summaryrefslogtreecommitdiffstats
path: root/kopete/plugins/addbookmarks/addbookmarksplugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/plugins/addbookmarks/addbookmarksplugin.cpp')
-rw-r--r--kopete/plugins/addbookmarks/addbookmarksplugin.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/kopete/plugins/addbookmarks/addbookmarksplugin.cpp b/kopete/plugins/addbookmarks/addbookmarksplugin.cpp
index fae164f1..113ec95e 100644
--- a/kopete/plugins/addbookmarks/addbookmarksplugin.cpp
+++ b/kopete/plugins/addbookmarks/addbookmarksplugin.cpp
@@ -12,9 +12,9 @@
#include <kdebug.h>
#include <kbookmark.h>
-#include <qvariant.h>
-#include <qtextcodec.h>
-#include <qregexp.h>
+#include <tqvariant.h>
+#include <tqtextcodec.h>
+#include <tqregexp.h>
#include "addbookmarksplugin.moc"
#include "addbookmarksplugin.h"
@@ -39,11 +39,11 @@ static bool isURLInGroup(const KURL& url, const KBookmarkGroup& group)
return false;
}
-BookmarksPlugin::BookmarksPlugin(QObject *parent, const char *name, const QStringList &/*args*/)
+BookmarksPlugin::BookmarksPlugin(TQObject *parent, const char *name, const TQStringList &/*args*/)
: Kopete::Plugin(BookmarksPluginFactory::instance(), parent, name)
{
//kdDebug(14501) << "plugin loading" << endl;
- connect( Kopete::ChatSessionManager::self(), SIGNAL( aboutToDisplay( Kopete::Message & ) ), this, SLOT( slotBookmarkURLsInMessage( Kopete::Message & ) ) );
+ connect( Kopete::ChatSessionManager::self(), TQT_SIGNAL( aboutToDisplay( Kopete::Message & ) ), this, TQT_SLOT( slotBookmarkURLsInMessage( Kopete::Message & ) ) );
}
/*!
@@ -75,16 +75,16 @@ void BookmarksPlugin::slotBookmarkURLsInMessage(Kopete::Message & msg)
delete URLsList;
}
-void BookmarksPlugin::slotAddKopeteBookmark( KIO::Job *transfer, const QByteArray &data )
+void BookmarksPlugin::slotAddKopeteBookmark( KIO::Job *transfer, const TQByteArray &data )
{
- QTextCodec *codec = getPageEncoding( data );
- QString htmlpage = codec->toUnicode( data );
- QRegExp rx("<title>([^<]*){1,96}</title>");
+ TQTextCodec *codec = getPageEncoding( data );
+ TQString htmlpage = codec->toUnicode( data );
+ TQRegExp rx("<title>([^<]*){1,96}</title>");
rx.setCaseSensitive(false);
int pos = rx.search( htmlpage );
KBookmarkManager *mgr = KBookmarkManager::userBookmarksManager();
KBookmarkGroup group = getKopeteFolder();
- QString sender = m_map[(KIO::TransferJob*)transfer].sender;
+ TQString sender = m_map[(KIO::TransferJob*)transfer].sender;
if ( m_settings.useSubfolderForContact( sender ) )
group = getFolder( group, sender );
@@ -102,10 +102,10 @@ void BookmarksPlugin::slotAddKopeteBookmark( KIO::Job *transfer, const QByteArra
transfer->kill();
}
-KURL::List* BookmarksPlugin::extractURLsFromString( const QString& text )
+KURL::List* BookmarksPlugin::extractURLsFromString( const TQString& text )
{
KURL::List *list = new KURL::List;
- QRegExp rx("<a href=\"[^\\s\"]+\"");
+ TQRegExp rx("<a href=\"[^\\s\"]+\"");
int pos=0;
KURL url;
@@ -119,7 +119,7 @@ KURL::List* BookmarksPlugin::extractURLsFromString( const QString& text )
return list;
}
-void BookmarksPlugin::addKopeteBookmark( const KURL& url, const QString& sender )
+void BookmarksPlugin::addKopeteBookmark( const KURL& url, const TQString& sender )
{
KBookmarkGroup group = getKopeteFolder();
@@ -133,8 +133,8 @@ void BookmarksPlugin::addKopeteBookmark( const KURL& url, const QString& sender
// make asynchronous transfer to avoid GUI freezing due to overloaded web servers
transfer = KIO::get(url, false, false);
transfer->setInteractive(false);
- connect ( transfer, SIGNAL ( data( KIO::Job *, const QByteArray & ) ),
- this, SLOT ( slotAddKopeteBookmark( KIO::Job *, const QByteArray & ) ) );
+ connect ( transfer, TQT_SIGNAL ( data( KIO::Job *, const TQByteArray & ) ),
+ this, TQT_SLOT ( slotAddKopeteBookmark( KIO::Job *, const TQByteArray & ) ) );
m_map[transfer].url = url;
m_map[transfer].sender = sender;
}
@@ -144,10 +144,10 @@ KBookmarkGroup BookmarksPlugin::getKopeteFolder()
{
KBookmarkManager *mgr = KBookmarkManager::userBookmarksManager();
- return getFolder( mgr->root(), QString::fromLatin1("kopete") );
+ return getFolder( mgr->root(), TQString::fromLatin1("kopete") );
}
-KBookmarkGroup BookmarksPlugin::getFolder( KBookmarkGroup group, const QString& folder )
+KBookmarkGroup BookmarksPlugin::getFolder( KBookmarkGroup group, const TQString& folder )
{
KBookmark bookmark;
@@ -163,16 +163,16 @@ KBookmarkGroup BookmarksPlugin::getFolder( KBookmarkGroup group, const QString&
return group;
}
-QTextCodec* BookmarksPlugin::getPageEncoding( const QByteArray& data )
+TQTextCodec* BookmarksPlugin::getPageEncoding( const TQByteArray& data )
{
- QString temp = QString::fromLatin1(data);
- QRegExp rx("<meta[^>]*(charset|CHARSET)\\s*=\\s*[^>]*>");
+ TQString temp = TQString::fromLatin1(data);
+ TQRegExp rx("<meta[^>]*(charset|CHARSET)\\s*=\\s*[^>]*>");
int pos = rx.search( temp );
- QTextCodec *codec;
+ TQTextCodec *codec;
if( pos == -1 ){
kdDebug( 14501 ) << "charset not found in first data chunk" << endl;
- return QTextCodec::codecForName("iso8859-1");
+ return TQTextCodec::codecForName("iso8859-1");
}
//kdDebug(14501) << temp.mid(pos, rx.matchedLength()) << endl;
temp = temp.mid(pos, rx.matchedLength()-1);
@@ -181,9 +181,9 @@ QTextCodec* BookmarksPlugin::getPageEncoding( const QByteArray& data )
for( pos = 0 ; temp[pos].isLetterOrNumber() || temp[pos] == '-' ; pos++ );
temp = temp.left( pos );
//kdDebug(14501) << "encoding: " << temp << endl;
- codec = QTextCodec::codecForName( temp.latin1() );
+ codec = TQTextCodec::codecForName( temp.latin1() );
if( !codec ){
- return QTextCodec::codecForName("iso8859-1");
+ return TQTextCodec::codecForName("iso8859-1");
}
return codec;
}