diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-16 09:56:13 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-16 09:56:13 -0600 |
commit | 1970df5bb461eff586a2a099ae0c020bdcd550b7 (patch) | |
tree | 9ec8eea2b02f2476145046092e3cdafd51b4ee10 /kiosktool/kioskrun.cpp | |
parent | f97153cfb212e0b3feb8c8f1c6376b89c747a9a9 (diff) | |
download | kiosktool-1970df5bb461eff586a2a099ae0c020bdcd550b7.tar.gz kiosktool-1970df5bb461eff586a2a099ae0c020bdcd550b7.zip |
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit f97153cfb212e0b3feb8c8f1c6376b89c747a9a9.
Diffstat (limited to 'kiosktool/kioskrun.cpp')
-rw-r--r-- | kiosktool/kioskrun.cpp | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/kiosktool/kioskrun.cpp b/kiosktool/kioskrun.cpp index ff58cde..8164dc8 100644 --- a/kiosktool/kioskrun.cpp +++ b/kiosktool/kioskrun.cpp @@ -264,17 +264,17 @@ KioskRun::setupConfigEnv() hostname[0] = 0; gethostname(hostname, 255); - TQString tmpDir = TQString("%1/%2-%3").arg(kdeHome).arg("tmp").arg(hostname); + TQString tmpDir = TQString("%1/%2-%3").tqarg(kdeHome).tqarg("tmp").tqarg(hostname); deleteDir(tmpDir); ::mkdir(TQFile::encodeName(newTmpDir), 0700); ::symlink(TQFile::encodeName(newTmpDir), TQFile::encodeName(tmpDir)); - TQString socketDir = TQString("%1/%2-%3").arg(kdeHome).arg("socket").arg(hostname); + TQString socketDir = TQString("%1/%2-%3").tqarg(kdeHome).tqarg("socket").tqarg(hostname); deleteDir(socketDir); ::mkdir(TQFile::encodeName(newSocketDir), 0700); ::symlink(TQFile::encodeName(newSocketDir), TQFile::encodeName(socketDir)); - m_configDir = TQString("%1/.kde/share/config/").arg(m_homeDir); + m_configDir = TQString("%1/.kde/share/config/").tqarg(m_homeDir); m_instance = new KInstance("kioskrun"); (void) m_instance->dirs(); // Create KStandardDirs obj @@ -338,7 +338,7 @@ KioskRun::shutdownConfigEnv() m_instance = 0; } -class ImmutableStatus +class ImmutabletqStatus { public: bool m_fileScope; @@ -352,7 +352,7 @@ bool KioskRun::isConfigImmutable(const TQString &filename, const TQString &group) { (void) configFile(filename); - ImmutableStatus *status = m_immutableStatusCache.find(filename); + ImmutabletqStatus *status = m_immutableStatusCache.find(filename); assert(status); if (group.isEmpty()) return status->m_fileScope; @@ -364,7 +364,7 @@ void KioskRun::setConfigImmutable(const TQString &filename, const TQString &_group, bool bImmutable) { (void) configFile(filename); - ImmutableStatus *status = m_immutableStatusCache.find(filename); + ImmutabletqStatus *status = m_immutableStatusCache.find(filename); assert(status); if (_group.isEmpty()) { @@ -377,7 +377,7 @@ KioskRun::setConfigImmutable(const TQString &filename, const TQString &_group, b } else { - TQString group = TQString("[%1]").arg(_group); + TQString group = TQString("[%1]").tqarg(_group); if (status->m_lines.find(group)) { if (!bImmutable) @@ -412,9 +412,9 @@ static void addImmutable(TQString &ext) } TQString -KioskRun::saveImmutableStatus(const TQString &filename) +KioskRun::saveImmutabletqStatus(const TQString &filename) { - ImmutableStatus *status = new ImmutableStatus; + ImmutabletqStatus *status = new ImmutabletqStatus; status->m_fileScope = false; status->m_dirty = false; m_immutableStatusCache.insert(filename, status); @@ -505,21 +505,21 @@ KioskRun::saveImmutableStatus(const TQString &filename) } bool -KioskRun::restoreImmutableStatus(const TQString &filename, bool force) +KioskRun::restoreImmutabletqStatus(const TQString &filename, bool force) { - ImmutableStatus *status = m_immutableStatusCache.take(filename); + ImmutabletqStatus *status = m_immutableStatusCache.take(filename); if (!status) { - kdDebug() << "KioskRun::restoreImmutableStatus(" << filename << ") status info missing" << endl; + kdDebug() << "KioskRun::restoreImmutabletqStatus(" << filename << ") status info missing" << endl; return true; } if (!force && !status->m_dirty) { - kdDebug() << "KioskRun::restoreImmutableStatus(" << filename << ") not changed" << endl; + kdDebug() << "KioskRun::restoreImmutabletqStatus(" << filename << ") not changed" << endl; delete status; return true; } - kdDebug() << "KioskRun::restoreImmutableStatus(" << filename << ") restoring" << endl; + kdDebug() << "KioskRun::restoreImmutabletqStatus(" << filename << ") restoring" << endl; TQString path = status->m_tmpFile; @@ -625,7 +625,7 @@ KioskRun::flushConfigCache() KConfig *config = it.current(); bool dirty = config->isDirty(); config->sync(); // Save - if (!restoreImmutableStatus(file, dirty)) + if (!restoreImmutabletqStatus(file, dirty)) return false; m_saveConfigCache.remove(file); } @@ -646,7 +646,7 @@ KioskRun::configFile(const TQString &filename) setupConfigEnv(); - TQString saveLocation = saveImmutableStatus(filename); + TQString saveLocation = saveImmutabletqStatus(filename); config = new KSimpleConfig(saveLocation); m_saveConfigCache.insert(filename, config); @@ -743,7 +743,7 @@ KioskRun::setupRuntimeEnv() char hostname[256]; hostname[0] = 0; gethostname(hostname, 255); - TQString cacheDir = TQString("%1/.kde/cache-%2").arg(m_homeDir).arg(hostname); + TQString cacheDir = TQString("%1/.kde/cache-%2").tqarg(m_homeDir).tqarg(hostname); deleteDir(cacheDir); KStandardDirs::makeDir(cacheDir); @@ -751,10 +751,10 @@ KioskRun::setupRuntimeEnv() ::unlink(TQFile::encodeName(m_homeDir+".kderc")); - TQString iceAuth = TQString("%1/.ICEauthority").arg(TQDir::homeDirPath()); + TQString iceAuth = TQString("%1/.ICEauthority").tqarg(TQDir::homeDirPath()); setenv("ICEAUTHORITY", TQFile::encodeName(iceAuth), 0); // Don't overwrite existing setting - TQString xAuth = TQString("%1/.Xauthority").arg(TQDir::homeDirPath()); + TQString xAuth = TQString("%1/.Xauthority").tqarg(TQDir::homeDirPath()); setenv("XAUTHORITY", TQFile::encodeName(xAuth), 0); // Don't overwrite existing setting TQString dcopServerFile = m_homeDir+"/.kde/DCOPserver"; @@ -902,11 +902,11 @@ KioskRun::createDir(const TQString &dir) if (error.isEmpty()) msg = i18n("<qt>The directory <b>%1</b> could not be created because of an unspecified problem.<p>") - .arg(dir); + .tqarg(dir); else msg = i18n("<qt>The directory <b>%1</b> could not be created because of the following problem:" "<p>%2<p>") - .arg(dir, NETACCESS::lastErrorString()); + .tqarg(dir, NETACCESS::lastErrorString()); msg += i18n("Without this directory your changes can not be saved.<p>" "Do you want to retry creating the directory or abort the saving of changes?</qt>"); @@ -944,7 +944,7 @@ KioskRun::createRemoteDirRecursive(const KURL &dest, bool ask) // Parent doesn't exist, int result = KMessageBox::warningContinueCancel(kapp->mainWidget(), i18n("<qt>The directory <b>%1</b> does not yet exist. " - "Do you want to create it?").arg(parent.prettyURL()), TQString(), + "Do you want to create it?").tqarg(parent.prettyURL()), TQString(), i18n("Create &Dir")); if (result != KMessageBox::Continue) return false; @@ -984,11 +984,11 @@ KioskRun::createRemoteDir(const KURL &dest) if (error.isEmpty()) msg = i18n("<qt>The directory <b>%1</b> could not be created because of an unspecified problem.<p>") - .arg(dest.prettyURL()); + .tqarg(dest.prettyURL()); else msg = i18n("<qt>The directory <b>%1</b> could not be created because of the following problem:" "<p>%2<p>") - .arg(dest.prettyURL(), NETACCESS::lastErrorString()); + .tqarg(dest.prettyURL(), NETACCESS::lastErrorString()); msg += i18n("Without this directory your files can not be uploaded.<p>" "Do you want to retry creating the directory or abort uploading?</qt>"); @@ -1034,11 +1034,11 @@ KioskRun::install(const TQString &file, const TQString &destination) TQString msg; if (error.isEmpty()) msg = i18n("<qt>The file <b>%1</b> could not be installed because of an unspecified problem.") - .arg(destination); + .tqarg(destination); else msg = i18n("<qt>The file <b>%1</b> could not be installed because of the following problem:" "<p>%2<p>") - .arg(destination, NETACCESS::lastErrorString()); + .tqarg(destination, NETACCESS::lastErrorString()); msg += i18n("Do you want to retry the installation or abort the saving of changes?</qt>"); @@ -1068,11 +1068,11 @@ KioskRun::uploadRemote(const TQString &file, const KURL &dest) TQString msg; if (error.isEmpty()) msg = i18n("<qt>The file <b>%1</b> could not be uploaded to <b>%2</b> because of an unspecified problem.") - .arg(file, dest.prettyURL()); + .tqarg(file, dest.prettyURL()); else msg = i18n("<qt>The file <b>%1</b> could not be uploaded to <b>%2</b> because of the following problem:" "<p>%3<p>") - .arg(file, dest.prettyURL(),NETACCESS::lastErrorString()); + .tqarg(file, dest.prettyURL(),NETACCESS::lastErrorString()); msg += i18n("Do you want to retry or abort the uploading?</qt>"); @@ -1156,7 +1156,7 @@ KioskRun::getProfileInfo(const TQString &profile, TQString &description, TQStrin tmp.replace("/", "_"); defaultInstallDir += tmp+"/"; - TQString group = TQString("Directories-%1").arg(profile); + TQString group = TQString("Directories-%1").tqarg(profile); config->setGroup(group); installDir = config->readEntry("prefixes", defaultInstallDir); @@ -1204,11 +1204,11 @@ KioskRun::openKderc() TQString msg; if (error.isEmpty()) msg = i18n("<qt>The file <b>%1</b> could not be accessed because of an unspecified problem.") - .arg(settingsUrl.path()); + .tqarg(settingsUrl.path()); else msg = i18n("<qt>The file <b>%1</b> could not be accessed because of the following problem:" "<p>%2<p>") - .arg(settingsUrl.path(), error); + .tqarg(settingsUrl.path(), error); msg += i18n("Do you want to retry the operation or abort the saving of changes?</qt>"); @@ -1274,7 +1274,7 @@ KioskRun::setProfileInfo(const TQString &profile, const TQString &description, c { int msgResult = KMessageBox::warningYesNoCancelList(kapp->mainWidget(), i18n("<qt>The profile directory <b>%1</b> contains the following files, " - "do you wish to delete these files?").arg(installDir), + "do you wish to delete these files?").tqarg(installDir), allFiles, i18n("Deleting Profile"), #if KDE_IS_VERSION(3,2,91) @@ -1334,7 +1334,7 @@ KioskRun::setProfileInfo(const TQString &profile, const TQString &description, c config->setGroup("Directories"); TQString oldAdmin = config->readEntry("kioskAdmin"); - TQString group = TQString("Directories-%1").arg(profile); + TQString group = TQString("Directories-%1").tqarg(profile); config->setGroup(group); if ((installDir == config->readEntry("prefixes")) && @@ -1420,8 +1420,8 @@ KioskRun::newProfile() KConfig *config = kapp->config(); for(int p = 1; p; p++) { - TQString profile = TQString("profile%1").arg(p); - TQString group = TQString("Directories-%1").arg(profile); + TQString profile = TQString("profile%1").tqarg(p); + TQString group = TQString("Directories-%1").tqarg(profile); if (!config->hasGroup(group)) { if (profilePrefix.isEmpty()) @@ -1614,7 +1614,7 @@ KioskRun::setCustomRestrictionFileBrowsing(bool restrict) TQStringList urlRestrictions; for(int i = 0; i < count; i++) { - TQString key = TQString("rule_%1").arg(i+1); + TQString key = TQString("rule_%1").tqarg(i+1); if (cfg->hasKey(key)) urlRestrictions.append(cfg->readEntry(key)); } @@ -1640,7 +1640,7 @@ KioskRun::setCustomRestrictionFileBrowsing(bool restrict) for(int i = 0; i < count; i++) { - TQString key = TQString("rule_%1").arg(i+1); + TQString key = TQString("rule_%1").tqarg(i+1); cfg->writeEntry(key, urlRestrictions[i]); } KioskRun::self()->setConfigImmutable(file, group, true); |