summaryrefslogtreecommitdiffstats
path: root/kopete/plugins/history/historylogger.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/plugins/history/historylogger.cpp')
-rw-r--r--kopete/plugins/history/historylogger.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/kopete/plugins/history/historylogger.cpp b/kopete/plugins/history/historylogger.cpp
index 714fe966..063ba73d 100644
--- a/kopete/plugins/history/historylogger.cpp
+++ b/kopete/plugins/history/historylogger.cpp
@@ -125,7 +125,7 @@ TQDomDocument HistoryLogger::getDocument(const Kopete::Contact *c, unsigned int
return TQDomDocument();
}
- if(!m_metaContact->contacts().tqcontains(c))
+ if(!m_metaContact->contacts().contains(c))
{
if(contain)
*contain=false;
@@ -133,7 +133,7 @@ TQDomDocument HistoryLogger::getDocument(const Kopete::Contact *c, unsigned int
}
TQMap<unsigned int , TQDomDocument> documents = m_documents[c];
- if (documents.tqcontains(month))
+ if (documents.contains(month))
return documents[month];
@@ -156,7 +156,7 @@ TQDomDocument HistoryLogger::getDocument(const Kopete::Contact *c, const TQDate
return TQDomDocument();
}
- if(!m_metaContact->contacts().tqcontains(c))
+ if(!m_metaContact->contacts().contains(c))
{
if(contain)
*contain=false;
@@ -223,7 +223,7 @@ void HistoryLogger::appendMessage( const Kopete::Message &msg , const Kopete::Co
}
- if(!c || !m_metaContact->contacts().tqcontains(c) )
+ if(!c || !m_metaContact->contacts().contains(c) )
{
/*TQPtrList<Kopete::Contact> contacts= m_metaContact->contacts();
TQPtrListIterator<Kopete::Contact> it( contacts );
@@ -418,7 +418,7 @@ TQValueList<Kopete::Message> HistoryLogger::readMessages(unsigned int lines,
return messages;
}
- if(c && !m_metaContact->contacts().tqcontains(c) )
+ if(c && !m_metaContact->contacts().contains(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.tqcontains(*it))
+ if(m_currentElements.contains(*it))
n=m_currentElements[*it];
else //there is not yet "next message" register, so we will take the first (for the current month)
{
@@ -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.tqcontains(currentContact))
+ if(m_currentElements.contains(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().tqcontains(TQRegExp(m_filter,m_filterCaseSensitive)) : msgElem.text().tqcontains(m_filter,m_filterCaseSensitive) ))
+ if( m_filter.isNull() || ( m_filterRegExp? msgElem.text().contains(TQRegExp(m_filter,m_filterCaseSensitive)) : msgElem.text().contains(m_filter,m_filterCaseSensitive) ))
{
TQString f=msgElem.attribute("from" );
const Kopete::Contact *from=(f.isNull() || !currentContact) ? 0L : currentContact->account()->contacts()[f];
@@ -663,11 +663,11 @@ TQValueList<Kopete::Message> HistoryLogger::readMessages(unsigned int lines,
TQString HistoryLogger::getFileName(const Kopete::Contact* c, TQDate date)
{
- TQString name = c->protocol()->pluginId().tqreplace( TQRegExp( TQString::tqfromLatin1( "[./~?*]" ) ), TQString::tqfromLatin1( "-" ) ) +
+ TQString name = c->protocol()->pluginId().replace( TQRegExp( TQString::tqfromLatin1( "[./~?*]" ) ), TQString::tqfromLatin1( "-" ) ) +
TQString::tqfromLatin1( "/" ) +
- c->account()->accountId().tqreplace( TQRegExp( TQString::tqfromLatin1( "[./~?*]" ) ), TQString::tqfromLatin1( "-" ) ) +
+ c->account()->accountId().replace( TQRegExp( TQString::tqfromLatin1( "[./~?*]" ) ), TQString::tqfromLatin1( "-" ) ) +
TQString::tqfromLatin1( "/" ) +
- c->contactId().tqreplace( TQRegExp( TQString::tqfromLatin1( "[./~?*]" ) ), TQString::tqfromLatin1( "-" ) ) +
+ c->contactId().replace( TQRegExp( TQString::tqfromLatin1( "[./~?*]" ) ), TQString::tqfromLatin1( "-" ) ) +
date.toString(".yyyyMM");
TQString filename=locateLocal( "data", TQString::tqfromLatin1( "kopete/logs/" ) + name+ TQString::tqfromLatin1( ".xml" ) ) ;
@@ -676,9 +676,9 @@ TQString HistoryLogger::getFileName(const Kopete::Contact* c, TQDate date)
TQFileInfo fi(filename);
if(!fi.exists())
{
- name = c->protocol()->pluginId().tqreplace( TQRegExp( TQString::tqfromLatin1( "[./~?*]" ) ), TQString::tqfromLatin1( "-" ) ) +
+ name = c->protocol()->pluginId().replace( TQRegExp( TQString::tqfromLatin1( "[./~?*]" ) ), TQString::tqfromLatin1( "-" ) ) +
TQString::tqfromLatin1( "/" ) +
- c->contactId().tqreplace( TQRegExp( TQString::tqfromLatin1( "[./~?*]" ) ), TQString::tqfromLatin1( "-" ) ) +
+ c->contactId().replace( TQRegExp( TQString::tqfromLatin1( "[./~?*]" ) ), TQString::tqfromLatin1( "-" ) ) +
date.toString(".yyyyMM");
TQString filename2=locateLocal( "data", TQString::tqfromLatin1( "kopete/logs/" ) + name+ TQString::tqfromLatin1( ".xml" ) ) ;
@@ -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().tqreplace( TQRegExp(TQString::tqfromLatin1("[./~?*]")),TQString::tqfromLatin1("-"))
+ c->protocol()->pluginId().replace( TQRegExp(TQString::tqfromLatin1("[./~?*]")),TQString::tqfromLatin1("-"))
));
d1.setFilter( TQDir::Files | TQDir::NoSymLinks );
d1.setSorting( TQDir::Name );
@@ -712,7 +712,7 @@ unsigned int HistoryLogger::getFirstMonth(const Kopete::Contact *c)
while ( (fi = it1.current()) != 0 )
{
- if(fi->fileName().tqcontains(c->contactId().tqreplace( TQRegExp( TQString::tqfromLatin1( "[./~?*]" ) ), TQString::tqfromLatin1( "-" ) )))
+ if(fi->fileName().contains(c->contactId().replace( TQRegExp( TQString::tqfromLatin1( "[./~?*]" ) ), TQString::tqfromLatin1( "-" ) )))
{
rx.search(fi->fileName());
int result = 12*(TQDate::tqcurrentDate().year() - rx.cap(1).toUInt()) +TQDate::tqcurrentDate().month() - rx.cap(2).toUInt();
@@ -730,9 +730,9 @@ unsigned int HistoryLogger::getFirstMonth(const Kopete::Contact *c)
TQDir d(locateLocal("data",TQString("kopete/logs/")+
- c->protocol()->pluginId().tqreplace( TQRegExp(TQString::tqfromLatin1("[./~?*]")),TQString::tqfromLatin1("-")) +
+ c->protocol()->pluginId().replace( TQRegExp(TQString::tqfromLatin1("[./~?*]")),TQString::tqfromLatin1("-")) +
TQString::tqfromLatin1( "/" ) +
- c->account()->accountId().tqreplace( TQRegExp( TQString::tqfromLatin1( "[./~?*]" ) ), TQString::tqfromLatin1( "-" ) )
+ c->account()->accountId().replace( TQRegExp( TQString::tqfromLatin1( "[./~?*]" ) ), TQString::tqfromLatin1( "-" ) )
));
d.setFilter( TQDir::Files | TQDir::NoSymLinks );
@@ -742,7 +742,7 @@ unsigned int HistoryLogger::getFirstMonth(const Kopete::Contact *c)
TQFileInfoListIterator it( *list );
while ( (fi = it.current()) != 0 )
{
- if(fi->fileName().tqcontains(c->contactId().tqreplace( TQRegExp( TQString::tqfromLatin1( "[./~?*]" ) ), TQString::tqfromLatin1( "-" ) )))
+ if(fi->fileName().contains(c->contactId().replace( TQRegExp( TQString::tqfromLatin1( "[./~?*]" ) ), TQString::tqfromLatin1( "-" ) )))
{
rx.search(fi->fileName());
int result = 12*(TQDate::tqcurrentDate().year() - rx.cap(1).toUInt()) +TQDate::tqcurrentDate().month() - rx.cap(2).toUInt();
@@ -838,7 +838,7 @@ TQValueList<int> HistoryLogger::getDaysForMonth(TQDate date)
pos += rxTime.matchedLength();
int day=rxTime.capturedTexts()[1].toInt();
- if ( day !=lastDay && dayList.tqfind(day) == dayList.end()) // avoid duplicates
+ if ( day !=lastDay && dayList.find(day) == dayList.end()) // avoid duplicates
{
dayList.append(rxTime.capturedTexts()[1].toInt());
lastDay=day;