summaryrefslogtreecommitdiffstats
path: root/kommander/pluginmanager
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:54:04 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:54:04 +0000
commitdc6b8e72fed2586239e3514819238c520636c9d9 (patch)
tree88b200df0a0b7fab9d6f147596173556f1ed9a13 /kommander/pluginmanager
parent6927d4436e54551917f600b706a8d6109e49de1c (diff)
downloadtdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.tar.gz
tdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1157656 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kommander/pluginmanager')
-rw-r--r--kommander/pluginmanager/main.cpp10
-rw-r--r--kommander/pluginmanager/mainwindow.cpp14
-rw-r--r--kommander/pluginmanager/mainwindow.h4
-rw-r--r--kommander/pluginmanager/pluginmanager.cpp20
-rw-r--r--kommander/pluginmanager/pluginmanager.h14
5 files changed, 31 insertions, 31 deletions
diff --git a/kommander/pluginmanager/main.cpp b/kommander/pluginmanager/main.cpp
index cdbf9cd5..74561925 100644
--- a/kommander/pluginmanager/main.cpp
+++ b/kommander/pluginmanager/main.cpp
@@ -20,12 +20,12 @@
#include <kaboutdata.h>
#include <klocale.h>
#include <kurl.h>
-#include <qapplication.h>
-#include <qobject.h>
+#include <tqapplication.h>
+#include <tqobject.h>
#include <kapplication.h>
/* QT INCLUDES */
-#include <qstringlist.h>
+#include <tqstringlist.h>
/* OTHER INCLUDES */
#include "pluginmanager.h"
@@ -86,8 +86,8 @@ int main(int argc, char *argv[])
if (args->isSet("list"))
{
- QStringList plugins = P.items();
- for (QStringList::ConstIterator it = plugins.begin(); it != plugins.end(); ++it)
+ TQStringList plugins = P.items();
+ for (TQStringList::ConstIterator it = plugins.begin(); it != plugins.end(); ++it)
cout << (*it).local8Bit() << "\n";
}
}
diff --git a/kommander/pluginmanager/mainwindow.cpp b/kommander/pluginmanager/mainwindow.cpp
index 4cc67d62..94d365f5 100644
--- a/kommander/pluginmanager/mainwindow.cpp
+++ b/kommander/pluginmanager/mainwindow.cpp
@@ -28,14 +28,14 @@
#include <kglobal.h>
#include <kstandarddirs.h>
-MainWindow::MainWindow( QWidget* parent, const char *name, WFlags f )
+MainWindow::MainWindow( TQWidget* parent, const char *name, WFlags f )
: KMainWindow( parent, name, f )
{
KToolBar *toolBar = new KToolBar( this );
toolBar->insertButton("fileopen", Add, true, i18n("Add") );
toolBar->insertButton("no", Remove, true, i18n("Remove") );
toolBar->insertButton("reload", Refresh, true, i18n("Refresh") );
- connect( toolBar, SIGNAL(clicked(int)), this, SLOT(toolButton(int)) );
+ connect( toolBar, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(toolButton(int)) );
m_list = new KListBox( this );
setCentralWidget(m_list);
@@ -67,17 +67,17 @@ void MainWindow::toolButton( int id )
void MainWindow::add()
{
- QString libDir = KGlobal::dirs()->findResourceDir("lib", "libkommanderplugin");
- QString plugin = KFileDialog::getOpenFileName(libDir, "lib*", this,
+ TQString libDir = KGlobal::dirs()->findResourceDir("lib", "libkommanderplugin");
+ TQString plugin = KFileDialog::getOpenFileName(libDir, "lib*", this,
i18n("Add Kommander Plugin"));
add(plugin);
}
-void MainWindow::add(const QString &plugin)
+void MainWindow::add(const TQString &plugin)
{
if (!m_pluginManager->add(plugin))
{
- QString errMsg = i18n("<qt>Unable to load Kommander plugin<br><b>%1</b></qt>").arg(plugin);
+ TQString errMsg = i18n("<qt>Unable to load Kommander plugin<br><b>%1</b></qt>").arg(plugin);
KMessageBox::error(this, errMsg, i18n("Cannot add plugin"));
}
else
@@ -86,7 +86,7 @@ void MainWindow::add(const QString &plugin)
void MainWindow::remove()
{
- QString plugin = m_list->currentText();
+ TQString plugin = m_list->currentText();
if (m_pluginManager->remove(plugin))
refresh();
}
diff --git a/kommander/pluginmanager/mainwindow.h b/kommander/pluginmanager/mainwindow.h
index addf1a5f..c774832f 100644
--- a/kommander/pluginmanager/mainwindow.h
+++ b/kommander/pluginmanager/mainwindow.h
@@ -27,7 +27,7 @@ class MainWindow : public KMainWindow
{
Q_OBJECT
public:
- MainWindow( QWidget* parent = 0, const char *name = 0, WFlags f = WType_TopLevel | WDestructiveClose );
+ MainWindow( TQWidget* parent = 0, const char *name = 0, WFlags f = WType_TopLevel | WDestructiveClose );
~MainWindow();
protected slots:
@@ -38,7 +38,7 @@ protected slots:
// Show dialogbox for selecting plugin, then add it
void add();
// Add given plugin if is not added yet
- void add( const QString &plugin );
+ void add( const TQString &plugin );
// Check whether installed plugins are valid
void verify();
private:
diff --git a/kommander/pluginmanager/pluginmanager.cpp b/kommander/pluginmanager/pluginmanager.cpp
index e9301b26..79da4d81 100644
--- a/kommander/pluginmanager/pluginmanager.cpp
+++ b/kommander/pluginmanager/pluginmanager.cpp
@@ -22,7 +22,7 @@
PluginManager::PluginManager()
{
m_cfg = new KConfig("kommanderrc");
- m_list = new QStringList(m_cfg->readListEntry("plugins"));
+ m_list = new TQStringList(m_cfg->readListEntry("plugins"));
}
PluginManager::~PluginManager()
@@ -37,14 +37,14 @@ int PluginManager::count() const
return m_list->count();
}
-QString PluginManager::item(int i) const
+TQString PluginManager::item(int i) const
{
return (*m_list)[i];
}
-bool PluginManager::add(const QString& plugin, bool)
+bool PluginManager::add(const TQString& plugin, bool)
{
- QString plugName= libraryName(plugin);
+ TQString plugName= libraryName(plugin);
if (plugName.isNull())
return false;
if (m_list->contains(plugName))
@@ -53,7 +53,7 @@ bool PluginManager::add(const QString& plugin, bool)
return true;
}
-bool PluginManager::remove(const QString& plugin)
+bool PluginManager::remove(const TQString& plugin)
{
if (!m_list->contains(plugin))
return false;
@@ -63,8 +63,8 @@ bool PluginManager::remove(const QString& plugin)
int PluginManager::verify()
{
- QStringList verified;
- for (QStringList::ConstIterator it = m_list->begin(); it != m_list->end(); ++it)
+ TQStringList verified;
+ for (TQStringList::ConstIterator it = m_list->begin(); it != m_list->end(); ++it)
if (!libraryName(*it).isNull())
verified.append(*it);
int removed = count() - verified.count();
@@ -73,16 +73,16 @@ int PluginManager::verify()
return removed;
}
-QString PluginManager::libraryName(const QString& plugin) const
+TQString PluginManager::libraryName(const TQString& plugin) const
{
KLibrary *l = KLibLoader::self()->library(plugin.latin1());
- QString libname;
+ TQString libname;
if (l && l->hasSymbol("kommander_plugin"))
libname = l->fileName();
return libname;
}
-QStringList PluginManager::items() const
+TQStringList PluginManager::items() const
{
return (*m_list);
}
diff --git a/kommander/pluginmanager/pluginmanager.h b/kommander/pluginmanager/pluginmanager.h
index 0c7c79b7..10bcc183 100644
--- a/kommander/pluginmanager/pluginmanager.h
+++ b/kommander/pluginmanager/pluginmanager.h
@@ -17,7 +17,7 @@
#ifndef __HAVE_PLUGINMANAGER_H
#define __HAVE_PLUGINMANAGER_H
-#include <qstringlist.h>
+#include <tqstringlist.h>
class KConfig;
@@ -30,21 +30,21 @@ public:
// number of known plugins
int count() const;
// n-th plugin
- QString item(int i) const;
+ TQString item(int i) const;
// adds a plugin if valid;
// FIXME: if overwrite is true, plugin with the same base name will be removed
- bool add(const QString& plugin, bool overwrite = true);
+ bool add(const TQString& plugin, bool overwrite = true);
// removes given plugin
- bool remove(const QString& plugin);
+ bool remove(const TQString& plugin);
// remove invalid plugins, returns number of removed plugins
int verify();
// list of plugins
- QStringList items() const;
+ TQStringList items() const;
private:
// returns expanded library name or null if it is invalid
- QString libraryName(const QString& plugin) const;
+ TQString libraryName(const TQString& plugin) const;
- QStringList* m_list;
+ TQStringList* m_list;
KConfig *m_cfg;
};