summaryrefslogtreecommitdiffstats
path: root/kopete/plugins/addbookmarks
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/plugins/addbookmarks')
-rw-r--r--kopete/plugins/addbookmarks/addbookmarksplugin.cpp48
-rw-r--r--kopete/plugins/addbookmarks/addbookmarksplugin.h20
-rw-r--r--kopete/plugins/addbookmarks/addbookmarkspreferences.cpp42
-rw-r--r--kopete/plugins/addbookmarks/addbookmarkspreferences.h2
-rw-r--r--kopete/plugins/addbookmarks/addbookmarksprefssettings.cpp6
-rw-r--r--kopete/plugins/addbookmarks/addbookmarksprefssettings.h14
6 files changed, 66 insertions, 66 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;
}
diff --git a/kopete/plugins/addbookmarks/addbookmarksplugin.h b/kopete/plugins/addbookmarks/addbookmarksplugin.h
index 4c425b9f..459c1b8b 100644
--- a/kopete/plugins/addbookmarks/addbookmarksplugin.h
+++ b/kopete/plugins/addbookmarks/addbookmarksplugin.h
@@ -17,8 +17,8 @@
#include <kopeteplugin.h>
#include <kbookmarkmanager.h>
#include <kio/job.h>
-#include <qcstring.h>
-#include <qmap.h>
+#include <tqcstring.h>
+#include <tqmap.h>
/**
@author Roie Kerstein <sf_kersteinroie@bezeqint.net>
@@ -28,27 +28,27 @@ class BookmarksPlugin : public Kopete::Plugin
{
Q_OBJECT
public:
- BookmarksPlugin(QObject *parent, const char *name, const QStringList &args);
+ BookmarksPlugin(TQObject *parent, const char *name, const TQStringList &args);
private:
typedef struct S_URLANDNAME{
KURL url;
- QString sender;
+ TQString sender;
} URLandName;
- typedef QMap<KIO::TransferJob*,URLandName> JobsToURLsMap;
+ typedef TQMap<KIO::TransferJob*,URLandName> JobsToURLsMap;
JobsToURLsMap m_map;
BookmarksPrefsSettings m_settings;
- void addKopeteBookmark( const KURL& url, const QString& sender );
- KURL::List* extractURLsFromString( const QString& text );
+ void addKopeteBookmark( const KURL& url, const TQString& sender );
+ KURL::List* extractURLsFromString( const TQString& text );
KBookmarkGroup getKopeteFolder();
- KBookmarkGroup getFolder( KBookmarkGroup group, const QString& folder );
- QTextCodec* getPageEncoding( const QByteArray& data );
+ KBookmarkGroup getFolder( KBookmarkGroup group, const TQString& folder );
+ TQTextCodec* getPageEncoding( const TQByteArray& data );
public slots:
void slotBookmarkURLsInMessage(Kopete::Message & msg);
void slotReloadSettings();
private slots:
- void slotAddKopeteBookmark( KIO::Job *transfer, const QByteArray &data );
+ void slotAddKopeteBookmark( KIO::Job *transfer, const TQByteArray &data );
};
typedef KGenericFactory<BookmarksPlugin> BookmarksPluginFactory;
diff --git a/kopete/plugins/addbookmarks/addbookmarkspreferences.cpp b/kopete/plugins/addbookmarks/addbookmarkspreferences.cpp
index 12ebd877..69b7fc1b 100644
--- a/kopete/plugins/addbookmarks/addbookmarkspreferences.cpp
+++ b/kopete/plugins/addbookmarks/addbookmarkspreferences.cpp
@@ -15,32 +15,32 @@
#include <kgenericfactory.h>
#include <kopetepluginmanager.h>
#include <kopetecontactlist.h>
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qbuttongroup.h>
-#include <qlistbox.h>
-#include <qnamespace.h>
-#include <qradiobutton.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqbuttongroup.h>
+#include <tqlistbox.h>
+#include <tqnamespace.h>
+#include <tqradiobutton.h>
typedef KGenericFactory<BookmarksPreferences> BookmarksPreferencesFactory;
K_EXPORT_COMPONENT_FACTORY( kcm_kopete_addbookmarks, BookmarksPreferencesFactory("kcm_kopete_addbookmarks") )
-BookmarksPreferences::BookmarksPreferences(QWidget *parent, const char *name, const QStringList &args)
+BookmarksPreferences::BookmarksPreferences(TQWidget *parent, const char *name, const TQStringList &args)
: KCModule(BookmarksPreferencesFactory::instance(), parent, args)
{
Q_UNUSED( name );
- ( new QVBoxLayout (this) )->setAutoAdd( true );
+ ( new TQVBoxLayout (this) )->setAutoAdd( true );
p_dialog = new BookmarksPrefsUI( this );
load();
- connect( p_dialog->yesButton, SIGNAL( toggled(bool) ), this, SLOT( slotSetStatusChanged() ));
- connect( p_dialog->noButton, SIGNAL( toggled(bool) ), this, SLOT( slotSetStatusChanged() ));
- connect( p_dialog->onlySelectedButton, SIGNAL( toggled(bool) ), this, SLOT( slotSetStatusChanged() ));
- connect( p_dialog->onlyNotSelectedButton, SIGNAL( toggled(bool) ), this, SLOT( slotSetStatusChanged() ));
- connect( p_dialog->contactList, SIGNAL( selectionChanged() ), this, SLOT( slotSetStatusChanged() ));
+ connect( p_dialog->yesButton, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotSetStatusChanged() ));
+ connect( p_dialog->noButton, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotSetStatusChanged() ));
+ connect( p_dialog->onlySelectedButton, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotSetStatusChanged() ));
+ connect( p_dialog->onlyNotSelectedButton, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotSetStatusChanged() ));
+ connect( p_dialog->contactList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotSetStatusChanged() ));
if(Kopete::PluginManager::self()->plugin("kopete_addbookmarks") )
- connect( this, SIGNAL(PreferencesChanged()), Kopete::PluginManager::self()->plugin("kopete_addbookmarks") , SLOT(slotReloadSettings()));
- connect( p_dialog->m_addUntrusted, SIGNAL( toggled(bool) ), this, SLOT( slotAddUntrustedChanged() ) );
+ connect( this, TQT_SIGNAL(PreferencesChanged()), Kopete::PluginManager::self()->plugin("kopete_addbookmarks") , TQT_SLOT(slotReloadSettings()));
+ connect( p_dialog->m_addUntrusted, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotAddUntrustedChanged() ) );
}
@@ -50,8 +50,8 @@ BookmarksPreferences::~BookmarksPreferences()
void BookmarksPreferences::save()
{
- QStringList list;
- QStringList::iterator it;
+ TQStringList list;
+ TQStringList::iterator it;
m_settings.setFolderForEachContact( (BookmarksPrefsSettings::UseSubfolders)p_dialog->buttonGroup1->selectedId() );
@@ -87,15 +87,15 @@ void BookmarksPreferences::slotAddUntrustedChanged()
void BookmarksPreferences::load()
{
- QStringList list;
- QStringList::iterator it;
- QListBoxItem* item;
+ TQStringList list;
+ TQStringList::iterator it;
+ TQListBoxItem* item;
m_settings.load();
p_dialog->buttonGroup1->setButton(m_settings.isFolderForEachContact());
p_dialog->m_addUntrusted->setChecked( m_settings.addBookmarksFromUnknownContacts() );
if( p_dialog->contactList->count() == 0 ){
- QStringList contacts = Kopete::ContactList::self()->contacts();
+ TQStringList contacts = Kopete::ContactList::self()->contacts();
contacts.sort();
p_dialog->contactList->insertStringList( contacts );
}
diff --git a/kopete/plugins/addbookmarks/addbookmarkspreferences.h b/kopete/plugins/addbookmarks/addbookmarkspreferences.h
index 7a9d5bff..30c94b70 100644
--- a/kopete/plugins/addbookmarks/addbookmarkspreferences.h
+++ b/kopete/plugins/addbookmarks/addbookmarkspreferences.h
@@ -23,7 +23,7 @@ class BookmarksPreferences : public KCModule
{
Q_OBJECT
public:
- BookmarksPreferences(QWidget *parent = 0, const char *name = 0, const QStringList &args = QStringList());
+ BookmarksPreferences(TQWidget *parent = 0, const char *name = 0, const TQStringList &args = TQStringList());
~BookmarksPreferences();
diff --git a/kopete/plugins/addbookmarks/addbookmarksprefssettings.cpp b/kopete/plugins/addbookmarks/addbookmarksprefssettings.cpp
index 045ce801..34d921c3 100644
--- a/kopete/plugins/addbookmarks/addbookmarksprefssettings.cpp
+++ b/kopete/plugins/addbookmarks/addbookmarksprefssettings.cpp
@@ -15,8 +15,8 @@
#include "addbookmarksprefssettings.h"
-BookmarksPrefsSettings::BookmarksPrefsSettings(QObject *parent, const char *name)
- : QObject(parent, name)
+BookmarksPrefsSettings::BookmarksPrefsSettings(TQObject *parent, const char *name)
+ : TQObject(parent, name)
{
load();
}
@@ -61,7 +61,7 @@ void BookmarksPrefsSettings::save()
configfile->sync();
}
-bool BookmarksPrefsSettings::useSubfolderForContact( QString nickname )
+bool BookmarksPrefsSettings::useSubfolderForContact( TQString nickname )
{
if ( !nickname.isEmpty() )
{
diff --git a/kopete/plugins/addbookmarks/addbookmarksprefssettings.h b/kopete/plugins/addbookmarks/addbookmarksprefssettings.h
index 2d82e7c4..659f3c69 100644
--- a/kopete/plugins/addbookmarks/addbookmarksprefssettings.h
+++ b/kopete/plugins/addbookmarks/addbookmarksprefssettings.h
@@ -12,8 +12,8 @@
#ifndef ADDBOOKMARKSPREFSSETTINGS_H
#define ADDBOOKMARKSPREFSSETTINGS_H
-#include <qobject.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
/**
@author Roie Kerstein <sf_kersteinroie@bezeqint.net>
@@ -24,7 +24,7 @@ Q_OBJECT
public:
enum UseSubfolders { Always=0, Never=1, SelectedContacts=2, UnselectedContacts=3 };
- BookmarksPrefsSettings(QObject *parent = 0, const char *name = 0);
+ BookmarksPrefsSettings(TQObject *parent = 0, const char *name = 0);
~BookmarksPrefsSettings();
@@ -32,9 +32,9 @@ public:
void save();
UseSubfolders isFolderForEachContact() {return m_isfolderforeachcontact;}
void setFolderForEachContact(UseSubfolders val) {m_isfolderforeachcontact = val;}
- bool useSubfolderForContact( QString nickname );
- QStringList getContactsList() {return m_contactslist;}
- void setContactsList(QStringList list) {m_contactslist = list;}
+ bool useSubfolderForContact( TQString nickname );
+ TQStringList getContactsList() {return m_contactslist;}
+ void setContactsList(TQStringList list) {m_contactslist = list;}
bool addBookmarksFromUnknownContacts() { return m_addbookmarksfromunknowns; };
void setAddBookmarksFromUnknownContacts( bool );
@@ -42,7 +42,7 @@ private:
bool m_folderPerContact;
bool m_addbookmarksfromunknowns;
UseSubfolders m_isfolderforeachcontact;
- QStringList m_contactslist;
+ TQStringList m_contactslist;
};