diff options
Diffstat (limited to 'kopete/plugins/history')
-rw-r--r-- | kopete/plugins/history/converter.cpp | 62 | ||||
-rw-r--r-- | kopete/plugins/history/historydialog.cpp | 96 | ||||
-rw-r--r-- | kopete/plugins/history/historydialog.h | 3 | ||||
-rw-r--r-- | kopete/plugins/history/historyguiclient.cpp | 8 | ||||
-rw-r--r-- | kopete/plugins/history/historyguiclient.h | 3 | ||||
-rw-r--r-- | kopete/plugins/history/historylogger.cpp | 112 | ||||
-rw-r--r-- | kopete/plugins/history/historylogger.h | 7 | ||||
-rw-r--r-- | kopete/plugins/history/historyplugin.cpp | 14 | ||||
-rw-r--r-- | kopete/plugins/history/historyplugin.h | 3 | ||||
-rw-r--r-- | kopete/plugins/history/historypreferences.cpp | 4 | ||||
-rw-r--r-- | kopete/plugins/history/historypreferences.h | 3 | ||||
-rw-r--r-- | kopete/plugins/history/historyprefsui.ui | 16 | ||||
-rw-r--r-- | kopete/plugins/history/historyviewer.ui | 58 |
13 files changed, 197 insertions, 192 deletions
diff --git a/kopete/plugins/history/converter.cpp b/kopete/plugins/history/converter.cpp index d2e4839d..5a84e021 100644 --- a/kopete/plugins/history/converter.cpp +++ b/kopete/plugins/history/converter.cpp @@ -40,17 +40,17 @@ void HistoryPlugin::convertOldHistory() i18n( "Would you like to remove old history files?" ) , i18n( "History Converter" ), KStdGuiItem::del(), i18n("Keep") ) == KMessageBox::Yes; KProgressDialog *progressDlg=new KProgressDialog(Kopete::UI::Global::mainWidget() , "history_progress_dlg" , i18n( "History converter" ) , - TQString::null , true); //modal to make sure the user will not doing stupid things (we have a kapp->processEvents()) + TQString() , true); //modal to make sure the user will not doing stupid things (we have a kapp->processEvents()) progressDlg->setAllowCancel(false); //because i am too lazy to allow to cancel - TQString kopetedir=locateLocal( "data", TQString::fromLatin1( "kopete")); + TQString kopetedir=locateLocal( "data", TQString::tqfromLatin1( "kopete")); TQDir d( kopetedir ); //d should point to ~/.kde/share/apps/kopete/ d.setFilter( TQDir::Dirs ); - const QFileInfoList *list = d.entryInfoList(); - QFileInfoListIterator it( *list ); + const TQFileInfoList *list = d.entryInfoList(); + TQFileInfoListIterator it( *list ); TQFileInfo *fi; while ( (fi = it.current()) != 0 ) { @@ -74,9 +74,9 @@ void HistoryPlugin::convertOldHistory() KGlobal::config()->setGroup("MSN"); accountId=KGlobal::config()->readEntry( "UserID" ); } - else if(fi->fileName() == "ICQProtocol" || fi->fileName() == "icq_logs" ) + else if(fi->fileName() == "ICTQProtocol" || fi->fileName() == "icq_logs" ) { - protocolId="ICQProtocol"; + protocolId="ICTQProtocol"; KGlobal::config()->setGroup("ICQ"); accountId=KGlobal::config()->readEntry( "UIN" ); } @@ -106,23 +106,23 @@ void HistoryPlugin::convertOldHistory() TQDir d2( fi->absFilePath() ); d2.setFilter( TQDir::Files ); d2.setNameFilter("*.log"); - const QFileInfoList *list = d2.entryInfoList(); - QFileInfoListIterator it2( *list ); + const TQFileInfoList *list = d2.entryInfoList(); + TQFileInfoListIterator it2( *list ); TQFileInfo *fi2; progressDlg->progressBar()->reset(); progressDlg->progressBar()->setTotalSteps(d2.count()); - progressDlg->setLabel(i18n("Parsing old history in %1").arg(fi->fileName())); + progressDlg->setLabel(i18n("Parsing old history in %1").tqarg(fi->fileName())); progressDlg->show(); //if it was not already showed... while ( (fi2 = it2.current()) != 0 ) { //we assume that all "-" are dots. (like in hotmail.com) - TQString contactId=fi2->fileName().replace(".log" , TQString::null).replace("-" , "."); + TQString contactId=fi2->fileName().tqreplace(".log" , TQString()).tqreplace("-" , "."); if(!contactId.isEmpty() ) { - progressDlg->setLabel(i18n("Parsing old history in %1:\n%2").arg(fi->fileName()).arg(contactId)); + progressDlg->setLabel(i18n("Parsing old history in %1:\n%2").tqarg(fi->fileName()).tqarg(contactId)); kapp->processEvents(0); //make sure the text is updated in the progressDlg int month=0; @@ -155,12 +155,12 @@ void HistoryPlugin::convertOldHistory() buffer += TQString::fromUtf8(cbuf); } - if( buffer.startsWith( TQString::fromLatin1( "<message " ) ) ) + if( buffer.startsWith( TQString::tqfromLatin1( "<message " ) ) ) { msgBlock = buffer; // find the end of the message block - while( !feof( f ) && buffer != TQString::fromLatin1( "</message>\n" ) /*strcmp("</message>\n", cbuf )*/ ) + while( !feof( f ) && buffer != TQString::tqfromLatin1( "</message>\n" ) /*strcmp("</message>\n", cbuf )*/ ) { fgets(cbuf, CBUFLENGTH, f); buffer = TQString::fromUtf8(cbuf); @@ -178,7 +178,7 @@ void HistoryPlugin::convertOldHistory() msgelement = xmllist.documentElement(); node = msgelement.firstChild(); - if( msgelement.attribute( TQString::fromLatin1( "direction" ) ) == TQString::fromLatin1( "inbound" ) ) + if( msgelement.attribute( TQString::tqfromLatin1( "direction" ) ) == TQString::tqfromLatin1( "inbound" ) ) dir = Kopete::Message::Inbound; else dir = Kopete::Message::Outbound; @@ -194,12 +194,12 @@ void HistoryPlugin::convertOldHistory() element = node.toElement(); tagname = element.tagName(); - if( tagname == TQString::fromLatin1( "srcnick" ) ) + if( tagname == TQString::tqfromLatin1( "srcnick" ) ) nick = element.text(); - else if( tagname == TQString::fromLatin1( "date" ) ) + else if( tagname == TQString::tqfromLatin1( "date" ) ) date = element.text(); - else if( tagname == TQString::fromLatin1( "body" ) ) + else if( tagname == TQString::tqfromLatin1( "body" ) ) body = element.text().stripWhiteSpace(); } @@ -213,11 +213,11 @@ void HistoryPlugin::convertOldHistory() if(!docElem.isNull()) { TQDate date(year,month,1); - TQString name = protocolId.replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ) + - TQString::fromLatin1( "/" ) + - contactId.replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ) + + TQString name = protocolId.tqreplace( TQRegExp( TQString::tqfromLatin1( "[./~?*]" ) ), TQString::tqfromLatin1( "-" ) ) + + TQString::tqfromLatin1( "/" ) + + contactId.tqreplace( TQRegExp( TQString::tqfromLatin1( "[./~?*]" ) ), TQString::tqfromLatin1( "-" ) ) + date.toString(".yyyyMM"); - KSaveFile file( locateLocal( "data", TQString::fromLatin1( "kopete/logs/" ) + name+ TQString::fromLatin1( ".xml" ) ) ); + KSaveFile file( locateLocal( "data", TQString::tqfromLatin1( "kopete/logs/" ) + name+ TQString::tqfromLatin1( ".xml" ) ) ); if( file.status() == 0 ) { TQTextStream *stream = file.textStream(); @@ -254,7 +254,7 @@ void HistoryPlugin::convertOldHistory() headElem.appendChild(contactElem); TQDomElement importElem = doc.createElement( "imported" ); importElem.setAttribute( "from", fi->fileName() ); - importElem.setAttribute( "date", TQDateTime::currentDateTime().toString() ); + importElem.setAttribute( "date", TQDateTime::tqcurrentDateTime().toString() ); headElem.appendChild(importElem); } TQDomElement msgElem = doc.createElement( "msg" ); @@ -275,11 +275,11 @@ void HistoryPlugin::convertOldHistory() if(!docElem.isNull()) { TQDate date(year,month,1); - TQString name = protocolId.replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ) + - TQString::fromLatin1( "/" ) + - contactId.replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ) + + TQString name = protocolId.tqreplace( TQRegExp( TQString::tqfromLatin1( "[./~?*]" ) ), TQString::tqfromLatin1( "-" ) ) + + TQString::tqfromLatin1( "/" ) + + contactId.tqreplace( TQRegExp( TQString::tqfromLatin1( "[./~?*]" ) ), TQString::tqfromLatin1( "-" ) ) + date.toString(".yyyyMM"); - KSaveFile file( locateLocal( "data", TQString::fromLatin1( "kopete/logs/" ) + name+ TQString::fromLatin1( ".xml" ) ) ); + KSaveFile file( locateLocal( "data", TQString::tqfromLatin1( "kopete/logs/" ) + name+ TQString::tqfromLatin1( ".xml" ) ) ); if( file.status() == 0 ) { TQTextStream *stream = file.textStream(); @@ -310,15 +310,15 @@ bool HistoryPlugin::detectOldHistory() return false; - TQDir d( locateLocal( "data", TQString::fromLatin1( "kopete/logs")) ); + TQDir d( locateLocal( "data", TQString::tqfromLatin1( "kopete/logs")) ); d.setFilter( TQDir::Dirs ); if(d.count() >= 3) // '.' and '..' are included return false; //the new history already exists - TQDir d2( locateLocal( "data", TQString::fromLatin1( "kopete")) ); + TQDir d2( locateLocal( "data", TQString::tqfromLatin1( "kopete")) ); d2.setFilter( TQDir::Dirs ); - const QFileInfoList *list = d2.entryInfoList(); - QFileInfoListIterator it( *list ); + const TQFileInfoList *list = d2.entryInfoList(); + TQFileInfoListIterator it( *list ); TQFileInfo *fi; while ( (fi = it.current()) != 0 ) { @@ -327,7 +327,7 @@ bool HistoryPlugin::detectOldHistory() if(fi->fileName() == "MSNProtocol" || fi->fileName() == "msn_logs" ) return true; - else if(fi->fileName() == "ICQProtocol" || fi->fileName() == "icq_logs" ) + else if(fi->fileName() == "ICTQProtocol" || fi->fileName() == "icq_logs" ) return true; else if(fi->fileName() == "AIMProtocol" || fi->fileName() == "aim_logs" ) return true; diff --git a/kopete/plugins/history/historydialog.cpp b/kopete/plugins/history/historydialog.cpp index 5dc550be..2496f893 100644 --- a/kopete/plugins/history/historydialog.cpp +++ b/kopete/plugins/history/historydialog.cpp @@ -60,7 +60,7 @@ class KListViewDateItem : public KListViewItem { public: - KListViewDateItem(KListView* parent, TQDate date, Kopete::MetaContact *mc); + KListViewDateItem(KListView* tqparent, TQDate date, Kopete::MetaContact *mc); TQDate date() { return mDate; } Kopete::MetaContact *metaContact() { return mMetaContact; } @@ -73,8 +73,8 @@ private: -KListViewDateItem::KListViewDateItem(KListView* parent, TQDate date, Kopete::MetaContact *mc) - : KListViewItem(parent, date.toString(Qt::ISODate), mc->displayName()) +KListViewDateItem::KListViewDateItem(KListView* tqparent, TQDate date, Kopete::MetaContact *mc) + : KListViewItem(tqparent, date.toString(Qt::ISODate), mc->displayName()) { mDate = date; mMetaContact = mc; @@ -93,16 +93,16 @@ int KListViewDateItem::compare(TQListViewItem *i, int col, bool ascending) const } -HistoryDialog::HistoryDialog(Kopete::MetaContact *mc, TQWidget* parent, - const char* name) : KDialogBase(parent, name, false, - i18n("History for %1").arg(mc->displayName()), 0), mSearching(false) +HistoryDialog::HistoryDialog(Kopete::MetaContact *mc, TQWidget* tqparent, + const char* name) : KDialogBase(tqparent, name, false, + i18n("History for %1").tqarg(mc->displayName()), 0), mSearching(false) { TQString fontSize; TQString htmlCode; TQString fontStyle; kdDebug(14310) << k_funcinfo << "called." << endl; - setWFlags(Qt::WDestructiveClose); // send TQT_SIGNAL(closing()) on quit + setWFlags(TQt::WDestructiveClose); // send TQT_SIGNAL(closing()) on quit // FIXME: Allow to show this dialog for only one contact mMetaContact = mc; @@ -125,7 +125,7 @@ HistoryDialog::HistoryDialog(Kopete::MetaContact *mc, TQWidget* parent, } if (mMetaContact) - mMainWidget->contactComboBox->setCurrentItem(mMetaContactList.find(mMetaContact)+1); + mMainWidget->contactComboBox->setCurrentItem(mMetaContactList.tqfind(mMetaContact)+1); mMainWidget->dateSearchLine->setListView(mMainWidget->dateListView); mMainWidget->dateListView->setSorting(0, 0); //newest-first @@ -147,8 +147,8 @@ HistoryDialog::HistoryDialog(Kopete::MetaContact *mc, TQWidget* parent, mHtmlView = mHtmlPart->view(); mHtmlView->setMarginWidth(4); mHtmlView->setMarginHeight(4); - mHtmlView->setFocusPolicy(NoFocus); - mHtmlView->setSizePolicy( + mHtmlView->setFocusPolicy(TQ_NoFocus); + mHtmlView->tqsetSizePolicy( TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding)); l->addWidget(mHtmlView); @@ -157,7 +157,7 @@ HistoryDialog::HistoryDialog(Kopete::MetaContact *mc, TQWidget* parent, mHtmlPart->begin(); htmlCode = "<html><head>" + fontStyle + "</head><body class=\"hf\"></body></html>"; - mHtmlPart->write( TQString::fromLatin1( htmlCode.latin1() ) ); + mHtmlPart->write( TQString::tqfromLatin1( htmlCode.latin1() ) ); mHtmlPart->end(); @@ -174,8 +174,8 @@ HistoryDialog::HistoryDialog(Kopete::MetaContact *mc, TQWidget* parent, //initActions KActionCollection* ac = new KActionCollection(this); - mCopyAct = KStdAction::copy( this, TQT_SLOT(slotCopy()), ac ); - mCopyURLAct = new KAction( i18n( "Copy Link Address" ), TQString::fromLatin1( "editcopy" ), 0, this, TQT_SLOT( slotCopyURL() ), ac ); + mCopyAct = KStdAction::copy( TQT_TQOBJECT(this), TQT_SLOT(slotCopy()), ac ); + mCopyURLAct = new KAction( i18n( "Copy Link Address" ), TQString::tqfromLatin1( "editcopy" ), 0, TQT_TQOBJECT(this), TQT_SLOT( slotCopyURL() ), ac ); resize(650, 700); centerOnScreen(this); @@ -196,7 +196,7 @@ void HistoryDialog::init() { if(mMetaContact) { - HistoryLogger logger(mMetaContact, this); + HistoryLogger logger(mMetaContact, TQT_TQOBJECT(this)); init(mMetaContact); } else @@ -204,7 +204,7 @@ void HistoryDialog::init() TQPtrListIterator<Kopete::MetaContact> it(mMetaContactList); for(; it.current(); ++it) { - HistoryLogger logger(*it, this); + HistoryLogger logger(*it, TQT_TQOBJECT(this)); init(*it); } @@ -226,12 +226,12 @@ void HistoryDialog::slotLoadDays() DMPair pair(mInit.dateMCList.first()); mInit.dateMCList.pop_front(); - HistoryLogger logger(pair.metaContact(), this); + HistoryLogger logger(pair.metaContact(), TQT_TQOBJECT(this)); TQValueList<int> dayList = logger.getDaysForMonth(pair.date()); for (unsigned int i=0; i<dayList.count(); i++) { TQDate c2Date(pair.date().year(),pair.date().month(),dayList[i]); - if (mInit.dateMCList.find(pair) == mInit.dateMCList.end()) + if (mInit.dateMCList.tqfind(pair) == mInit.dateMCList.end()) new KListViewDateItem(mMainWidget->dateListView, c2Date, pair.metaContact()); } mMainWidget->searchProgress->advance(1); @@ -255,24 +255,24 @@ void HistoryDialog::init(Kopete::Contact *c) { // Get year and month list TQRegExp rx( "\\.(\\d\\d\\d\\d)(\\d\\d)" ); - const TQString contact_in_filename=c->contactId().replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ); + const TQString contact_in_filename=c->contactId().tqreplace( TQRegExp( TQString::tqfromLatin1( "[./~?*]" ) ), TQString::tqfromLatin1( "-" ) ); TQFileInfo *fi; // BEGIN check if there are Kopete 0.7.x TQDir d1(locateLocal("data",TQString("kopete/logs/")+ - c->protocol()->pluginId().replace( TQRegExp(TQString::fromLatin1("[./~?*]")),TQString::fromLatin1("-")) + c->protocol()->pluginId().tqreplace( TQRegExp(TQString::tqfromLatin1("[./~?*]")),TQString::tqfromLatin1("-")) )); d1.setFilter( TQDir::Files | TQDir::NoSymLinks ); d1.setSorting( TQDir::Name ); - const QFileInfoList *list1 = d1.entryInfoList(); + const TQFileInfoList *list1 = d1.entryInfoList(); if ( list1 != 0 ) { - QFileInfoListIterator it1( *list1 ); + TQFileInfoListIterator it1( *list1 ); while ( (fi = it1.current()) != 0 ) { - if(fi->fileName().contains(contact_in_filename)) + if(fi->fileName().tqcontains(contact_in_filename)) { rx.search(fi->fileName()); @@ -288,20 +288,20 @@ void HistoryDialog::init(Kopete::Contact *c) // END of kopete 0.7.x check TQString logDir = locateLocal("data",TQString("kopete/logs/")+ - c->protocol()->pluginId().replace( TQRegExp(TQString::fromLatin1("[./~?*]")),TQString::fromLatin1("-")) + - TQString::fromLatin1( "/" ) + - c->account()->accountId().replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ) + c->protocol()->pluginId().tqreplace( TQRegExp(TQString::tqfromLatin1("[./~?*]")),TQString::tqfromLatin1("-")) + + TQString::tqfromLatin1( "/" ) + + c->account()->accountId().tqreplace( TQRegExp( TQString::tqfromLatin1( "[./~?*]" ) ), TQString::tqfromLatin1( "-" ) ) ); TQDir d(logDir); d.setFilter( TQDir::Files | TQDir::NoSymLinks ); d.setSorting( TQDir::Name ); - const QFileInfoList *list = d.entryInfoList(); + const TQFileInfoList *list = d.entryInfoList(); if ( list != 0 ) { - QFileInfoListIterator it( *list ); + TQFileInfoListIterator it( *list ); while ( (fi = it.current()) != 0 ) { - if(fi->fileName().contains(contact_in_filename)) + if(fi->fileName().tqcontains(contact_in_filename)) { rx.search(fi->fileName()); @@ -325,7 +325,7 @@ void HistoryDialog::dateSelected(TQListViewItem* it) TQDate chosenDate = item->date(); - HistoryLogger logger(item->metaContact(), this); + HistoryLogger logger(item->metaContact(), TQT_TQOBJECT(this)); TQValueList<Kopete::Message> msgs=logger.readMessages(chosenDate); setMessages(msgs); @@ -339,16 +339,16 @@ void HistoryDialog::setMessages(TQValueList<Kopete::Message> msgs) htmlBody.removeChild(htmlBody.childNodes().item(htmlBody.childNodes().length() - 1)); // ---- - TQString dir = (TQApplication::reverseLayout() ? TQString::fromLatin1("rtl") : - TQString::fromLatin1("ltr")); + TQString dir = (TQApplication::reverseLayout() ? TQString::tqfromLatin1("rtl") : + TQString::tqfromLatin1("ltr")); TQValueList<Kopete::Message>::iterator it = msgs.begin(); TQString accountLabel; TQString resultHTML = "<b><font color=\"red\">" + (*it).timestamp().date().toString() + "</font></b><br/>"; - DOM::HTMLElement newNode = mHtmlPart->document().createElement(TQString::fromLatin1("span")); - newNode.setAttribute(TQString::fromLatin1("dir"), dir); + DOM::HTMLElement newNode = mHtmlPart->document().createElement(TQString::tqfromLatin1("span")); + newNode.setAttribute(TQString::tqfromLatin1("dir"), dir); newNode.setInnerHTML(resultHTML); mHtmlPart->htmlDocument().body().appendChild(newNode); @@ -375,7 +375,7 @@ void HistoryDialog::setMessages(TQValueList<Kopete::Message> msgs) if (!mMainWidget->searchLine->text().isEmpty()) // If there is a search, then we hightlight the keywords { - body = body.replace(mMainWidget->searchLine->text(), "<span style=\"background-color:yellow\">" + mMainWidget->searchLine->text() + "</span>", false); + body = body.tqreplace(mMainWidget->searchLine->text(), "<span style=\"background-color:yellow\">" + mMainWidget->searchLine->text() + "</span>", false); } resultHTML += "(<b>" + (*it).timestamp().time().toString() + "</b>) " @@ -384,8 +384,8 @@ void HistoryDialog::setMessages(TQValueList<Kopete::Message> msgs) : "<font color=\"" + KopetePrefs::prefs()->textColor().light(200).name() + "\"><b><</b></font> ") + body + "<br/>"; - newNode = mHtmlPart->document().createElement(TQString::fromLatin1("span")); - newNode.setAttribute(TQString::fromLatin1("dir"), dir); + newNode = mHtmlPart->document().createElement(TQString::tqfromLatin1("span")); + newNode.setAttribute(TQString::tqfromLatin1("dir"), dir); newNode.setInnerHTML(resultHTML); mHtmlPart->htmlDocument().body().appendChild(newNode); @@ -477,12 +477,12 @@ void HistoryDialog::slotSearch() curItem = static_cast<KListViewDateItem *>(curItem->nextSibling()) ) { - qApp->processEvents(); + tqApp->processEvents(); if (!mSearching) return; TQDate month(curItem->date().year(),curItem->date().month(),1); // if we haven't searched the relevant history logs, search them now - if (!monthsSearched[month].contains(curItem->metaContact())) + if (!monthsSearched[month].tqcontains(curItem->metaContact())) { monthsSearched[month].push_back(curItem->metaContact()); TQPtrList<Kopete::Contact> contacts = curItem->metaContact()->contacts(); @@ -496,7 +496,7 @@ void HistoryDialog::slotSearch() if (!file.isOpen()) { kdWarning(14310) << k_funcinfo << "Error opening " << - file.name() << ": " << file.errorString() << endl; + file.name() << ": " << file.errorString().data() << endl; continue; } @@ -505,19 +505,19 @@ void HistoryDialog::slotSearch() while(!stream.atEnd()) { textLine = stream.readLine(); - if (textLine.contains(mMainWidget->searchLine->text(), false)) + if (textLine.tqcontains(mMainWidget->searchLine->text(), false)) { if(rx.search(textLine) != -1) { // only match message body - if (rx.cap(2).contains(mMainWidget->searchLine->text())) + if (rx.cap(2).tqcontains(mMainWidget->searchLine->text())) matches[TQDate(curItem->date().year(),curItem->date().month(),rx.cap(1).toInt())].push_back(curItem->metaContact()); } // this will happen when multiline messages are searched, properly // parsing the files would fix this else { } } - qApp->processEvents(); + tqApp->processEvents(); if (!mSearching) return; } file.close(); @@ -525,7 +525,7 @@ void HistoryDialog::slotSearch() } // relevant logfiles have been searched now, check if current date matches - if (matches[curItem->date()].contains(curItem->metaContact())) + if (matches[curItem->date()].tqcontains(curItem->metaContact())) curItem->setVisible(true); // Next date item @@ -553,7 +553,7 @@ void HistoryDialog::slotContactChanged(int index) else { mMetaContact = mMetaContactList.at(index-1); - setCaption(i18n("History for %1").arg(mMetaContact->displayName())); + setCaption(i18n("History for %1").tqarg(mMetaContact->displayName())); init(); } } @@ -597,16 +597,16 @@ void HistoryDialog::slotCopy() if ( qsSelection.isEmpty() ) return; disconnect( kapp->clipboard(), TQT_SIGNAL( selectionChanged()), mHtmlPart, TQT_SLOT(slotClearSelection())); - TQApplication::clipboard()->setText(qsSelection, QClipboard::Clipboard); - TQApplication::clipboard()->setText(qsSelection, QClipboard::Selection); + TQApplication::tqclipboard()->setText(qsSelection, TQClipboard::Clipboard); + TQApplication::tqclipboard()->setText(qsSelection, TQClipboard::Selection); connect( kapp->clipboard(), TQT_SIGNAL( selectionChanged()), mHtmlPart, TQT_SLOT(slotClearSelection())); } void HistoryDialog::slotCopyURL() { disconnect( kapp->clipboard(), TQT_SIGNAL( selectionChanged()), mHtmlPart, TQT_SLOT(slotClearSelection())); - TQApplication::clipboard()->setText( mURL, QClipboard::Clipboard); - TQApplication::clipboard()->setText( mURL, QClipboard::Selection); + TQApplication::tqclipboard()->setText( mURL, TQClipboard::Clipboard); + TQApplication::tqclipboard()->setText( mURL, TQClipboard::Selection); connect( kapp->clipboard(), TQT_SIGNAL( selectionChanged()), mHtmlPart, TQT_SLOT(slotClearSelection())); } diff --git a/kopete/plugins/history/historydialog.h b/kopete/plugins/history/historydialog.h index 63b08470..783bb3a7 100644 --- a/kopete/plugins/history/historydialog.h +++ b/kopete/plugins/history/historydialog.h @@ -62,9 +62,10 @@ class DMPair class HistoryDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - HistoryDialog(Kopete::MetaContact *mc, TQWidget* parent=0, + HistoryDialog(Kopete::MetaContact *mc, TQWidget* tqparent=0, const char* name="HistoryDialog"); ~HistoryDialog(); diff --git a/kopete/plugins/history/historyguiclient.cpp b/kopete/plugins/history/historyguiclient.cpp index 4b1798ae..57dfdc1c 100644 --- a/kopete/plugins/history/historyguiclient.cpp +++ b/kopete/plugins/history/historyguiclient.cpp @@ -27,12 +27,12 @@ class HistoryPlugin; -HistoryGUIClient::HistoryGUIClient(Kopete::ChatSession *parent, const char *name) - : TQObject(parent, name), KXMLGUIClient(parent) +HistoryGUIClient::HistoryGUIClient(Kopete::ChatSession *tqparent, const char *name) + : TQObject(tqparent, name), KXMLGUIClient(tqparent) { setInstance(KGenericFactory<HistoryPlugin>::instance()); - m_manager = parent; + m_manager = tqparent; // Refuse to build this client, it is based on wrong parameters if(!m_manager || m_manager->members().isEmpty()) @@ -41,7 +41,7 @@ HistoryGUIClient::HistoryGUIClient(Kopete::ChatSession *parent, const char *name TQPtrList<Kopete::Contact> mb=m_manager->members(); m_logger=new HistoryLogger( mb.first() , this ); - actionLast=new KAction( i18n("History Last" ), TQString::fromLatin1( "finish" ), 0, this, TQT_SLOT(slotLast()), actionCollection() , "historyLast" ); + actionLast=new KAction( i18n("History Last" ), TQString::tqfromLatin1( "finish" ), 0, this, TQT_SLOT(slotLast()), actionCollection() , "historyLast" ); actionPrev = KStdAction::back( this, TQT_SLOT(slotPrevious()), actionCollection() , "historyPrevious" ); actionNext = KStdAction::forward( this, TQT_SLOT(slotNext()), actionCollection() , "historyNext" ); diff --git a/kopete/plugins/history/historyguiclient.h b/kopete/plugins/history/historyguiclient.h index 792325fc..b48595fc 100644 --- a/kopete/plugins/history/historyguiclient.h +++ b/kopete/plugins/history/historyguiclient.h @@ -29,8 +29,9 @@ class KAction; class HistoryGUIClient : public TQObject , public KXMLGUIClient { Q_OBJECT + TQ_OBJECT public: - HistoryGUIClient(Kopete::ChatSession *parent = 0, const char *name = 0); + HistoryGUIClient(Kopete::ChatSession *tqparent = 0, const char *name = 0); ~HistoryGUIClient(); HistoryLogger *logger() const { return m_logger; } diff --git a/kopete/plugins/history/historylogger.cpp b/kopete/plugins/history/historylogger.cpp index 96f4d6dc..714fe966 100644 --- a/kopete/plugins/history/historylogger.cpp +++ b/kopete/plugins/history/historylogger.cpp @@ -37,15 +37,15 @@ #include "kopetechatsession.h" // ----------------------------------------------------------------------------- -HistoryLogger::HistoryLogger( Kopete::MetaContact *m, TQObject *parent, const char *name ) - : TQObject(parent, name) +HistoryLogger::HistoryLogger( Kopete::MetaContact *m, TQObject *tqparent, const char *name ) + : TQObject(tqparent, name) { m_saveTimer=0L; m_saveTimerTime=0; m_metaContact=m; m_hideOutgoing=false; m_cachedMonth=-1; - m_realMonth=TQDate::currentDate().month(); + m_realMonth=TQDate::tqcurrentDate().month(); m_oldSens=Default; //the contact may be destroyed, for example, if the contact changes its metacontact @@ -55,15 +55,15 @@ HistoryLogger::HistoryLogger( Kopete::MetaContact *m, TQObject *parent, const c } -HistoryLogger::HistoryLogger( Kopete::Contact *c, TQObject *parent, const char *name ) - : TQObject(parent, name) +HistoryLogger::HistoryLogger( Kopete::Contact *c, TQObject *tqparent, const char *name ) + : TQObject(tqparent, name) { m_saveTimer=0L; m_saveTimerTime=0; m_cachedMonth=-1; m_metaContact=c->metaContact(); m_hideOutgoing=false; - m_realMonth=TQDate::currentDate().month(); + m_realMonth=TQDate::tqcurrentDate().month(); m_oldSens=Default; //the contact may be destroyed, for example, if the contact changes its metacontact @@ -107,14 +107,14 @@ void HistoryLogger::setCurrentMonth(int month) TQDomDocument HistoryLogger::getDocument(const Kopete::Contact *c, unsigned int month , bool canLoad , bool* contain) { - if(m_realMonth!=TQDate::currentDate().month()) + if(m_realMonth!=TQDate::tqcurrentDate().month()) { //We changed month, our indice are not correct anymore, clean memory. // or we will see what i called "the 31 midnight bug"(TM) :-) -Olivier m_documents.clear(); m_cachedMonth=-1; m_currentMonth++; //Not usre it's ok, but should work; m_oldMonth++; // idem - m_realMonth=TQDate::currentDate().month(); + m_realMonth=TQDate::tqcurrentDate().month(); } if(!m_metaContact) @@ -125,7 +125,7 @@ TQDomDocument HistoryLogger::getDocument(const Kopete::Contact *c, unsigned int return TQDomDocument(); } - if(!m_metaContact->contacts().contains(c)) + if(!m_metaContact->contacts().tqcontains(c)) { if(contain) *contain=false; @@ -133,11 +133,11 @@ TQDomDocument HistoryLogger::getDocument(const Kopete::Contact *c, unsigned int } TQMap<unsigned int , TQDomDocument> documents = m_documents[c]; - if (documents.contains(month)) + if (documents.tqcontains(month)) return documents[month]; - TQDomDocument doc = getDocument(c, TQDate::currentDate().addMonths(0-month), canLoad, contain); + TQDomDocument doc = getDocument(c, TQDate::tqcurrentDate().addMonths(0-month), canLoad, contain); documents.insert(month, doc); m_documents[c]=documents; @@ -156,7 +156,7 @@ TQDomDocument HistoryLogger::getDocument(const Kopete::Contact *c, const TQDate return TQDomDocument(); } - if(!m_metaContact->contacts().contains(c)) + if(!m_metaContact->contacts().tqcontains(c)) { if(contain) *contain=false; @@ -170,7 +170,7 @@ TQDomDocument HistoryLogger::getDocument(const Kopete::Contact *c, const TQDate return TQDomDocument(); } - QString FileName = getFileName(c, date); + TQString FileName = getFileName(c, date); TQDomDocument doc( "Kopete-History" ); @@ -223,7 +223,7 @@ void HistoryLogger::appendMessage( const Kopete::Message &msg , const Kopete::Co } - if(!c || !m_metaContact->contacts().contains(c) ) + if(!c || !m_metaContact->contacts().tqcontains(c) ) { /*TQPtrList<Kopete::Contact> contacts= m_metaContact->contacts(); TQPtrListIterator<Kopete::Contact> it( contacts ); @@ -253,8 +253,8 @@ void HistoryLogger::appendMessage( const Kopete::Message &msg , const Kopete::Co TQDomElement headElem = doc.createElement( "head" ); docElem.appendChild( headElem ); TQDomElement dateElem = doc.createElement( "date" ); - dateElem.setAttribute( "year", TQString::number(TQDate::currentDate().year()) ); - dateElem.setAttribute( "month", TQString::number(TQDate::currentDate().month()) ); + dateElem.setAttribute( "year", TQString::number(TQDate::tqcurrentDate().year()) ); + dateElem.setAttribute( "month", TQString::number(TQDate::tqcurrentDate().month()) ); headElem.appendChild(dateElem); TQDomElement myselfElem = doc.createElement( "contact" ); myselfElem.setAttribute( "type", "myself" ); @@ -280,7 +280,7 @@ void HistoryLogger::appendMessage( const Kopete::Message &msg , const Kopete::Co // On hight-traffic channel, saving can take lots of CPU. (because the file is big) // So i wait a time proportional to the time needed to save.. - const TQString filename=getFileName(c,TQDate::currentDate()); + const TQString filename=getFileName(c,TQDate::tqcurrentDate()); if(!m_toSaveFileName.isEmpty() && m_toSaveFileName != filename) { //that mean the contact or the month has changed, save it now. saveToDisk(); @@ -316,14 +316,14 @@ void HistoryLogger::saveToDisk() m_toSaveDocument.save( *stream, 1 ); file.close(); - m_saveTimerTime=QMIN(t.elapsed()*1000, 300000); + m_saveTimerTime=TQMIN(t.elapsed()*1000, 300000); //a time 1000 times supperior to the time needed to save. but with a upper limit of 5 minutes //on a my machine, (2.4Ghz, but old HD) it should take about 10 ms to save the file. // So that would mean save every 10 seconds, which seems to be ok. // But it may take 500 ms if the file to save becomes too big (1Mb). kdDebug(14310) << k_funcinfo << m_toSaveFileName << " saved in " << t.elapsed() << " ms " <<endl ; - m_toSaveFileName=TQString::null; + m_toSaveFileName=TQString(); m_toSaveDocument=TQDomDocument(); } else @@ -376,8 +376,8 @@ TQValueList<Kopete::Message> HistoryLogger::readMessages(TQDate date) to.append( dir==Kopete::Message::Inbound ? (*it)->account()->myself() : *it ); Kopete::Message msg(dt, from, to, msgElem2.text(), dir); - msg.setBody( TQString::fromLatin1("<span title=\"%1\">%2</span>") - .arg( dt.toString(Qt::LocalDate), msg.escapedBody() ), + msg.setBody( TQString::tqfromLatin1("<span title=\"%1\">%2</span>") + .tqarg( dt.toString(Qt::LocalDate), msg.escapedBody() ), Kopete::Message::RichText); @@ -403,7 +403,7 @@ TQValueList<Kopete::Message> HistoryLogger::readMessages(TQDate date) TQValueList<Kopete::Message> HistoryLogger::readMessages(unsigned int lines, const Kopete::Contact *c, Sens sens, bool reverseOrder, bool colorize) { - //TQDate dd = TQDate::currentDate().addMonths(0-m_currentMonth); + //TQDate dd = TQDate::tqcurrentDate().addMonths(0-m_currentMonth); TQValueList<Kopete::Message> messages; @@ -418,7 +418,7 @@ TQValueList<Kopete::Message> HistoryLogger::readMessages(unsigned int lines, return messages; } - if(c && !m_metaContact->contacts().contains(c) ) + if(c && !m_metaContact->contacts().tqcontains(c) ) return messages; if(sens ==0 ) //if no sens are selected, just continue in the previous sens @@ -473,7 +473,7 @@ TQValueList<Kopete::Message> HistoryLogger::readMessages(unsigned int lines, // date, this date will bocomes the limit. TQDomNode n; - if(m_currentElements.contains(*it)) + if(m_currentElements.tqcontains(*it)) n=m_currentElements[*it]; else //there is not yet "next message" register, so we will take the first (for the current month) { @@ -490,7 +490,7 @@ TQValueList<Kopete::Message> HistoryLogger::readMessages(unsigned int lines, if( !msgElem2.isNull() && msgElem2.tagName()=="msg") { rxTime.search(msgElem2.attribute("time")); - TQDate d=TQDate::currentDate().addMonths(0-m_currentMonth); + TQDate d=TQDate::tqcurrentDate().addMonths(0-m_currentMonth); TQDateTime dt( TQDate(d.year() , d.month() , rxTime.cap(1).toUInt()), TQTime( rxTime.cap(2).toUInt() , rxTime.cap(3).toUInt(), rxTime.cap(5).toUInt() ) ); if(!timestamp.isValid() || ((sens==Chronological )? dt < timestamp : dt > timestamp) ) { @@ -512,7 +512,7 @@ TQValueList<Kopete::Message> HistoryLogger::readMessages(unsigned int lines, } else //we don't have to merge the history. just take the next item in the contact { - if(m_currentElements.contains(currentContact)) + if(m_currentElements.tqcontains(currentContact)) msgElem=m_currentElements[currentContact]; else { @@ -572,7 +572,7 @@ TQValueList<Kopete::Message> HistoryLogger::readMessages(unsigned int lines, if(!m_hideOutgoing || dir != Kopete::Message::Outbound) { //parse only if we don't hide it - if( m_filter.isNull() || ( m_filterRegExp? msgElem.text().contains(TQRegExp(m_filter,m_filterCaseSensitive)) : msgElem.text().contains(m_filter,m_filterCaseSensitive) )) + if( m_filter.isNull() || ( m_filterRegExp? msgElem.text().tqcontains(TQRegExp(m_filter,m_filterCaseSensitive)) : msgElem.text().tqcontains(m_filter,m_filterCaseSensitive) )) { TQString f=msgElem.attribute("from" ); const Kopete::Contact *from=(f.isNull() || !currentContact) ? 0L : currentContact->account()->contacts()[f]; @@ -587,23 +587,23 @@ TQValueList<Kopete::Message> HistoryLogger::readMessages(unsigned int lines, { //parse timestamp only if it was not already parsed rxTime.search(msgElem.attribute("time")); - TQDate d=TQDate::currentDate().addMonths(0-m_currentMonth); + TQDate d=TQDate::tqcurrentDate().addMonths(0-m_currentMonth); timestamp=TQDateTime( TQDate(d.year() , d.month() , rxTime.cap(1).toUInt()), TQTime( rxTime.cap(2).toUInt() , rxTime.cap(3).toUInt() , rxTime.cap(5).toUInt() ) ); } Kopete::Message msg(timestamp, from, to, msgElem.text(), dir); if (colorize) { - msg.setBody( TQString::fromLatin1("<span style=\"color:%1\" title=\"%2\">%3</span>") - .arg( fgColor.name(), timestamp.toString(Qt::LocalDate), msg.escapedBody() ), + msg.setBody( TQString::tqfromLatin1("<span style=\"color:%1\" title=\"%2\">%3</span>") + .tqarg( fgColor.name(), timestamp.toString(Qt::LocalDate), msg.escapedBody() ), Kopete::Message::RichText ); msg.setFg( fgColor ); } else { - msg.setBody( TQString::fromLatin1("<span title=\"%1\">%2</span>") - .arg( timestamp.toString(Qt::LocalDate), msg.escapedBody() ), + msg.setBody( TQString::tqfromLatin1("<span title=\"%1\">%2</span>") + .tqarg( timestamp.toString(Qt::LocalDate), msg.escapedBody() ), Kopete::Message::RichText ); } @@ -635,7 +635,7 @@ TQValueList<Kopete::Message> HistoryLogger::readMessages(unsigned int lines, TQRegExp rx("(\\d+) (\\d+):(\\d+):(\\d+)"); rx.search(msgElem.attribute("time")); - TQDate d = TQDate::currentDate().addMonths(0-m_currentMonth); + TQDate d = TQDate::tqcurrentDate().addMonths(0-m_currentMonth); timestamp = TQDateTime( TQDate(d.year(), d.month(), rx.cap(1).toUInt()), TQTime( rx.cap(2).toUInt(), rx.cap(3).toUInt() ) ); @@ -663,25 +663,25 @@ TQValueList<Kopete::Message> HistoryLogger::readMessages(unsigned int lines, TQString HistoryLogger::getFileName(const Kopete::Contact* c, TQDate date) { - TQString name = c->protocol()->pluginId().replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ) + - TQString::fromLatin1( "/" ) + - c->account()->accountId().replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ) + - TQString::fromLatin1( "/" ) + - c->contactId().replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ) + + TQString name = c->protocol()->pluginId().tqreplace( TQRegExp( TQString::tqfromLatin1( "[./~?*]" ) ), TQString::tqfromLatin1( "-" ) ) + + TQString::tqfromLatin1( "/" ) + + c->account()->accountId().tqreplace( TQRegExp( TQString::tqfromLatin1( "[./~?*]" ) ), TQString::tqfromLatin1( "-" ) ) + + TQString::tqfromLatin1( "/" ) + + c->contactId().tqreplace( TQRegExp( TQString::tqfromLatin1( "[./~?*]" ) ), TQString::tqfromLatin1( "-" ) ) + date.toString(".yyyyMM"); - TQString filename=locateLocal( "data", TQString::fromLatin1( "kopete/logs/" ) + name+ TQString::fromLatin1( ".xml" ) ) ; + TQString filename=locateLocal( "data", TQString::tqfromLatin1( "kopete/logs/" ) + name+ TQString::tqfromLatin1( ".xml" ) ) ; //Check if there is a kopete 0.7.x file TQFileInfo fi(filename); if(!fi.exists()) { - name = c->protocol()->pluginId().replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ) + - TQString::fromLatin1( "/" ) + - c->contactId().replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ) + + name = c->protocol()->pluginId().tqreplace( TQRegExp( TQString::tqfromLatin1( "[./~?*]" ) ), TQString::tqfromLatin1( "-" ) ) + + TQString::tqfromLatin1( "/" ) + + c->contactId().tqreplace( TQRegExp( TQString::tqfromLatin1( "[./~?*]" ) ), TQString::tqfromLatin1( "-" ) ) + date.toString(".yyyyMM"); - TQString filename2=locateLocal( "data", TQString::fromLatin1( "kopete/logs/" ) + name+ TQString::fromLatin1( ".xml" ) ) ; + TQString filename2=locateLocal( "data", TQString::tqfromLatin1( "kopete/logs/" ) + name+ TQString::tqfromLatin1( ".xml" ) ) ; TQFileInfo fi2(filename2); if(fi2.exists()) @@ -702,20 +702,20 @@ unsigned int HistoryLogger::getFirstMonth(const Kopete::Contact *c) // BEGIN check if there are Kopete 0.7.x TQDir d1(locateLocal("data",TQString("kopete/logs/")+ - c->protocol()->pluginId().replace( TQRegExp(TQString::fromLatin1("[./~?*]")),TQString::fromLatin1("-")) + c->protocol()->pluginId().tqreplace( TQRegExp(TQString::tqfromLatin1("[./~?*]")),TQString::tqfromLatin1("-")) )); d1.setFilter( TQDir::Files | TQDir::NoSymLinks ); d1.setSorting( TQDir::Name ); - const QFileInfoList *list1 = d1.entryInfoList(); - QFileInfoListIterator it1( *list1 ); + const TQFileInfoList *list1 = d1.entryInfoList(); + TQFileInfoListIterator it1( *list1 ); while ( (fi = it1.current()) != 0 ) { - if(fi->fileName().contains(c->contactId().replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ))) + if(fi->fileName().tqcontains(c->contactId().tqreplace( TQRegExp( TQString::tqfromLatin1( "[./~?*]" ) ), TQString::tqfromLatin1( "-" ) ))) { rx.search(fi->fileName()); - int result = 12*(TQDate::currentDate().year() - rx.cap(1).toUInt()) +TQDate::currentDate().month() - rx.cap(2).toUInt(); + int result = 12*(TQDate::tqcurrentDate().year() - rx.cap(1).toUInt()) +TQDate::tqcurrentDate().month() - rx.cap(2).toUInt(); if(result < 0) { @@ -730,22 +730,22 @@ unsigned int HistoryLogger::getFirstMonth(const Kopete::Contact *c) TQDir d(locateLocal("data",TQString("kopete/logs/")+ - c->protocol()->pluginId().replace( TQRegExp(TQString::fromLatin1("[./~?*]")),TQString::fromLatin1("-")) + - TQString::fromLatin1( "/" ) + - c->account()->accountId().replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ) + c->protocol()->pluginId().tqreplace( TQRegExp(TQString::tqfromLatin1("[./~?*]")),TQString::tqfromLatin1("-")) + + TQString::tqfromLatin1( "/" ) + + c->account()->accountId().tqreplace( TQRegExp( TQString::tqfromLatin1( "[./~?*]" ) ), TQString::tqfromLatin1( "-" ) ) )); d.setFilter( TQDir::Files | TQDir::NoSymLinks ); d.setSorting( TQDir::Name ); - const QFileInfoList *list = d.entryInfoList(); - QFileInfoListIterator it( *list ); + const TQFileInfoList *list = d.entryInfoList(); + TQFileInfoListIterator it( *list ); while ( (fi = it.current()) != 0 ) { - if(fi->fileName().contains(c->contactId().replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ))) + if(fi->fileName().tqcontains(c->contactId().tqreplace( TQRegExp( TQString::tqfromLatin1( "[./~?*]" ) ), TQString::tqfromLatin1( "-" ) ))) { rx.search(fi->fileName()); - int result = 12*(TQDate::currentDate().year() - rx.cap(1).toUInt()) +TQDate::currentDate().month() - rx.cap(2).toUInt(); + int result = 12*(TQDate::tqcurrentDate().year() - rx.cap(1).toUInt()) +TQDate::tqcurrentDate().month() - rx.cap(2).toUInt(); if(result < 0) { kdWarning(14310) << k_funcinfo << "Kopete only found log file made in the future. Check your date!" << endl; @@ -838,7 +838,7 @@ TQValueList<int> HistoryLogger::getDaysForMonth(TQDate date) pos += rxTime.matchedLength(); int day=rxTime.capturedTexts()[1].toInt(); - if ( day !=lastDay && dayList.find(day) == dayList.end()) // avoid duplicates + if ( day !=lastDay && dayList.tqfind(day) == dayList.end()) // avoid duplicates { dayList.append(rxTime.capturedTexts()[1].toInt()); lastDay=day; diff --git a/kopete/plugins/history/historylogger.h b/kopete/plugins/history/historylogger.h index c8a7690c..6d01754d 100644 --- a/kopete/plugins/history/historylogger.h +++ b/kopete/plugins/history/historylogger.h @@ -32,9 +32,10 @@ class TQTimer; * * @author Olivier Goffart */ -class HistoryLogger : public QObject +class HistoryLogger : public TQObject { Q_OBJECT + TQ_OBJECT public: /** @@ -46,8 +47,8 @@ public: /** * Constructor, takes the contact, and the color of messages */ - HistoryLogger( Kopete::MetaContact *m , TQObject *parent = 0, const char *name = 0); - HistoryLogger( Kopete::Contact *c , TQObject *parent = 0, const char *name = 0); + HistoryLogger( Kopete::MetaContact *m , TQObject *tqparent = 0, const char *name = 0); + HistoryLogger( Kopete::Contact *c , TQObject *tqparent = 0, const char *name = 0); ~HistoryLogger(); diff --git a/kopete/plugins/history/historyplugin.cpp b/kopete/plugins/history/historyplugin.cpp index af92fc09..789b331c 100644 --- a/kopete/plugins/history/historyplugin.cpp +++ b/kopete/plugins/history/historyplugin.cpp @@ -41,11 +41,11 @@ typedef KGenericFactory<HistoryPlugin> HistoryPluginFactory; static const KAboutData aboutdata("kopete_history", I18N_NOOP("History") , "1.0" ); K_EXPORT_COMPONENT_FACTORY( kopete_history, HistoryPluginFactory( &aboutdata ) ) -HistoryPlugin::HistoryPlugin( TQObject *parent, const char *name, const TQStringList & /* args */ ) -: Kopete::Plugin( HistoryPluginFactory::instance(), parent, name ), m_loggerFactory( this ) +HistoryPlugin::HistoryPlugin( TQObject *tqparent, const char *name, const TQStringList & /* args */ ) +: Kopete::Plugin( HistoryPluginFactory::instance(), tqparent, name ), m_loggerFactory( this ) { KAction *viewMetaContactHistory = new KAction( i18n("View &History" ), - TQString::fromLatin1( "history" ), 0, this, TQT_SLOT(slotViewHistory()), + TQString::tqfromLatin1( "history" ), 0, this, TQT_SLOT(slotViewHistory()), actionCollection(), "viewMetaContactHistory" ); viewMetaContactHistory->setEnabled( Kopete::ContactList::self()->selectedMetaContacts().count() == 1 ); @@ -76,7 +76,7 @@ HistoryPlugin::HistoryPlugin( TQObject *parent, const char *name, const TQString TQValueList<Kopete::ChatSession*> sessions = Kopete::ChatSessionManager::self()->sessions(); for (TQValueListIterator<Kopete::ChatSession*> it= sessions.begin(); it!=sessions.end() ; ++it) { - if(!m_loggers.contains(*it)) + if(!m_loggers.tqcontains(*it)) { m_loggers.insert(*it, new HistoryGUIClient( *it ) ); connect( *it, TQT_SIGNAL(closing(Kopete::ChatSession*)), @@ -102,7 +102,7 @@ void HistoryPlugin::messageDisplayed(const Kopete::Message &m) if(m.direction()==Kopete::Message::Internal || !m.manager()) return; - if(!m_loggers.contains(m.manager())) + if(!m_loggers.tqcontains(m.manager())) { m_loggers.insert(m.manager() , new HistoryGUIClient( m.manager() ) ); connect(m.manager(), TQT_SIGNAL(closing(Kopete::ChatSession*)), @@ -136,7 +136,7 @@ void HistoryPlugin::slotViewHistory() void HistoryPlugin::slotViewCreated( KopeteView* v ) { - if(v->plugin()->pluginInfo()->pluginName() != TQString::fromLatin1("kopete_chatwindow") ) + if(v->plugin()->pluginInfo()->pluginName() != TQString::tqfromLatin1("kopete_chatwindow") ) return; //Email chat windows are not supported. bool autoChatWindow = HistoryConfig::auto_chatwindow(); @@ -149,7 +149,7 @@ void HistoryPlugin::slotViewCreated( KopeteView* v ) if(!m_currentChatSession) return; //i am sorry - if(!m_loggers.contains(m_currentChatSession)) + if(!m_loggers.tqcontains(m_currentChatSession)) { m_loggers.insert(m_currentChatSession , new HistoryGUIClient( m_currentChatSession ) ); connect( m_currentChatSession, TQT_SIGNAL(closing(Kopete::ChatSession*)), diff --git a/kopete/plugins/history/historyplugin.h b/kopete/plugins/history/historyplugin.h index 8c0f553d..560d09b5 100644 --- a/kopete/plugins/history/historyplugin.h +++ b/kopete/plugins/history/historyplugin.h @@ -74,8 +74,9 @@ public: class HistoryPlugin : public Kopete::Plugin { Q_OBJECT + TQ_OBJECT public: - HistoryPlugin( TQObject *parent, const char *name, const TQStringList &args ); + HistoryPlugin( TQObject *tqparent, const char *name, const TQStringList &args ); ~HistoryPlugin(); /** diff --git a/kopete/plugins/history/historypreferences.cpp b/kopete/plugins/history/historypreferences.cpp index 370e6721..959f9653 100644 --- a/kopete/plugins/history/historypreferences.cpp +++ b/kopete/plugins/history/historypreferences.cpp @@ -29,8 +29,8 @@ typedef KGenericFactory<HistoryPreferences> HistoryConfigFactory; K_EXPORT_COMPONENT_FACTORY( kcm_kopete_history, HistoryConfigFactory( "kcm_kopete_history" ) ) -HistoryPreferences::HistoryPreferences(TQWidget *parent, const char*/*name*/, const TQStringList &args) - : KCModule(HistoryConfigFactory::instance(), parent, args) +HistoryPreferences::HistoryPreferences(TQWidget *tqparent, const char*/*name*/, const TQStringList &args) + : KCModule(HistoryConfigFactory::instance(), tqparent, args) { kdDebug(14310) << k_funcinfo << "called." << endl; (new TQVBoxLayout(this))->setAutoAdd(true); diff --git a/kopete/plugins/history/historypreferences.h b/kopete/plugins/history/historypreferences.h index bed6de7b..848580b2 100644 --- a/kopete/plugins/history/historypreferences.h +++ b/kopete/plugins/history/historypreferences.h @@ -29,8 +29,9 @@ class HistoryPrefsUI; class HistoryPreferences : public KCModule { Q_OBJECT + TQ_OBJECT public: - HistoryPreferences(TQWidget *parent=0, const char* name=0, + HistoryPreferences(TQWidget *tqparent=0, const char* name=0, const TQStringList &args = TQStringList()); ~HistoryPreferences(); diff --git a/kopete/plugins/history/historyprefsui.ui b/kopete/plugins/history/historyprefsui.ui index 5942a07a..8bcea1ae 100644 --- a/kopete/plugins/history/historyprefsui.ui +++ b/kopete/plugins/history/historyprefsui.ui @@ -1,7 +1,7 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>HistoryPrefsUI</class> <author>Olivier Goffart</author> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>HistoryPrefsWidget</cstring> </property> @@ -20,7 +20,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>grpChatHistory</cstring> </property> @@ -31,7 +31,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>lblNoLinesPerPage</cstring> </property> @@ -59,7 +59,7 @@ <string>The number of message that are shown when borwsing history in the chat window</string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>colorLabel</cstring> </property> @@ -108,7 +108,7 @@ <string>This is the number of messages that will be added automatically in the chat window when opening a new chat.</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>numberLabel</cstring> </property> @@ -122,7 +122,7 @@ <string>This is the number of messages that will be added automatically in the chat window when opening a new chat.</string> </property> </widget> - <widget class="QCheckBox" row="0" column="0" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="0" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>chkShowPrevious</cstring> </property> @@ -148,7 +148,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>31</width> <height>90</height> @@ -178,7 +178,7 @@ <tabstop>Number_Auto_chatwindow</tabstop> <tabstop>History_color</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>knuminput.h</includehint> <includehint>kcolorbutton.h</includehint> diff --git a/kopete/plugins/history/historyviewer.ui b/kopete/plugins/history/historyviewer.ui index 4cef647e..cdf49bbe 100644 --- a/kopete/plugins/history/historyviewer.ui +++ b/kopete/plugins/history/historyviewer.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>HistoryViewer</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>HistoryViewer</cstring> </property> @@ -20,7 +20,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>300</width> <height>200</height> @@ -33,19 +33,19 @@ <property name="margin"> <number>0</number> </property> - <widget class="QLayoutWidget" row="3" column="0"> + <widget class="TQLayoutWidget" row="3" column="0"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>statusLabel</cstring> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>32767</width> <height>20</height> @@ -62,15 +62,15 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget" row="2" column="0"> + <widget class="TQLayoutWidget" row="2" column="0"> <property name="name"> - <cstring>layout8</cstring> + <cstring>tqlayout8</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>searchErase</cstring> </property> @@ -81,7 +81,7 @@ <string></string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -94,7 +94,7 @@ <cstring>searchLine</cstring> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>searchButton</cstring> </property> @@ -109,13 +109,13 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>70</width> <height>0</height> </size> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>150</width> <height>32767</height> @@ -127,16 +127,16 @@ </widget> </hbox> </widget> - <widget class="QSplitter" row="1" column="0"> + <widget class="TQSplitter" row="1" column="0"> <property name="name"> <cstring>splitter2</cstring> </property> <property name="orientation"> <enum>Horizontal</enum> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <vbox> <property name="name"> @@ -160,13 +160,13 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>140</width> <height>0</height> </size> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>32767</width> <height>32767</height> @@ -207,13 +207,13 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>0</height> </size> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>32767</width> <height>32767</height> @@ -225,7 +225,7 @@ </widget> </vbox> </widget> - <widget class="QFrame"> + <widget class="TQFrame"> <property name="name"> <cstring>htmlFrame</cstring> </property> @@ -237,7 +237,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>0</height> @@ -251,15 +251,15 @@ </property> </widget> </widget> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout11</cstring> + <cstring>tqlayout11</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -288,7 +288,7 @@ </sizepolicy> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1_2</cstring> </property> @@ -296,7 +296,7 @@ <string>Message Filter:</string> </property> </widget> - <widget class="QComboBox"> + <widget class="TQComboBox"> <item> <property name="text"> <string>All messages</string> @@ -323,7 +323,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>200</width> <height>0</height> @@ -336,7 +336,7 @@ </widget> <customwidgets> </customwidgets> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kprogress.h</includehint> <includehint>klineedit.h</includehint> |