Rename KStandard for enhanced compatibility with KDE4

pull/2/head
Timothy Pearson 11 years ago
parent 5e5409d895
commit 01c60a2678

@ -70,7 +70,7 @@ BackTrace::~BackTrace()
void BackTrace::start() void BackTrace::start()
{ {
TQString exec = m_krashconf->tryExec(); TQString exec = m_krashconf->tryExec();
if ( !exec.isEmpty() && KStandardDirs::findExe(exec).isEmpty() ) if ( !exec.isEmpty() && TDEStandardDirs::findExe(exec).isEmpty() )
{ {
TQObject * o = parent(); TQObject * o = parent();

@ -30,7 +30,7 @@
#include "bgdefaults.h" #include "bgdefaults.h"
class BGMonitorArrangement; class BGMonitorArrangement;
class KStandardDirs; class TDEStandardDirs;
class BGDialog : public BGDialog_UI class BGDialog : public BGDialog_UI
{ {
@ -84,7 +84,7 @@ protected slots:
protected: protected:
void getEScreen(); void getEScreen();
TDEGlobalBackgroundSettings *m_pGlobals; TDEGlobalBackgroundSettings *m_pGlobals;
KStandardDirs *m_pDirs; TDEStandardDirs *m_pDirs;
bool m_multidesktop; bool m_multidesktop;
bool m_useViewports; bool m_useViewports;
int m_curDesk; int m_curDesk;

@ -990,7 +990,7 @@ void KBackgroundRenderer::saveCacheFile()
if( m_Image.isNull()) if( m_Image.isNull())
fullWallpaperBlend(); // generate from m_Pixmap fullWallpaperBlend(); // generate from m_Pixmap
TQString f = cacheFileName(); TQString f = cacheFileName();
if( KStandardDirs::exists( f ) || m_Cached ) if( TDEStandardDirs::exists( f ) || m_Cached )
utime( TQFile::encodeName( f ), NULL ); utime( TQFile::encodeName( f ), NULL );
else { else {
m_Image.save( f, "PNG" ); m_Image.save( f, "PNG" );

@ -27,7 +27,7 @@ class TDEConfig;
class TDEProcess; class TDEProcess;
class KTempFile; class KTempFile;
class KShellProcess; class KShellProcess;
class KStandardDirs; class TDEStandardDirs;
/** /**
* This class renders a desktop background to a TQImage. The operation is * This class renders a desktop background to a TQImage. The operation is
@ -109,7 +109,7 @@ private:
TQPixmap m_Pixmap; TQPixmap m_Pixmap;
TQTimer *m_pTimer; TQTimer *m_pTimer;
KStandardDirs *m_pDirs; TDEStandardDirs *m_pDirs;
KShellProcess *m_pProc; KShellProcess *m_pProc;
}; };

@ -182,7 +182,7 @@ int KBackgroundPattern::hash()
/* static */ /* static */
TQStringList KBackgroundPattern::list() TQStringList KBackgroundPattern::list()
{ {
KStandardDirs *dirs = TDEGlobal::dirs(); TDEStandardDirs *dirs = TDEGlobal::dirs();
dirs->addResourceType("dtop_pattern", dirs->kde_default("data") + dirs->addResourceType("dtop_pattern", dirs->kde_default("data") +
"kdesktop/patterns"); "kdesktop/patterns");
TQStringList lst = dirs->findAllResources("dtop_pattern", "*.desktop", TQStringList lst = dirs->findAllResources("dtop_pattern", "*.desktop",
@ -393,7 +393,7 @@ int KBackgroundProgram::hash()
/* static */ /* static */
TQStringList KBackgroundProgram::list() TQStringList KBackgroundProgram::list()
{ {
KStandardDirs *dirs = TDEGlobal::dirs(); TDEStandardDirs *dirs = TDEGlobal::dirs();
dirs->addResourceType("dtop_program", dirs->kde_default("data") + dirs->addResourceType("dtop_program", dirs->kde_default("data") +
"kdesktop/programs"); "kdesktop/programs");
TQStringList lst = dirs->findAllResources("dtop_program", "*.desktop", TQStringList lst = dirs->findAllResources("dtop_program", "*.desktop",
@ -651,7 +651,7 @@ void KBackgroundSettings::setWallpaperMode(int mode)
void KBackgroundSettings::setWallpaperList(TQStringList list) void KBackgroundSettings::setWallpaperList(TQStringList list)
{ {
KStandardDirs *d = TDEGlobal::dirs(); TDEStandardDirs *d = TDEGlobal::dirs();
if (m_WallpaperList == list) if (m_WallpaperList == list)
return; return;

@ -17,7 +17,7 @@
#include <tqvaluevector.h> #include <tqvaluevector.h>
template <class TQString, class T> class TQMap; template <class TQString, class T> class TQMap;
class KStandardDirs; class TDEStandardDirs;
class KSimpleConfig; class KSimpleConfig;
class TDEConfig; class TDEConfig;
class TQString; class TQString;
@ -66,7 +66,7 @@ private:
int m_Hash; int m_Hash;
TQString m_Name, m_Comment; TQString m_Name, m_Comment;
TQString m_Pattern, m_File; TQString m_Pattern, m_File;
KStandardDirs *m_pDirs; TDEStandardDirs *m_pDirs;
KSimpleConfig *m_pConfig; KSimpleConfig *m_pConfig;
}; };
@ -137,7 +137,7 @@ private:
TQString m_Name, m_Command; TQString m_Name, m_Command;
TQString m_PreviewCommand, m_Comment; TQString m_PreviewCommand, m_Comment;
TQString m_Executable, m_File; TQString m_Executable, m_File;
KStandardDirs *m_pDirs; TDEStandardDirs *m_pDirs;
KSimpleConfig *m_pConfig; KSimpleConfig *m_pConfig;
}; };
@ -283,7 +283,7 @@ private:
TQString m_CurrentWallpaperName; TQString m_CurrentWallpaperName;
TDEConfig *m_pConfig; TDEConfig *m_pConfig;
KStandardDirs *m_pDirs; TDEStandardDirs *m_pDirs;
bool m_bDeleteConfig; bool m_bDeleteConfig;
bool m_bEnabled; bool m_bEnabled;

@ -76,7 +76,7 @@ bool LocalDomainURIFilter::isLocalDomainHost( TQString& cmd ) const
if( !(host == last_host && last_time > time( NULL ) - 5 ) ) { if( !(host == last_host && last_time > time( NULL ) - 5 ) ) {
TQString helper = KStandardDirs::findExe(TQString::fromLatin1( "klocaldomainurifilterhelper" )); TQString helper = TDEStandardDirs::findExe(TQString::fromLatin1( "klocaldomainurifilterhelper" ));
if( helper.isEmpty()) if( helper.isEmpty())
return last_result = false; return last_result = false;

@ -441,7 +441,7 @@ bool KShortURIFilter::filterURI( KURIFilterData& data ) const
// line arguments or options that might have been supplied. // line arguments or options that might have been supplied.
TQString exe = removeArgs( cmd ); TQString exe = removeArgs( cmd );
//kdDebug() << k_funcinfo << "findExe with " << exe << endl; //kdDebug() << k_funcinfo << "findExe with " << exe << endl;
if( data.checkForExecutables() && !KStandardDirs::findExe( exe ).isNull() ) if( data.checkForExecutables() && !TDEStandardDirs::findExe( exe ).isNull() )
{ {
//kdDebug() << "EXECUTABLE exe=" << exe << endl; //kdDebug() << "EXECUTABLE exe=" << exe << endl;
setFilteredURI( data, KURL( exe )); setFilteredURI( data, KURL( exe ));

@ -298,7 +298,7 @@ bool ThemePage::installThemes( const TQString &file )
return false; return false;
const TQString destDir = TQDir::homeDirPath() + "/.icons/"; const TQString destDir = TQDir::homeDirPath() + "/.icons/";
KStandardDirs::makeDir( destDir ); // Make sure the directory exists TDEStandardDirs::makeDir( destDir ); // Make sure the directory exists
for ( TQStringList::ConstIterator it = themeDirs.begin(); it != themeDirs.end(); ++it ) for ( TQStringList::ConstIterator it = themeDirs.begin(); it != themeDirs.end(); ++it )
{ {

@ -186,7 +186,7 @@ void ConfigModule::runAsRoot()
} }
// run the process // run the process
TQString tdesu = KStandardDirs::findExe("tdesu"); TQString tdesu = TDEStandardDirs::findExe("tdesu");
if (!tdesu.isEmpty()) if (!tdesu.isEmpty())
{ {
_rootProcess = new TDEProcess; _rootProcess = new TDEProcess;

@ -125,7 +125,7 @@ bool createDir(const TQString &dir)
// //
// Clear any umask before dir is created // Clear any umask before dir is created
mode_t oldMask=umask(0000); mode_t oldMask=umask(0000);
bool status=KStandardDirs::makeDir(dir, DIR_PERMS); bool status=TDEStandardDirs::makeDir(dir, DIR_PERMS);
// Reset umask // Reset umask
::umask(oldMask); ::umask(oldMask);
return status; return status;

@ -383,14 +383,14 @@ extern "C"
KDE_EXPORT TDECModule *create_kicker_arrangement(TQWidget *parent, const char * /*name*/) KDE_EXPORT TDECModule *create_kicker_arrangement(TQWidget *parent, const char * /*name*/)
{ {
TDEGlobal::dirs()->addResourceType("extensions", KStandardDirs::kde_default("data") + TDEGlobal::dirs()->addResourceType("extensions", TDEStandardDirs::kde_default("data") +
"kicker/extensions"); "kicker/extensions");
return new PositionConfig(parent, "kcmkicker"); return new PositionConfig(parent, "kcmkicker");
} }
KDE_EXPORT TDECModule *create_kicker_hiding(TQWidget *parent, const char * /*name*/) KDE_EXPORT TDECModule *create_kicker_hiding(TQWidget *parent, const char * /*name*/)
{ {
TDEGlobal::dirs()->addResourceType("extensions", KStandardDirs::kde_default("data") + TDEGlobal::dirs()->addResourceType("extensions", TDEStandardDirs::kde_default("data") +
"kicker/extensions"); "kicker/extensions");
return new HidingConfig(parent, "kcmkicker"); return new HidingConfig(parent, "kcmkicker");
} }
@ -403,9 +403,9 @@ extern "C"
KDE_EXPORT TDECModule *create_kicker_appearance(TQWidget *parent, const char * /*name*/) KDE_EXPORT TDECModule *create_kicker_appearance(TQWidget *parent, const char * /*name*/)
{ {
KImageIO::registerFormats(); KImageIO::registerFormats();
TDEGlobal::dirs()->addResourceType("tiles", KStandardDirs::kde_default("data") + TDEGlobal::dirs()->addResourceType("tiles", TDEStandardDirs::kde_default("data") +
"kicker/tiles"); "kicker/tiles");
TDEGlobal::dirs()->addResourceType("hb_pics", KStandardDirs::kde_default("data") + TDEGlobal::dirs()->addResourceType("hb_pics", TDEStandardDirs::kde_default("data") +
"kcmkicker/pics"); "kcmkicker/pics");
return new LookAndFeelConfig(parent, "kcmkicker"); return new LookAndFeelConfig(parent, "kcmkicker");
} }

@ -230,7 +230,7 @@ void DesktopPathConfig::save()
TQString path = urDocument->url(); TQString path = urDocument->url();
if (!TQDir(path).exists()) if (!TQDir(path).exists())
{ {
if (!KStandardDirs::makeDir(path)) if (!TDEStandardDirs::makeDir(path))
{ {
KMessageBox::sorry(this, TDEIO::buildErrorString(TDEIO::ERR_COULD_NOT_MKDIR, path)); KMessageBox::sorry(this, TDEIO::buildErrorString(TDEIO::ERR_COULD_NOT_MKDIR, path));
urDocument->setURL(documentURL.path()); urDocument->setURL(documentURL.path());

@ -444,7 +444,7 @@ void runRdb( uint flags )
// Export colors to non-(KDE/Qt) apps (e.g. Motif, GTK+ apps) // Export colors to non-(KDE/Qt) apps (e.g. Motif, GTK+ apps)
if (exportColors) if (exportColors)
{ {
TDEGlobal::dirs()->addResourceType("appdefaults", KStandardDirs::kde_default("data") + "kdisplay/app-defaults/"); TDEGlobal::dirs()->addResourceType("appdefaults", TDEStandardDirs::kde_default("data") + "kdisplay/app-defaults/");
TQColorGroup cg = newPal.active(); TQColorGroup cg = newPal.active();
TDEGlobal::locale()->insertCatalogue("krdb"); TDEGlobal::locale()->insertCatalogue("krdb");
createGtkrc( true, cg, 1 ); createGtkrc( true, cg, 1 );

@ -27,7 +27,7 @@
#include <kurl.h> #include <kurl.h>
class KStandardDirs; class TDEStandardDirs;
class TDEConfig; class TDEConfig;
/// defines the syntax version used by the XML /// defines the syntax version used by the XML
@ -216,7 +216,7 @@ private:
/// "general" section /// "general" section
TQDomElement m_general; TQDomElement m_general;
KStandardDirs * m_kgd; TDEStandardDirs * m_kgd;
TQGuardedPtr<TQWidget> m_parent; TQGuardedPtr<TQWidget> m_parent;
}; };

@ -106,7 +106,7 @@ kthememanager::~kthememanager()
void kthememanager::init() void kthememanager::init()
{ {
TDEGlobal::dirs()->addResourceType( "themes", KStandardDirs::kde_default("data") + TDEGlobal::dirs()->addResourceType( "themes", TDEStandardDirs::kde_default("data") +
"kthememanager/themes/" ); "kthememanager/themes/" );
} }

@ -66,7 +66,7 @@ K_EXPORT_COMPONENT_FACTORY (kcm_screensaver, KSSFactory("kcmscreensaver") )
static TQString findExe(const TQString &exe) { static TQString findExe(const TQString &exe) {
TQString result = locate("exe", exe); TQString result = locate("exe", exe);
if (result.isEmpty()) if (result.isEmpty())
result = KStandardDirs::findExe(exe); result = TDEStandardDirs::findExe(exe);
return result; return result;
} }

@ -128,7 +128,7 @@ KCMStyle::KCMStyle( TQWidget* parent, const char* name )
m_bToolbarsDirty = false; m_bToolbarsDirty = false;
TDEGlobal::dirs()->addResourceType("themes", TDEGlobal::dirs()->addResourceType("themes",
KStandardDirs::kde_default("data") + "kstyle/themes"); TDEStandardDirs::kde_default("data") + "kstyle/themes");
TDEAboutData *about = TDEAboutData *about =
new TDEAboutData( I18N_NOOP("kcmstyle"), new TDEAboutData( I18N_NOOP("kcmstyle"),

@ -996,9 +996,9 @@ bool KDIconView::makeFriendlyText( KFileIVI *fileIVI )
{ {
KURL u( item->url() ); KURL u( item->url() );
u.addPath( ".directory" ); u.addPath( ".directory" );
// using KStandardDirs as this one checks for path being // using TDEStandardDirs as this one checks for path being
// a file instead of a directory // a file instead of a directory
if ( KStandardDirs::exists( u.path() ) ) if ( TDEStandardDirs::exists( u.path() ) )
desktopFile = u.path(); desktopFile = u.path();
} }
else if ( isDesktopFile( item ) ) else if ( isDesktopFile( item ) )
@ -1029,7 +1029,7 @@ bool KDIconView::makeFriendlyText( KFileIVI *fileIVI )
} }
if (cfg.hasKey("TryExec")) if (cfg.hasKey("TryExec"))
{ {
if (KStandardDirs::findExe( cfg.readEntry( "TryExec" ) ).isEmpty()) if (TDEStandardDirs::findExe( cfg.readEntry( "TryExec" ) ).isEmpty())
return false; return false;
} }

@ -1586,7 +1586,7 @@ bool LockProcess::startHack()
TQTextStream ts(&mSaverExec, IO_ReadOnly); TQTextStream ts(&mSaverExec, IO_ReadOnly);
TQString word; TQString word;
ts >> word; ts >> word;
TQString path = KStandardDirs::findExe(word); TQString path = TDEStandardDirs::findExe(word);
if (!path.isEmpty()) if (!path.isEmpty())
{ {
@ -2345,7 +2345,7 @@ void LockProcess::showVkbd()
int status = system( "hal-find-by-property --key system.formfactor.subtype --string tabletpc" ); int status = system( "hal-find-by-property --key system.formfactor.subtype --string tabletpc" );
// status = 0; // enable for testing // status = 0; // enable for testing
run_vkbd = ( WIFEXITED( status ) && WEXITSTATUS( status ) == 0 run_vkbd = ( WIFEXITED( status ) && WEXITSTATUS( status ) == 0
&& !KStandardDirs::findExe( "xvkbd" ).isEmpty()) ? 1 : 0; && !TDEStandardDirs::findExe( "xvkbd" ).isEmpty()) ? 1 : 0;
} }
if( run_vkbd ) { if( run_vkbd ) {
mVkbdWindows.clear(); mVkbdWindows.clear();

@ -95,7 +95,7 @@ SaverEngine::SaverEngine()
configure(); configure();
mLockProcess.clearArguments(); mLockProcess.clearArguments();
TQString path = KStandardDirs::findExe( "kdesktop_lock" ); TQString path = TDEStandardDirs::findExe( "kdesktop_lock" );
if( path.isEmpty()) if( path.isEmpty())
{ {
kdDebug( 1204 ) << "Can't find kdesktop_lock!" << endl; kdDebug( 1204 ) << "Can't find kdesktop_lock!" << endl;
@ -361,7 +361,7 @@ bool SaverEngine::startLockProcess( LockType lock_type )
if (!mLockProcess.isRunning()) { if (!mLockProcess.isRunning()) {
mLockProcess.clearArguments(); mLockProcess.clearArguments();
TQString path = KStandardDirs::findExe( "kdesktop_lock" ); TQString path = TDEStandardDirs::findExe( "kdesktop_lock" );
if( path.isEmpty()) if( path.isEmpty())
{ {
kdDebug( 1204 ) << "Can't find kdesktop_lock!" << endl; kdDebug( 1204 ) << "Can't find kdesktop_lock!" << endl;
@ -467,7 +467,7 @@ void SaverEngine::lockProcessExited()
// Restart the lock process // Restart the lock process
if (!mLockProcess.isRunning()) { if (!mLockProcess.isRunning()) {
mLockProcess.clearArguments(); mLockProcess.clearArguments();
TQString path = KStandardDirs::findExe( "kdesktop_lock" ); TQString path = TDEStandardDirs::findExe( "kdesktop_lock" );
if( path.isEmpty()) if( path.isEmpty())
{ {
kdDebug( 1204 ) << "Can't find kdesktop_lock!" << endl; kdDebug( 1204 ) << "Can't find kdesktop_lock!" << endl;

@ -1072,7 +1072,7 @@ void Minicli::slotPriority(int priority)
TQString Minicli::calculate(const TQString &exp) TQString Minicli::calculate(const TQString &exp)
{ {
TQString result, cmd; TQString result, cmd;
const TQString bc = KStandardDirs::findExe("bc"); const TQString bc = TDEStandardDirs::findExe("bc");
if ( !bc.isEmpty() ) if ( !bc.isEmpty() )
cmd = TQString("echo %1 | %2").arg(TDEProcess::quote(TQString("scale=8; ")+exp), TDEProcess::quote(bc)); cmd = TQString("echo %1 | %2").arg(TDEProcess::quote(TQString("scale=8; ")+exp), TDEProcess::quote(bc));
else else

@ -76,7 +76,7 @@ KfindTabWidget::KfindTabWidget(TQWidget *parent, const char *name)
subdirsCb->setChecked(true); subdirsCb->setChecked(true);
caseSensCb->setChecked(false); caseSensCb->setChecked(false);
useLocateCb->setChecked(false); useLocateCb->setChecked(false);
if(KStandardDirs::findExe("locate")==NULL) if(TDEStandardDirs::findExe("locate")==NULL)
useLocateCb->setEnabled(false); useLocateCb->setEnabled(false);
nameBox->setDuplicatesEnabled(FALSE); nameBox->setDuplicatesEnabled(FALSE);

@ -251,7 +251,7 @@ bool DocEntry::docExists() const
{ {
if ( !mUrl.isEmpty() ) { if ( !mUrl.isEmpty() ) {
KURL docUrl( mUrl ); KURL docUrl( mUrl );
if ( docUrl.isLocalFile() && !KStandardDirs::exists( docUrl.path() ) ) { if ( docUrl.isLocalFile() && !TDEStandardDirs::exists( docUrl.path() ) ) {
// kdDebug(1400) << "URL not found: " << docUrl.url() << endl; // kdDebug(1400) << "URL not found: " << docUrl.url() << endl;
return false; return false;
} }

@ -137,7 +137,7 @@ void DocMetaInfo::scanMetaInfo( bool force )
TQStringList metaInfos = config.readListEntry( "MetaInfoDirs" ); TQStringList metaInfos = config.readListEntry( "MetaInfoDirs" );
if ( metaInfos.isEmpty() ) { if ( metaInfos.isEmpty() ) {
KStandardDirs* kstd = TDEGlobal::dirs(); TDEStandardDirs* kstd = TDEGlobal::dirs();
kstd->addResourceType( "data", "share/apps/khelpcenter" ); kstd->addResourceType( "data", "share/apps/khelpcenter" );
metaInfos = kstd->findDirs( "data", "plugins" ); metaInfos = kstd->findDirs( "data", "plugins" );
} }

@ -32,7 +32,7 @@ void HTMLSearch::scanDir(const TQString& dir)
TQStringList::ConstIterator it; TQStringList::ConstIterator it;
if ( KStandardDirs::exists( dir + "index.docbook" ) ) { if ( TDEStandardDirs::exists( dir + "index.docbook" ) ) {
_files.append(dir + "index.docbook"); _files.append(dir + "index.docbook");
progress->setFilesScanned(++_filesScanned); progress->setFilesScanned(++_filesScanned);
} else { } else {

@ -87,7 +87,7 @@ bool SearchHandler::checkBinary( const TQString &cmd ) const
if ( pos < 0 ) binary = cmd; if ( pos < 0 ) binary = cmd;
else binary = cmd.left( pos ); else binary = cmd.left( pos );
return !KStandardDirs::findExe( binary ).isEmpty(); return !TDEStandardDirs::findExe( binary ).isEmpty();
} }
void SearchHandler::search( DocEntry *entry, const TQStringList &words, void SearchHandler::search( DocEntry *entry, const TQStringList &words,

@ -57,7 +57,7 @@ bool khotkeys_active()
return _khotkeys_active; return _khotkeys_active;
} }
// does the opposite of KStandardDirs::findResource() i.e. e.g. // does the opposite of TDEStandardDirs::findResource() i.e. e.g.
// "/opt/kde2/share/applnk/System/konsole.desktop" -> "System/konsole.desktop" // "/opt/kde2/share/applnk/System/konsole.desktop" -> "System/konsole.desktop"
TQString get_menu_entry_from_path( const TQString& path_P ) TQString get_menu_entry_from_path( const TQString& path_P )
{ {

@ -205,7 +205,7 @@ void DockBarExtension::embedWindow(WId win, TQString command, TQString resName,
if (container == 0) { if (container == 0) {
TQString cmd = command.isNull() ? resClass : command; TQString cmd = command.isNull() ? resClass : command;
if (KStandardDirs::findExe(KShell::splitArgs(cmd).front()).isEmpty()) if (TDEStandardDirs::findExe(KShell::splitArgs(cmd).front()).isEmpty())
ncmd = true; ncmd = true;
container = new DockContainer(cmd, this, resName, resClass); container = new DockContainer(cmd, this, resName, resClass);
addContainer(container); addContainer(container);

@ -95,7 +95,7 @@ Kicker::Kicker()
dcopClient()->setDefaultObject("Panel"); dcopClient()->setDefaultObject("Panel");
disableSessionManagement(); disableSessionManagement();
TQString dataPathBase = KStandardDirs::kde_default("data").append("kicker/"); TQString dataPathBase = TDEStandardDirs::kde_default("data").append("kicker/");
TDEGlobal::dirs()->addResourceType("mini", dataPathBase + "pics/mini"); TDEGlobal::dirs()->addResourceType("mini", dataPathBase + "pics/mini");
TDEGlobal::dirs()->addResourceType("icon", dataPathBase + "pics"); TDEGlobal::dirs()->addResourceType("icon", dataPathBase + "pics");
TDEGlobal::dirs()->addResourceType("builtinbuttons", dataPathBase + "builtins"); TDEGlobal::dirs()->addResourceType("builtinbuttons", dataPathBase + "builtins");

@ -128,7 +128,7 @@ void PanelExeDialog::updateIcon()
void PanelExeDialog::fillCompletion() void PanelExeDialog::fillCompletion()
{ {
KCompletion *comp = ui->m_exec->completionObject(); KCompletion *comp = ui->m_exec->completionObject();
TQStringList exePaths = KStandardDirs::systemPaths(); TQStringList exePaths = TDEStandardDirs::systemPaths();
for (TQStringList::ConstIterator it = exePaths.begin(); it != exePaths.end(); it++) for (TQStringList::ConstIterator it = exePaths.begin(); it != exePaths.end(); it++)
{ {

@ -122,7 +122,7 @@
static TQString calculate(const TQString &exp) static TQString calculate(const TQString &exp)
{ {
TQString result, cmd; TQString result, cmd;
const TQString bc = KStandardDirs::findExe("bc"); const TQString bc = TDEStandardDirs::findExe("bc");
if ( !bc.isEmpty() ) if ( !bc.isEmpty() )
cmd = TQString("echo %1 | %2").arg(TDEProcess::quote(exp), TDEProcess::quote(bc)); cmd = TQString("echo %1 | %2").arg(TDEProcess::quote(exp), TDEProcess::quote(bc));
else else
@ -302,7 +302,7 @@ KMenu::KMenu()
m_searchInternet->setPixmap(0,icon); m_searchInternet->setPixmap(0,icon);
setTabOrder(m_kcommand, m_searchResultsWidget); setTabOrder(m_kcommand, m_searchResultsWidget);
m_kerryInstalled = !KStandardDirs::findExe(TQString::fromLatin1("kerry")).isEmpty(); m_kerryInstalled = !TDEStandardDirs::findExe(TQString::fromLatin1("kerry")).isEmpty();
m_isShowing = false; m_isShowing = false;
if (!m_kerryInstalled) { if (!m_kerryInstalled) {
@ -1353,7 +1353,7 @@ void KMenu::insertStaticItems()
m_systemView->insertItem( "folder_home", i18n( "Home Folder" ), m_systemView->insertItem( "folder_home", i18n( "Home Folder" ),
TQDir::homeDirPath(), "file://"+TQDir::homeDirPath(), nId++, index++ ); TQDir::homeDirPath(), "file://"+TQDir::homeDirPath(), nId++, index++ );
if ( KStandardDirs::exists( TDEGlobalSettings::documentPath() + "/" ) ) if ( TDEStandardDirs::exists( TDEGlobalSettings::documentPath() + "/" ) )
{ {
TQString documentPath = TDEGlobalSettings::documentPath(); TQString documentPath = TDEGlobalSettings::documentPath();
if ( documentPath.endsWith( "/" ) ) if ( documentPath.endsWith( "/" ) )
@ -2934,7 +2934,7 @@ void KMenu::slotContextMenu(int selected)
case EditMenu: case EditMenu:
accept(); accept();
proc = new TDEProcess(TQT_TQOBJECT(this)); proc = new TDEProcess(TQT_TQOBJECT(this));
*proc << KStandardDirs::findExe(TQString::fromLatin1("kmenuedit")); *proc << TDEStandardDirs::findExe(TQString::fromLatin1("kmenuedit"));
*proc << "/"+m_popupPath.menuPath.section('/',-200,-2) << m_popupPath.menuPath.section('/', -1); *proc << "/"+m_popupPath.menuPath.section('/',-200,-2) << m_popupPath.menuPath.section('/', -1);
proc->start(); proc->start();
break; break;

@ -695,7 +695,7 @@ void PanelServiceMenu::slotContextMenu(int selected)
case EditItem: case EditItem:
proc = new TDEProcess(TQT_TQOBJECT(this)); proc = new TDEProcess(TQT_TQOBJECT(this));
*proc << KStandardDirs::findExe(TQString::fromLatin1("kmenuedit")); *proc << TDEStandardDirs::findExe(TQString::fromLatin1("kmenuedit"));
*proc << "/"+relPath_ << static_cast<KService *>(contextKSycocaEntry_)->menuId(); *proc << "/"+relPath_ << static_cast<KService *>(contextKSycocaEntry_)->menuId();
proc->start(); proc->start();
break; break;
@ -739,7 +739,7 @@ void PanelServiceMenu::slotContextMenu(int selected)
case EditMenu: case EditMenu:
proc = new TDEProcess(TQT_TQOBJECT(this)); proc = new TDEProcess(TQT_TQOBJECT(this));
*proc << KStandardDirs::findExe(TQString::fromLatin1("kmenuedit")); *proc << TDEStandardDirs::findExe(TQString::fromLatin1("kmenuedit"));
*proc << "/"+static_cast<KServiceGroup *>(contextKSycocaEntry_)->relPath(); *proc << "/"+static_cast<KServiceGroup *>(contextKSycocaEntry_)->relPath();
proc->start(); proc->start();
break; break;

@ -28,7 +28,7 @@ KonsoleBookmarkHandler::KonsoleBookmarkHandler( KonsoleMenu *konsole, bool )
file = locateLocal( "data", "konsole/bookmarks.xml" ); file = locateLocal( "data", "konsole/bookmarks.xml" );
// import old bookmarks // import old bookmarks
if ( !KStandardDirs::exists( file ) ) { if ( !TDEStandardDirs::exists( file ) ) {
TQString oldFile = locate( "data", "tdefile/bookmarks.html" ); TQString oldFile = locate( "data", "tdefile/bookmarks.html" );
if ( !oldFile.isEmpty() ) if ( !oldFile.isEmpty() )
importOldBookmarks( oldFile, file ); importOldBookmarks( oldFile, file );

@ -43,7 +43,7 @@ RemoteMenu::RemoteMenu(TQWidget *parent, const char *name,
: KPanelMenu(parent, name), KDirNotify() : KPanelMenu(parent, name), KDirNotify()
{ {
TDEGlobal::dirs()->addResourceType("remote_entries", TDEGlobal::dirs()->addResourceType("remote_entries",
KStandardDirs::kde_default("data") + "remoteview"); TDEStandardDirs::kde_default("data") + "remoteview");
TQString path = TDEGlobal::dirs()->saveLocation("remote_entries"); TQString path = TDEGlobal::dirs()->saveLocation("remote_entries");

@ -84,7 +84,7 @@ extern "C" KDE_EXPORT int kdemain( int argc, char ** argv )
TDEApplication a; TDEApplication a;
a.disableSessionManagement(); a.disableSessionManagement();
TDEGlobal::dirs()->addResourceType("applets", KStandardDirs::kde_default("data") + TDEGlobal::dirs()->addResourceType("applets", TDEStandardDirs::kde_default("data") +
"kicker/applets"); "kicker/applets");
// setup proxy object // setup proxy object

@ -88,7 +88,7 @@ int main( int argc, char ** argv )
TDEApplication a; TDEApplication a;
a.disableSessionManagement(); a.disableSessionManagement();
TDEGlobal::dirs()->addResourceType("extensions", KStandardDirs::kde_default("data") + TDEGlobal::dirs()->addResourceType("extensions", TDEStandardDirs::kde_default("data") +
"kicker/extensions"); "kicker/extensions");
TQString df; TQString df;

@ -70,7 +70,7 @@ extern "C" KDE_EXPORT int kdemain( int argc, char ** argv )
TDEApplication a; TDEApplication a;
a.disableSessionManagement(); a.disableSessionManagement();
TDEGlobal::dirs()->addResourceType("extensions", KStandardDirs::kde_default("data") + TDEGlobal::dirs()->addResourceType("extensions", TDEStandardDirs::kde_default("data") +
"kicker/extensions"); "kicker/extensions");
// setup proxy object // setup proxy object

@ -170,7 +170,7 @@ void KNetAttach::finished()
if (_createIcon->isChecked()) { if (_createIcon->isChecked()) {
TDEGlobal::dirs()->addResourceType("remote_entries", TDEGlobal::dirs()->addResourceType("remote_entries",
KStandardDirs::kde_default("data") + "remoteview"); TDEStandardDirs::kde_default("data") + "remoteview");
TQString path = TDEGlobal::dirs()->saveLocation("remote_entries"); TQString path = TDEGlobal::dirs()->saveLocation("remote_entries");
path += name + ".desktop"; path += name + ".desktop";

@ -67,7 +67,7 @@ void addBackEnd::aboutToShowAddMenu()
{ {
if (!menu) if (!menu)
return; return;
KStandardDirs *dirs = TDEGlobal::dirs(); TDEStandardDirs *dirs = TDEGlobal::dirs();
TQStringList list = dirs->findAllResources("data","konqsidebartng/add/*.desktop",true,true); TQStringList list = dirs->findAllResources("data","konqsidebartng/add/*.desktop",true,true);
libNames.setAutoDelete(true); libNames.setAutoDelete(true);
libNames.resize(0); libNames.resize(0);
@ -122,7 +122,7 @@ void addBackEnd::doRollBack()
{ {
if (KMessageBox::warningContinueCancel(m_parent, i18n("<qt>This removes all your entries from the sidebar and adds the system default ones.<BR><B>This procedure is irreversible</B><BR>Do you want to proceed?</qt>"))==KMessageBox::Continue) if (KMessageBox::warningContinueCancel(m_parent, i18n("<qt>This removes all your entries from the sidebar and adds the system default ones.<BR><B>This procedure is irreversible</B><BR>Do you want to proceed?</qt>"))==KMessageBox::Continue)
{ {
KStandardDirs *dirs = TDEGlobal::dirs(); TDEStandardDirs *dirs = TDEGlobal::dirs();
TQString loc=dirs->saveLocation("data","konqsidebartng/" + m_currentProfile + "/",true); TQString loc=dirs->saveLocation("data","konqsidebartng/" + m_currentProfile + "/",true);
TQDir dir(loc); TQDir dir(loc);
TQStringList dirEntries = dir.entryList( TQDir::Dirs | TQDir::NoSymLinks ); TQStringList dirEntries = dir.entryList( TQDir::Dirs | TQDir::NoSymLinks );
@ -139,7 +139,7 @@ void addBackEnd::doRollBack()
static TQString findFileName(const TQString* tmpl,bool universal, const TQString &profile) { static TQString findFileName(const TQString* tmpl,bool universal, const TQString &profile) {
TQString myFile, filename; TQString myFile, filename;
KStandardDirs *dirs = TDEGlobal::dirs(); TDEStandardDirs *dirs = TDEGlobal::dirs();
TQString tmp = *tmpl; TQString tmp = *tmpl;
if (universal) { if (universal) {
@ -331,7 +331,7 @@ void Sidebar_Widget::addWebSideBar(const KURL& url, const TQString& /*name*/) {
// << " [" << name << "]" << endl; // << " [" << name << "]" << endl;
// Look for existing ones with this URL // Look for existing ones with this URL
KStandardDirs *dirs = TDEGlobal::dirs(); TDEStandardDirs *dirs = TDEGlobal::dirs();
TQString list; TQString list;
dirs->saveLocation("data", m_relPath, true); dirs->saveLocation("data", m_relPath, true);
list = locateLocal("data", m_relPath); list = locateLocal("data", m_relPath);

@ -87,7 +87,7 @@ void KonqSidebarTree::loadModuleFactories()
{ {
pluginFactories.clear(); pluginFactories.clear();
pluginInfo.clear(); pluginInfo.clear();
KStandardDirs *dirs=TDEGlobal::dirs(); TDEStandardDirs *dirs=TDEGlobal::dirs();
TQStringList list=dirs->findAllResources("data","konqsidebartng/dirtree/*.desktop",false,true); TQStringList list=dirs->findAllResources("data","konqsidebartng/dirtree/*.desktop",false,true);

@ -134,7 +134,7 @@ extern "C"
{ {
KDE_EXPORT bool add_konqsidebar_tree(TQString* fn, TQString*, TQMap<TQString,TQString> *map) KDE_EXPORT bool add_konqsidebar_tree(TQString* fn, TQString*, TQMap<TQString,TQString> *map)
{ {
KStandardDirs *dirs=TDEGlobal::dirs(); TDEStandardDirs *dirs=TDEGlobal::dirs();
TQStringList list=dirs->findAllResources("data","konqsidebartng/dirtree/*.desktop",false,true); TQStringList list=dirs->findAllResources("data","konqsidebartng/dirtree/*.desktop",false,true);
TQStringList names; TQStringList names;
for (TQStringList::ConstIterator it=list.begin();it!=list.end();++it) for (TQStringList::ConstIterator it=list.begin();it!=list.end();++it)

@ -191,7 +191,7 @@ extern "C" {
extern "C" { extern "C" {
KDE_EXPORT bool add_konqsidebar_web(TQString* fn, TQString* param, TQMap<TQString,TQString> *map) { KDE_EXPORT bool add_konqsidebar_web(TQString* fn, TQString* param, TQMap<TQString,TQString> *map) {
Q_UNUSED(param); Q_UNUSED(param);
TDEGlobal::dirs()->addResourceType("websidebardata", KStandardDirs::kde_default("data") + "konqsidebartng/websidebar"); TDEGlobal::dirs()->addResourceType("websidebardata", TDEStandardDirs::kde_default("data") + "konqsidebartng/websidebar");
KURL url; KURL url;
url.setProtocol("file"); url.setProtocol("file");
TQStringList paths = TDEGlobal::dirs()->resourceDirs("websidebardata"); TQStringList paths = TDEGlobal::dirs()->resourceDirs("websidebardata");

@ -255,7 +255,7 @@ extern "C" int KDE_EXPORT kdemain(int argc, char* argv[])
a = new TDEApplication; a = new TDEApplication;
#endif #endif
TQString dataPathBase = KStandardDirs::kde_default("data").append("konsole/"); TQString dataPathBase = TDEStandardDirs::kde_default("data").append("konsole/");
TDEGlobal::dirs()->addResourceType("wallpaper", dataPathBase + "wallpapers"); TDEGlobal::dirs()->addResourceType("wallpaper", dataPathBase + "wallpapers");
KImageIO::registerFormats(); // add io for additional image formats KImageIO::registerFormats(); // add io for additional image formats

@ -105,7 +105,7 @@ void KOSPage::save(bool currSettings){
void KOSPage::saveCheckState(bool currSettings){ void KOSPage::saveCheckState(bool currSettings){
if(currSettings){ if(currSettings){
// Set the path for the keysscheme resource files // Set the path for the keysscheme resource files
TDEGlobal::dirs()->addResourceType("keys", KStandardDirs::kde_default("data")+"kcmkeys"); TDEGlobal::dirs()->addResourceType("keys", TDEStandardDirs::kde_default("data")+"kcmkeys");
// write the settings to the configfiles, depending on wich radiobutton is checked // write the settings to the configfiles, depending on wich radiobutton is checked
if(rb_kde->isChecked()){ if(rb_kde->isChecked()){
writeKDE(); writeKDE();

@ -118,7 +118,7 @@ void KStylePage::saveKWin(bool curSettings){
TQString twin = origKWinStyle; TQString twin = origKWinStyle;
if(curSettings) { if(curSettings) {
KDesktopFile* kdf = 0L; KDesktopFile* kdf = 0L;
KStandardDirs* kstd = TDEGlobal::dirs(); TDEStandardDirs* kstd = TDEGlobal::dirs();
if (cde->isSelected() && twin_cde_exist) if (cde->isSelected() && twin_cde_exist)
kdf = new KDesktopFile(kstd->findResource("data", "twin/cde.desktop")); kdf = new KDesktopFile(kstd->findResource("data", "twin/cde.desktop"));
else if (win->isSelected() && twin_win_exist) else if (win->isSelected() && twin_win_exist)
@ -324,7 +324,7 @@ void KStylePage::getColors(colorSet *set, bool colorfile ){
bool deleteConfig = false; bool deleteConfig = false;
// get the color scheme file and go to the color scheme group // get the color scheme file and go to the color scheme group
if(colorfile){ if(colorfile){
TDEGlobal::dirs()->addResourceType("colors", KStandardDirs::kde_default("data")+"kdisplay/color-schemes"); TDEGlobal::dirs()->addResourceType("colors", TDEStandardDirs::kde_default("data")+"kdisplay/color-schemes");
// set the style // set the style
if (kde->isSelected()) { if (kde->isSelected()) {
set->bgMode="Flat"; set->bgMode="Flat";
@ -439,7 +439,7 @@ void KStylePage::getAvailability() {
twin_keramik_exist = twin_system_exist = twin_plastik_exist twin_keramik_exist = twin_system_exist = twin_plastik_exist
= twin_default_exist = twin_win_exist = twin_default_exist = twin_win_exist
= twin_cde_exist = twin_quartz_exist = false; = twin_cde_exist = twin_quartz_exist = false;
KStandardDirs* kstd = TDEGlobal::dirs(); TDEStandardDirs* kstd = TDEGlobal::dirs();
if (!kstd->findResource("data", "twin/keramik.desktop").isNull()) if (!kstd->findResource("data", "twin/keramik.desktop").isNull())
twin_keramik_exist = true; twin_keramik_exist = true;
if (!kstd->findResource("data", "twin/plastik.desktop").isNull()) if (!kstd->findResource("data", "twin/plastik.desktop").isNull())

@ -88,7 +88,7 @@ void ThemeListBox::mouseMoveEvent(TQMouseEvent *e)
SplashInstaller::SplashInstaller (TQWidget *aParent, const char *aName, bool aInit) SplashInstaller::SplashInstaller (TQWidget *aParent, const char *aName, bool aInit)
: TQWidget(aParent, aName), mGui(!aInit) : TQWidget(aParent, aName), mGui(!aInit)
{ {
TDEGlobal::dirs()->addResourceType("ksplashthemes", KStandardDirs::kde_default("data") + "ksplash/Themes"); TDEGlobal::dirs()->addResourceType("ksplashthemes", TDEStandardDirs::kde_default("data") + "ksplash/Themes");
if (!mGui) if (!mGui)
return; return;

@ -86,7 +86,7 @@ TQString KSplashThemeMgr::quickHelp() const
void KSplashThemeMgr::init() void KSplashThemeMgr::init()
{ {
TDEGlobal::dirs()->addResourceType("ksplashthemes", KStandardDirs::kde_default("data") + "ksplash/Themes"); TDEGlobal::dirs()->addResourceType("ksplashthemes", TDEStandardDirs::kde_default("data") + "ksplash/Themes");
} }
void KSplashThemeMgr::save() void KSplashThemeMgr::save()

@ -309,7 +309,7 @@ void KSysGuardApplet::resizeDocks( uint newDockCount )
bool KSysGuardApplet::load() bool KSysGuardApplet::load()
{ {
KStandardDirs* kstd = TDEGlobal::dirs(); TDEStandardDirs* kstd = TDEGlobal::dirs();
kstd->addResourceType( "data", "share/apps/ksysguard" ); kstd->addResourceType( "data", "share/apps/ksysguard" );
TQString fileName = kstd->findResource( "data", "KSysGuardApplet.xml" ); TQString fileName = kstd->findResource( "data", "KSysGuardApplet.xml" );
@ -458,7 +458,7 @@ bool KSysGuardApplet::save()
((KSGRD::SensorDisplay*)mDockList[ i ])->saveSettings( doc, element ); ((KSGRD::SensorDisplay*)mDockList[ i ])->saveSettings( doc, element );
} }
KStandardDirs* kstd = TDEGlobal::dirs(); TDEStandardDirs* kstd = TDEGlobal::dirs();
kstd->addResourceType( "data", "share/apps/ksysguard" ); kstd->addResourceType( "data", "share/apps/ksysguard" );
TQString fileName = kstd->saveLocation( "data", "ksysguard" ); TQString fileName = kstd->saveLocation( "data", "ksysguard" );
fileName += "/KSysGuardApplet.xml"; fileName += "/KSysGuardApplet.xml";

@ -91,7 +91,7 @@ void Workspace::readProperties( TDEConfig *cfg )
/* If workDir is not specified in the config file, it's /* If workDir is not specified in the config file, it's
* probably the first time the user has started KSysGuard. We * probably the first time the user has started KSysGuard. We
* then "restore" a special default configuration. */ * then "restore" a special default configuration. */
KStandardDirs* kstd = TDEGlobal::dirs(); TDEStandardDirs* kstd = TDEGlobal::dirs();
kstd->addResourceType( "data", "share/apps/ksysguard" ); kstd->addResourceType( "data", "share/apps/ksysguard" );
mWorkDir = kstd->saveLocation( "data", "ksysguard" ); mWorkDir = kstd->saveLocation( "data", "ksysguard" );
@ -440,7 +440,7 @@ void Workspace::applyStyle()
void Workspace::showProcesses() void Workspace::showProcesses()
{ {
KStandardDirs* kstd = TDEGlobal::dirs(); TDEStandardDirs* kstd = TDEGlobal::dirs();
kstd->addResourceType( "data", "share/apps/ksysguard" ); kstd->addResourceType( "data", "share/apps/ksysguard" );
TQString file = kstd->findResource( "data", "ProcessTable.sgrd" ); TQString file = kstd->findResource( "data", "ProcessTable.sgrd" );

@ -162,7 +162,7 @@ void TopLevel::resetWorkSheets()
mWorkSpace->removeAllWorkSheets(); mWorkSpace->removeAllWorkSheets();
KStandardDirs* kstd = TDEGlobal::dirs(); TDEStandardDirs* kstd = TDEGlobal::dirs();
kstd->addResourceType( "data", "share/apps/ksysguard" ); kstd->addResourceType( "data", "share/apps/ksysguard" );
TQString workDir = kstd->saveLocation( "data", "ksysguard" ); TQString workDir = kstd->saveLocation( "data", "ksysguard" );

@ -68,7 +68,7 @@ int main(int argc, char **argv)
} }
// Make sure the specified WM exists // Make sure the specified WM exists
if (KStandardDirs::findExe(wmToLaunch) == TQString::null) { if (TDEStandardDirs::findExe(wmToLaunch) == TQString::null) {
wmToLaunch = ""; wmToLaunch = "";
} }

@ -132,7 +132,7 @@ void CgiProtocol::get( const KURL& url )
if ( !(*it).endsWith("/") ) if ( !(*it).endsWith("/") )
cmd += "/"; cmd += "/";
cmd += file; cmd += file;
if ( KStandardDirs::exists( cmd ) ) { if ( TDEStandardDirs::exists( cmd ) ) {
forwardFile = false; forwardFile = false;
stripHeader = true; stripHeader = true;
break; break;

@ -254,12 +254,12 @@ fishProtocol::fishProtocol(const TQCString &pool_socket, const TQCString &app_so
// disabled: currently not needed. Didn't work reliably. // disabled: currently not needed. Didn't work reliably.
// isOpenSSH = !system("ssh -V 2>&1 | grep OpenSSH > /dev/null"); // isOpenSSH = !system("ssh -V 2>&1 | grep OpenSSH > /dev/null");
if (isNXFish) if (isNXFish)
sshPath = strdup(TQFile::encodeName(KStandardDirs::findExe("nxfish"))); sshPath = strdup(TQFile::encodeName(TDEStandardDirs::findExe("nxfish")));
else else
sshPath = strdup(TQFile::encodeName(KStandardDirs::findExe("ssh"))); sshPath = strdup(TQFile::encodeName(TDEStandardDirs::findExe("ssh")));
} }
if (suPath == NULL) { if (suPath == NULL) {
suPath = strdup(TQFile::encodeName(KStandardDirs::findExe("su"))); suPath = strdup(TQFile::encodeName(TDEStandardDirs::findExe("su")));
} }
childPid = 0; childPid = 0;
connectionPort = 0; connectionPort = 0;

@ -83,7 +83,7 @@ bool parseUrl(const TQString& _url, TQString &title, TQString &section)
TQString url = _url; TQString url = _url;
if (url.at(0) == '/') { if (url.at(0) == '/') {
if (KStandardDirs::exists(url)) { if (TDEStandardDirs::exists(url)) {
title = url; title = url;
return true; return true;
} else } else
@ -559,7 +559,7 @@ char *MANProtocol::readManPage(const char *_filename)
if (TQDir::isRelativePath(filename)) { if (TQDir::isRelativePath(filename)) {
kdDebug(7107) << "relative " << filename << endl; kdDebug(7107) << "relative " << filename << endl;
filename = TQDir::cleanDirPath(lastdir + "/" + filename).utf8(); filename = TQDir::cleanDirPath(lastdir + "/" + filename).utf8();
if (!KStandardDirs::exists(filename)) { // exists perhaps with suffix if (!TDEStandardDirs::exists(filename)) { // exists perhaps with suffix
lastdir = filename.left(filename.findRev('/')); lastdir = filename.left(filename.findRev('/'));
TQDir mandir(lastdir); TQDir mandir(lastdir);
mandir.setNameFilter(filename.mid(filename.findRev('/') + 1) + ".*"); mandir.setNameFilter(filename.mid(filename.findRev('/') + 1) + ".*");

@ -313,8 +313,8 @@ void FstabBackend::handleFstabChange(bool allowNotification)
TQString FstabBackend::generateId(const TQString &devNode, TQString FstabBackend::generateId(const TQString &devNode,
const TQString &mountPoint) const TQString &mountPoint)
{ {
TQString d = KStandardDirs::realFilePath(devNode); TQString d = TDEStandardDirs::realFilePath(devNode);
TQString m = KStandardDirs::realPath(mountPoint); TQString m = TDEStandardDirs::realPath(mountPoint);
return "/org/kde/mediamanager/fstab/" return "/org/kde/mediamanager/fstab/"
+d.replace("/", "") +d.replace("/", "")

@ -1164,12 +1164,12 @@ TQString startPrivilegedProcess(const TQString& command, const TQString& dialogC
{ {
TQString error; TQString error;
TQString tdesudoPath = KStandardDirs::findExe("tdesudo"); TQString tdesudoPath = TDEStandardDirs::findExe("tdesudo");
if (!tdesudoPath.isEmpty()) if (!tdesudoPath.isEmpty())
error = startKdeSudoProcess(tdesudoPath, command, dialogCaption, dialogComment); error = startKdeSudoProcess(tdesudoPath, command, dialogCaption, dialogComment);
else { else {
TQString tdesuPath = KStandardDirs::findExe("tdesu"); TQString tdesuPath = TDEStandardDirs::findExe("tdesu");
if (!tdesuPath.isEmpty()) if (!tdesuPath.isEmpty())
error = startKdeSuProcess(tdesuPath, command, dialogCaption); error = startKdeSuProcess(tdesuPath, command, dialogCaption);
@ -1184,7 +1184,7 @@ TQString privilegedMount(const char* udi, const char* mountPoint, const char** o
kdDebug() << "run privileged mount for " << udi << endl; kdDebug() << "run privileged mount for " << udi << endl;
TQString dbusSendPath = KStandardDirs::findExe("dbus-send"); TQString dbusSendPath = TDEStandardDirs::findExe("dbus-send");
// @todo return error message // @todo return error message
if (dbusSendPath.isEmpty()) if (dbusSendPath.isEmpty())
@ -1219,7 +1219,7 @@ TQString privilegedUnmount(const char* udi)
kdDebug() << "run privileged unmount for " << udi << endl; kdDebug() << "run privileged unmount for " << udi << endl;
TQString dbusSendPath = KStandardDirs::findExe("dbus-send"); TQString dbusSendPath = TDEStandardDirs::findExe("dbus-send");
// @todo return error message // @todo return error message
if (dbusSendPath.isEmpty()) if (dbusSendPath.isEmpty())

@ -188,7 +188,7 @@ TQStringList MediaManager::properties(const TQString &name)
for (; it!=end; ++it) for (; it!=end; ++it)
{ {
path = KStandardDirs::realFilePath(u.path()); path = TDEStandardDirs::realFilePath(u.path());
kdDebug() << "comparing " << (*it)->mountPoint() << " " << path << " " << (*it)->deviceNode() << endl; kdDebug() << "comparing " << (*it)->mountPoint() << " " << path << " " << (*it)->deviceNode() << endl;
if ((*it)->mountPoint() == path || (*it)->deviceNode() == path) { if ((*it)->mountPoint() == path || (*it)->deviceNode() == path) {
m = *it; m = *it;

@ -166,7 +166,7 @@ void RemovableBackend::handleMtabChange()
TQString RemovableBackend::generateId(const TQString &devNode) TQString RemovableBackend::generateId(const TQString &devNode)
{ {
TQString dev = KStandardDirs::realFilePath(devNode); TQString dev = TDEStandardDirs::realFilePath(devNode);
return "/org/kde/mediamanager/removable/" return "/org/kde/mediamanager/removable/"
+dev.replace("/", ""); +dev.replace("/", "");

@ -230,7 +230,7 @@ bool MediaNotifier::execAutoopen( const KFileItem &medium, const TQString &path,
// The desktop environment MUST verify that the relative path points // The desktop environment MUST verify that the relative path points
// to a file that is actually located on the medium [...] // to a file that is actually located on the medium [...]
TQString resolved_path TQString resolved_path
= KStandardDirs::realFilePath( path+"/"+relative_path ); = TDEStandardDirs::realFilePath( path+"/"+relative_path );
if ( !resolved_path.startsWith( path ) ) if ( !resolved_path.startsWith( path ) )
{ {

@ -31,7 +31,7 @@
RemoteDirNotify::RemoteDirNotify() RemoteDirNotify::RemoteDirNotify()
{ {
TDEGlobal::dirs()->addResourceType("remote_entries", TDEGlobal::dirs()->addResourceType("remote_entries",
KStandardDirs::kde_default("data") + "remoteview"); TDEStandardDirs::kde_default("data") + "remoteview");
TQString path = TDEGlobal::dirs()->saveLocation("remote_entries"); TQString path = TDEGlobal::dirs()->saveLocation("remote_entries");
m_baseURL.setPath(path); m_baseURL.setPath(path);

@ -37,7 +37,7 @@
RemoteImpl::RemoteImpl() RemoteImpl::RemoteImpl()
{ {
TDEGlobal::dirs()->addResourceType("remote_entries", TDEGlobal::dirs()->addResourceType("remote_entries",
KStandardDirs::kde_default("data") + "remoteview"); TDEStandardDirs::kde_default("data") + "remoteview");
TQString path = TDEGlobal::dirs()->saveLocation("remote_entries"); TQString path = TDEGlobal::dirs()->saveLocation("remote_entries");

@ -206,7 +206,7 @@ void KSshProcess::removeSignalHandlers() {
KSshProcess::KSshProcess() KSshProcess::KSshProcess()
: mVersion(UNKNOWN_VER), mConnected(false), : mVersion(UNKNOWN_VER), mConnected(false),
mRunning(false), mConnectState(0) { mRunning(false), mConnectState(0) {
mSshPath = KStandardDirs::findExe(TQString::fromLatin1("ssh")); mSshPath = TDEStandardDirs::findExe(TQString::fromLatin1("ssh"));
kdDebug(KSSHPROC) << "KSshProcess::KSshProcess(): ssh path [" << kdDebug(KSSHPROC) << "KSshProcess::KSshProcess(): ssh path [" <<
mSshPath << "]" << endl; mSshPath << "]" << endl;

@ -264,7 +264,7 @@ int MyPtyProcess::exec(TQCString command, QCStringList args)
path = command; path = command;
else else
{ {
TQString file = KStandardDirs::findExe(command); TQString file = TDEStandardDirs::findExe(command);
if (file.isEmpty()) if (file.isEmpty())
{ {
kdError(PTYPROC) << k_lineinfo << command << " not found\n"; kdError(PTYPROC) << k_lineinfo << command << " not found\n";

@ -64,7 +64,7 @@ void SMBSlave::special( const TQByteArray & data)
kdDebug(KIO_SMB) << "mounting: " << remotePath.local8Bit() << " to " << mountPoint.local8Bit() << endl; kdDebug(KIO_SMB) << "mounting: " << remotePath.local8Bit() << " to " << mountPoint.local8Bit() << endl;
if (tmp==3) { if (tmp==3) {
if (!KStandardDirs::makeDir(mountPoint)) { if (!TDEStandardDirs::makeDir(mountPoint)) {
error(TDEIO::ERR_COULD_NOT_MKDIR, mountPoint); error(TDEIO::ERR_COULD_NOT_MKDIR, mountPoint);
return; return;
} }

@ -42,7 +42,7 @@ void SystemDirNotify::init()
return; return;
mInited = true; mInited = true;
TDEGlobal::dirs()->addResourceType("system_entries", TDEGlobal::dirs()->addResourceType("system_entries",
KStandardDirs::kde_default("data") + "systemview"); TDEStandardDirs::kde_default("data") + "systemview");
TQStringList names_found; TQStringList names_found;
TQStringList dirList = TDEGlobal::dirs()->resourceDirs("system_entries"); TQStringList dirList = TDEGlobal::dirs()->resourceDirs("system_entries");

@ -34,7 +34,7 @@
SystemImpl::SystemImpl() : TQObject() SystemImpl::SystemImpl() : TQObject()
{ {
TDEGlobal::dirs()->addResourceType("system_entries", TDEGlobal::dirs()->addResourceType("system_entries",
KStandardDirs::kde_default("data") + "systemview"); TDEStandardDirs::kde_default("data") + "systemview");
} }
bool SystemImpl::listRoot(TQValueList<TDEIO::UDSEntry> &list) bool SystemImpl::listRoot(TQValueList<TDEIO::UDSEntry> &list)

@ -133,7 +133,7 @@ bool TrashImpl::init()
m_initStatus = InitError; m_initStatus = InitError;
// $XDG_DATA_HOME/Trash, i.e. ~/.local/share/Trash by default. // $XDG_DATA_HOME/Trash, i.e. ~/.local/share/Trash by default.
const TQString xdgDataDir = TDEGlobal::dirs()->localxdgdatadir(); const TQString xdgDataDir = TDEGlobal::dirs()->localxdgdatadir();
if ( !KStandardDirs::makeDir( xdgDataDir, 0700 ) ) { if ( !TDEStandardDirs::makeDir( xdgDataDir, 0700 ) ) {
kdWarning() << "failed to create " << xdgDataDir << endl; kdWarning() << "failed to create " << xdgDataDir << endl;
return false; return false;
} }
@ -282,7 +282,7 @@ bool TrashImpl::createInfo( const TQString& origPath, int& trashId, TQString& fi
TQString TrashImpl::makeRelativePath( const TQString& topdir, const TQString& path ) TQString TrashImpl::makeRelativePath( const TQString& topdir, const TQString& path )
{ {
const TQString realPath = KStandardDirs::realFilePath( path ); const TQString realPath = TDEStandardDirs::realFilePath( path );
// topdir ends with '/' // topdir ends with '/'
if ( realPath.startsWith( topdir ) ) { if ( realPath.startsWith( topdir ) ) {
const TQString rel = realPath.mid( topdir.length() ); const TQString rel = realPath.mid( topdir.length() );

@ -29,7 +29,7 @@ TQString defaultCommand(const TQString& cmd)
int p(-1); int p(-1);
if ((p=r.search(str)) != -1) if ((p=r.search(str)) != -1)
{ {
TQString exe = KStandardDirs::findExe(r.cap(1)); TQString exe = TDEStandardDirs::findExe(r.cap(1));
if (exe.isEmpty()) if (exe.isEmpty())
exe = "/usr/bin/"+r.cap(1); exe = "/usr/bin/"+r.cap(1);
str.replace(p, r.matchedLength(), exe); str.replace(p, r.matchedLength(), exe);

@ -144,7 +144,7 @@ int main(int argc, char *argv[])
bool opengl = type.readBoolEntry("OpenGL", hasDirectRendering()); bool opengl = type.readBoolEntry("OpenGL", hasDirectRendering());
kdDebug() << "hasOPEN " << opengl << endl; kdDebug() << "hasOPEN " << opengl << endl;
bool manipulatescreen = type.readBoolEntry("ManipulateScreen"); bool manipulatescreen = type.readBoolEntry("ManipulateScreen");
bool fortune = !KStandardDirs::findExe("fortune").isEmpty(); bool fortune = !TDEStandardDirs::findExe("fortune").isEmpty();
TQStringList defaults = type.readListEntry( "Defaults" ); TQStringList defaults = type.readListEntry( "Defaults" );
TQMap<TQString, int> def_numbers; TQMap<TQString, int> def_numbers;
for ( TQStringList::ConstIterator it = defaults.begin(); it != defaults.end(); ++it ) { for ( TQStringList::ConstIterator it = defaults.begin(); it != defaults.end(); ++it ) {
@ -219,7 +219,7 @@ int main(int argc, char *argv[])
TQTextStream ts(&cmd, IO_ReadOnly); TQTextStream ts(&cmd, IO_ReadOnly);
TQString word; TQString word;
ts >> word; ts >> word;
TQString exeFile = KStandardDirs::findExe(word); TQString exeFile = TDEStandardDirs::findExe(word);
if (!exeFile.isEmpty()) if (!exeFile.isEmpty())
{ {

@ -181,7 +181,7 @@ static int startApp()
{ {
if (file.at(0) != '/') if (file.at(0) != '/')
{ {
KStandardDirs dirs; TDEStandardDirs dirs;
dirs.addKDEDefaults(); dirs.addKDEDefaults();
file = dirs.findResource("config", file); file = dirs.findResource("config", file);
if (file.isEmpty()) if (file.isEmpty())

@ -641,7 +641,7 @@ KGreeter::insertSessions()
dsk.readEntry( "Name" ), dsk.readEntry( "Name" ),
(dsk.readBoolEntry( "Hidden", false ) || (dsk.readBoolEntry( "Hidden", false ) ||
(dsk.hasKey( "TryExec" ) && (dsk.hasKey( "TryExec" ) &&
KStandardDirs::findExe( dsk.readEntry( "TryExec" ) ).isEmpty())), TDEStandardDirs::findExe( dsk.readEntry( "TryExec" ) ).isEmpty())),
dsk.readEntry( "Exec" ).latin1() ); dsk.readEntry( "Exec" ).latin1() );
} }
} }

@ -72,7 +72,7 @@ KdmPixmap::KdmPixmap( KdmItem *parent, const TQDomNode &node, const char *name )
if ((_compositor.isEmpty()) || (!argb_visual_available)) { if ((_compositor.isEmpty()) || (!argb_visual_available)) {
// Software blend only (no compositing support) // Software blend only (no compositing support)
// Use the preset TDM background... // Use the preset TDM background...
KStandardDirs *m_pDirs = TDEGlobal::dirs(); TDEStandardDirs *m_pDirs = TDEGlobal::dirs();
KSimpleConfig *config = new KSimpleConfig( TQFile::decodeName( _backgroundCfg ) ); KSimpleConfig *config = new KSimpleConfig( TQFile::decodeName( _backgroundCfg ) );
config->setGroup("Desktop0"); config->setGroup("Desktop0");
pixmap.normal.fullpath = m_pDirs->findResource("wallpaper", config->readPathEntry("Wallpaper")); pixmap.normal.fullpath = m_pDirs->findResource("wallpaper", config->readPathEntry("Wallpaper"));
@ -179,7 +179,7 @@ KdmPixmap::loadPixmap( PixmapStruct::PixmapClass *pClass )
kdDebug() << timestamp() << " ext " << ext << " " << fullpath << endl; kdDebug() << timestamp() << " ext " << ext << " " << fullpath << endl;
TQString testpath = TQString("-%1x%2").arg(area.width()).arg(area.height()) + ext; TQString testpath = TQString("-%1x%2").arg(area.width()).arg(area.height()) + ext;
kdDebug() << timestamp() << " testing for " << fullpath + testpath << endl; kdDebug() << timestamp() << " testing for " << fullpath + testpath << endl;
if (KStandardDirs::exists(fullpath + testpath)) if (TDEStandardDirs::exists(fullpath + testpath))
pClass->pixmap.load(fullpath + testpath); pClass->pixmap.load(fullpath + testpath);
else else
pClass->pixmap.load( fullpath + ext ); pClass->pixmap.load( fullpath + ext );

@ -1829,7 +1829,7 @@ void Client::killProcess( bool ask, Time timestamp )
else else
{ // SELI TODO handle the window created by handler specially (on top,urgent?) { // SELI TODO handle the window created by handler specially (on top,urgent?)
process_killer = new TDEProcess( this ); process_killer = new TDEProcess( this );
*process_killer << KStandardDirs::findExe( "twin_killer_helper" ) *process_killer << TDEStandardDirs::findExe( "twin_killer_helper" )
<< "--pid" << TQCString().setNum( pid ) << "--hostname" << machine << "--pid" << TQCString().setNum( pid ) << "--hostname" << machine
<< "--windowname" << caption().utf8() << "--windowname" << caption().utf8()
<< "--applicationname" << resourceClass() << "--applicationname" << resourceClass()
@ -1958,7 +1958,7 @@ bool Client::queryUserSuspendedResume()
} }
// FIXME We should display a busy cursor until twin_resumer_helper loads // FIXME We should display a busy cursor until twin_resumer_helper loads
process_resumer = new TDEProcess( this ); process_resumer = new TDEProcess( this );
*process_resumer << KStandardDirs::findExe( "twin_resumer_helper" ) *process_resumer << TDEStandardDirs::findExe( "twin_resumer_helper" )
<< "--pid" << TQCString().setNum( info->pid() ) << "--hostname" << wmClientMachine( true ) << "--pid" << TQCString().setNum( info->pid() ) << "--hostname" << wmClientMachine( true )
<< "--windowname" << caption().utf8() << "--windowname" << caption().utf8()
<< "--applicationname" << resourceClass() << "--applicationname" << resourceClass()

@ -153,7 +153,7 @@ extern "C"
(usually 'widget()->resize( s );' is enough). (usually 'widget()->resize( s );' is enough).
- Review mousePosition() if it's implemented. Position constants need 'Position' prepended, - Review mousePosition() if it's implemented. Position constants need 'Position' prepended,
e.g. Top -> PositionTop. e.g. Top -> PositionTop.
- Note that you cannot use "appdata" with KStandardDirs, as the decoration will be used - Note that you cannot use "appdata" with TDEStandardDirs, as the decoration will be used
also in other applications than twin. also in other applications than twin.
- Implement all missing pure virtual functions. For mousePosition(), you may call - Implement all missing pure virtual functions. For mousePosition(), you may call
KDecoration::mousePosition() if it's sufficient. KDecoration::mousePosition() if it's sufficient.

@ -465,7 +465,7 @@ void KWinDecorationModule::createThirdPartyWMList()
if (descStart >= 0) { if (descStart >= 0) {
wmExecutable.truncate(descStart); wmExecutable.truncate(descStart);
} }
if (KStandardDirs::findExe(wmExecutable) != TQString::null) { if (TDEStandardDirs::findExe(wmExecutable) != TQString::null) {
wmAvailableNames.append(*it); wmAvailableNames.append(*it);
} }
} }

Loading…
Cancel
Save