From 2fb1ed0d03dda186096172cb76aedfd5e3953f94 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 31 Jan 2013 13:29:48 -0600 Subject: Rename KStandard for enhanced compatibility with KDE4 --- ark/extractiondialog.cpp | 2 +- kdessh/kdessh.cpp | 2 +- kgpg/kgpg.cpp | 2 +- klaptopdaemon/acpi.cpp | 4 ++-- klaptopdaemon/apm.cpp | 6 +++--- klaptopdaemon/daemondock.cpp | 6 +++--- klaptopdaemon/portable.cpp | 4 ++-- klaptopdaemon/sony.cpp | 2 +- ksim/ksimview.cpp | 4 ++-- ksim/library/themeloader.cpp | 8 ++++---- superkaramba/src/sknewstuff.cpp | 4 ++-- superkaramba/src/themesdlg.cpp | 4 ++-- 12 files changed, 24 insertions(+), 24 deletions(-) diff --git a/ark/extractiondialog.cpp b/ark/extractiondialog.cpp index 9974252..ca82b56 100644 --- a/ark/extractiondialog.cpp +++ b/ark/extractiondialog.cpp @@ -153,7 +153,7 @@ void ExtractionDialog::accept() } // create directory using filename, make sure it has trailing slash p.adjustPath(1); - if( !KStandardDirs::makeDir( p.path() ) ) + if( !TDEStandardDirs::makeDir( p.path() ) ) { KMessageBox::error( this, i18n( "The folder could not be created. Please check permissions." ) ); return; diff --git a/kdessh/kdessh.cpp b/kdessh/kdessh.cpp index c5b89ab..0f48f1a 100644 --- a/kdessh/kdessh.cpp +++ b/kdessh/kdessh.cpp @@ -83,7 +83,7 @@ int main(int argc, char *argv[]) TDECmdLineArgs::usage(i18n("No command or host specified.")); // Check if ssh is available - if (KStandardDirs::findExe(TQString::fromLatin1("ssh")).isEmpty()) + if (TDEStandardDirs::findExe(TQString::fromLatin1("ssh")).isEmpty()) { kdError(1511) << "ssh not found\n"; exit(1); diff --git a/kgpg/kgpg.cpp b/kgpg/kgpg.cpp index 0dc74a1..44ff121 100644 --- a/kgpg/kgpg.cpp +++ b/kgpg/kgpg.cpp @@ -607,7 +607,7 @@ static TQString getGpgHome() if(!gpgHome.endsWith("/")) gpgHome.append('/'); - KStandardDirs::makeDir(gpgHome, 0700); + TDEStandardDirs::makeDir(gpgHome, 0700); return gpgHome; } diff --git a/klaptopdaemon/acpi.cpp b/klaptopdaemon/acpi.cpp index cf04dab..131e92c 100644 --- a/klaptopdaemon/acpi.cpp +++ b/klaptopdaemon/acpi.cpp @@ -163,10 +163,10 @@ AcpiConfig::~AcpiConfig() void AcpiConfig::setupHelper() { unsigned long len, crc; - TQString helper = KStandardDirs::findExe("klaptop_acpi_helper"); + TQString helper = TDEStandardDirs::findExe("klaptop_acpi_helper"); checkcrc(TQFile::encodeName(helper), len, crc); - TQString tdesu = KStandardDirs::findExe("tdesu"); + TQString tdesu = TDEStandardDirs::findExe("tdesu"); if (!tdesu.isEmpty()) { int rc = KMessageBox::warningContinueCancel(0, i18n("You will need to supply a root password " diff --git a/klaptopdaemon/apm.cpp b/klaptopdaemon/apm.cpp index 8f231e5..bde1410 100644 --- a/klaptopdaemon/apm.cpp +++ b/klaptopdaemon/apm.cpp @@ -154,7 +154,7 @@ ApmConfig::~ApmConfig() void ApmConfig::setupHelper() { - TQString tdesu = KStandardDirs::findExe("tdesu"); + TQString tdesu = TDEStandardDirs::findExe("tdesu"); if (!tdesu.isEmpty()) { int rc = KMessageBox::warningContinueCancel(0, i18n("You will need to supply a root password " @@ -185,10 +185,10 @@ void ApmConfig::setupHelper() void ApmConfig::setupHelper2() // we use the acpi helper to do software suspend { unsigned long len, crc; - TQString helper = KStandardDirs::findExe("klaptop_acpi_helper"); + TQString helper = TDEStandardDirs::findExe("klaptop_acpi_helper"); checkcrc(helper.latin1(), len, crc); - TQString tdesu = KStandardDirs::findExe("tdesu"); + TQString tdesu = TDEStandardDirs::findExe("tdesu"); if (!tdesu.isEmpty()) { int rc = KMessageBox::warningContinueCancel(0, i18n("You will need to supply a root password " diff --git a/klaptopdaemon/daemondock.cpp b/klaptopdaemon/daemondock.cpp index cdac1e1..f91d43d 100644 --- a/klaptopdaemon/daemondock.cpp +++ b/klaptopdaemon/daemondock.cpp @@ -233,7 +233,7 @@ laptop_dock::invokeBrightness() void laptop_dock::slotGoRoot(int /*id*/) { #ifdef NOTDEF - TQString tdesu = KStandardDirs::findExe("tdesu"); + TQString tdesu = TDEStandardDirs::findExe("tdesu"); if (!tdesu.isEmpty()) { int rc = KMessageBox::warningContinueCancel(0, i18n("You will need to supply a root password " @@ -250,7 +250,7 @@ void laptop_dock::slotGoRoot(int /*id*/) { *_rootProcess << "-u"; *_rootProcess << "root"; //*_rootProcess << "--nonewdcop"; - *_rootProcess << KStandardDirs::findExe("klaptopdaemon"); + *_rootProcess << TDEStandardDirs::findExe("klaptopdaemon"); connect(_rootProcess, TQT_SIGNAL(processExited(TDEProcess*)), this, TQT_SLOT(rootExited(TDEProcess*))); _rootProcess->start(TDEProcess::NotifyOnExit); @@ -526,7 +526,7 @@ void laptop_dock::invokeLockSuspend() void laptop_dock::invokeSetup() { TDEProcess proc; - proc << KStandardDirs::findExe("tdecmshell"); + proc << TDEStandardDirs::findExe("tdecmshell"); proc << "laptop"; proc.start(TDEProcess::DontCare); proc.detach(); diff --git a/klaptopdaemon/portable.cpp b/klaptopdaemon/portable.cpp index 9f551dd..b351a1c 100644 --- a/klaptopdaemon/portable.cpp +++ b/klaptopdaemon/portable.cpp @@ -746,7 +746,7 @@ static void invoke_acpi_helper(const char *param, const char *param2, const char *param3) { TDEProcess proc; - proc << KStandardDirs::findExe("klaptop_acpi_helper"); + proc << TDEStandardDirs::findExe("klaptop_acpi_helper"); proc << param; if (param2) proc << param2; @@ -1358,7 +1358,7 @@ acpi_helper_ok(bool type) known[type] = last_seed; known_res[type] = 0; struct stat sb; - TQString str = KStandardDirs::findExe("klaptop_acpi_helper"); + TQString str = TDEStandardDirs::findExe("klaptop_acpi_helper"); if (str.isNull() || str.isEmpty()) return(0); diff --git a/klaptopdaemon/sony.cpp b/klaptopdaemon/sony.cpp index 16d0155..33d3a05 100644 --- a/klaptopdaemon/sony.cpp +++ b/klaptopdaemon/sony.cpp @@ -107,7 +107,7 @@ SonyConfig::SonyConfig(TQWidget * parent, const char *name) void SonyConfig::setupHelper() { - TQString tdesu = KStandardDirs::findExe("tdesu"); + TQString tdesu = TDEStandardDirs::findExe("tdesu"); if (!tdesu.isEmpty()) { int rc = KMessageBox::warningContinueCancel(0, i18n("You will need to supply a root password " diff --git a/ksim/ksimview.cpp b/ksim/ksimview.cpp index 572579c..09b5cf7 100644 --- a/ksim/ksimview.cpp +++ b/ksim/ksimview.cpp @@ -190,8 +190,8 @@ void KSim::MainView::makeDirs() if (TQFile::exists(themeDir) && TQFile::exists(monitorDir)) return; - bool themeCreated = KStandardDirs::makeDir(themeDir); - bool monitorCreated = KStandardDirs::makeDir(monitorDir); + bool themeCreated = TDEStandardDirs::makeDir(themeDir); + bool monitorCreated = TDEStandardDirs::makeDir(monitorDir); if (!themeCreated || !monitorCreated) { diff --git a/ksim/library/themeloader.cpp b/ksim/library/themeloader.cpp index 947ba73..0548f73 100644 --- a/ksim/library/themeloader.cpp +++ b/ksim/library/themeloader.cpp @@ -1042,7 +1042,7 @@ void KSim::ThemeLoader::parseDir(const TQString &url, int alt) homePath.length() ) ); if ( !TQFile::exists( homePath ) ) - KStandardDirs::makeDir( homePath ); + TDEStandardDirs::makeDir( homePath ); kdWarning() << "Cant write to current dir, setting dir to " << homePath << endl; @@ -1074,7 +1074,7 @@ void KSim::ThemeLoader::parseDir(const TQString &url, int alt) for (meter = meters.begin(); meter != meters.end(); ++meter) { TQString bgMeter = TQString::fromLatin1("bg_meter_"); if (TQFile::exists(bgMeter + (*meter) + altString + "." + (*format))) { - if (KStandardDirs::makeDir(url + (*meter))) + if (TDEStandardDirs::makeDir(url + (*meter))) directory.rename(bgMeter + (*meter) + altString + "." + (*format), (*meter) + "/bg_meter" + altString + "." + (*format)); } @@ -1085,7 +1085,7 @@ void KSim::ThemeLoader::parseDir(const TQString &url, int alt) for (panel = panels.begin(); panel != panels.end(); ++panel) { TQString bgPanel = TQString::fromLatin1("bg_panel_"); if (TQFile::exists(bgPanel + (*panel) + altString + "." + (*format))) { - if (KStandardDirs::makeDir(url + (*panel))) + if (TDEStandardDirs::makeDir(url + (*panel))) directory.rename(bgPanel + (*panel) + altString + "." + (*format), (*panel) + "/bg_panel" + altString + "." + (*format)); } @@ -1100,7 +1100,7 @@ void KSim::ThemeLoader::parseDir(const TQString &url, int alt) // move decal_net_leds* to the net folder to be more consistant tempFile = TQString::fromLatin1("decal_net_leds"); if (TQFile::exists(tempFile + altString + "." + (*format))) { - if (KStandardDirs::makeDir(url + "net")) + if (TDEStandardDirs::makeDir(url + "net")) directory.rename(tempFile + altString + "." + (*format), "net/decal_net_leds" + altString + "." + (*format)); } diff --git a/superkaramba/src/sknewstuff.cpp b/superkaramba/src/sknewstuff.cpp index 1b8b451..130d58a 100644 --- a/superkaramba/src/sknewstuff.cpp +++ b/superkaramba/src/sknewstuff.cpp @@ -50,12 +50,12 @@ bool SKNewStuff::install( const TQString &fileName ) kdDebug() << "SKNewStuff::install(): " << fileName << endl; KMimeType::Ptr result = KMimeType::findByURL(fileName); - KStandardDirs myStdDir; + TDEStandardDirs myStdDir; TQFileInfo fi(fileName); TQString base = fi.baseName(); TQString baseDestDir =myStdDir.saveLocation("data", kapp->instanceName() + "/themes/", true); const TQString destDir = baseDestDir + base + "/"; - KStandardDirs::makeDir( destDir ); + TDEStandardDirs::makeDir( destDir ); kdDebug() << "SKNewStuff::install() mimetype: " << result->name() << endl; diff --git a/superkaramba/src/themesdlg.cpp b/superkaramba/src/themesdlg.cpp index 9b13ff3..d47b039 100644 --- a/superkaramba/src/themesdlg.cpp +++ b/superkaramba/src/themesdlg.cpp @@ -74,7 +74,7 @@ ThemesDlg::~ThemesDlg() void ThemesDlg::saveUserAddedThemes() { - KStandardDirs ksd; + TDEStandardDirs ksd; TQStringList t = themes(); TQStringList dirs = ksd.findDirs("data", TQString(kapp->name()) + "/themes"); TQStringList::Iterator it = t.begin(); @@ -121,7 +121,7 @@ void ThemesDlg::populateListbox() TQDir dir; TQStringList dirs; TQStringList t; - KStandardDirs ksd; + TDEStandardDirs ksd; tableThemes->clear(); -- cgit v1.2.3