summaryrefslogtreecommitdiffstats
path: root/kopete/plugins/history
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-16 09:59:34 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-16 09:59:34 -0600
commit83677e35509b4dafac63b76995652bdf3b49f209 (patch)
tree591f1dc22278addb439726c42896376b17bb42bd /kopete/plugins/history
parent808e453c56036211f57482ed847d54aca01bba68 (diff)
downloadtdenetwork-83677e35509b4dafac63b76995652bdf3b49f209.tar.gz
tdenetwork-83677e35509b4dafac63b76995652bdf3b49f209.zip
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit 808e453c56036211f57482ed847d54aca01bba68.
Diffstat (limited to 'kopete/plugins/history')
-rw-r--r--kopete/plugins/history/converter.cpp40
-rw-r--r--kopete/plugins/history/historydialog.cpp44
-rw-r--r--kopete/plugins/history/historyguiclient.cpp2
-rw-r--r--kopete/plugins/history/historylogger.cpp72
-rw-r--r--kopete/plugins/history/historyplugin.cpp4
-rw-r--r--kopete/plugins/history/historypreferences.cpp2
-rw-r--r--kopete/plugins/history/historyprefsui.ui2
-rw-r--r--kopete/plugins/history/historyviewer.ui28
8 files changed, 97 insertions, 97 deletions
diff --git a/kopete/plugins/history/converter.cpp b/kopete/plugins/history/converter.cpp
index 677ed1d2..76b29a5c 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::fromLatin1( "kopete"));
+ TQString kopetedir=locateLocal( "data", TQString::tqfromLatin1( "kopete"));
TQDir d( kopetedir ); //d should point to ~/.kde/share/apps/kopete/
d.setFilter( TQDir::Dirs );
@@ -112,7 +112,7 @@ void HistoryPlugin::convertOldHistory()
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 )
@@ -122,7 +122,7 @@ void HistoryPlugin::convertOldHistory()
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.replace( TQRegExp( TQString::tqfromLatin1( "[./~?*]" ) ), TQString::tqfromLatin1( "-" ) ) +
+ TQString::tqfromLatin1( "/" ) +
+ contactId.replace( 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.replace( TQRegExp( TQString::tqfromLatin1( "[./~?*]" ) ), TQString::tqfromLatin1( "-" ) ) +
+ TQString::tqfromLatin1( "/" ) +
+ contactId.replace( 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,12 +310,12 @@ 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 TQFileInfoList *list = d2.entryInfoList();
TQFileInfoListIterator it( *list );
diff --git a/kopete/plugins/history/historydialog.cpp b/kopete/plugins/history/historydialog.cpp
index 4b4877c2..c4f5418f 100644
--- a/kopete/plugins/history/historydialog.cpp
+++ b/kopete/plugins/history/historydialog.cpp
@@ -35,12 +35,12 @@
#include <tqpushbutton.h>
#include <tqlineedit.h>
#include <tqcheckbox.h>
-#include <layout.h>
+#include <tqlayout.h>
#include <tqdir.h>
#include <tqdatetime.h>
#include <tqheader.h>
#include <tqlabel.h>
-#include <clipboard.h>
+#include <tqclipboard.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -95,7 +95,7 @@ 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)
+ i18n("History for %1").tqarg(mc->displayName()), 0), mSearching(false)
{
TQString fontSize;
TQString htmlCode;
@@ -148,7 +148,7 @@ HistoryDialog::HistoryDialog(Kopete::MetaContact *mc, TQWidget* parent,
mHtmlView->setMarginWidth(4);
mHtmlView->setMarginHeight(4);
mHtmlView->setFocusPolicy(TQ_NoFocus);
- mHtmlView->setSizePolicy(
+ 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();
@@ -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::fromLatin1( "editcopy" ), 0, TQT_TQOBJECT(this), TQT_SLOT( slotCopyURL() ), ac );
+ mCopyURLAct = new KAction( i18n( "Copy Link Address" ), TQString::tqfromLatin1( "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::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) );
+ const TQString contact_in_filename=c->contactId().replace( 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().replace( TQRegExp(TQString::tqfromLatin1("[./~?*]")),TQString::tqfromLatin1("-"))
));
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::fromLatin1("[./~?*]")),TQString::fromLatin1("-")) +
- TQString::fromLatin1( "/" ) +
- c->account()->accountId().replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) )
+ c->protocol()->pluginId().replace( TQRegExp(TQString::tqfromLatin1("[./~?*]")),TQString::tqfromLatin1("-")) +
+ TQString::tqfromLatin1( "/" ) +
+ c->account()->accountId().replace( TQRegExp( TQString::tqfromLatin1( "[./~?*]" ) ), TQString::tqfromLatin1( "-" ) )
);
TQDir d(logDir);
d.setFilter( TQDir::Files | TQDir::NoSymLinks );
@@ -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);
@@ -384,8 +384,8 @@ void HistoryDialog::setMessages(TQValueList<Kopete::Message> msgs)
: "<font color=\"" + KopetePrefs::prefs()->textColor().light(200).name() + "\"><b>&lt;</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);
@@ -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, TQClipboard::Clipboard);
- TQApplication::clipboard()->setText(qsSelection, TQClipboard::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, TQClipboard::Clipboard);
- TQApplication::clipboard()->setText( mURL, TQClipboard::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/historyguiclient.cpp b/kopete/plugins/history/historyguiclient.cpp
index 4b1798ae..b8608ac9 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<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/historylogger.cpp b/kopete/plugins/history/historylogger.cpp
index f03d165b..02bc1b2f 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::currentDate().month();
+ m_realMonth=TQDate::tqcurrentDate().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::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)
@@ -137,7 +137,7 @@ TQDomDocument HistoryLogger::getDocument(const Kopete::Contact *c, unsigned int
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;
@@ -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();
@@ -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;
@@ -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) )
{
@@ -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().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( "-" ) ) +
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().replace( TQRegExp( TQString::tqfromLatin1( "[./~?*]" ) ), TQString::tqfromLatin1( "-" ) ) +
+ TQString::tqfromLatin1( "/" ) +
+ c->contactId().replace( 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,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::fromLatin1("[./~?*]")),TQString::fromLatin1("-"))
+ c->protocol()->pluginId().replace( TQRegExp(TQString::tqfromLatin1("[./~?*]")),TQString::tqfromLatin1("-"))
));
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::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) )))
+ if(fi->fileName().contains(c->contactId().replace( 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,9 +730,9 @@ 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().replace( TQRegExp(TQString::tqfromLatin1("[./~?*]")),TQString::tqfromLatin1("-")) +
+ TQString::tqfromLatin1( "/" ) +
+ c->account()->accountId().replace( TQRegExp( TQString::tqfromLatin1( "[./~?*]" ) ), TQString::tqfromLatin1( "-" ) )
));
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::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) )))
+ if(fi->fileName().contains(c->contactId().replace( 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;
diff --git a/kopete/plugins/history/historyplugin.cpp b/kopete/plugins/history/historyplugin.cpp
index a6069289..8cd76682 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::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 );
@@ -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();
diff --git a/kopete/plugins/history/historypreferences.cpp b/kopete/plugins/history/historypreferences.cpp
index 81fd216b..370e6721 100644
--- a/kopete/plugins/history/historypreferences.cpp
+++ b/kopete/plugins/history/historypreferences.cpp
@@ -20,7 +20,7 @@
#include "historyprefsui.h"
#include <kgenericfactory.h>
-#include <layout.h>
+#include <tqlayout.h>
#include <tqgroupbox.h>
#include <kcolorbutton.h>
#include <knuminput.h>
diff --git a/kopete/plugins/history/historyprefsui.ui b/kopete/plugins/history/historyprefsui.ui
index 558c68a2..36f3dee2 100644
--- a/kopete/plugins/history/historyprefsui.ui
+++ b/kopete/plugins/history/historyprefsui.ui
@@ -148,7 +148,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>31</width>
<height>90</height>
diff --git a/kopete/plugins/history/historyviewer.ui b/kopete/plugins/history/historyviewer.ui
index 8d7ca4b2..af9f1bce 100644
--- a/kopete/plugins/history/historyviewer.ui
+++ b/kopete/plugins/history/historyviewer.ui
@@ -20,7 +20,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>300</width>
<height>200</height>
@@ -35,7 +35,7 @@
</property>
<widget class="TQLayoutWidget" row="3" column="0">
<property name="name">
- <cstring>layout3</cstring>
+ <cstring>tqlayout3</cstring>
</property>
<hbox>
<property name="name">
@@ -45,7 +45,7 @@
<property name="name">
<cstring>statusLabel</cstring>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>32767</width>
<height>20</height>
@@ -64,7 +64,7 @@
</widget>
<widget class="TQLayoutWidget" row="2" column="0">
<property name="name">
- <cstring>layout8</cstring>
+ <cstring>tqlayout8</cstring>
</property>
<hbox>
<property name="name">
@@ -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>
@@ -136,7 +136,7 @@
</property>
<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>
@@ -237,7 +237,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>0</width>
<height>0</height>
@@ -253,7 +253,7 @@
</widget>
<widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
- <cstring>layout11</cstring>
+ <cstring>tqlayout11</cstring>
</property>
<hbox>
<property name="name">
@@ -323,7 +323,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>200</width>
<height>0</height>