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/kexitemplateloader.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/kexitemplateloader.cpp')
-rw-r--r-- | kexi/core/kexitemplateloader.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/kexi/core/kexitemplateloader.cpp b/kexi/core/kexitemplateloader.cpp index 489d5f51..f6564d65 100644 --- a/kexi/core/kexitemplateloader.cpp +++ b/kexi/core/kexitemplateloader.cpp @@ -27,27 +27,27 @@ #include <kiconloader.h> #include <kapplication.h> -#include <qdir.h> +#include <tqdir.h> //static KexiTemplateInfo::List KexiTemplateLoader::loadListInfo() { KexiTemplateInfo::List list; - const QString subdir = QString(kapp->instanceName()) + "/templates"; - QString lang( KGlobal::locale()->language() ); - QStringList dirs( kapp->dirs()->findDirs("data", subdir) ); + const TQString subdir = TQString(kapp->instanceName()) + "/templates"; + TQString lang( KGlobal::locale()->language() ); + TQStringList dirs( kapp->dirs()->findDirs("data", subdir) ); while (true) { - foreach( QStringList::ConstIterator, it, dirs) { - QDir dir((*it)+lang); + foreach( TQStringList::ConstIterator, it, dirs) { + TQDir dir((*it)+lang); if (!dir.exists()) continue; if (!dir.isReadable()) { kdWarning() << "KexiTemplateLoader::loadListInfo() \"" << dir.absPath() << "\" not readable!" << endl; continue; } - const QStringList templateDirs( dir.entryList(QDir::Dirs, QDir::Name) ); - const QString absDirPath( dir.absPath() + '/' ); - foreach(QStringList::ConstIterator, templateIt, templateDirs) { + const TQStringList templateDirs( dir.entryList(TQDir::Dirs, TQDir::Name) ); + const TQString absDirPath( dir.absPath() + '/' ); + foreach(TQStringList::ConstIterator, templateIt, templateDirs) { if ((*templateIt)=="." || (*templateIt=="..")) continue; KexiTemplateInfo info = KexiTemplateLoader::loadInfo( absDirPath + *templateIt ); @@ -64,15 +64,15 @@ KexiTemplateInfo::List KexiTemplateLoader::loadListInfo() } //static -KexiTemplateInfo KexiTemplateLoader::loadInfo(const QString& directory) +KexiTemplateInfo KexiTemplateLoader::loadInfo(const TQString& directory) { - QDir dir(directory); + TQDir dir(directory); if (!dir.isReadable()) { kdWarning() << "KexiTemplateLoader::loadInfo() \"" << directory << "\" not readable!" << endl; return KexiTemplateInfo(); } - if (!QFileInfo(directory+"/info.txt").isReadable()) + if (!TQFileInfo(directory+"/info.txt").isReadable()) return KexiTemplateInfo(); KConfig infoTxt(directory+"/info.txt", true/*readonly*/, false/*local*/); KexiTemplateInfo info; @@ -81,22 +81,22 @@ KexiTemplateInfo KexiTemplateLoader::loadInfo(const QString& directory) kdWarning() << "KexiTemplateLoader::loadInfo() \"" << (directory+"/info.txt") << "\" contains no \"name\" field" << endl; return KexiTemplateInfo(); } - const QStringList templateFiles( dir.entryList("*.kexi", QDir::Files|QDir::Readable, QDir::Name) ); + const TQStringList templateFiles( dir.entryList("*.kexi", TQDir::Files|TQDir::Readable, TQDir::Name) ); if (templateFiles.isEmpty()) { kdWarning() << "KexiTemplateLoader::loadInfo() no readable .kexi template file found in \"" << directory << "\"" << endl; return KexiTemplateInfo(); } info.filename = directory+"/"+templateFiles.first(); info.description = infoTxt.readEntry("Description"); - const QString iconFileName( infoTxt.readEntry("Icon") ); + const TQString iconFileName( infoTxt.readEntry("Icon") ); if (!iconFileName.isEmpty()) - info.icon = QPixmap(directory+'/'+iconFileName); + info.icon = TQPixmap(directory+'/'+iconFileName); if (info.icon.isNull()) info.icon = DesktopIcon("kexiproject_sqlite"); //default - QStringList autoopenObjectsString = infoTxt.readListEntry("AutoOpenObjects"); - foreach( QStringList::ConstIterator, it, autoopenObjectsString) { + TQStringList autoopenObjectsString = infoTxt.readListEntry("AutoOpenObjects"); + foreach( TQStringList::ConstIterator, it, autoopenObjectsString) { KexiProjectData::ObjectInfo autoopenObject; - QStringList autoopenObjectNameSplitted( QStringList::split(':', *it) ); + TQStringList autoopenObjectNameSplitted( TQStringList::split(':', *it) ); if (autoopenObjectNameSplitted.count()>1) { autoopenObject["type"] = autoopenObjectNameSplitted[0]; autoopenObject["name"] = autoopenObjectNameSplitted[1]; |