diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kexi/core/kexipartmanager.cpp | |
parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
download | koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip |
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kexi/core/kexipartmanager.cpp')
-rw-r--r-- | kexi/core/kexipartmanager.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/kexi/core/kexipartmanager.cpp b/kexi/core/kexipartmanager.cpp index 8525c2d7..8cd8fc0e 100644 --- a/kexi/core/kexipartmanager.cpp +++ b/kexi/core/kexipartmanager.cpp @@ -35,8 +35,8 @@ using namespace KexiPart; -Manager::Manager(QObject *parent) - : QObject(parent) +Manager::Manager(TQObject *tqparent) + : TQObject(tqparent) { m_lookupDone = false; m_partlist.setAutoDelete(true); @@ -56,20 +56,20 @@ Manager::lookup() m_partsByMime.clear(); m_parts.clear(); KTrader::OfferList tlist = KTrader::self()->query("Kexi/Handler", - "[X-Kexi-PartVersion] == " + QString::number(KEXI_PART_VERSION)); + "[X-Kexi-PartVersion] == " + TQString::number(KEXI_PART_VERSION)); KConfig conf("kexirc", true); conf.setGroup("Parts"); - QStringList sl_order = QStringList::split( ",", conf.readEntry("Order") );//we'll set parts in defined order - const int size = QMAX( tlist.count(), sl_order.count() ); - QPtrVector<KService> ordered( size*2 ); + TQStringList sl_order = TQStringList::split( ",", conf.readEntry("Order") );//we'll set parts in defined order + const int size = TQMAX( tlist.count(), sl_order.count() ); + TQPtrVector<KService> ordered( size*2 ); int offset = size; //we will insert not described parts from #offset //compute order for(KTrader::OfferList::ConstIterator it(tlist.constBegin()); it != tlist.constEnd(); ++it) { KService::Ptr ptr = (*it); - QCString mime = ptr->property("X-Kexi-TypeMime").toCString(); + TQCString mime = ptr->property("X-Kexi-TypeMime").toCString(); kdDebug() << "Manager::lookup(): " << mime << endl; //<TEMP>: disable some parts if needed if (!Kexi::tempShowForms() && mime=="kexi/form") @@ -81,7 +81,7 @@ Manager::lookup() if (!Kexi::tempShowScripts() && mime=="kexi/script") continue; //</TEMP> - int idx = sl_order.findIndex( ptr->library() ); + int idx = sl_order.tqfindIndex( ptr->library() ); if (idx!=-1) ordered.insert(idx, ptr); else //add to end @@ -127,11 +127,11 @@ Manager::part(Info *i) // kdDebug() << "Manager::part().." << endl; int error=0; p = KParts::ComponentFactory::createInstanceFromService<Part>(i->ptr(), this, - QString(i->objectName()+"_part").latin1(), QStringList(), &error); + TQString(i->objectName()+"_part").latin1(), TQStringList(), &error); if(!p) { kdDebug() << "Manager::part(): failed :( (ERROR #" << error << ")" << endl; kdDebug() << " " << KLibLoader::self()->lastErrorMessage() << endl; - i->setBroken(true, i18n("Error while loading plugin \"%1\"").arg(i->objectName())); + i->setBroken(true, i18n("Error while loading plugin \"%1\"").tqarg(i->objectName())); setError(i->errorMessage()); return 0; } @@ -180,25 +180,25 @@ Manager::removeClients( KexiMainWindow *win ) { if (!win) return; - QIntDictIterator<Part> it(m_parts); + TQIntDictIterator<Part> it(m_parts); for (;i.current();++it) { i.current()->removeClient(win->guiFactory()); } }*/ Part * -Manager::partForMimeType(const QString &mimeType) +Manager::partForMimeType(const TQString &mimeType) { return mimeType.isEmpty() ? 0 : part(m_partsByMime[mimeType.latin1()]); } Info * -Manager::infoForMimeType(const QString &mimeType) +Manager::infoForMimeType(const TQString &mimeType) { Info *i = mimeType.isEmpty() ? 0 : m_partsByMime[mimeType.latin1()]; if (i) return i; - setError(i18n("No plugin for mime type \"%1\"").arg(mimeType)); + setError(i18n("No plugin for mime type \"%1\"").tqarg(mimeType)); return 0; } @@ -207,7 +207,7 @@ bool Manager::checkProject(KexiDB::Connection *conn) { clearError(); -// QString errmsg = i18n("Invalid project contents."); +// TQString errmsg = i18n("Invalid project contents."); //TODO: catch errors! if(!conn->isDatabaseUsed()) { @@ -222,7 +222,7 @@ Manager::checkProject(KexiDB::Connection *conn) } // int id=0; -// QStringList parts_found; +// TQStringList parts_found; for(cursor->moveFirst(); !cursor->eof(); cursor->moveNext()) { // id++; @@ -254,12 +254,12 @@ Manager::checkProject(KexiDB::Connection *conn) KexiDB::FieldList *fl = ts->subList("p_id", "p_name", "p_mime", "p_url"); if (!fl) return false; - if (!parts_found.contains("kexi/table")) { - if (!conn->insertRecord(*fl, QVariant(1), QVariant("Tables"), QVariant("kexi/table"), QVariant("http://"))) + if (!parts_found.tqcontains("kexi/table")) { + if (!conn->insertRecord(*fl, TQVariant(1), TQVariant("Tables"), TQVariant("kexi/table"), TQVariant("http://"))) return false; } - if (!parts_found.contains("kexi/query")) { - if (!conn->insertRecord(*fl, QVariant(2), QVariant("Queries"), QVariant("kexi/query"), QVariant("http://"))) + if (!parts_found.tqcontains("kexi/query")) { + if (!conn->insertRecord(*fl, TQVariant(2), TQVariant("Queries"), TQVariant("kexi/query"), TQVariant("http://"))) return false; } #endif |