From 089118c18533dfa3e6ce5065dbebdd4db94051f1 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sun, 18 Dec 2011 18:33:51 -0600 Subject: Rename old tq methods that no longer need a unique name --- kopete/plugins/history/converter.cpp | 36 ++++++++-------- kopete/plugins/history/historydialog.cpp | 28 ++++++------ kopete/plugins/history/historyguiclient.cpp | 2 +- kopete/plugins/history/historylogger.cpp | 66 ++++++++++++++--------------- kopete/plugins/history/historyplugin.cpp | 4 +- kopete/plugins/history/historyprefsui.ui | 2 +- kopete/plugins/history/historyviewer.ui | 20 ++++----- 7 files changed, 79 insertions(+), 79 deletions(-) (limited to 'kopete/plugins/history') diff --git a/kopete/plugins/history/converter.cpp b/kopete/plugins/history/converter.cpp index 76b29a5c..64af8c81 100644 --- a/kopete/plugins/history/converter.cpp +++ b/kopete/plugins/history/converter.cpp @@ -44,7 +44,7 @@ void HistoryPlugin::convertOldHistory() progressDlg->setAllowCancel(false); //because i am too lazy to allow to cancel - TQString kopetedir=locateLocal( "data", TQString::tqfromLatin1( "kopete")); + TQString kopetedir=locateLocal( "data", TQString::fromLatin1( "kopete")); TQDir d( kopetedir ); //d should point to ~/.kde/share/apps/kopete/ d.setFilter( TQDir::Dirs ); @@ -155,12 +155,12 @@ void HistoryPlugin::convertOldHistory() buffer += TQString::fromUtf8(cbuf); } - if( buffer.startsWith( TQString::tqfromLatin1( "\n" ) /*strcmp("\n", cbuf )*/ ) + while( !feof( f ) && buffer != TQString::fromLatin1( "\n" ) /*strcmp("\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::tqfromLatin1( "direction" ) ) == TQString::tqfromLatin1( "inbound" ) ) + if( msgelement.attribute( TQString::fromLatin1( "direction" ) ) == TQString::fromLatin1( "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::tqfromLatin1( "srcnick" ) ) + if( tagname == TQString::fromLatin1( "srcnick" ) ) nick = element.text(); - else if( tagname == TQString::tqfromLatin1( "date" ) ) + else if( tagname == TQString::fromLatin1( "date" ) ) date = element.text(); - else if( tagname == TQString::tqfromLatin1( "body" ) ) + else if( tagname == TQString::fromLatin1( "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::tqfromLatin1( "[./~?*]" ) ), TQString::tqfromLatin1( "-" ) ) + - TQString::tqfromLatin1( "/" ) + - contactId.replace( TQRegExp( TQString::tqfromLatin1( "[./~?*]" ) ), TQString::tqfromLatin1( "-" ) ) + + TQString name = protocolId.replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ) + + TQString::fromLatin1( "/" ) + + contactId.replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ) + date.toString(".yyyyMM"); - KSaveFile file( locateLocal( "data", TQString::tqfromLatin1( "kopete/logs/" ) + name+ TQString::tqfromLatin1( ".xml" ) ) ); + KSaveFile file( locateLocal( "data", TQString::fromLatin1( "kopete/logs/" ) + name+ TQString::fromLatin1( ".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::tqcurrentDateTime().toString() ); + importElem.setAttribute( "date", TQDateTime::currentDateTime().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::tqfromLatin1( "[./~?*]" ) ), TQString::tqfromLatin1( "-" ) ) + - TQString::tqfromLatin1( "/" ) + - contactId.replace( TQRegExp( TQString::tqfromLatin1( "[./~?*]" ) ), TQString::tqfromLatin1( "-" ) ) + + TQString name = protocolId.replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ) + + TQString::fromLatin1( "/" ) + + contactId.replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ) + date.toString(".yyyyMM"); - KSaveFile file( locateLocal( "data", TQString::tqfromLatin1( "kopete/logs/" ) + name+ TQString::tqfromLatin1( ".xml" ) ) ); + KSaveFile file( locateLocal( "data", TQString::fromLatin1( "kopete/logs/" ) + name+ TQString::fromLatin1( ".xml" ) ) ); if( file.status() == 0 ) { TQTextStream *stream = file.textStream(); @@ -310,12 +310,12 @@ bool HistoryPlugin::detectOldHistory() return false; - TQDir d( locateLocal( "data", TQString::tqfromLatin1( "kopete/logs")) ); + TQDir d( locateLocal( "data", TQString::fromLatin1( "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::tqfromLatin1( "kopete")) ); + TQDir d2( locateLocal( "data", TQString::fromLatin1( "kopete")) ); d2.setFilter( TQDir::Dirs ); const TQFileInfoList *list = d2.entryInfoList(); TQFileInfoListIterator it( *list ); diff --git a/kopete/plugins/history/historydialog.cpp b/kopete/plugins/history/historydialog.cpp index c4f5418f..45c639a7 100644 --- a/kopete/plugins/history/historydialog.cpp +++ b/kopete/plugins/history/historydialog.cpp @@ -148,7 +148,7 @@ HistoryDialog::HistoryDialog(Kopete::MetaContact *mc, TQWidget* parent, mHtmlView->setMarginWidth(4); mHtmlView->setMarginHeight(4); mHtmlView->setFocusPolicy(TQ_NoFocus); - mHtmlView->tqsetSizePolicy( + mHtmlView->setSizePolicy( TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding)); l->addWidget(mHtmlView); @@ -157,7 +157,7 @@ HistoryDialog::HistoryDialog(Kopete::MetaContact *mc, TQWidget* parent, mHtmlPart->begin(); htmlCode = "" + fontStyle + ""; - mHtmlPart->write( TQString::tqfromLatin1( htmlCode.latin1() ) ); + mHtmlPart->write( TQString::fromLatin1( htmlCode.latin1() ) ); mHtmlPart->end(); @@ -175,7 +175,7 @@ HistoryDialog::HistoryDialog(Kopete::MetaContact *mc, TQWidget* parent, //initActions KActionCollection* ac = new KActionCollection(this); 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 ); + mCopyURLAct = new KAction( i18n( "Copy Link Address" ), TQString::fromLatin1( "editcopy" ), 0, TQT_TQOBJECT(this), TQT_SLOT( slotCopyURL() ), ac ); resize(650, 700); centerOnScreen(this); @@ -255,13 +255,13 @@ 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::tqfromLatin1( "[./~?*]" ) ), TQString::tqfromLatin1( "-" ) ); + const TQString contact_in_filename=c->contactId().replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ); TQFileInfo *fi; // BEGIN check if there are Kopete 0.7.x TQDir d1(locateLocal("data",TQString("kopete/logs/")+ - c->protocol()->pluginId().replace( TQRegExp(TQString::tqfromLatin1("[./~?*]")),TQString::tqfromLatin1("-")) + c->protocol()->pluginId().replace( TQRegExp(TQString::fromLatin1("[./~?*]")),TQString::fromLatin1("-")) )); d1.setFilter( TQDir::Files | TQDir::NoSymLinks ); d1.setSorting( TQDir::Name ); @@ -288,9 +288,9 @@ 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::tqfromLatin1("[./~?*]")),TQString::tqfromLatin1("-")) + - TQString::tqfromLatin1( "/" ) + - c->account()->accountId().replace( TQRegExp( TQString::tqfromLatin1( "[./~?*]" ) ), TQString::tqfromLatin1( "-" ) ) + c->protocol()->pluginId().replace( TQRegExp(TQString::fromLatin1("[./~?*]")),TQString::fromLatin1("-")) + + TQString::fromLatin1( "/" ) + + c->account()->accountId().replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ) ); TQDir d(logDir); d.setFilter( TQDir::Files | TQDir::NoSymLinks ); @@ -339,16 +339,16 @@ void HistoryDialog::setMessages(TQValueList msgs) htmlBody.removeChild(htmlBody.childNodes().item(htmlBody.childNodes().length() - 1)); // ---- - TQString dir = (TQApplication::reverseLayout() ? TQString::tqfromLatin1("rtl") : - TQString::tqfromLatin1("ltr")); + TQString dir = (TQApplication::reverseLayout() ? TQString::fromLatin1("rtl") : + TQString::fromLatin1("ltr")); TQValueList::iterator it = msgs.begin(); TQString accountLabel; TQString resultHTML = "" + (*it).timestamp().date().toString() + "
"; - DOM::HTMLElement newNode = mHtmlPart->document().createElement(TQString::tqfromLatin1("span")); - newNode.setAttribute(TQString::tqfromLatin1("dir"), dir); + DOM::HTMLElement newNode = mHtmlPart->document().createElement(TQString::fromLatin1("span")); + newNode.setAttribute(TQString::fromLatin1("dir"), dir); newNode.setInnerHTML(resultHTML); mHtmlPart->htmlDocument().body().appendChild(newNode); @@ -384,8 +384,8 @@ void HistoryDialog::setMessages(TQValueList msgs) : "textColor().light(200).name() + "\">< ") + body + "
"; - newNode = mHtmlPart->document().createElement(TQString::tqfromLatin1("span")); - newNode.setAttribute(TQString::tqfromLatin1("dir"), dir); + newNode = mHtmlPart->document().createElement(TQString::fromLatin1("span")); + newNode.setAttribute(TQString::fromLatin1("dir"), dir); newNode.setInnerHTML(resultHTML); mHtmlPart->htmlDocument().body().appendChild(newNode); diff --git a/kopete/plugins/history/historyguiclient.cpp b/kopete/plugins/history/historyguiclient.cpp index b8608ac9..4b1798ae 100644 --- a/kopete/plugins/history/historyguiclient.cpp +++ b/kopete/plugins/history/historyguiclient.cpp @@ -41,7 +41,7 @@ HistoryGUIClient::HistoryGUIClient(Kopete::ChatSession *parent, const char *name TQPtrList mb=m_manager->members(); m_logger=new HistoryLogger( mb.first() , this ); - actionLast=new KAction( i18n("History Last" ), TQString::tqfromLatin1( "finish" ), 0, this, TQT_SLOT(slotLast()), actionCollection() , "historyLast" ); + actionLast=new KAction( i18n("History Last" ), TQString::fromLatin1( "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/historylogger.cpp b/kopete/plugins/history/historylogger.cpp index 02bc1b2f..c79c11c0 100644 --- a/kopete/plugins/history/historylogger.cpp +++ b/kopete/plugins/history/historylogger.cpp @@ -45,7 +45,7 @@ HistoryLogger::HistoryLogger( Kopete::MetaContact *m, TQObject *parent, const c m_metaContact=m; m_hideOutgoing=false; m_cachedMonth=-1; - m_realMonth=TQDate::tqcurrentDate().month(); + m_realMonth=TQDate::currentDate().month(); m_oldSens=Default; //the contact may be destroyed, for example, if the contact changes its metacontact @@ -63,7 +63,7 @@ HistoryLogger::HistoryLogger( Kopete::Contact *c, TQObject *parent, const char m_cachedMonth=-1; m_metaContact=c->metaContact(); m_hideOutgoing=false; - m_realMonth=TQDate::tqcurrentDate().month(); + m_realMonth=TQDate::currentDate().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::tqcurrentDate().month()) + if(m_realMonth!=TQDate::currentDate().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::tqcurrentDate().month(); + m_realMonth=TQDate::currentDate().month(); } if(!m_metaContact) @@ -137,7 +137,7 @@ TQDomDocument HistoryLogger::getDocument(const Kopete::Contact *c, unsigned int return documents[month]; - TQDomDocument doc = getDocument(c, TQDate::tqcurrentDate().addMonths(0-month), canLoad, contain); + TQDomDocument doc = getDocument(c, TQDate::currentDate().addMonths(0-month), canLoad, contain); documents.insert(month, doc); m_documents[c]=documents; @@ -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::tqcurrentDate().year()) ); - dateElem.setAttribute( "month", TQString::number(TQDate::tqcurrentDate().month()) ); + dateElem.setAttribute( "year", TQString::number(TQDate::currentDate().year()) ); + dateElem.setAttribute( "month", TQString::number(TQDate::currentDate().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::tqcurrentDate()); + const TQString filename=getFileName(c,TQDate::currentDate()); if(!m_toSaveFileName.isEmpty() && m_toSaveFileName != filename) { //that mean the contact or the month has changed, save it now. saveToDisk(); @@ -376,7 +376,7 @@ TQValueList 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::tqfromLatin1("%2") + msg.setBody( TQString::fromLatin1("%2") .tqarg( dt.toString(Qt::LocalDate), msg.escapedBody() ), Kopete::Message::RichText); @@ -403,7 +403,7 @@ TQValueList HistoryLogger::readMessages(TQDate date) TQValueList HistoryLogger::readMessages(unsigned int lines, const Kopete::Contact *c, Sens sens, bool reverseOrder, bool colorize) { - //TQDate dd = TQDate::tqcurrentDate().addMonths(0-m_currentMonth); + //TQDate dd = TQDate::currentDate().addMonths(0-m_currentMonth); TQValueList messages; @@ -490,7 +490,7 @@ TQValueList HistoryLogger::readMessages(unsigned int lines, if( !msgElem2.isNull() && msgElem2.tagName()=="msg") { rxTime.search(msgElem2.attribute("time")); - TQDate d=TQDate::tqcurrentDate().addMonths(0-m_currentMonth); + TQDate d=TQDate::currentDate().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) ) { @@ -587,14 +587,14 @@ TQValueList HistoryLogger::readMessages(unsigned int lines, { //parse timestamp only if it was not already parsed rxTime.search(msgElem.attribute("time")); - TQDate d=TQDate::tqcurrentDate().addMonths(0-m_currentMonth); + TQDate d=TQDate::currentDate().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::tqfromLatin1("%3") + msg.setBody( TQString::fromLatin1("%3") .tqarg( fgColor.name(), timestamp.toString(Qt::LocalDate), msg.escapedBody() ), Kopete::Message::RichText ); @@ -602,7 +602,7 @@ TQValueList HistoryLogger::readMessages(unsigned int lines, } else { - msg.setBody( TQString::tqfromLatin1("%2") + msg.setBody( TQString::fromLatin1("%2") .tqarg( timestamp.toString(Qt::LocalDate), msg.escapedBody() ), Kopete::Message::RichText ); @@ -635,7 +635,7 @@ TQValueList HistoryLogger::readMessages(unsigned int lines, TQRegExp rx("(\\d+) (\\d+):(\\d+):(\\d+)"); rx.search(msgElem.attribute("time")); - TQDate d = TQDate::tqcurrentDate().addMonths(0-m_currentMonth); + TQDate d = TQDate::currentDate().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 HistoryLogger::readMessages(unsigned int lines, TQString HistoryLogger::getFileName(const Kopete::Contact* c, TQDate date) { - TQString name = c->protocol()->pluginId().replace( TQRegExp( TQString::tqfromLatin1( "[./~?*]" ) ), TQString::tqfromLatin1( "-" ) ) + - TQString::tqfromLatin1( "/" ) + - c->account()->accountId().replace( TQRegExp( TQString::tqfromLatin1( "[./~?*]" ) ), TQString::tqfromLatin1( "-" ) ) + - TQString::tqfromLatin1( "/" ) + - c->contactId().replace( TQRegExp( TQString::tqfromLatin1( "[./~?*]" ) ), TQString::tqfromLatin1( "-" ) ) + + 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( "-" ) ) + date.toString(".yyyyMM"); - TQString filename=locateLocal( "data", TQString::tqfromLatin1( "kopete/logs/" ) + name+ TQString::tqfromLatin1( ".xml" ) ) ; + TQString filename=locateLocal( "data", TQString::fromLatin1( "kopete/logs/" ) + name+ TQString::fromLatin1( ".xml" ) ) ; //Check if there is a kopete 0.7.x file TQFileInfo fi(filename); if(!fi.exists()) { - name = c->protocol()->pluginId().replace( TQRegExp( TQString::tqfromLatin1( "[./~?*]" ) ), TQString::tqfromLatin1( "-" ) ) + - TQString::tqfromLatin1( "/" ) + - c->contactId().replace( TQRegExp( TQString::tqfromLatin1( "[./~?*]" ) ), TQString::tqfromLatin1( "-" ) ) + + name = c->protocol()->pluginId().replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ) + + TQString::fromLatin1( "/" ) + + c->contactId().replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ) + date.toString(".yyyyMM"); - TQString filename2=locateLocal( "data", TQString::tqfromLatin1( "kopete/logs/" ) + name+ TQString::tqfromLatin1( ".xml" ) ) ; + TQString filename2=locateLocal( "data", TQString::fromLatin1( "kopete/logs/" ) + name+ TQString::fromLatin1( ".xml" ) ) ; TQFileInfo fi2(filename2); if(fi2.exists()) @@ -702,7 +702,7 @@ 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::tqfromLatin1("[./~?*]")),TQString::tqfromLatin1("-")) + c->protocol()->pluginId().replace( TQRegExp(TQString::fromLatin1("[./~?*]")),TQString::fromLatin1("-")) )); d1.setFilter( TQDir::Files | TQDir::NoSymLinks ); d1.setSorting( TQDir::Name ); @@ -712,10 +712,10 @@ unsigned int HistoryLogger::getFirstMonth(const Kopete::Contact *c) while ( (fi = it1.current()) != 0 ) { - if(fi->fileName().contains(c->contactId().replace( TQRegExp( TQString::tqfromLatin1( "[./~?*]" ) ), TQString::tqfromLatin1( "-" ) ))) + if(fi->fileName().contains(c->contactId().replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ))) { rx.search(fi->fileName()); - int result = 12*(TQDate::tqcurrentDate().year() - rx.cap(1).toUInt()) +TQDate::tqcurrentDate().month() - rx.cap(2).toUInt(); + int result = 12*(TQDate::currentDate().year() - rx.cap(1).toUInt()) +TQDate::currentDate().month() - rx.cap(2).toUInt(); if(result < 0) { @@ -730,9 +730,9 @@ unsigned int HistoryLogger::getFirstMonth(const Kopete::Contact *c) TQDir d(locateLocal("data",TQString("kopete/logs/")+ - c->protocol()->pluginId().replace( TQRegExp(TQString::tqfromLatin1("[./~?*]")),TQString::tqfromLatin1("-")) + - TQString::tqfromLatin1( "/" ) + - c->account()->accountId().replace( TQRegExp( TQString::tqfromLatin1( "[./~?*]" ) ), TQString::tqfromLatin1( "-" ) ) + c->protocol()->pluginId().replace( TQRegExp(TQString::fromLatin1("[./~?*]")),TQString::fromLatin1("-")) + + TQString::fromLatin1( "/" ) + + c->account()->accountId().replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ) )); d.setFilter( TQDir::Files | TQDir::NoSymLinks ); @@ -742,10 +742,10 @@ unsigned int HistoryLogger::getFirstMonth(const Kopete::Contact *c) TQFileInfoListIterator it( *list ); while ( (fi = it.current()) != 0 ) { - if(fi->fileName().contains(c->contactId().replace( TQRegExp( TQString::tqfromLatin1( "[./~?*]" ) ), TQString::tqfromLatin1( "-" ) ))) + if(fi->fileName().contains(c->contactId().replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ))) { rx.search(fi->fileName()); - int result = 12*(TQDate::tqcurrentDate().year() - rx.cap(1).toUInt()) +TQDate::tqcurrentDate().month() - rx.cap(2).toUInt(); + int result = 12*(TQDate::currentDate().year() - rx.cap(1).toUInt()) +TQDate::currentDate().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; diff --git a/kopete/plugins/history/historyplugin.cpp b/kopete/plugins/history/historyplugin.cpp index 8cd76682..a6069289 100644 --- a/kopete/plugins/history/historyplugin.cpp +++ b/kopete/plugins/history/historyplugin.cpp @@ -45,7 +45,7 @@ HistoryPlugin::HistoryPlugin( TQObject *parent, const char *name, const TQString : Kopete::Plugin( HistoryPluginFactory::instance(), parent, name ), m_loggerFactory( this ) { KAction *viewMetaContactHistory = new KAction( i18n("View &History" ), - TQString::tqfromLatin1( "history" ), 0, this, TQT_SLOT(slotViewHistory()), + TQString::fromLatin1( "history" ), 0, this, TQT_SLOT(slotViewHistory()), actionCollection(), "viewMetaContactHistory" ); viewMetaContactHistory->setEnabled( Kopete::ContactList::self()->selectedMetaContacts().count() == 1 ); @@ -136,7 +136,7 @@ void HistoryPlugin::slotViewHistory() void HistoryPlugin::slotViewCreated( KopeteView* v ) { - if(v->plugin()->pluginInfo()->pluginName() != TQString::tqfromLatin1("kopete_chatwindow") ) + if(v->plugin()->pluginInfo()->pluginName() != TQString::fromLatin1("kopete_chatwindow") ) return; //Email chat windows are not supported. bool autoChatWindow = HistoryConfig::auto_chatwindow(); diff --git a/kopete/plugins/history/historyprefsui.ui b/kopete/plugins/history/historyprefsui.ui index 36f3dee2..558c68a2 100644 --- a/kopete/plugins/history/historyprefsui.ui +++ b/kopete/plugins/history/historyprefsui.ui @@ -148,7 +148,7 @@ Expanding - + 31 90 diff --git a/kopete/plugins/history/historyviewer.ui b/kopete/plugins/history/historyviewer.ui index af9f1bce..35891bf9 100644 --- a/kopete/plugins/history/historyviewer.ui +++ b/kopete/plugins/history/historyviewer.ui @@ -20,7 +20,7 @@ 0 - + 300 200 @@ -45,7 +45,7 @@ statusLabel - + 32767 20 @@ -109,13 +109,13 @@ 0 - + 70 0 - + 150 32767 @@ -160,13 +160,13 @@ 0 - + 140 0 - + 32767 32767 @@ -207,13 +207,13 @@ 0 - + 0 0 - + 32767 32767 @@ -237,7 +237,7 @@ 0 - + 0 0 @@ -323,7 +323,7 @@ 0 - + 200 0 -- cgit v1.2.1