Rename KStandard for enhanced compatibility with KDE4

pull/1/head
Timothy Pearson 11 years ago
parent 6ad068ea54
commit 2fb1ed0d03

@ -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;

@ -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);

@ -607,7 +607,7 @@ static TQString getGpgHome()
if(!gpgHome.endsWith("/"))
gpgHome.append('/');
KStandardDirs::makeDir(gpgHome, 0700);
TDEStandardDirs::makeDir(gpgHome, 0700);
return gpgHome;
}

@ -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 "

@ -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 "

@ -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();

@ -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);

@ -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 "

@ -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)
{

@ -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));
}

@ -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;

@ -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();

Loading…
Cancel
Save