diff options
| author | 2008-06-02 20:25:27 +0000 | |
|---|---|---|
| committer | 2008-06-02 20:25:27 +0000 | |
| commit | e58588fa6a41bd91bddf8c5fac5b44dcc6205de1 (patch) | |
| tree | 3ad51ac070945b2ea846d6c9fa3237d51b1d4084 | |
| parent | reverted taskbar (diff) | |
| download | KVIrc-e58588fa6a41bd91bddf8c5fac5b44dcc6205de1.tar.gz KVIrc-e58588fa6a41bd91bddf8c5fac5b44dcc6205de1.tar.bz2 KVIrc-e58588fa6a41bd91bddf8c5fac5b44dcc6205de1.zip | |
fixed compilation warnings
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@1894 17fca916-40b9-46aa-a4ea-0a15b648b75c
| -rw-r--r-- | src/kvirc/kernel/kvi_ircconnection.cpp | 50 | ||||
| -rwxr-xr-x | src/modules/help/index.cpp | 140 | ||||
| -rw-r--r-- | src/modules/list/listwindow.cpp | 32 | ||||
| -rw-r--r-- | src/modules/objects/libkviobjects.cpp | 66 | ||||
| -rw-r--r-- | src/modules/socketspy/socketspywindow.cpp | 8 |
5 files changed, 148 insertions, 148 deletions
diff --git a/src/kvirc/kernel/kvi_ircconnection.cpp b/src/kvirc/kernel/kvi_ircconnection.cpp index f92c53e47..55c342d53 100644 --- a/src/kvirc/kernel/kvi_ircconnection.cpp +++ b/src/kvirc/kernel/kvi_ircconnection.cpp @@ -280,7 +280,7 @@ void KviIrcConnection::start() void KviIrcConnection::linkEstabilished() { m_eState = Connected; - + // setup reasonable defaults before notifying anyone m_pStatistics->setConnectionStartTime(kvi_unixTime()); m_pStatistics->setLastMessageTime(kvi_unixTime()); @@ -307,19 +307,19 @@ void KviIrcConnection::linkTerminated() m_bIdentdAttached=false; } m_eState = Idle; - + if(m_pNotifyListManager) { delete m_pNotifyListManager; m_pNotifyListManager = 0; } - + if(m_pLagMeter) { delete m_pLagMeter; m_pLagMeter = 0; } - + if(KviPointerList<KviIrcDataStreamMonitor> * l = context()->monitorList()) { for(KviIrcDataStreamMonitor *m =l->first();m;m =l->next()) @@ -614,7 +614,7 @@ void KviIrcConnection::delayedStartNotifyList() void KviIrcConnection::endOfMotdReceived() { - // if the timer is still there running then just + // if the timer is still there running then just if(m_pNotifyListTimer)restartNotifyList(); } @@ -703,7 +703,7 @@ void KviIrcConnection::resolveLocalHost() m_pConsole->output(KVI_OUT_SYSTEMMESSAGE,__tr2qs("Local host address is %Q"), &(m_pUserInfo->localHostIp())); } - + // For now this is the only we know m_pUserInfo->setHostName(m_pUserInfo->localHostIp()); m_pUserInfo->setHostIp(m_pUserInfo->localHostIp()); @@ -735,7 +735,7 @@ void KviIrcConnection::userInfoReceived(const QString &szUserName,const QString if(szHostName.isEmpty())return; // nothing to do anyway if(KviQString::equalCS(m_pUserInfo->hostName(),szHostName))return; // again nothing to do - + static bool warned_once = false; if(!warned_once) @@ -792,17 +792,17 @@ void KviIrcConnection::userInfoReceived(const QString &szUserName,const QString if(!_OUTPUT_MUTE) m_pConsole->output(KVI_OUT_SYSTEMMESSAGE,__tr2qs("The local IP address as seen by the IRC server is %Q"),&szHostName); m_pUserInfo->setHostIp(szHostName); - } else + } else #ifdef COMPILE_IPV6_SUPPORT if(KviNetUtils::isValidStringIp(szUnmaskedHost) || KviNetUtils::isValidStringIp_V6(szUnmaskedHost)) #else if(KviNetUtils::isValidStringIp(szUnmaskedHost)) -#endif +#endif { if(!_OUTPUT_MUTE) m_pConsole->output(KVI_OUT_SYSTEMMESSAGE,__tr2qs("The local IP address as seen by the IRC server is %Q"),&szUnmaskedHost); m_pUserInfo->setHostIp(szUnmaskedHost); - + } else { // look it up too if(m_pLocalhostDns)delete m_pLocalhostDns; // it could be only another local host lookup @@ -935,7 +935,7 @@ void KviIrcConnection::loginToIrcServer() m_pUserInfo->setRealName(KVI_OPTION_STRING(KviOption_stringRealname)); } } - + // FIXME: The server's encoding! setupTextCodec(); KviQCString szNick = encodeText(m_pUserInfo->nickName()); // never empty @@ -971,14 +971,14 @@ void KviIrcConnection::loginToIrcServer() return; } } - - + + if(!sendFmtData("NICK %s",szNick.data())) { // disconnected :( return; } - + QString szGenderTag; if(KVI_OPTION_BOOL(KviOption_boolPrependGenderInfoToRealname) && !KVI_OPTION_STRING(KviOption_stringCtcpUserInfoGender).isEmpty()) { @@ -1018,7 +1018,7 @@ void KviIrcConnection::loginToIrcServer() } } } // else buuug - + if(KVI_OPTION_STRING(KviOption_stringCtcpUserInfoGender).startsWith("m",Qt::CaseInsensitive)){ e->setGender(KviIrcUserEntry::Male); } else if(KVI_OPTION_STRING(KviOption_stringCtcpUserInfoGender).startsWith("f",Qt::CaseInsensitive)){ @@ -1107,10 +1107,10 @@ void KviIrcConnection::loginComplete(const QString &szNickName) } g_pApp->addRecentNickname(szNickName); - + bool bHaltOutput = false; bHaltOutput = KVS_TRIGGER_EVENT_0_HALTED(KviEvent_OnIrc,m_pConsole); - + if(!bHaltOutput) m_pConsole->outputNoFmt(KVI_OUT_IRC,__tr2qs("Login operations complete, happy ircing!")); @@ -1165,20 +1165,20 @@ void KviIrcConnection::loginComplete(const QString &szNickName) // join saved channels QString szChannels,szProtectedChannels,szPasswords,szCurPass,szCurChan; - + if(!(m_pStateData->commandToExecAfterConnect().isEmpty())) { KviStr tmp = m_pStateData->commandToExecAfterConnect(); KviKvsScript::run(tmp.ptr(),m_pConsole); } - + if(target()->server()->m_pReconnectInfo) { if(!target()->server()->m_pReconnectInfo->m_szJoinChannels.isEmpty()) sendFmtData("JOIN %s",encodeText(target()->server()->m_pReconnectInfo->m_szJoinChannels).data()); KviQuery * query; - + for(QStringList::Iterator it = target()->server()->m_pReconnectInfo->m_szOpenQueryes.begin(); it != target()->server()->m_pReconnectInfo->m_szOpenQueryes.end();it++) { @@ -1215,7 +1215,7 @@ void KviIrcConnection::loginComplete(const QString &szNickName) if(l->count()!=0) { for ( QStringList::Iterator it = l->begin(); it != l->end(); ++it ) { - + szCurPass=(*it).section(':',1); if(szCurPass.isEmpty()) { @@ -1237,7 +1237,7 @@ void KviIrcConnection::loginComplete(const QString &szNickName) szPasswords.append(szCurPass); } } - } + } } if(server()->autoJoinChannelList()) @@ -1272,7 +1272,7 @@ void KviIrcConnection::loginComplete(const QString &szNickName) } } } - + QString szCommand; if( (!szChannels.isEmpty()) || (!szProtectedChannels.isEmpty()) ) { @@ -1282,7 +1282,7 @@ void KviIrcConnection::loginComplete(const QString &szNickName) szCommand.append(szChannels); szCommand.append(" "); szCommand.append(szPasswords); - + sendFmtData("JOIN %s",encodeText(szCommand).data()); } } @@ -1343,7 +1343,7 @@ void KviIrcConnection::heartbeat(kvi_time_t tNow) console()->output(KVI_OUT_VERBOSE,__tr2qs("Updating away state for channel %Q"),&szChanName); if(lagMeter()) { - KviStr tmp(KviStr::Format,"WHO %s",pOldest->objectName().toLatin1()); + KviStr tmp(KviStr::Format,"WHO %s",pOldest->objectName().toLatin1().data()); lagMeter()->lagCheckRegister(tmp.ptr(),70); } pOldest->setSentSyncWhoRequest(); diff --git a/src/modules/help/index.cpp b/src/modules/help/index.cpp index 9953c35ea..a7648b8f5 100755 --- a/src/modules/help/index.cpp +++ b/src/modules/help/index.cpp @@ -131,7 +131,7 @@ void Index::insertInDict( const QString &str, int docNum ) if (KviQString::equalCI( str, "amp" ) || KviQString::equalCI( str, "nbsp" ) ) return; Entry *e = 0; if ( dict.count() ) e = dict[ str ]; - + if ( e ) { if ( e->documents.first().docNumber != docNum ) e->documents.prepend( Document( docNum, 1 ) ); @@ -173,12 +173,12 @@ void Index::parseDocument( const QString &filename, int docNum ) c = buf[++j]; continue; } - + if ( !valid ) { c = buf[++j]; continue; } - + if ( ( c.isLetterOrNumber() || c == '_' ) && i < 63 ) { str[i] = c.toLower(); ++i; @@ -186,7 +186,7 @@ void Index::parseDocument( const QString &filename, int docNum ) if ( i > 1 ) insertInDict( QString(str,i), docNum ); i = 0; } - + c = buf[++j]; } @@ -199,15 +199,15 @@ void Index::writeDict() KviPointerHashTableIterator<QString,Entry> it( dict ); KviFile f( dictFile ); if ( !f.openForWriting() ) return; - + QDataStream s( &f ); - + for( ; it.current(); ++it ) { Entry *e = it.current(); s << it.currentKey(); s << e->documents; } - + f.close(); writeDocumentList(); } @@ -219,7 +219,7 @@ void Index::writeDocumentList() QTextStream s( &f ); QString docs = docList.join("[#item#]"); s << docs; - + KviFile f1( docListFile+".titles" ); if ( !f1.openForWriting() ) return; QTextStream s1( &f1 ); @@ -251,7 +251,7 @@ void Index::readDocumentList() if ( !f.openForReading() ) return; QTextStream s( &f ); docList = s.readAll().split("[#item#]",QString::SkipEmptyParts,Qt::CaseInsensitive); - + //reading titles KviFile f1( docListFile+".titles" ); if ( !f1.openForReading() ) return; @@ -264,7 +264,7 @@ QStringList Index::query( const QStringList &terms, const QStringList &termSeq, { TermList termList; QStringList::ConstIterator it = terms.begin(); - + for ( it = terms.begin(); it != terms.end(); ++it ) { Entry *e = 0; if ( (*it).contains( '*' ) ) { @@ -275,29 +275,29 @@ QStringList Index::query( const QStringList &terms, const QStringList &termSeq, termList.append( new Term( *it, e->documents.count(), e->documents ) ); } else return QStringList(); } - + termList.sort(); - + Term *minTerm = termList.first(); - + if ( !termList.count() ) return QStringList(); - + termList.removeFirst(); - + KviValueList<Document> minDocs = minTerm->documents; KviValueList<Document>::iterator C; KviValueList<Document>::ConstIterator It; - + Term *t = termList.first(); for ( ; t; t = termList.next() ) { - + KviValueList<Document> docs = t->documents; - + C = minDocs.begin(); - + while ( C != minDocs.end() ) { bool found = FALSE; - + for ( It = docs.begin(); It != docs.end(); ++It ) { if ( (*C).docNumber == (*It).docNumber ) { (*C).frequency += (*It).frequency; @@ -305,28 +305,28 @@ QStringList Index::query( const QStringList &terms, const QStringList &termSeq, break; } } - + if ( !found ) C = minDocs.erase( C ); else ++C; } } - + QStringList results; if ( termSeq.isEmpty() ) { for ( C = minDocs.begin(); C != minDocs.end(); ++C ) results << docList[ (int)(*C).docNumber ]; - + return results; } - + QString fileName; for ( C = minDocs.begin(); C != minDocs.end(); ++C ) { fileName = docList[ (int)(*C).docNumber ]; - + if ( searchForPattern( termSeq, seqWords, fileName ) ) results << fileName; } - + return results; } @@ -338,15 +338,15 @@ QString Index::getDocumentTitle( const QString &fileName ) qWarning( warn.toUtf8().data() ); return fileName; } - + QTextStream s( &file ); QString text = s.readAll(); - + int start = text.indexOf( "<title>", 0, Qt::CaseInsensitive ) + 7; int end = text.indexOf( "</title>", 0, Qt::CaseInsensitive); - + QString title = ( end - start <= 0 ? tr("Untitled") : text.mid( start, end - start ) ); - + return title; } @@ -355,36 +355,36 @@ QStringList Index::getWildcardTerms( const QString &term ) QStringList lst; QStringList terms = split( term ); QStringList::Iterator iter; - + KviPointerHashTableIterator<QString,Entry> it( dict ); for( ; it.current(); ++it ) { int index = 0; bool found = FALSE; QString text( it.currentKey() ); - + for ( iter = terms.begin(); iter != terms.end(); ++iter ) { if ( *iter == "*" ) { found = TRUE; continue; } - + if ( iter == terms.begin() && (*iter)[0] != text[0] ) { found = FALSE; break; } - + index = text.indexOf( *iter, index,Qt::CaseInsensitive ); - + if ( *iter == terms.last() && index != (int)text.length()-1 ) { index = text.lastIndexOf( *iter,-1,Qt::CaseInsensitive ); - + if ( index != (int)text.length() - (int)(*iter).length() ) { found = FALSE; break; } - + } - + if ( index != -1 ) { found = TRUE; index += (*iter).length(); @@ -394,10 +394,10 @@ QStringList Index::getWildcardTerms( const QString &term ) break; } } - + if ( found ) lst << text; } - + return lst; } @@ -406,22 +406,22 @@ QStringList Index::split( const QString &str ) QStringList lst; int j = 0; int i = str.indexOf( '*', j ); - + while ( i != -1 ) { if ( i > j && i <= (int)str.length() ) { lst << str.mid( j, i - j ); lst << "*"; } - + j = i + 1; i = str.indexOf( '*', j ); } - + int l = str.length() - 1; - + if ( str.mid( j, l - j + 1 ).length() > 0 ) lst << str.mid( j, l - j + 1 ); - + return lst; } @@ -429,26 +429,26 @@ KviValueList<Document> Index::setupDummyTerm( const QStringList &terms ) { TermList termList; QStringList::ConstIterator it = terms.begin(); - + for ( ; it != terms.end(); ++it ) { Entry *e = 0; if ( dict[ *it ] ) { e = dict[ *it ]; termList.append( new Term( *it, e->documents.count(), e->documents ) ); } - + } - + termList.sort(); - + KviValueList<Document> maxList; if ( !termList.count() ) return maxList; - + maxList = termList.last()->documents; termList.removeLast(); - + KviValueList<Document>::iterator docIt; - + Term *t = termList.first(); while ( t ) { KviValueList<Document> docs = t->documents; @@ -458,7 +458,7 @@ KviValueList<Document> Index::setupDummyTerm( const QStringList &terms ) } t = termList.next(); } - + return maxList; } @@ -471,21 +471,21 @@ void Index::buildMiniDict( const QString &str ) bool Index::searchForPattern( const QStringList &patterns, const QStringList &words, const QString &fileName ) { KviFile file( fileName ); - + if ( !file.openForReading() ) { QString warn = "cannot open file " + fileName; qWarning( warn.toUtf8().data() ); return FALSE; } else debug("Open file %s",fileName.utf8().data()); - debug("Patterns %s and words %s",patterns.join(","),words.join(",")); + debug("Patterns %s and words %s",patterns.join(",").utf8().data(),words.join(",").utf8().data()); wordNum = 3; miniDict.clear(); - + QStringList::ConstIterator cIt = words.begin(); for ( ; cIt != words.end(); ++cIt ) miniDict.insert( *cIt, new PosEntry( 0 ) ); - + QTextStream s( &file ); QString text = s.readAll(); bool valid = TRUE; @@ -502,18 +502,18 @@ bool Index::searchForPattern( const QStringList &patterns, const QStringList &wo c = buf[++j]; continue; } - + if ( ( c == '>' || c == ';' ) && !valid ) { valid = TRUE; c = buf[++j]; continue; } - + if ( !valid ) { c = buf[++j]; continue; } - + if ( ( c.isLetterOrNumber() || c == '_' ) && i < 63 ) { str[i] = c.toLower(); ++i; @@ -521,29 +521,29 @@ bool Index::searchForPattern( const QStringList &patterns, const QStringList &wo if ( i > 1 ) buildMiniDict( QString(str,i) ); i = 0; } - + c = buf[++j]; } - + if ( i > 1 ) buildMiniDict( QString(str,i) ); - + file.close(); - + QStringList::ConstIterator patIt = patterns.begin(); QStringList wordLst; - + KviValueList<uint> a, b; KviValueList<uint>::iterator aIt; - + for ( ; patIt != patterns.end(); ++patIt ) { QString tmp=*patIt; wordLst = tmp.split( ' '); a = miniDict[ wordLst[0] ]->positions; - + for ( int j = 1; j < (int)wordLst.count(); ++j ) { b = miniDict[ wordLst[j] ]->positions; aIt = a.begin(); - + while ( aIt != a.end() ) { if ( b.find( *aIt + 1 ) != b.end() ) { (*aIt)++; @@ -554,9 +554,9 @@ bool Index::searchForPattern( const QStringList &patterns, const QStringList &wo } } } - + if ( a.count() ) return TRUE; - + return FALSE; } diff --git a/src/modules/list/listwindow.cpp b/src/modules/list/listwindow.cpp index ea6db1bb5..86ac371a8 100644 --- a/src/modules/list/listwindow.cpp +++ b/src/modules/list/listwindow.cpp @@ -106,7 +106,7 @@ int KviChannelTreeWidgetItem::width ( const QFontMetrics & fm, const KviTalTreeW #define KVI_LABEL_DEF_BACK 100 #define KVI_LABEL_DEF_FORE 101 -void KviChannelTreeWidgetItemDelegate::paint( QPainter * p, const QStyleOptionViewItem & option, const QModelIndex & index ) const
+void KviChannelTreeWidgetItemDelegate::paint( QPainter * p, const QStyleOptionViewItem & option, const QModelIndex & index ) const { QString szText; QPalette cg; @@ -129,7 +129,7 @@ void KviChannelTreeWidgetItemDelegate::paint( QPainter * p, const QStyleOptionVi if ((option.state & QStyle::State_Selected) && (index.column() == 0 || lv->allColumnsShowFocus()) ) { p->fillRect( r - marg, 0, width - r + marg, option.rect.height(), cg.brush( QPalette::Highlight ) ); - + if ( (option.state & QStyle::State_Enabled) || !lv ) p->setPen( cg.highlightedText().color() ); else if ( !(option.state & QStyle::State_Enabled) && lv) @@ -143,7 +143,7 @@ void KviChannelTreeWidgetItemDelegate::paint( QPainter * p, const QStyleOptionVi //p->setPen( lv->palette().disabled().text() ); p->setPen(lv->palette().text().color()); } - + KviTopicWidget::paintColoredText(p,szText,cg,option.rect); } @@ -188,18 +188,18 @@ KviListWindow::KviListWindow(KviFrame * lpFrm,KviConsole * lpConsole) box->setMargin(0); m_pOpenButton = new KviStyledToolButton(box); m_pOpenButton->setIcon(QIcon(*(g_pIconManager->getBigIcon(KVI_BIGICON_OPEN)))); - connect(m_pOpenButton,SIGNAL(clicked()),this,SLOT(importList())); + connect(m_pOpenButton,SIGNAL(clicked()),this,SLOT(importList())); m_pSaveButton = new KviStyledToolButton(box); m_pSaveButton->setIcon(QIcon(*(g_pIconManager->getBigIcon(KVI_BIGICON_SAVE)))); - connect(m_pSaveButton,SIGNAL(clicked()),this,SLOT(exportList())); + connect(m_pSaveButton,SIGNAL(clicked()),this,SLOT(exportList())); m_pRequestButton = new KviStyledToolButton(box,"request_button"); m_pRequestButton->setIconSize(QSize(16,16)); m_pRequestButton->setIcon(QIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_LIST)))); - connect(m_pRequestButton,SIGNAL(clicked()),this,SLOT(requestList())); + connect(m_pRequestButton,SIGNAL(clicked()),this,SLOT(requestList())); KviTalToolTip::add(m_pRequestButton,__tr2qs("Request List")); - + m_pStopListDownloadButton = new KviStyledToolButton(box,"stoplistdownload_button"); m_pStopListDownloadButton->setIconSize(QSize(16,16)); m_pStopListDownloadButton->setIcon(QIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_NICKNAMEPROBLEM)))); @@ -238,7 +238,7 @@ KviListWindow::KviListWindow(KviFrame * lpFrm,KviConsole * lpConsole) this,SLOT(connectionStateChange())); connectionStateChange(); - + } KviListWindow::~KviListWindow() @@ -321,15 +321,15 @@ void KviListWindow::fillCaptionBuffers() KviQString::sprintf(m_szHtmlActiveCaption, __tr2qs("<nobr><font color=\"%s\"><b>Channel List</b></font> " \ "<font color=\"%s\">[IRC Context %u]</font></nobr>"), - KVI_OPTION_COLOR(KviOption_colorCaptionTextActive).name().toAscii(), - KVI_OPTION_COLOR(KviOption_colorCaptionTextActive2).name().toAscii(), + KVI_OPTION_COLOR(KviOption_colorCaptionTextActive).name().toAscii().data(), + KVI_OPTION_COLOR(KviOption_colorCaptionTextActive2).name().toAscii().data(), m_pConsole->ircContextId()); KviQString::sprintf(m_szHtmlInactiveCaption, __tr2qs("<nobr><font color=\"%s\"><b>Channel list</b></font> " \ "<font color=\"%s\">[IRC Context %u]</font></nobr>"), - KVI_OPTION_COLOR(KviOption_colorCaptionTextInactive).name().toAscii(), - KVI_OPTION_COLOR(KviOption_colorCaptionTextInactive2).name().toAscii(), + KVI_OPTION_COLOR(KviOption_colorCaptionTextInactive).name().toAscii().data(), + KVI_OPTION_COLOR(KviOption_colorCaptionTextInactive2).name().toAscii().data(), m_pConsole->ircContextId()); } @@ -345,7 +345,7 @@ void KviListWindow::exportList() KviMessageBox::warning(__tr2qs("You cannot export an empty list")); return; } - + QString szFile; if(connection()) { @@ -364,7 +364,7 @@ void KviListWindow::exportList() KviConfig cfg(szFile,KviConfig::Write); cfg.clear(); //KviTalTreeWidgetItemIterator it(m_pTreeWidget); - + //while(it.current()) KviChannelTreeWidgetItem *it; for (int i=0;i<m_pTreeWidget->topLevelItemCount();i++) @@ -383,7 +383,7 @@ void KviListWindow::exportList() void KviListWindow::importList() { - + QString szFile; if(KviFileDialog::askForOpenFileName(szFile,__tr2qs("Choose filename"),QString::null,KVI_FILTER_CONFIG,false, false,this)) @@ -401,7 +401,7 @@ void KviListWindow::importList() while(it.current()) { cfg.setGroup(it.currentKey()); - m_pItemList->append( + m_pItemList->append( new KviChannelTreeWidgetItemData( it.currentKey(), cfg.readQStringEntry("users","0"), diff --git a/src/modules/objects/libkviobjects.cpp b/src/modules/objects/libkviobjects.cpp index 60801d6cd..fa3b9750f 100644 --- a/src/modules/objects/libkviobjects.cpp +++ b/src/modules/objects/libkviobjects.cpp @@ -118,7 +118,7 @@ static bool objects_module_cleanup(KviModule *m) KviKvsObject_vbox::unregisterSelf(); KviKvsObject_label::unregisterSelf(); KviKvsObject_buttongroup::unregisterSelf(); - KviKvsObject_groupbox::unregisterSelf(); + KviKvsObject_groupbox::unregisterSelf(); KviKvsObject_dialog::unregisterSelf(); KviKvsObject_checkbox::unregisterSelf(); KviKvsObject_textbrowser::unregisterSelf(); @@ -231,7 +231,7 @@ static bool objects_kvs_cmd_connect(KviKvsModuleCommandCall * c) [cmd]class[/cmd], [cmd]object.disconnect[/cmd], [doc:objects]objects documentation[/doc] */ - + KviKvsObject *obSrc; KviKvsObject *obTrg; QString szSignal,szSlot; @@ -322,7 +322,7 @@ static bool objects_kvs_fnc_instances(KviKvsModuleFunctionCall * c) @seealso: [doc:objects]objects documentation[/doc] */ - + QString szClassName; QString szFlags; KVSM_PARAMETERS_BEGIN(c) @@ -380,7 +380,7 @@ static bool objects_kvs_fnc_instances(KviKvsModuleFunctionCall * c) @syntax: <hash> objects.variables(<hobject>) @description: - Returns an hash with the object's variables(useful only for debugging). + Returns an hash with the object's variables(useful only for debugging). @seealso: [doc:objects]objects documentation[/doc] */ @@ -406,7 +406,7 @@ static bool objects_kvs_fnc_variables(KviKvsModuleFunctionCall * c) } return true; - + } /* @@ -420,7 +420,7 @@ static bool objects_kvs_fnc_variables(KviKvsModuleFunctionCall * c) @syntax: <hash> objects.classAllHandlers(<class name:string>) @description: - Returns an hash with the class's functions(useful only for debugging). + Returns an hash with the class's functions(useful only for debugging). @seealso: [doc:objects]objects documentation[/doc] */ @@ -455,7 +455,7 @@ static bool objects_kvs_fnc_classAllHandlers(KviKvsModuleFunctionCall * c) static bool objects_kvs_fnc_classes(KviKvsModuleFunctionCall * c) { - + /* @doc: objects.classes @title: @@ -467,11 +467,11 @@ static bool objects_kvs_fnc_classes(KviKvsModuleFunctionCall * c) @syntax: <array> $object.classes() @description: - Returns an array with the user defined classes. + Returns an array with the user defined classes. @seealso: [doc:objects]objects documentation[/doc] */ - + KviKvsArray * pArry = new KviKvsArray(); c->returnValue()->setArray(pArry); int uIdx=0; @@ -492,8 +492,8 @@ static bool objects_kvs_fnc_classes(KviKvsModuleFunctionCall * c) for(QStringList::Iterator it2 = sl.begin();it2 != sl.end();++it2) { QString szName=*it2; - szName.replace("--","::"); - if (szName!=".." && szName!=".") classdict->insert(szName.left(szName.length()-4),&bFake); + szName.replace("--","::"); + if (szName!=".." && szName!=".") classdict->insert(szName.left(szName.length()-4),&bFake); } KviKvsArray* pArray = new KviKvsArray(); c->returnValue()->setArray(pArray); @@ -531,7 +531,7 @@ static bool objects_kvs_cmd_disconnect(KviKvsModuleCommandCall * c) [cmd]class[/cmd], [cmd]objects.connect[/cmd], [doc:objects]objects documentation[/doc] */ - + KviKvsObject *obSrc; @@ -579,7 +579,7 @@ static bool objects_kvs_cmd_bitBlt(KviKvsModuleCommandCall * c) @description: Copies a block of pixels from <source> to <destination> at the coordinates <x>,<y> .[br] Source and destination must be a widget or pixmap.[br] - + */ KviKvsObject *obSrc; @@ -611,7 +611,7 @@ static bool objects_kvs_cmd_bitBlt(KviKvsModuleCommandCall * c) QImage * imgSource=0; QPaintDevice * pdSource = 0; - + if(obSrc->inherits("KviKvsObject_pixmap")) pdSource =((KviKvsObject_pixmap *)obSrc)->getPixmap(); else if (obSrc->inherits("KviKvsObject_widget")) pdSource=((KviKvsObject_widget *)obSrc)->widget(); if (!pdSource) @@ -653,13 +653,13 @@ static bool objects_kvs_cmd_bitBlt(KviKvsModuleCommandCall * c) @short: Blends two images to a destination. @syntax: - objects.blend <background: image hobject> <x_offset_bkg:unsigned integer> <y_offset_bkg:unsigned integer> - <foreground: image hobject> <x_offset_fgr:unsigned integer> <y_offset_fgr:unsigned integer> + objects.blend <background: image hobject> <x_offset_bkg:unsigned integer> <y_offset_bkg:unsigned integer> + <foreground: image hobject> <x_offset_fgr:unsigned integer> <y_offset_fgr:unsigned integer> <destination: image, pixmap. widget hobject> <x_offset_dest:unsigned integer> <y_offset_dest:unsigned integer> <width:unsigned integer> <height:unsigned integer> <blend_factor> @description: Blends two images <background> and <foreground> and copy the result to <destination> at the coordinates <x_offset>,<y_offset> with a <blend_factor> value .[br] Destination must be a widget or pixmap.[br] - + */ static bool objects_kvs_cmd_blend(KviKvsModuleCommandCall * c) @@ -691,12 +691,12 @@ static bool objects_kvs_cmd_blend(KviKvsModuleCommandCall * c) KVSO_PARAMETER("blend_value",KVS_PT_REAL,0,dBlend) - + KVSO_PARAMETERS_END(c) obFor=KviKvsKernel::instance()->objectController()->lookupObject(hFo); - + obBck=KviKvsKernel::instance()->objectController()->lookupObject(hBk); obDest=KviKvsKernel::instance()->objectController()->lookupObject(hDest); @@ -715,7 +715,7 @@ static bool objects_kvs_cmd_blend(KviKvsModuleCommandCall * c) QPaintDevice * pdDest = 0; if(obDest->inherits("KviKvsObject_pixmap")) pdDest = ((KviKvsObject_pixmap *)obDest)->getPixmap(); else if (obDest->inherits("KviKvsObject_widget")) pdDest=((KviKvsObject_widget *)obDest)->widget(); - + if (!pdDest) { c->warning(__tr2qs("Widget or Pixmap required ")); @@ -754,8 +754,8 @@ static bool objects_kvs_cmd_blend(KviKvsModuleCommandCall * c) int a=0; while(dst < end) { - - + + *dst = qRgba( (int)((qRed(*bkg) * dRemaining) + (qRed(*fgn) * dBlend)), (int)((qGreen(*bkg) * dRemaining) + (qGreen(*fgn) * dBlend)), @@ -767,7 +767,7 @@ static bool objects_kvs_cmd_blend(KviKvsModuleCommandCall * c) bkg++; fgn++; } - + } QPainter p(pdDest); @@ -789,14 +789,14 @@ static bool objects_kvs_fnc_listObjects(KviKvsModuleFunctionCall * cmd) @title: $objects.dump @keyterms: - dump objects + dump objects @short: Dump the kvirc widgets. @syntax: $objects.dump(<flag b>) @description: This function returns the tree of the widgets of the kvirc, if the flag <b> is planned to 1,[br] - will return it on the currente window, if it' is planned to 0 instead it will return it as a string.[br] + will return it on the currente window, if it' is planned to 0 instead it will return it as a string.[br] ES: %A[]=$str.split("\|",$objects.dump(0)) %i=0 @@ -814,7 +814,7 @@ static bool objects_kvs_fnc_listObjects(KviKvsModuleFunctionCall * cmd) KVSO_PARAMETERS_END(cmd) if (bFlag) cmd->window()->output(80, "Objects dump:"); QWidgetList list = g_pApp->topLevelWidgets(); - + KviStr spacing = ">"; QString szTemp; KviKvsArray * n = new KviKvsArray(); @@ -827,7 +827,7 @@ static bool objects_kvs_fnc_listObjects(KviKvsModuleFunctionCall * cmd) { cmd->window()->output(80, "Ptr %u: top level object: %c%s%c, class %s, %s, rect = %d, %d, %d, %d", list.at(i), - KVI_TEXT_BOLD, list.at(i)->objectName(), KVI_TEXT_BOLD, + KVI_TEXT_BOLD, list.at(i)->objectName().data(), KVI_TEXT_BOLD, list.at(i)->metaObject()->className(), list.at(i)->isVisible() ? "visible" : "hidden", list.at(i)->x(), list.at(i)->y(), list.at(i)->width(), list.at(i)->height()); @@ -842,9 +842,9 @@ static bool objects_kvs_fnc_listObjects(KviKvsModuleFunctionCall * cmd) debug ("string %s",szTemp.latin1()); debug ("class %s",szClass.latin1()); debug ("Obj %s",szObj.latin1()); - + idx++; - + dumpChildObjects(cmd->window(), list.at(i), spacing.ptr(), bFlag,n,idx); } //++it; @@ -868,7 +868,7 @@ static void dumpChildObjects(KviWindow *pWnd, QObject *parent, const char *spaci { pWnd->output(80, "%sPtr %u: object: %c%s%c, class %s", spacing, list.at(i), KVI_TEXT_BOLD, - list.at(i)->objectName(), KVI_TEXT_BOLD, list.at(i)->metaObject()->className() + list.at(i)->objectName().data(), KVI_TEXT_BOLD, list.at(i)->metaObject()->className() ); } QString szClass=list.at(i)->metaObject()->className(); @@ -902,7 +902,7 @@ static bool objects_module_init(KviModule * m) KVSM_REGISTER_FUNCTION(m,"dump",objects_kvs_fnc_listObjects); KVSM_REGISTER_FUNCTION(m,"variables",objects_kvs_fnc_variables); KVSM_REGISTER_FUNCTION(m,"classAllHandlers",objects_kvs_fnc_classAllHandlers); - + // commands KVSM_REGISTER_SIMPLE_COMMAND(m,"connect",objects_kvs_cmd_connect); KVSM_REGISTER_SIMPLE_COMMAND(m,"disconnect",objects_kvs_cmd_disconnect); @@ -930,7 +930,7 @@ static bool objects_module_init(KviModule * m) KviKvsObject_lineedit::registerSelf(); KviKvsObject_menubar::registerSelf(); KviKvsObject_workspace::registerSelf(); - + KviKvsObject_combobox::registerSelf(); @@ -958,7 +958,7 @@ static bool objects_module_init(KviModule * m) KviKvsObject_socket::registerSelf(); KviKvsObject_process::registerSelf(); - + return true; } diff --git a/src/modules/socketspy/socketspywindow.cpp b/src/modules/socketspy/socketspywindow.cpp index 5dc10b53a..89a230180 100644 --- a/src/modules/socketspy/socketspywindow.cpp +++ b/src/modules/socketspy/socketspywindow.cpp @@ -82,15 +82,15 @@ void KviSocketSpyWindow::fillCaptionBuffers() KviQString::sprintf(m_szHtmlActiveCaption, __tr2qs("<nobr><font color=\"%s\"><b>Socket Spy</b></font> " \ "<font color=\"%s\">[IRC Context %u]</font></nobr>"), - KVI_OPTION_COLOR(KviOption_colorCaptionTextActive).name().toAscii(), - KVI_OPTION_COLOR(KviOption_colorCaptionTextActive2).name().toAscii(), + KVI_OPTION_COLOR(KviOption_colorCaptionTextActive).name().toAscii().data(), + KVI_OPTION_COLOR(KviOption_colorCaptionTextActive2).name().toAscii().data(), m_pConsole->ircContextId()); KviQString::sprintf(m_szHtmlInactiveCaption, __tr2qs("<nobr><font color=\"%s\"><b>Socket Spy</b></font> " \ "<font color=\"%s\">[IRC Context %u]</font></nobr>"), - KVI_OPTION_COLOR(KviOption_colorCaptionTextInactive).name().toAscii(), - KVI_OPTION_COLOR(KviOption_colorCaptionTextInactive2).name().toAscii(), + KVI_OPTION_COLOR(KviOption_colorCaptionTextInactive).name().toAscii().data(), + KVI_OPTION_COLOR(KviOption_colorCaptionTextInactive2).name().toAscii().data(), m_pConsole->ircContextId()); } |
