summaryrefslogtreecommitdiffstats
path: root/katapult/plugins/catalogs/bookmarkcatalog/bookmarkcatalog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'katapult/plugins/catalogs/bookmarkcatalog/bookmarkcatalog.cpp')
-rw-r--r--katapult/plugins/catalogs/bookmarkcatalog/bookmarkcatalog.cpp62
1 files changed, 31 insertions, 31 deletions
diff --git a/katapult/plugins/catalogs/bookmarkcatalog/bookmarkcatalog.cpp b/katapult/plugins/catalogs/bookmarkcatalog/bookmarkcatalog.cpp
index e70d65f..0fae37d 100644
--- a/katapult/plugins/catalogs/bookmarkcatalog/bookmarkcatalog.cpp
+++ b/katapult/plugins/catalogs/bookmarkcatalog/bookmarkcatalog.cpp
@@ -27,12 +27,12 @@
#include <knuminput.h>
#include <kurlrequester.h>
-#include <qstring.h>
-#include <qradiobutton.h>
-#include <qbuttongroup.h>
-#include <qdir.h>
-#include <qregexp.h>
-#include <qfile.h>
+#include <tqstring.h>
+#include <tqradiobutton.h>
+#include <tqbuttongroup.h>
+#include <tqdir.h>
+#include <tqregexp.h>
+#include <tqfile.h>
#include "bookmarkcatalog.h"
#include "bookmark.h"
@@ -44,7 +44,7 @@
K_EXPORT_COMPONENT_FACTORY( katapult_bookmarkcatalog,
KGenericFactory<BookmarkCatalog>( "katapult_bookmarkcatalog" ) )
-BookmarkCatalog::BookmarkCatalog(QObject *, const char *, const QStringList&)
+BookmarkCatalog::BookmarkCatalog(TQObject *, const char *, const TQStringList&)
: CachedCatalog()
{
manager = KBookmarkManager::userBookmarksManager();
@@ -86,34 +86,34 @@ void BookmarkCatalog::cacheMozillaBookmarks()
if(_mozFile.isEmpty())
return;
- QFile bmFile(_mozFile);
+ TQFile bmFile(_mozFile);
if(!bmFile.open(IO_ReadOnly))
return;
- QString contents = bmFile.readAll();
- QRegExp rx("<A HREF=\"([^\"]+)\" [^>]+>([^<]+)</A>");
+ TQString contents = bmFile.readAll();
+ TQRegExp rx("<A HREF=\"([^\"]+)\" [^>]+>([^<]+)</A>");
int pos = 0;
while(pos > -1) {
pos = rx.search(contents, pos);
if(pos > -1) {
- addItem(new MozillaBookmark(rx.cap(1), rx.cap(2), QPixmap()));
+ addItem(new MozillaBookmark(rx.cap(1), rx.cap(2), TQPixmap()));
pos += rx.matchedLength();
}
}
}
-QString BookmarkCatalog::detectMozillaFile()
+TQString BookmarkCatalog::detectMozillaFile()
{
- QStringList testDirs;
+ TQStringList testDirs;
testDirs << ".firefox" << ".mozilla" << ".phoenix" << ".netscape";
- QDir home = QDir::home();
- for(QStringList::Iterator it = testDirs.begin(); it != testDirs.end(); ++it) {
- QString testDir = *it;
+ TQDir home = TQDir::home();
+ for(TQStringList::Iterator it = testDirs.begin(); it != testDirs.end(); ++it) {
+ TQString testDir = *it;
if(home.exists(testDir)) {
- QDir mozDir = QDir(home.path()+"/"+testDir).canonicalPath();
- if(mozDir.dirName() != testDir && testDirs.contains(mozDir.dirName()))
+ TQDir mozDir = TQDir(home.path()+"/"+testDir).canonicalPath();
+ if(mozDir.dirName() != testDir && testDirs.tqcontains(mozDir.dirName()))
continue;
- QString path = searchMozDir(mozDir.path());
+ TQString path = searchMozDir(mozDir.path());
if(!path.isEmpty())
return path;
}
@@ -122,21 +122,21 @@ QString BookmarkCatalog::detectMozillaFile()
return "";
}
-QString BookmarkCatalog::searchMozDir(QString path)
+TQString BookmarkCatalog::searchMozDir(TQString path)
{
- QDir dir(path);
+ TQDir dir(path);
if(dir.exists("bookmarks.html")) {
return path+"/bookmarks.html";
}
- QStringList entries = dir.entryList(QDir::Dirs | QDir::NoSymLinks);
- for(QStringList::Iterator it = entries.begin(); it != entries.end(); ++it) {
+ TQStringList entries = dir.entryList(TQDir::Dirs | TQDir::NoSymLinks);
+ for(TQStringList::Iterator it = entries.begin(); it != entries.end(); ++it) {
if(*it != "." && *it != ".."){
- QString result = searchMozDir(path + "/" + *it);
+ TQString result = searchMozDir(path + "/" + *it);
if(!result.isEmpty())
return result;
}
}
- return QString::null;
+ return TQString();
}
unsigned int BookmarkCatalog::minQueryLen() const
@@ -160,23 +160,23 @@ void BookmarkCatalog::writeSettings(KConfigBase *config)
config->writeEntry("MozFile", _mozFile);
}
-QWidget * BookmarkCatalog::configure()
+TQWidget * BookmarkCatalog::configure()
{
settings = new BookmarkCatalogSettings();
settings->minQueryLen->setValue(_minQueryLen);
- connect(settings->minQueryLen, SIGNAL(valueChanged(int)), this, SLOT(minQueryLenChanged(int)));
+ connect(settings->minQueryLen, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(minQueryLenChanged(int)));
settings->mozEnabled->setChecked(_mozEnabled);
- connect(settings->mozEnabled, SIGNAL(toggled(bool)), this, SLOT(toggleMozEnabled(bool)));
+ connect(settings->mozEnabled, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(toggleMozEnabled(bool)));
settings->mozAuto->setChecked(_mozAuto);
- connect(settings->mozAuto, SIGNAL(toggled(bool)), this, SLOT(toggleMozAuto(bool)));
+ connect(settings->mozAuto, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(toggleMozAuto(bool)));
settings->mozManual->setChecked(!_mozAuto);
settings->mozFile->setURL(_mozFile);
- connect(settings->mozFile, SIGNAL(urlSelected(const QString &)), this, SLOT(changeMozFile(const QString &)));
+ connect(settings->mozFile, TQT_SIGNAL(urlSelected(const TQString &)), this, TQT_SLOT(changeMozFile(const TQString &)));
settings->mozAuto->setEnabled(_mozEnabled);
settings->mozManual->setEnabled(_mozEnabled);
@@ -204,7 +204,7 @@ void BookmarkCatalog::toggleMozAuto(bool _mozAuto)
settings->mozFile->setEnabled(!_mozAuto);
}
-void BookmarkCatalog::changeMozFile(const QString & _mozFile)
+void BookmarkCatalog::changeMozFile(const TQString & _mozFile)
{
this->_mozFile = _mozFile;
}