summaryrefslogtreecommitdiffstats
path: root/bibletime/frontend/btinstallmgr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'bibletime/frontend/btinstallmgr.cpp')
-rw-r--r--bibletime/frontend/btinstallmgr.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/bibletime/frontend/btinstallmgr.cpp b/bibletime/frontend/btinstallmgr.cpp
index 1332d10..c3cb859 100644
--- a/bibletime/frontend/btinstallmgr.cpp
+++ b/bibletime/frontend/btinstallmgr.cpp
@@ -12,8 +12,8 @@
#include "util/cpointers.h"
//Qt includes
-#include <qfile.h>
-#include <qfileinfo.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
//KDE includes
#include <kapplication.h>
@@ -35,21 +35,21 @@ using namespace sword;
namespace BookshelfManager {
- const QString BTInstallMgr::Tool::LocalConfig::swordConfigFilename() {
+ const TQString BTInstallMgr::Tool::LocalConfig::swordConfigFilename() {
// Q_ASSERT( CPointers::backend()->sysconfig );
- return QString::fromLatin1("%1/.sword/sword.conf").arg(getenv("HOME"));
+ return TQString::fromLatin1("%1/.sword/sword.conf").arg(getenv("HOME"));
}
- QStringList BTInstallMgr::Tool::RemoteConfig::sourceList( sword::InstallMgr* mgr ) {
+ TQStringList BTInstallMgr::Tool::RemoteConfig::sourceList( sword::InstallMgr* mgr ) {
// qWarning("BTInstallMgr::Tool::sourceList( sword::InstallMgr* mgr )");
Q_ASSERT(mgr);
Q_ASSERT(mgr->installConf);
- QStringList names;
+ TQStringList names;
//add Sword remote sources
for (InstallSourceMap::iterator it = mgr->sources.begin(); it != mgr->sources.end(); it++) {
- names << QString::fromLocal8Bit(it->second->caption);
+ names << TQString::fromLocal8Bit(it->second->caption);
}
// Add local directory sources
@@ -61,7 +61,7 @@ namespace BookshelfManager {
while (sourceBegin != sourceEnd) {
InstallSource is("DIR", sourceBegin->second.c_str());
- names << QString::fromLatin1(is.caption.c_str());
+ names << TQString::fromLatin1(is.caption.c_str());
sourceBegin++;
}
@@ -70,18 +70,18 @@ namespace BookshelfManager {
return names;
}
- QStringList BTInstallMgr::Tool::LocalConfig::targetList() {
- QStringList names = CPointers::backend()->swordDirList();
+ TQStringList BTInstallMgr::Tool::LocalConfig::targetList() {
+ TQStringList names = CPointers::backend()->swordDirList();
return names;
}
- void BTInstallMgr::Tool::LocalConfig::setTargetList( const QStringList& targets ) {
+ void BTInstallMgr::Tool::LocalConfig::setTargetList( const TQStringList& targets ) {
//saves a new Sworc config using the provided target list
- QString filename = KGlobal::dirs()->saveLocation("data", "bibletime/") + "sword.conf"; //default is to assume the real location isn't writable
+ TQString filename = KGlobal::dirs()->saveLocation("data", "bibletime/") + "sword.conf"; //default is to assume the real location isn't writable
bool directAccess = false;
- QFileInfo i(LocalConfig::swordConfigFilename());
- QFileInfo dirInfo(i.dirPath(true));
+ TQFileInfo i(LocalConfig::swordConfigFilename());
+ TQFileInfo dirInfo(i.dirPath(true));
if ( i.exists() && i.isWritable() ) { //we can write to the file ourself
filename = LocalConfig::swordConfigFilename();
@@ -96,9 +96,9 @@ namespace BookshelfManager {
SWConfig conf(filename.local8Bit());
conf.Sections.clear();
- for (QStringList::const_iterator it = targets.begin(); it != targets.end(); ++it) {
- QString t = *it;
- if (t.contains( QString("%1/.sword").arg(getenv("HOME")) )) {
+ for (TQStringList::const_iterator it = targets.begin(); it != targets.end(); ++it) {
+ TQString t = *it;
+ if (t.contains( TQString("%1/.sword").arg(getenv("HOME")) )) {
//we don't want HOME/.sword in the config
continue;
}
@@ -113,12 +113,12 @@ namespace BookshelfManager {
if (!directAccess) { //use kdesu to move the file to the right place
KProcess *proc = new KProcess;
*proc << "kdesu";
- *proc << QString::fromLatin1("-c") << QString("mv %1 %2").arg(filename).arg(LocalConfig::swordConfigFilename());
+ *proc << TQString::fromLatin1("-c") << TQString("mv %1 %2").arg(filename).arg(LocalConfig::swordConfigFilename());
proc->start(KProcess::Block);
}
}
- sword::InstallSource BTInstallMgr::Tool::RemoteConfig::source( sword::InstallMgr* mgr, const QString& name ) {
+ sword::InstallSource BTInstallMgr::Tool::RemoteConfig::source( sword::InstallMgr* mgr, const TQString& name ) {
Q_ASSERT(mgr);
InstallSourceMap::iterator source = mgr->sources.find(name.latin1());
@@ -187,15 +187,15 @@ namespace BookshelfManager {
config.Save();
}
- const QString BTInstallMgr::Tool::RemoteConfig::configPath() {
+ const TQString BTInstallMgr::Tool::RemoteConfig::configPath() {
const char *envhomedir = getenv("HOME");
- QString confPath = QString(envhomedir ? envhomedir : ".");
+ TQString confPath = TQString(envhomedir ? envhomedir : ".");
confPath.append("/.sword/InstallMgr");
return confPath;
}
- const QString BTInstallMgr::Tool::RemoteConfig::configFilename() {
+ const TQString BTInstallMgr::Tool::RemoteConfig::configFilename() {
return (configPath() + "/InstallMgr.conf");
}
@@ -252,11 +252,11 @@ namespace BookshelfManager {
CSwordBackend* ret = 0;
if (RemoteConfig::isRemoteSource(is)) {
// qWarning("## remote backend for %s", is->localShadow.c_str());
- ret = new CSwordBackend( QString(is->localShadow.c_str()), false );
+ ret = new CSwordBackend( TQString(is->localShadow.c_str()), false );
}
else {
- // qWarning("## local backend for %s", QString(is->directory.c_str()).latin1());
- ret = new CSwordBackend( QString(is->directory.c_str()) );
+ // qWarning("## local backend for %s", TQString(is->directory.c_str()).latin1());
+ ret = new CSwordBackend( TQString(is->directory.c_str()) );
}
Q_ASSERT(ret);