summaryrefslogtreecommitdiffstats
path: root/src/fetch/gcstarpluginfetcher.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-02 06:40:27 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-02 06:40:27 +0000
commit2595a15ebeb6fc46b7cb241d01ec0c2460ec2111 (patch)
tree18a8f0f4ac5a86dacfa74c3537551ec39bc85e75 /src/fetch/gcstarpluginfetcher.cpp
parent1d90725a4001fab9d3922b2cbcceeee5e2d1686f (diff)
downloadtellico-2595a15ebeb6fc46b7cb241d01ec0c2460ec2111.tar.gz
tellico-2595a15ebeb6fc46b7cb241d01ec0c2460ec2111.zip
TQt4 port tellico
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/tellico@1239054 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/fetch/gcstarpluginfetcher.cpp')
-rw-r--r--src/fetch/gcstarpluginfetcher.cpp236
1 files changed, 118 insertions, 118 deletions
diff --git a/src/fetch/gcstarpluginfetcher.cpp b/src/fetch/gcstarpluginfetcher.cpp
index 4bffed7..3129c78 100644
--- a/src/fetch/gcstarpluginfetcher.cpp
+++ b/src/fetch/gcstarpluginfetcher.cpp
@@ -31,10 +31,10 @@
#include <kstandarddirs.h>
#include <kaccelmanager.h>
-#include <qdir.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qwhatsthis.h>
+#include <tqdir.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqwhatsthis.h>
using Tellico::Fetch::GCstarPluginFetcher;
@@ -43,25 +43,25 @@ GCstarPluginFetcher::PluginParse GCstarPluginFetcher::pluginParse = NotYet;
//static
GCstarPluginFetcher::PluginList GCstarPluginFetcher::plugins(int collType_) {
- if(!pluginMap.contains(collType_)) {
+ if(!pluginMap.tqcontains(collType_)) {
GUI::CursorSaver cs;
- QString gcstar = KStandardDirs::findExe(QString::fromLatin1("gcstar"));
+ TQString gcstar = KStandardDirs::findExe(TQString::tqfromLatin1("gcstar"));
if(pluginParse == NotYet) {
KProcIO proc;
- proc << gcstar << QString::fromLatin1("--version");
+ proc << gcstar << TQString::tqfromLatin1("--version");
// wait 5 seconds at most, just a sanity thing, never want to block completely
if(proc.start(KProcess::Block) && proc.wait(5)) {
- QString output;
+ TQString output;
proc.readln(output);
if(!output.isEmpty()) {
// always going to be x.y[.z] ?
- QRegExp versionRx(QString::fromLatin1("(\\d+)\\.(\\d+)(?:\\.(\\d+))?"));
+ TQRegExp versionRx(TQString::tqfromLatin1("(\\d+)\\.(\\d+)(?:\\.(\\d+))?"));
if(versionRx.search(output) > -1) {
int x = versionRx.cap(1).toInt();
int y = versionRx.cap(2).toInt();
int z = versionRx.cap(3).toInt(); // ok to be empty
- myDebug() << QString::fromLatin1("GCstarPluginFetcher() - found %1.%2.%3").arg(x).arg(y).arg(z) << endl;
+ myDebug() << TQString::tqfromLatin1("GCstarPluginFetcher() - found %1.%2.%3").tqarg(x).tqarg(y).tqarg(z) << endl;
// --list-plugins argument was added for 1.3 release
pluginParse = (x >= 1 && y >=3) ? New : Old;
}
@@ -80,13 +80,13 @@ GCstarPluginFetcher::PluginList GCstarPluginFetcher::plugins(int collType_) {
}
}
- return pluginMap.contains(collType_) ? pluginMap[collType_] : GCstarPluginFetcher::PluginList();
+ return pluginMap.tqcontains(collType_) ? pluginMap[collType_] : GCstarPluginFetcher::PluginList();
}
-void GCstarPluginFetcher::readPluginsNew(int collType_, const QString& gcstar_) {
+void GCstarPluginFetcher::readPluginsNew(int collType_, const TQString& gcstar_) {
PluginList plugins;
- QString gcstarCollection = gcstarType(collType_);
+ TQString gcstarCollection = gcstarType(collType_);
if(gcstarCollection.isEmpty()) {
pluginMap.insert(collType_, plugins);
return;
@@ -94,9 +94,9 @@ void GCstarPluginFetcher::readPluginsNew(int collType_, const QString& gcstar_)
KProcIO proc;
proc << gcstar_
- << QString::fromLatin1("-x")
- << QString::fromLatin1("--list-plugins")
- << QString::fromLatin1("--collection") << gcstarCollection;
+ << TQString::tqfromLatin1("-x")
+ << TQString::tqfromLatin1("--list-plugins")
+ << TQString::tqfromLatin1("--collection") << gcstarCollection;
if(!proc.start(KProcess::Block)) {
myWarning() << "GCstarPluginFetcher::readPluginsNew() - can't start" << endl;
@@ -105,7 +105,7 @@ void GCstarPluginFetcher::readPluginsNew(int collType_, const QString& gcstar_)
bool hasName = false;
PluginInfo info;
- QString line;
+ TQString line;
for(int length = 0; length > -1; length = proc.readln(line)) {
if(line.isEmpty()) {
if(hasName) {
@@ -117,10 +117,10 @@ void GCstarPluginFetcher::readPluginsNew(int collType_, const QString& gcstar_)
// authors have \t at beginning
line = line.stripWhiteSpace();
if(!hasName) {
- info.insert(QString::fromLatin1("name"), line);
+ info.insert(TQString::tqfromLatin1("name"), line);
hasName = true;
} else {
- info.insert(QString::fromLatin1("author"), line);
+ info.insert(TQString::tqfromLatin1("author"), line);
}
// myDebug() << line << endl;
}
@@ -129,34 +129,34 @@ void GCstarPluginFetcher::readPluginsNew(int collType_, const QString& gcstar_)
pluginMap.insert(collType_, plugins);
}
-void GCstarPluginFetcher::readPluginsOld(int collType_, const QString& gcstar_) {
- QDir dir(gcstar_, QString::fromLatin1("GC*.pm"));
- dir.cd(QString::fromLatin1("../../lib/gcstar/GCPlugins/"));
+void GCstarPluginFetcher::readPluginsOld(int collType_, const TQString& gcstar_) {
+ TQDir dir(gcstar_, TQString::tqfromLatin1("GC*.pm"));
+ dir.cd(TQString::tqfromLatin1("../../lib/gcstar/GCPlugins/"));
- QRegExp rx(QString::fromLatin1("get(Name|Author|Lang)\\s*\\{\\s*return\\s+['\"](.+)['\"]"));
+ TQRegExp rx(TQString::tqfromLatin1("get(Name|Author|Lang)\\s*\\{\\s*return\\s+['\"](.+)['\"]"));
rx.setMinimal(true);
PluginList plugins;
- QString dirName = gcstarType(collType_);
+ TQString dirName = gcstarType(collType_);
if(dirName.isEmpty()) {
pluginMap.insert(collType_, plugins);
return;
}
- QStringList files = dir.entryList();
- for(QStringList::ConstIterator file = files.begin(); file != files.end(); ++file) {
+ TQStringList files = dir.entryList();
+ for(TQStringList::ConstIterator file = files.begin(); file != files.end(); ++file) {
KURL u;
u.setPath(dir.filePath(*file));
PluginInfo info;
- QString text = FileHandler::readTextFile(u);
+ TQString text = FileHandler::readTextFile(u);
for(int pos = rx.search(text);
pos > -1;
pos = rx.search(text, pos+rx.matchedLength())) {
info.insert(rx.cap(1).lower(), rx.cap(2));
}
// only add if it has a name
- if(info.contains(QString::fromLatin1("name"))) {
+ if(info.tqcontains(TQString::tqfromLatin1("name"))) {
plugins << info;
}
}
@@ -164,21 +164,21 @@ void GCstarPluginFetcher::readPluginsOld(int collType_, const QString& gcstar_)
pluginMap.insert(collType_, plugins);
}
-QString GCstarPluginFetcher::gcstarType(int collType_) {
+TQString GCstarPluginFetcher::gcstarType(int collType_) {
switch(collType_) {
- case Data::Collection::Book: return QString::fromLatin1("GCbooks");
- case Data::Collection::Video: return QString::fromLatin1("GCfilms");
- case Data::Collection::Game: return QString::fromLatin1("GCgames");
- case Data::Collection::Album: return QString::fromLatin1("GCmusics");
- case Data::Collection::Coin: return QString::fromLatin1("GCcoins");
- case Data::Collection::Wine: return QString::fromLatin1("GCwines");
- case Data::Collection::BoardGame: return QString::fromLatin1("GCboardgames");
+ case Data::Collection::Book: return TQString::tqfromLatin1("GCbooks");
+ case Data::Collection::Video: return TQString::tqfromLatin1("GCfilms");
+ case Data::Collection::Game: return TQString::tqfromLatin1("GCgames");
+ case Data::Collection::Album: return TQString::tqfromLatin1("GCmusics");
+ case Data::Collection::Coin: return TQString::tqfromLatin1("GCcoins");
+ case Data::Collection::Wine: return TQString::tqfromLatin1("GCwines");
+ case Data::Collection::BoardGame: return TQString::tqfromLatin1("GCboardgames");
default: break;
}
- return QString();
+ return TQString();
}
-GCstarPluginFetcher::GCstarPluginFetcher(QObject* parent_, const char* name_/*=0*/) : Fetcher(parent_, name_),
+GCstarPluginFetcher::GCstarPluginFetcher(TQObject* tqparent_, const char* name_/*=0*/) : Fetcher(tqparent_, name_),
m_started(false), m_collType(-1), m_process(0) {
}
@@ -186,11 +186,11 @@ GCstarPluginFetcher::~GCstarPluginFetcher() {
stop();
}
-QString GCstarPluginFetcher::defaultName() {
+TQString GCstarPluginFetcher::defaultName() {
return i18n("GCstar Plugin");
}
-QString GCstarPluginFetcher::source() const {
+TQString GCstarPluginFetcher::source() const {
return m_name;
}
@@ -203,7 +203,7 @@ void GCstarPluginFetcher::readConfigHook(const KConfigGroup& config_) {
m_plugin = config_.readEntry("Plugin");
}
-void GCstarPluginFetcher::search(FetchKey key_, const QString& value_) {
+void GCstarPluginFetcher::search(FetchKey key_, const TQString& value_) {
m_started = true;
m_data.truncate(0);
@@ -213,14 +213,14 @@ void GCstarPluginFetcher::search(FetchKey key_, const QString& value_) {
return;
}
- QString gcstar = KStandardDirs::findExe(QString::fromLatin1("gcstar"));
+ TQString gcstar = KStandardDirs::findExe(TQString::tqfromLatin1("gcstar"));
if(gcstar.isEmpty()) {
myWarning() << "GCstarPluginFetcher::search() - gcstar not found!" << endl;
stop();
return;
}
- QString gcstarCollection = gcstarType(m_collType);
+ TQString gcstarCollection = gcstarType(m_collType);
if(m_plugin.isEmpty()) {
myWarning() << "GCstarPluginFetcher::search() - no plugin name! " << endl;
@@ -229,16 +229,16 @@ void GCstarPluginFetcher::search(FetchKey key_, const QString& value_) {
}
m_process = new KProcess();
- connect(m_process, SIGNAL(receivedStdout(KProcess*, char*, int)), SLOT(slotData(KProcess*, char*, int)));
- connect(m_process, SIGNAL(receivedStderr(KProcess*, char*, int)), SLOT(slotError(KProcess*, char*, int)));
- connect(m_process, SIGNAL(processExited(KProcess*)), SLOT(slotProcessExited(KProcess*)));
- QStringList args;
- args << gcstar << QString::fromLatin1("-x")
- << QString::fromLatin1("--collection") << gcstarCollection
- << QString::fromLatin1("--export") << QString::fromLatin1("Tellico")
- << QString::fromLatin1("--website") << m_plugin
- << QString::fromLatin1("--download") << KProcess::quote(value_);
- myLog() << "GCstarPluginFetcher::search() - " << args.join(QChar(' ')) << endl;
+ connect(m_process, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), TQT_SLOT(slotData(KProcess*, char*, int)));
+ connect(m_process, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), TQT_SLOT(slotError(KProcess*, char*, int)));
+ connect(m_process, TQT_SIGNAL(processExited(KProcess*)), TQT_SLOT(slotProcessExited(KProcess*)));
+ TQStringList args;
+ args << gcstar << TQString::tqfromLatin1("-x")
+ << TQString::tqfromLatin1("--collection") << gcstarCollection
+ << TQString::tqfromLatin1("--export") << TQString::tqfromLatin1("Tellico")
+ << TQString::tqfromLatin1("--website") << m_plugin
+ << TQString::tqfromLatin1("--download") << KProcess::quote(value_);
+ myLog() << "GCstarPluginFetcher::search() - " << args.join(TQChar(' ')) << endl;
*m_process << args;
if(!m_process->start(KProcess::NotifyOnExit, KProcess::AllOutput)) {
myDebug() << "GCstarPluginFetcher::startSearch() - process failed to start" << endl;
@@ -262,13 +262,13 @@ void GCstarPluginFetcher::stop() {
}
void GCstarPluginFetcher::slotData(KProcess*, char* buffer_, int len_) {
- QDataStream stream(m_data, IO_WriteOnly | IO_Append);
+ TQDataStream stream(m_data, IO_WriteOnly | IO_Append);
stream.writeRawBytes(buffer_, len_);
}
void GCstarPluginFetcher::slotError(KProcess*, char* buffer_, int len_) {
- QString msg = QString::fromLocal8Bit(buffer_, len_);
- msg.prepend(source() + QString::fromLatin1(": "));
+ TQString msg = TQString::fromLocal8Bit(buffer_, len_);
+ msg.prepend(source() + TQString::tqfromLatin1(": "));
myDebug() << "GCstarPluginFetcher::slotError() - " << msg << endl;
m_errors << msg;
}
@@ -278,13 +278,13 @@ void GCstarPluginFetcher::slotProcessExited(KProcess*) {
if(!m_process->normalExit() || m_process->exitStatus()) {
myDebug() << "GCstarPluginFetcher::slotProcessExited() - "<< source() << ": process did not exit successfully" << endl;
if(!m_errors.isEmpty()) {
- message(m_errors.join(QChar('\n')), MessageHandler::Error);
+ message(m_errors.join(TQChar('\n')), MessageHandler::Error);
}
stop();
return;
}
if(!m_errors.isEmpty()) {
- message(m_errors.join(QChar('\n')), MessageHandler::Warning);
+ message(m_errors.join(TQChar('\n')), MessageHandler::Warning);
}
if(m_data.isEmpty()) {
@@ -293,12 +293,12 @@ void GCstarPluginFetcher::slotProcessExited(KProcess*) {
return;
}
- Import::TellicoImporter imp(QString::fromUtf8(m_data, m_data.size()));
+ Import::TellicoImporter imp(TQString::fromUtf8(m_data, m_data.size()));
Data::CollPtr coll = imp.collection();
if(!coll) {
if(!imp.statusMessage().isEmpty()) {
- message(imp.statusMessage(), MessageHandler::Status);
+ message(imp.statusMessage(), MessageHandler::tqStatus);
}
myDebug() << "GCstarPluginFetcher::slotProcessExited() - "<< source() << ": no collection pointer" << endl;
stop();
@@ -307,60 +307,60 @@ void GCstarPluginFetcher::slotProcessExited(KProcess*) {
Data::EntryVec entries = coll->entries();
for(Data::EntryVec::Iterator entry = entries.begin(); entry != entries.end(); ++entry) {
- QString desc;
+ TQString desc;
switch(coll->type()) {
case Data::Collection::Book:
case Data::Collection::Bibtex:
- desc = entry->field(QString::fromLatin1("author"))
- + QChar('/')
- + entry->field(QString::fromLatin1("publisher"));
- if(!entry->field(QString::fromLatin1("cr_year")).isEmpty()) {
- desc += QChar('/') + entry->field(QString::fromLatin1("cr_year"));
- } else if(!entry->field(QString::fromLatin1("pub_year")).isEmpty()){
- desc += QChar('/') + entry->field(QString::fromLatin1("pub_year"));
+ desc = entry->field(TQString::tqfromLatin1("author"))
+ + TQChar('/')
+ + entry->field(TQString::tqfromLatin1("publisher"));
+ if(!entry->field(TQString::tqfromLatin1("cr_year")).isEmpty()) {
+ desc += TQChar('/') + entry->field(TQString::tqfromLatin1("cr_year"));
+ } else if(!entry->field(TQString::tqfromLatin1("pub_year")).isEmpty()){
+ desc += TQChar('/') + entry->field(TQString::tqfromLatin1("pub_year"));
}
break;
case Data::Collection::Video:
- desc = entry->field(QString::fromLatin1("studio"))
- + QChar('/')
- + entry->field(QString::fromLatin1("director"))
- + QChar('/')
- + entry->field(QString::fromLatin1("year"))
- + QChar('/')
- + entry->field(QString::fromLatin1("medium"));
+ desc = entry->field(TQString::tqfromLatin1("studio"))
+ + TQChar('/')
+ + entry->field(TQString::tqfromLatin1("director"))
+ + TQChar('/')
+ + entry->field(TQString::tqfromLatin1("year"))
+ + TQChar('/')
+ + entry->field(TQString::tqfromLatin1("medium"));
break;
case Data::Collection::Album:
- desc = entry->field(QString::fromLatin1("artist"))
- + QChar('/')
- + entry->field(QString::fromLatin1("label"))
- + QChar('/')
- + entry->field(QString::fromLatin1("year"));
+ desc = entry->field(TQString::tqfromLatin1("artist"))
+ + TQChar('/')
+ + entry->field(TQString::tqfromLatin1("label"))
+ + TQChar('/')
+ + entry->field(TQString::tqfromLatin1("year"));
break;
case Data::Collection::Game:
- desc = entry->field(QString::fromLatin1("platform"));
+ desc = entry->field(TQString::tqfromLatin1("platform"));
break;
case Data::Collection::ComicBook:
- desc = entry->field(QString::fromLatin1("publisher"))
- + QChar('/')
- + entry->field(QString::fromLatin1("pub_year"));
+ desc = entry->field(TQString::tqfromLatin1("publisher"))
+ + TQChar('/')
+ + entry->field(TQString::tqfromLatin1("pub_year"));
break;
case Data::Collection::BoardGame:
- desc = entry->field(QString::fromLatin1("designer"))
- + QChar('/')
- + entry->field(QString::fromLatin1("publisher"))
- + QChar('/')
- + entry->field(QString::fromLatin1("year"));
+ desc = entry->field(TQString::tqfromLatin1("designer"))
+ + TQChar('/')
+ + entry->field(TQString::tqfromLatin1("publisher"))
+ + TQChar('/')
+ + entry->field(TQString::tqfromLatin1("year"));
break;
default:
break;
}
- SearchResult* r = new SearchResult(this, entry->title(), desc, entry->field(QString::fromLatin1("isbn")));
+ SearchResult* r = new SearchResult(this, entry->title(), desc, entry->field(TQString::tqfromLatin1("isbn")));
m_entries.insert(r->uid, entry);
emit signalResultFound(r);
}
@@ -373,7 +373,7 @@ Tellico::Data::EntryPtr GCstarPluginFetcher::fetchEntry(uint uid_) {
void GCstarPluginFetcher::updateEntry(Data::EntryPtr entry_) {
// ry searching for title and rely on Collection::sameEntry() to figure things out
- QString t = entry_->field(QString::fromLatin1("title"));
+ TQString t = entry_->field(TQString::tqfromLatin1("title"));
if(!t.isEmpty()) {
search(Fetch::Title, t);
return;
@@ -383,48 +383,48 @@ void GCstarPluginFetcher::updateEntry(Data::EntryPtr entry_) {
emit signalDone(this); // always need to emit this if not continuing with the search
}
-Tellico::Fetch::ConfigWidget* GCstarPluginFetcher::configWidget(QWidget* parent_) const {
- return new GCstarPluginFetcher::ConfigWidget(parent_, this);
+Tellico::Fetch::ConfigWidget* GCstarPluginFetcher::configWidget(TQWidget* tqparent_) const {
+ return new GCstarPluginFetcher::ConfigWidget(tqparent_, this);
}
-GCstarPluginFetcher::ConfigWidget::ConfigWidget(QWidget* parent_, const GCstarPluginFetcher* fetcher_/*=0*/)
- : Fetch::ConfigWidget(parent_), m_needPluginList(true) {
- QGridLayout* l = new QGridLayout(optionsWidget(), 3, 4);
+GCstarPluginFetcher::ConfigWidget::ConfigWidget(TQWidget* tqparent_, const GCstarPluginFetcher* fetcher_/*=0*/)
+ : Fetch::ConfigWidget(tqparent_), m_needPluginList(true) {
+ TQGridLayout* l = new TQGridLayout(optionsWidget(), 3, 4);
l->setSpacing(4);
l->setColStretch(1, 10);
int row = -1;
- QLabel* label = new QLabel(i18n("Collection &type:"), optionsWidget());
+ TQLabel* label = new TQLabel(i18n("Collection &type:"), optionsWidget());
l->addWidget(label, ++row, 0);
m_collCombo = new GUI::CollectionTypeCombo(optionsWidget());
- connect(m_collCombo, SIGNAL(activated(int)), SLOT(slotSetModified()));
- connect(m_collCombo, SIGNAL(activated(int)), SLOT(slotTypeChanged()));
+ connect(m_collCombo, TQT_SIGNAL(activated(int)), TQT_SLOT(slotSetModified()));
+ connect(m_collCombo, TQT_SIGNAL(activated(int)), TQT_SLOT(slotTypeChanged()));
l->addMultiCellWidget(m_collCombo, row, row, 1, 3);
- QString w = i18n("Set the collection type of the data returned from the plugin.");
- QWhatsThis::add(label, w);
- QWhatsThis::add(m_collCombo, w);
+ TQString w = i18n("Set the collection type of the data returned from the plugin.");
+ TQWhatsThis::add(label, w);
+ TQWhatsThis::add(m_collCombo, w);
label->setBuddy(m_collCombo);
- label = new QLabel(i18n("&Plugin: "), optionsWidget());
+ label = new TQLabel(i18n("&Plugin: "), optionsWidget());
l->addWidget(label, ++row, 0);
m_pluginCombo = new GUI::ComboBox(optionsWidget());
- connect(m_pluginCombo, SIGNAL(activated(int)), SLOT(slotSetModified()));
- connect(m_pluginCombo, SIGNAL(activated(int)), SLOT(slotPluginChanged()));
+ connect(m_pluginCombo, TQT_SIGNAL(activated(int)), TQT_SLOT(slotSetModified()));
+ connect(m_pluginCombo, TQT_SIGNAL(activated(int)), TQT_SLOT(slotPluginChanged()));
l->addMultiCellWidget(m_pluginCombo, row, row, 1, 3);
w = i18n("Select the GCstar plugin used for the data source.");
- QWhatsThis::add(label, w);
- QWhatsThis::add(m_pluginCombo, w);
+ TQWhatsThis::add(label, w);
+ TQWhatsThis::add(m_pluginCombo, w);
label->setBuddy(m_pluginCombo);
- label = new QLabel(i18n("Author: "), optionsWidget());
+ label = new TQLabel(i18n("Author: "), optionsWidget());
l->addWidget(label, ++row, 0);
- m_authorLabel = new QLabel(optionsWidget());
+ m_authorLabel = new TQLabel(optionsWidget());
l->addWidget(m_authorLabel, row, 1);
-// label = new QLabel(i18n("Language: "), optionsWidget());
+// label = new TQLabel(i18n("Language: "), optionsWidget());
// l->addWidget(label, row, 2);
-// m_langLabel = new QLabel(optionsWidget());
+// m_langLabel = new TQLabel(optionsWidget());
// l->addWidget(m_langLabel, row, 3);
if(fetcher_ && fetcher_->m_collType > -1) {
@@ -448,17 +448,17 @@ void GCstarPluginFetcher::ConfigWidget::saveConfig(KConfigGroup& config_) {
config_.writeEntry("Plugin", m_pluginCombo->currentText());
}
-QString GCstarPluginFetcher::ConfigWidget::preferredName() const {
- return QString::fromLatin1("GCstar - ") + m_pluginCombo->currentText();
+TQString GCstarPluginFetcher::ConfigWidget::preferredName() const {
+ return TQString::tqfromLatin1("GCstar - ") + m_pluginCombo->currentText();
}
void GCstarPluginFetcher::ConfigWidget::slotTypeChanged() {
int collType = m_collCombo->currentType();
m_pluginCombo->clear();
- QStringList pluginNames;
+ TQStringList pluginNames;
GCstarPluginFetcher::PluginList list = GCstarPluginFetcher::plugins(collType);
for(GCstarPluginFetcher::PluginList::ConstIterator it = list.begin(); it != list.end(); ++it) {
- pluginNames << (*it)[QString::fromLatin1("name")].toString();
+ pluginNames << (*it)[TQString::tqfromLatin1("name")].toString();
m_pluginCombo->insertItem(pluginNames.last(), *it);
}
slotPluginChanged();
@@ -467,12 +467,12 @@ void GCstarPluginFetcher::ConfigWidget::slotTypeChanged() {
void GCstarPluginFetcher::ConfigWidget::slotPluginChanged() {
PluginInfo info = m_pluginCombo->currentData().toMap();
- m_authorLabel->setText(info[QString::fromLatin1("author")].toString());
-// m_langLabel->setText(info[QString::fromLatin1("lang")].toString());
+ m_authorLabel->setText(info[TQString::tqfromLatin1("author")].toString());
+// m_langLabel->setText(info[TQString::tqfromLatin1("lang")].toString());
emit signalName(preferredName());
}
-void GCstarPluginFetcher::ConfigWidget::showEvent(QShowEvent*) {
+void GCstarPluginFetcher::ConfigWidget::showEvent(TQShowEvent*) {
if(m_needPluginList) {
m_needPluginList = false;
slotTypeChanged(); // update plugin combo box