Rename KStandard for enhanced compatibility with KDE4

pull/16/head
Timothy Pearson 12 years ago
parent 12f3d421cd
commit d3afa6baf9

@ -77,12 +77,12 @@ Arts::SoundServerV2 KArtsServer::server(void)
X11CommConfig.sync(); X11CommConfig.sync();
proc << TQFile::encodeName(KStandardDirs::findExe(TQString::fromLatin1("tdeinit_wrapper"))).data(); proc << TQFile::encodeName(TDEStandardDirs::findExe(TQString::fromLatin1("tdeinit_wrapper"))).data();
if(rt) if(rt)
proc << TQFile::encodeName(KStandardDirs::findExe(TQString::fromLatin1("artswrapper"))).data(); proc << TQFile::encodeName(TDEStandardDirs::findExe(TQString::fromLatin1("artswrapper"))).data();
else else
proc << TQFile::encodeName(KStandardDirs::findExe(TQString::fromLatin1("artsd"))).data(); proc << TQFile::encodeName(TDEStandardDirs::findExe(TQString::fromLatin1("artsd"))).data();
proc << TQStringList::split( " ", config.readEntry( "Arguments", "-F 10 -S 4096 -s 60 -m artsmessage -l 3 -f" ) ); proc << TQStringList::split( " ", config.readEntry( "Arguments", "-F 10 -S 4096 -s 60 -m artsmessage -l 3 -f" ) );

@ -296,7 +296,7 @@ void KNotify::loadConfig() {
players << "wavplay" << "aplay" << "auplay"; players << "wavplay" << "aplay" << "auplay";
TQStringList::Iterator it = players.begin(); TQStringList::Iterator it = players.begin();
while ( d->externalPlayer.isEmpty() && it != players.end() ) { while ( d->externalPlayer.isEmpty() && it != players.end() ) {
d->externalPlayer = KStandardDirs::findExe( *it ); d->externalPlayer = TDEStandardDirs::findExe( *it );
++it; ++it;
} }
} }

@ -127,7 +127,7 @@ void importKMailAddressBook( KABC::AddressBook *ab )
cfg.setGroup( "Addressbook" ); cfg.setGroup( "Addressbook" );
fileName = cfg.readPathEntry( "default", fileName ); fileName = cfg.readPathEntry( "default", fileName );
} }
if ( !KStandardDirs::exists( fileName ) ) { if ( !TDEStandardDirs::exists( fileName ) ) {
kdDebug(5700) << "Couldn't find KMail addressbook." << endl; kdDebug(5700) << "Couldn't find KMail addressbook." << endl;
return; return;
} }

@ -767,7 +767,7 @@ VFolderMenu::locateMenuFile(const TQString &fileName)
{ {
if (!TQDir::isRelativePath(fileName)) if (!TQDir::isRelativePath(fileName))
{ {
if (KStandardDirs::exists(fileName)) if (TDEStandardDirs::exists(fileName))
return fileName; return fileName;
return TQString::null; return TQString::null;
} }
@ -808,7 +808,7 @@ VFolderMenu::locateDirectoryFile(const TQString &fileName)
if (!TQDir::isRelativePath(fileName)) if (!TQDir::isRelativePath(fileName))
{ {
if (KStandardDirs::exists(fileName)) if (TDEStandardDirs::exists(fileName))
return fileName; return fileName;
return TQString::null; return TQString::null;
} }
@ -820,7 +820,7 @@ VFolderMenu::locateDirectoryFile(const TQString &fileName)
++it) ++it)
{ {
tmp = (*it)+fileName; tmp = (*it)+fileName;
if (KStandardDirs::exists(tmp)) if (TDEStandardDirs::exists(tmp))
return tmp; return tmp;
} }

@ -163,7 +163,7 @@ int main(int argc, char **argv) {
exe = XMLLINT; exe = XMLLINT;
#endif #endif
if ( (::access( TQFile::encodeName( exe ), X_OK )!=0) ) { if ( (::access( TQFile::encodeName( exe ), X_OK )!=0) ) {
exe = KStandardDirs::findExe( "xmllint" ); exe = TDEStandardDirs::findExe( "xmllint" );
if (exe.isEmpty()) if (exe.isEmpty())
exe = locate( "exe", "xmllint" ); exe = locate( "exe", "xmllint" );
} }

@ -190,7 +190,7 @@ void HelpProtocol::get( const KURL& url )
} }
} else { } else {
TQString docbook_file = file.left(file.findRev('/')) + "/index.docbook"; TQString docbook_file = file.left(file.findRev('/')) + "/index.docbook";
if (!KStandardDirs::exists(file)) { if (!TDEStandardDirs::exists(file)) {
file = docbook_file; file = docbook_file;
} else { } else {
TQFileInfo fi(file); TQFileInfo fi(file);

@ -114,7 +114,7 @@ xmlParserInputPtr meinExternalEntityLoader(const char *URL, const char *ID,
URL = "docbook/xml-dtd-4.1.2/docbookx.dtd"; URL = "docbook/xml-dtd-4.1.2/docbookx.dtd";
TQString file; TQString file;
if (KStandardDirs::exists( TQDir::currentDirPath() + "/" + URL ) ) if (TDEStandardDirs::exists( TQDir::currentDirPath() + "/" + URL ) )
file = TQDir::currentDirPath() + "/" + URL; file = TQDir::currentDirPath() + "/" + URL;
else else
file = locate("dtd", URL); file = locate("dtd", URL);
@ -186,7 +186,7 @@ void fillInstance(TDEInstance &ins, const TQString &srcdir) {
catalogs += ins.dirs()->findResource("data", "ksgmltools2/customization/catalog"); catalogs += ins.dirs()->findResource("data", "ksgmltools2/customization/catalog");
catalogs += ':'; catalogs += ':';
catalogs += ins.dirs()->findResource("data", "ksgmltools2/docbook/xml-dtd-4.2/docbook.cat"); catalogs += ins.dirs()->findResource("data", "ksgmltools2/docbook/xml-dtd-4.2/docbook.cat");
ins.dirs()->addResourceType("dtd", KStandardDirs::kde_default("data") + "ksgmltools2"); ins.dirs()->addResourceType("dtd", TDEStandardDirs::kde_default("data") + "ksgmltools2");
} else { } else {
catalogs += srcdir +"/customization/catalog:" + srcdir + "/docbook/xml-dtd-4.2/docbook.cat"; catalogs += srcdir +"/customization/catalog:" + srcdir + "/docbook/xml-dtd-4.2/docbook.cat";
ins.dirs()->addResourceDir("dtd", srcdir); ins.dirs()->addResourceDir("dtd", srcdir);

@ -132,7 +132,7 @@ int main()
++it ) ++it )
{ {
TQString cfg = *it + "share/config/" + file; TQString cfg = *it + "share/config/" + file;
if( KStandardDirs::exists( cfg )) if( TDEStandardDirs::exists( cfg ))
startupconfigfiles << cfg << "\n"; startupconfigfiles << cfg << "\n";
else else
startupconfigfiles << "!" << cfg << "\n"; startupconfigfiles << "!" << cfg << "\n";

@ -134,7 +134,7 @@ TQString KNewStuffGeneric::downloadDestination( KNS::Entry *entry )
{ {
TQString file = destinationPath(entry); TQString file = destinationPath(entry);
if ( KStandardDirs::exists( file ) ) { if ( TDEStandardDirs::exists( file ) ) {
int result = KMessageBox::warningContinueCancel( parentWidget(), int result = KMessageBox::warningContinueCancel( parentWidget(),
i18n("The file '%1' already exists. Do you want to overwrite it?") i18n("The file '%1' already exists. Do you want to overwrite it?")
.arg( file ), .arg( file ),

@ -1,7 +1,7 @@
/* /*
$Id$ $Id$
Simple helper routines for style's use of KStandardDirs with TQSettings, etc. Simple helper routines for style's use of TDEStandardDirs with TQSettings, etc.
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public modify it under the terms of the GNU Library General Public
@ -29,8 +29,8 @@ KStyleDirs* KStyleDirs::instance = 0;
KStyleDirs::KStyleDirs() KStyleDirs::KStyleDirs()
{ {
addResourceType( "themepixmap", KStandardDirs::kde_default( "data" ) + "kstyle/pixmaps/" ); addResourceType( "themepixmap", TDEStandardDirs::kde_default( "data" ) + "kstyle/pixmaps/" );
addResourceType( "themerc", KStandardDirs::kde_default( "data" ) + "kstyle/themes/" ); addResourceType( "themerc", TDEStandardDirs::kde_default( "data" ) + "kstyle/themes/" );
} }
KStyleDirs::~KStyleDirs() KStyleDirs::~KStyleDirs()

@ -30,16 +30,16 @@
/** /**
* @short Access to the standard KDE directories for the pixmap style * @short Access to the standard KDE directories for the pixmap style
* @author Maksim Orlovich<mo002j@mail.rochester.edu> is responsible for this file, * @author Maksim Orlovich<mo002j@mail.rochester.edu> is responsible for this file,
but all the interesting work is done by KStandardDirs but all the interesting work is done by TDEStandardDirs
* @version $Id$ * @version $Id$
* *
* This class provides a this wrapper for styles around KStandardDirs, * This class provides a this wrapper for styles around TDEStandardDirs,
* permitting integration with TQSettings and easy loading of pixmaps * permitting integration with TQSettings and easy loading of pixmaps
* *
* It add share/apps/kstyle/themes as "themerc", * It add share/apps/kstyle/themes as "themerc",
* share/apps/kstyle/pixmaps "themepixmap" * share/apps/kstyle/pixmaps "themepixmap"
*/ */
class KStyleDirs: public KStandardDirs class KStyleDirs: public TDEStandardDirs
{ {
public: public:
static KStyleDirs* dirs() static KStyleDirs* dirs()

@ -28,7 +28,7 @@ resources provided by the system were located under $TDEDIR and user-
specific resources were located under $HOME/.trinity. specific resources were located under $HOME/.trinity.
In KDE2 resource management has been largely abstracted by the introduction In KDE2 resource management has been largely abstracted by the introduction
of the KStandardDirs class and has become much more flexible. The user / of the TDEStandardDirs class and has become much more flexible. The user /
administrator can now specify a variable number of locations where resources administrator can now specify a variable number of locations where resources
can be found. A list of locations can either be specified via $TDEDIRS can be found. A list of locations can either be specified via $TDEDIRS
(notice the extra 'S'), via /etc/kderc and even via the kdeglobals config (notice the extra 'S'), via /etc/kderc and even via the kdeglobals config

@ -1013,7 +1013,7 @@ void TDEApplication::init(bool GUIenabled)
setReverseLayout( !rtl ); setReverseLayout( !rtl );
// install appdata resource type // install appdata resource type
TDEGlobal::dirs()->addResourceType("appdata", KStandardDirs::kde_default("data") TDEGlobal::dirs()->addResourceType("appdata", TDEStandardDirs::kde_default("data")
+ TQString::fromLatin1(name()) + '/'); + TQString::fromLatin1(name()) + '/');
pSessionConfig = 0L; pSessionConfig = 0L;
bSessionManagement = true; bSessionManagement = true;
@ -1346,7 +1346,7 @@ static void checkRestartVersion( TQSessionManager& sm )
} }
} }
} }
TQString wrapper = KStandardDirs::findExe( "trinity" ); TQString wrapper = TDEStandardDirs::findExe( "trinity" );
TQStringList restartCommand = sm.restartCommand(); TQStringList restartCommand = sm.restartCommand();
restartCommand.prepend( wrapper ); restartCommand.prepend( wrapper );
sm.setRestartCommand( restartCommand ); sm.setRestartCommand( restartCommand );
@ -1451,9 +1451,9 @@ void TDEApplication::startKdeinit()
return; // whoever held the lock has already started dcopserver return; // whoever held the lock has already started dcopserver
} }
// Try to launch tdeinit. // Try to launch tdeinit.
TQString srv = KStandardDirs::findExe(TQString::fromLatin1("tdeinit")); TQString srv = TDEStandardDirs::findExe(TQString::fromLatin1("tdeinit"));
if (srv.isEmpty()) if (srv.isEmpty())
srv = KStandardDirs::findExe(TQString::fromLatin1("tdeinit"), TDEGlobal::dirs()->kfsstnd_defaultbindir()); srv = TDEStandardDirs::findExe(TQString::fromLatin1("tdeinit"), TDEGlobal::dirs()->kfsstnd_defaultbindir());
if (srv.isEmpty()) if (srv.isEmpty())
return; return;
if (kapp && (Tty != kapp->type())) if (kapp && (Tty != kapp->type()))

@ -79,7 +79,7 @@ void TDEApplication::invokeHelp( const TQString& anchor,
{ {
if (!d->qassistantclient) { if (!d->qassistantclient) {
d->qassistantclient = new QAssistantClient( d->qassistantclient = new QAssistantClient(
KStandardDirs::findExe( "assistant" ), 0); TDEStandardDirs::findExe( "assistant" ), 0);
TQStringList args; TQStringList args;
args << "-profile"; args << "-profile";
args << TQDir::convertSeparators( locate("html", TQString(name())+"/"+TQString(name())+".adp") ); args << TQDir::convertSeparators( locate("html", TQString(name())+"/"+TQString(name())+".adp") );

@ -133,7 +133,7 @@ bool KDesktopFile::isAuthorizedDesktopFile(const TQString& path)
if (TQDir::isRelativePath(path)) if (TQDir::isRelativePath(path))
return true; // Relative paths are ok. return true; // Relative paths are ok.
KStandardDirs *dirs = TDEGlobal::dirs(); TDEStandardDirs *dirs = TDEGlobal::dirs();
if (TQDir::isRelativePath( dirs->relativeLocation("apps", path) )) if (TQDir::isRelativePath( dirs->relativeLocation("apps", path) ))
return true; return true;
if (TQDir::isRelativePath( dirs->relativeLocation("xdgdata-apps", path) )) if (TQDir::isRelativePath( dirs->relativeLocation("xdgdata-apps", path) ))

@ -53,7 +53,7 @@
static void kglobal_init(); static void kglobal_init();
KStandardDirs *TDEGlobal::dirs() TDEStandardDirs *TDEGlobal::dirs()
{ {
MYASSERT(_instance); MYASSERT(_instance);

@ -28,7 +28,7 @@ class KIconLoader;
class TDEHardwareDevices; class TDEHardwareDevices;
class TDEGlobalNetworkManager; class TDEGlobalNetworkManager;
class KLocale; class KLocale;
class KStandardDirs; class TDEStandardDirs;
class KStaticDeleterBase; class KStaticDeleterBase;
class KStaticDeleterList; class KStaticDeleterList;
class KStringDict; class KStringDict;
@ -59,7 +59,7 @@ public:
* Returns the application standard dirs object. * Returns the application standard dirs object.
* @return the global standard dir object * @return the global standard dir object
*/ */
static KStandardDirs *dirs(); static TDEStandardDirs *dirs();
/** /**
* Returns the general config object. * Returns the general config object.

@ -127,7 +127,7 @@ static TQValueList< KIconLoaderDebug > *kiconloaders;
/*** KIconLoader: the icon loader ***/ /*** KIconLoader: the icon loader ***/
KIconLoader::KIconLoader(const TQString& _appname, KStandardDirs *_dirs) KIconLoader::KIconLoader(const TQString& _appname, TDEStandardDirs *_dirs)
{ {
#ifdef KICONLOADER_CHECKS #ifdef KICONLOADER_CHECKS
if( kiconloaders == NULL ) if( kiconloaders == NULL )
@ -159,7 +159,7 @@ KIconLoader::KIconLoader(const TQString& _appname, KStandardDirs *_dirs)
init( _appname, _dirs ); init( _appname, _dirs );
} }
void KIconLoader::reconfigure( const TQString& _appname, KStandardDirs *_dirs ) void KIconLoader::reconfigure( const TQString& _appname, TDEStandardDirs *_dirs )
{ {
d->links.clear(); d->links.clear();
d->imgDict.clear(); d->imgDict.clear();
@ -171,7 +171,7 @@ void KIconLoader::reconfigure( const TQString& _appname, KStandardDirs *_dirs )
init( _appname, _dirs ); init( _appname, _dirs );
} }
void KIconLoader::init( const TQString& _appname, KStandardDirs *_dirs ) void KIconLoader::init( const TQString& _appname, TDEStandardDirs *_dirs )
{ {
// If this is unequal to 0, the iconloader is initialized // If this is unequal to 0, the iconloader is initialized
// successfully. // successfully.
@ -236,10 +236,10 @@ void KIconLoader::init( const TQString& _appname, KStandardDirs *_dirs )
} }
// Insert application specific themes at the top. // Insert application specific themes at the top.
d->mpDirs->addResourceType("appicon", KStandardDirs::kde_default("data") + d->mpDirs->addResourceType("appicon", TDEStandardDirs::kde_default("data") +
appname + "/pics/"); appname + "/pics/");
// ################## KDE4: consider removing the toolbar directory // ################## KDE4: consider removing the toolbar directory
d->mpDirs->addResourceType("appicon", KStandardDirs::kde_default("data") + d->mpDirs->addResourceType("appicon", TDEStandardDirs::kde_default("data") +
appname + "/toolbar/"); appname + "/toolbar/");
// Add legacy icon dirs. // Add legacy icon dirs.
@ -294,10 +294,10 @@ bool KIconLoader::isDelayedIconSetLoadingEnabled() const
void KIconLoader::addAppDir(const TQString& appname) void KIconLoader::addAppDir(const TQString& appname)
{ {
d->mpDirs->addResourceType("appicon", KStandardDirs::kde_default("data") + d->mpDirs->addResourceType("appicon", TDEStandardDirs::kde_default("data") +
appname + "/pics/"); appname + "/pics/");
// ################## KDE4: consider removing the toolbar directory // ################## KDE4: consider removing the toolbar directory
d->mpDirs->addResourceType("appicon", KStandardDirs::kde_default("data") + d->mpDirs->addResourceType("appicon", TDEStandardDirs::kde_default("data") +
appname + "/toolbar/"); appname + "/toolbar/");
addAppThemes(appname); addAppThemes(appname);
} }
@ -362,8 +362,8 @@ void KIconLoader::addExtraDesktopThemes()
TQStringList::ConstIterator it2; TQStringList::ConstIterator it2;
for (it2=lst.begin(); it2!=lst.end(); ++it2) for (it2=lst.begin(); it2!=lst.end(); ++it2)
{ {
if (!KStandardDirs::exists(*it + *it2 + "/index.desktop") if (!TDEStandardDirs::exists(*it + *it2 + "/index.desktop")
&& !KStandardDirs::exists(*it + *it2 + "/index.theme")) && !TDEStandardDirs::exists(*it + *it2 + "/index.theme"))
continue; continue;
r=readlink( TQFile::encodeName(*it + *it2) , buf, sizeof(buf)-1); r=readlink( TQFile::encodeName(*it + *it2) , buf, sizeof(buf)-1);
if ( r>0 ) if ( r>0 )

@ -35,7 +35,7 @@ struct KIconGroup;
class KIconThemeNode; class KIconThemeNode;
class TDEConfig; class TDEConfig;
struct KIconLoaderPrivate; struct KIconLoaderPrivate;
class KStandardDirs; class TDEStandardDirs;
class KIconEffect; class KIconEffect;
@ -83,7 +83,7 @@ public:
* @param appname Add the data directories of this application to the * @param appname Add the data directories of this application to the
* icon search path for the "User" group. The default argument adds the * icon search path for the "User" group. The default argument adds the
* directories of the current application. * directories of the current application.
* @param dirs the KStandardDirs object to use. If null the global one is used * @param dirs the TDEStandardDirs object to use. If null the global one is used
* *
* Usually, you use the default iconloader, which can be accessed via * Usually, you use the default iconloader, which can be accessed via
* TDEGlobal::iconLoader(), so you hardly ever have to create an * TDEGlobal::iconLoader(), so you hardly ever have to create an
@ -92,7 +92,7 @@ public:
* @see TDEGlobal::iconLoader() * @see TDEGlobal::iconLoader()
* @see TDEInstance::iconLoader() * @see TDEInstance::iconLoader()
*/ */
KIconLoader(const TQString& appname=TQString::null, KStandardDirs *dirs = 0); KIconLoader(const TQString& appname=TQString::null, TDEStandardDirs *dirs = 0);
/** /**
* Cleanup * Cleanup
@ -301,7 +301,7 @@ public:
* @param _dirs the new standard directories. If 0, the directories * @param _dirs the new standard directories. If 0, the directories
* from TDEGlobal will be taken. * from TDEGlobal will be taken.
*/ */
void reconfigure( const TQString& _appname, KStandardDirs *_dirs ); void reconfigure( const TQString& _appname, TDEStandardDirs *_dirs );
/** /**
* Returns the unknown icon. An icon that is used when no other icon * Returns the unknown icon. An icon that is used when no other icon
@ -368,7 +368,7 @@ public:
/** /**
* @internal * @internal
*/ */
void init( const TQString& _appname, KStandardDirs *_dirs ); void init( const TQString& _appname, TDEStandardDirs *_dirs );
/** /**
* @internal * @internal

@ -40,7 +40,7 @@ public:
TQStringList mThemesInTree; TQStringList mThemesInTree;
KIconGroup *mpGroups; KIconGroup *mpGroups;
KIconThemeNode *mpThemeRoot; KIconThemeNode *mpThemeRoot;
KStandardDirs *mpDirs; TDEStandardDirs *mpDirs;
KIconLoader *q; KIconLoader *q;
KIconEffect mpEffect; KIconEffect mpEffect;
TQDict<TQImage> imgDict; TQDict<TQImage> imgDict;

@ -113,11 +113,11 @@ KIconTheme::KIconTheme(const TQString& name, const TQString& appName)
for (it=icnlibs.begin(); it!=icnlibs.end(); ++it) for (it=icnlibs.begin(); it!=icnlibs.end(); ++it)
{ {
cDir = *it + name + "/"; cDir = *it + name + "/";
if (KStandardDirs::exists(cDir)) if (TDEStandardDirs::exists(cDir))
{ {
themeDirs += cDir; themeDirs += cDir;
if (mDir.isEmpty() if (mDir.isEmpty()
&& (KStandardDirs::exists( cDir + "index.desktop") || KStandardDirs::exists( cDir + "index.theme"))) && (TDEStandardDirs::exists( cDir + "index.desktop") || TDEStandardDirs::exists( cDir + "index.theme")))
mDir = cDir; mDir = cDir;
} }
} }
@ -166,7 +166,7 @@ KIconTheme::KIconTheme(const TQString& name, const TQString& appName)
cfg.setGroup(*it); cfg.setGroup(*it);
for (itDir=themeDirs.begin(); itDir!=themeDirs.end(); ++itDir) for (itDir=themeDirs.begin(); itDir!=themeDirs.end(); ++itDir)
{ {
if (KStandardDirs::exists(*itDir + *it + "/")) if (TDEStandardDirs::exists(*itDir + *it + "/"))
{ {
KIconThemeDir *dir = new KIconThemeDir(*itDir + *it, &cfg); KIconThemeDir *dir = new KIconThemeDir(*itDir + *it, &cfg);
if (!dir->isValid()) if (!dir->isValid())
@ -487,7 +487,7 @@ TQStringList KIconTheme::list()
{ {
if ((*it2 == ".") || (*it2 == "..") || (*it2).startsWith("default.") ) if ((*it2 == ".") || (*it2 == "..") || (*it2).startsWith("default.") )
continue; continue;
if (!KStandardDirs::exists(*it + *it2 + "/index.desktop") && !KStandardDirs::exists(*it + *it2 + "/index.theme")) if (!TDEStandardDirs::exists(*it + *it2 + "/index.desktop") && !TDEStandardDirs::exists(*it + *it2 + "/index.theme"))
continue; continue;
KIconTheme oink(*it2); KIconTheme oink(*it2);
if (!oink.isValid()) continue; if (!oink.isValid()) continue;

@ -172,11 +172,11 @@ TDEInstance::~TDEInstance()
} }
KStandardDirs *TDEInstance::dirs() const TDEStandardDirs *TDEInstance::dirs() const
{ {
DEBUG_CHECK_ALIVE DEBUG_CHECK_ALIVE
if( _dirs == 0 ) { if( _dirs == 0 ) {
_dirs = new KStandardDirs( ); _dirs = new TDEStandardDirs( );
if (_config) { if (_config) {
if (_dirs->addCustomized(_config)) if (_dirs->addCustomized(_config))
_config->reparseConfiguration(); _config->reparseConfiguration();

@ -18,7 +18,7 @@
#ifndef _KINSTANCE_H #ifndef _KINSTANCE_H
#define _KINSTANCE_H #define _KINSTANCE_H
class KStandardDirs; class TDEStandardDirs;
class TDEAboutData; class TDEAboutData;
class TDEConfig; class TDEConfig;
class KIconLoader; class KIconLoader;
@ -44,7 +44,7 @@ class TDEGlobalNetworkManager;
*/ */
class TDECORE_EXPORT TDEInstance class TDECORE_EXPORT TDEInstance
{ {
friend class KStandardDirs; friend class TDEStandardDirs;
public: public:
/** /**
@ -80,9 +80,9 @@ class TDECORE_EXPORT TDEInstance
/** /**
* Returns the application standard dirs object. * Returns the application standard dirs object.
* @return The KStandardDirs of the application. * @return The TDEStandardDirs of the application.
*/ */
KStandardDirs *dirs() const; TDEStandardDirs *dirs() const;
/** /**
* Returns the general config object ("appnamerc"). * Returns the general config object ("appnamerc").
@ -163,7 +163,7 @@ protected:
void setConfigName(const TQString &name); void setConfigName(const TQString &name);
private: private:
mutable KStandardDirs *_dirs; mutable TDEStandardDirs *_dirs;
mutable TDEConfig *_config; mutable TDEConfig *_config;
mutable KIconLoader *_iconLoader; mutable KIconLoader *_iconLoader;

@ -158,7 +158,7 @@ KMountPoint::List KMountPoint::possibleMountPoints(int infoNeeded)
if (infoNeeded & NeedRealDeviceName) if (infoNeeded & NeedRealDeviceName)
{ {
if (mp->m_mountedFrom.startsWith("/")) if (mp->m_mountedFrom.startsWith("/"))
mp->m_device = KStandardDirs::realPath(mp->m_mountedFrom); mp->m_device = TDEStandardDirs::realPath(mp->m_mountedFrom);
} }
// TODO: Strip trailing '/' ? // TODO: Strip trailing '/' ?
result.append(mp); result.append(mp);
@ -209,7 +209,7 @@ KMountPoint::List KMountPoint::possibleMountPoints(int infoNeeded)
if (infoNeeded & NeedRealDeviceName) if (infoNeeded & NeedRealDeviceName)
{ {
if (mp->m_mountedFrom.startsWith("/")) if (mp->m_mountedFrom.startsWith("/"))
mp->m_device = KStandardDirs::realPath(mp->m_mountedFrom); mp->m_device = TDEStandardDirs::realPath(mp->m_mountedFrom);
} }
// TODO: Strip trailing '/' ? // TODO: Strip trailing '/' ?
result.append(mp); result.append(mp);
@ -256,7 +256,7 @@ KMountPoint::List KMountPoint::currentMountPoints(int infoNeeded)
if (infoNeeded & NeedRealDeviceName) if (infoNeeded & NeedRealDeviceName)
{ {
if (mp->m_mountedFrom.startsWith("/")) if (mp->m_mountedFrom.startsWith("/"))
mp->m_device = KStandardDirs::realPath(mp->m_mountedFrom); mp->m_device = TDEStandardDirs::realPath(mp->m_mountedFrom);
} }
// TODO: Strip trailing '/' ? // TODO: Strip trailing '/' ?
result.append(mp); result.append(mp);
@ -320,7 +320,7 @@ KMountPoint::List KMountPoint::currentMountPoints(int infoNeeded)
if (infoNeeded & NeedRealDeviceName) if (infoNeeded & NeedRealDeviceName)
{ {
if (mp->m_mountedFrom.startsWith("/")) if (mp->m_mountedFrom.startsWith("/"))
mp->m_device = KStandardDirs::realPath(mp->m_mountedFrom); mp->m_device = TDEStandardDirs::realPath(mp->m_mountedFrom);
} }
result.append(mp); result.append(mp);
@ -363,7 +363,7 @@ KMountPoint::List KMountPoint::currentMountPoints(int infoNeeded)
if (infoNeeded & NeedRealDeviceName) if (infoNeeded & NeedRealDeviceName)
{ {
if (mp->m_mountedFrom.startsWith("/")) if (mp->m_mountedFrom.startsWith("/"))
mp->m_device = KStandardDirs::realPath(mp->m_mountedFrom); mp->m_device = TDEStandardDirs::realPath(mp->m_mountedFrom);
} }
// TODO: Strip trailing '/' ? // TODO: Strip trailing '/' ?
result.append(mp); result.append(mp);

@ -44,7 +44,7 @@ KSaveFile::KSaveFile(const TQString &filename, int mode)
: mTempFile(true) : mTempFile(true)
{ {
// follow symbolic link, if any // follow symbolic link, if any
TQString real_filename = KStandardDirs::realFilePath(filename); TQString real_filename = TDEStandardDirs::realFilePath(filename);
// we only check here if the directory can be written to // we only check here if the directory can be written to
// the actual filename isn't written to, but replaced later // the actual filename isn't written to, but replaced later

@ -57,10 +57,10 @@
template class TQDict<TQStringList>; template class TQDict<TQStringList>;
class KStandardDirs::KStandardDirsPrivate class TDEStandardDirs::TDEStandardDirsPrivate
{ {
public: public:
KStandardDirsPrivate() TDEStandardDirsPrivate()
: restrictionsActive(false), : restrictionsActive(false),
dataRestrictionActive(false), dataRestrictionActive(false),
checkRestrictions(true) checkRestrictions(true)
@ -76,20 +76,20 @@ public:
// Singleton, with data shared by all kstandarddirs instances. // Singleton, with data shared by all kstandarddirs instances.
// Used in static methods like findExe() // Used in static methods like findExe()
class KStandardDirsSingleton class TDEStandardDirsSingleton
{ {
public: public:
TQString defaultprefix; TQString defaultprefix;
TQString defaultbindir; TQString defaultbindir;
static KStandardDirsSingleton* self(); static TDEStandardDirsSingleton* self();
private: private:
static KStandardDirsSingleton* s_self; static TDEStandardDirsSingleton* s_self;
}; };
static KStaticDeleter<KStandardDirsSingleton> kstds_sd; static KStaticDeleter<TDEStandardDirsSingleton> kstds_sd;
KStandardDirsSingleton* KStandardDirsSingleton::s_self = 0; TDEStandardDirsSingleton* TDEStandardDirsSingleton::s_self = 0;
KStandardDirsSingleton* KStandardDirsSingleton::self() { TDEStandardDirsSingleton* TDEStandardDirsSingleton::self() {
if ( !s_self ) if ( !s_self )
kstds_sd.setObject( s_self, new KStandardDirsSingleton ); kstds_sd.setObject( s_self, new TDEStandardDirsSingleton );
return s_self; return s_self;
} }
@ -105,9 +105,9 @@ static const char* const types[] = {"html", "html-bundle", "icon", "apps", "soun
static int tokenize( TQStringList& token, const TQString& str, static int tokenize( TQStringList& token, const TQString& str,
const TQString& delim ); const TQString& delim );
KStandardDirs::KStandardDirs( ) : addedCustoms(false) TDEStandardDirs::TDEStandardDirs( ) : addedCustoms(false)
{ {
d = new KStandardDirsPrivate; d = new TDEStandardDirsPrivate;
dircache.setAutoDelete(true); dircache.setAutoDelete(true);
relatives.setAutoDelete(true); relatives.setAutoDelete(true);
absolutes.setAutoDelete(true); absolutes.setAutoDelete(true);
@ -115,12 +115,12 @@ KStandardDirs::KStandardDirs( ) : addedCustoms(false)
addKDEDefaults(); addKDEDefaults();
} }
KStandardDirs::~KStandardDirs() TDEStandardDirs::~TDEStandardDirs()
{ {
delete d; delete d;
} }
bool KStandardDirs::isRestrictedResource(const char *type, const TQString& relPath) const bool TDEStandardDirs::isRestrictedResource(const char *type, const TQString& relPath) const
{ {
if (!d || !d->restrictionsActive) if (!d || !d->restrictionsActive)
return false; return false;
@ -140,7 +140,7 @@ bool KStandardDirs::isRestrictedResource(const char *type, const TQString& relPa
return false; return false;
} }
void KStandardDirs::applyDataRestrictions(const TQString &relPath) const void TDEStandardDirs::applyDataRestrictions(const TQString &relPath) const
{ {
TQString key; TQString key;
int i = relPath.find(QChar('/')); int i = relPath.find(QChar('/'));
@ -154,7 +154,7 @@ void KStandardDirs::applyDataRestrictions(const TQString &relPath) const
} }
TQStringList KStandardDirs::allTypes() const TQStringList TDEStandardDirs::allTypes() const
{ {
TQStringList list; TQStringList list;
for (int i = 0; types[i] != 0; ++i) for (int i = 0; types[i] != 0; ++i)
@ -177,12 +177,12 @@ static void priorityAdd(TQStringList &prefixes, const TQString& dir, bool priori
} }
} }
void KStandardDirs::addPrefix( const TQString& _dir ) void TDEStandardDirs::addPrefix( const TQString& _dir )
{ {
addPrefix(_dir, false); addPrefix(_dir, false);
} }
void KStandardDirs::addPrefix( const TQString& _dir, bool priority ) void TDEStandardDirs::addPrefix( const TQString& _dir, bool priority )
{ {
if (_dir.isEmpty()) if (_dir.isEmpty())
return; return;
@ -197,12 +197,12 @@ void KStandardDirs::addPrefix( const TQString& _dir, bool priority )
} }
} }
void KStandardDirs::addXdgConfigPrefix( const TQString& _dir ) void TDEStandardDirs::addXdgConfigPrefix( const TQString& _dir )
{ {
addXdgConfigPrefix(_dir, false); addXdgConfigPrefix(_dir, false);
} }
void KStandardDirs::addXdgConfigPrefix( const TQString& _dir, bool priority ) void TDEStandardDirs::addXdgConfigPrefix( const TQString& _dir, bool priority )
{ {
if (_dir.isEmpty()) if (_dir.isEmpty())
return; return;
@ -217,12 +217,12 @@ void KStandardDirs::addXdgConfigPrefix( const TQString& _dir, bool priority )
} }
} }
void KStandardDirs::addXdgDataPrefix( const TQString& _dir ) void TDEStandardDirs::addXdgDataPrefix( const TQString& _dir )
{ {
addXdgDataPrefix(_dir, false); addXdgDataPrefix(_dir, false);
} }
void KStandardDirs::addXdgDataPrefix( const TQString& _dir, bool priority ) void TDEStandardDirs::addXdgDataPrefix( const TQString& _dir, bool priority )
{ {
if (_dir.isEmpty()) if (_dir.isEmpty())
return; return;
@ -237,27 +237,27 @@ void KStandardDirs::addXdgDataPrefix( const TQString& _dir, bool priority )
} }
} }
TQString KStandardDirs::kfsstnd_prefixes() TQString TDEStandardDirs::kfsstnd_prefixes()
{ {
return prefixes.join(TQChar(KPATH_SEPARATOR)); return prefixes.join(TQChar(KPATH_SEPARATOR));
} }
TQString KStandardDirs::kfsstnd_xdg_conf_prefixes() TQString TDEStandardDirs::kfsstnd_xdg_conf_prefixes()
{ {
return d->xdgconf_prefixes.join(TQChar(KPATH_SEPARATOR)); return d->xdgconf_prefixes.join(TQChar(KPATH_SEPARATOR));
} }
TQString KStandardDirs::kfsstnd_xdg_data_prefixes() TQString TDEStandardDirs::kfsstnd_xdg_data_prefixes()
{ {
return d->xdgdata_prefixes.join(TQChar(KPATH_SEPARATOR)); return d->xdgdata_prefixes.join(TQChar(KPATH_SEPARATOR));
} }
bool KStandardDirs::addResourceType( const char *type, bool TDEStandardDirs::addResourceType( const char *type,
const TQString& relativename ) const TQString& relativename )
{ {
return addResourceType(type, relativename, true); return addResourceType(type, relativename, true);
} }
bool KStandardDirs::addResourceType( const char *type, bool TDEStandardDirs::addResourceType( const char *type,
const TQString& relativename, const TQString& relativename,
bool priority ) bool priority )
{ {
@ -283,14 +283,14 @@ bool KStandardDirs::addResourceType( const char *type,
return false; return false;
} }
bool KStandardDirs::addResourceDir( const char *type, bool TDEStandardDirs::addResourceDir( const char *type,
const TQString& absdir) const TQString& absdir)
{ {
// KDE4: change priority to bring in line with addResourceType // KDE4: change priority to bring in line with addResourceType
return addResourceDir(type, absdir, false); return addResourceDir(type, absdir, false);
} }
bool KStandardDirs::addResourceDir( const char *type, bool TDEStandardDirs::addResourceDir( const char *type,
const TQString& absdir, const TQString& absdir,
bool priority) bool priority)
{ {
@ -314,7 +314,7 @@ bool KStandardDirs::addResourceDir( const char *type,
return false; return false;
} }
TQString KStandardDirs::findResource( const char *type, TQString TDEStandardDirs::findResource( const char *type,
const TQString& filename ) const const TQString& filename ) const
{ {
if (!TQDir::isRelativePath(filename)) if (!TQDir::isRelativePath(filename))
@ -349,7 +349,7 @@ static TQ_UINT32 updateHash(const TQString &file, TQ_UINT32 hash)
return hash; return hash;
} }
TQ_UINT32 KStandardDirs::calcResourceHash( const char *type, TQ_UINT32 TDEStandardDirs::calcResourceHash( const char *type,
const TQString& filename, bool deep) const const TQString& filename, bool deep) const
{ {
TQ_UINT32 hash = 0; TQ_UINT32 hash = 0;
@ -375,7 +375,7 @@ TQ_UINT32 KStandardDirs::calcResourceHash( const char *type,
} }
TQStringList KStandardDirs::findDirs( const char *type, TQStringList TDEStandardDirs::findDirs( const char *type,
const TQString& reldir ) const const TQString& reldir ) const
{ {
TQDir testdir; TQDir testdir;
@ -409,12 +409,12 @@ TQStringList KStandardDirs::findDirs( const char *type,
return list; return list;
} }
TQString KStandardDirs::findResourceDir( const char *type, TQString TDEStandardDirs::findResourceDir( const char *type,
const TQString& filename) const const TQString& filename) const
{ {
#ifndef NDEBUG #ifndef NDEBUG
if (filename.isEmpty()) { if (filename.isEmpty()) {
fprintf(stderr, "filename for type %s in KStandardDirs::findResourceDir is not supposed to be empty!!", type); fprintf(stderr, "filename for type %s in TDEStandardDirs::findResourceDir is not supposed to be empty!!", type);
return TQString::null; return TQString::null;
} }
#endif #endif
@ -430,7 +430,7 @@ TQString KStandardDirs::findResourceDir( const char *type,
#ifdef Q_WS_WIN //this ensures we're using installed .la files #ifdef Q_WS_WIN //this ensures we're using installed .la files
if ((*it).isEmpty() && filename.right(3)==".la") { if ((*it).isEmpty() && filename.right(3)==".la") {
#ifndef NDEBUG #ifndef NDEBUG
fprintf(stderr, "KStandardDirs::findResourceDir() found .la in cwd: skipping. (fname=%s)\n", filename.ascii()); fprintf(stderr, "TDEStandardDirs::findResourceDir() found .la in cwd: skipping. (fname=%s)\n", filename.ascii());
#endif #endif
continue; continue;
} }
@ -447,7 +447,7 @@ TQString KStandardDirs::findResourceDir( const char *type,
return TQString::null; return TQString::null;
} }
bool KStandardDirs::exists(const TQString &fullPath) bool TDEStandardDirs::exists(const TQString &fullPath)
{ {
KDE_struct_stat buff; KDE_struct_stat buff;
if ((access(TQFile::encodeName(fullPath), R_OK) == 0) && (KDE_stat( TQFile::encodeName(fullPath), &buff ) == 0)) { if ((access(TQFile::encodeName(fullPath), R_OK) == 0) && (KDE_stat( TQFile::encodeName(fullPath), &buff ) == 0)) {
@ -620,7 +620,7 @@ static void lookupPrefix(const TQString& prefix, const TQString& relpath,
} }
TQStringList TQStringList
KStandardDirs::findAllResources( const char *type, TDEStandardDirs::findAllResources( const char *type,
const TQString& filter, const TQString& filter,
bool recursive, bool recursive,
bool unique, bool unique,
@ -676,7 +676,7 @@ KStandardDirs::findAllResources( const char *type,
} }
TQStringList TQStringList
KStandardDirs::findAllResources( const char *type, TDEStandardDirs::findAllResources( const char *type,
const TQString& filter, const TQString& filter,
bool recursive, bool recursive,
bool unique) const bool unique) const
@ -686,7 +686,7 @@ KStandardDirs::findAllResources( const char *type,
} }
TQString TQString
KStandardDirs::realPath(const TQString &dirname) TDEStandardDirs::realPath(const TQString &dirname)
{ {
char realpath_buffer[MAXPATHLEN + 1]; char realpath_buffer[MAXPATHLEN + 1];
memset(realpath_buffer, 0, MAXPATHLEN + 1); memset(realpath_buffer, 0, MAXPATHLEN + 1);
@ -704,7 +704,7 @@ KStandardDirs::realPath(const TQString &dirname)
} }
TQString TQString
KStandardDirs::realFilePath(const TQString &filename) TDEStandardDirs::realFilePath(const TQString &filename)
{ {
char realpath_buffer[MAXPATHLEN + 1]; char realpath_buffer[MAXPATHLEN + 1];
memset(realpath_buffer, 0, MAXPATHLEN + 1); memset(realpath_buffer, 0, MAXPATHLEN + 1);
@ -718,7 +718,7 @@ KStandardDirs::realFilePath(const TQString &filename)
return filename; return filename;
} }
void KStandardDirs::createSpecialResource(const char *type) void TDEStandardDirs::createSpecialResource(const char *type)
{ {
char hostname[256]; char hostname[256];
hostname[0] = 0; hostname[0] = 0;
@ -792,17 +792,17 @@ void KStandardDirs::createSpecialResource(const char *type)
addResourceDir(type, dir+QChar('/')); addResourceDir(type, dir+QChar('/'));
} }
TQStringList KStandardDirs::resourceDirs(const char *type) const TQStringList TDEStandardDirs::resourceDirs(const char *type) const
{ {
TQStringList *candidates = dircache.find(type); TQStringList *candidates = dircache.find(type);
if (!candidates) { // filling cache if (!candidates) { // filling cache
if (strcmp(type, "socket") == 0) if (strcmp(type, "socket") == 0)
const_cast<KStandardDirs *>(this)->createSpecialResource(type); const_cast<TDEStandardDirs *>(this)->createSpecialResource(type);
else if (strcmp(type, "tmp") == 0) else if (strcmp(type, "tmp") == 0)
const_cast<KStandardDirs *>(this)->createSpecialResource(type); const_cast<TDEStandardDirs *>(this)->createSpecialResource(type);
else if (strcmp(type, "cache") == 0) else if (strcmp(type, "cache") == 0)
const_cast<KStandardDirs *>(this)->createSpecialResource(type); const_cast<TDEStandardDirs *>(this)->createSpecialResource(type);
TQDir testdir; TQDir testdir;
@ -883,7 +883,7 @@ TQStringList KStandardDirs::resourceDirs(const char *type) const
return *candidates; return *candidates;
} }
TQStringList KStandardDirs::systemPaths( const TQString& pstr ) TQStringList TDEStandardDirs::systemPaths( const TQString& pstr )
{ {
TQStringList tokens; TQStringList tokens;
TQString p = pstr; TQString p = pstr;
@ -929,7 +929,7 @@ TQStringList KStandardDirs::systemPaths( const TQString& pstr )
} }
TQString KStandardDirs::findExe( const TQString& appname, TQString TDEStandardDirs::findExe( const TQString& appname,
const TQString& pstr, bool ignore) const TQString& pstr, bool ignore)
{ {
#ifdef Q_WS_WIN #ifdef Q_WS_WIN
@ -978,7 +978,7 @@ TQString KStandardDirs::findExe( const TQString& appname,
return TQString::null; return TQString::null;
} }
int KStandardDirs::findAllExe( TQStringList& list, const TQString& appname, int TDEStandardDirs::findAllExe( TQStringList& list, const TQString& appname,
const TQString& pstr, bool ignore ) const TQString& pstr, bool ignore )
{ {
#ifdef Q_WS_WIN #ifdef Q_WS_WIN
@ -1033,7 +1033,7 @@ static int tokenize( TQStringList& tokens, const TQString& str,
return tokens.count(); return tokens.count();
} }
TQString KStandardDirs::kde_default(const char *type) { TQString TDEStandardDirs::kde_default(const char *type) {
if (!strcmp(type, "data")) if (!strcmp(type, "data"))
return "share/apps/"; return "share/apps/";
if (!strcmp(type, "html-bundle")) if (!strcmp(type, "html-bundle"))
@ -1096,7 +1096,7 @@ TQString KStandardDirs::kde_default(const char *type) {
return TQString::null; return TQString::null;
} }
TQString KStandardDirs::saveLocation(const char *type, TQString TDEStandardDirs::saveLocation(const char *type,
const TQString& suffix, const TQString& suffix,
bool create) const bool create) const
{ {
@ -1127,7 +1127,7 @@ TQString KStandardDirs::saveLocation(const char *type,
else { else {
dirs = absolutes.find(type); dirs = absolutes.find(type);
if (!dirs) if (!dirs)
tqFatal("KStandardDirs: The resource type %s is not registered", type); tqFatal("TDEStandardDirs: The resource type %s is not registered", type);
pPath = new TQString(realPath(dirs->last())); pPath = new TQString(realPath(dirs->last()));
} }
@ -1151,7 +1151,7 @@ TQString KStandardDirs::saveLocation(const char *type,
return fullPath; return fullPath;
} }
TQString KStandardDirs::relativeLocation(const char *type, const TQString &absPath) TQString TDEStandardDirs::relativeLocation(const char *type, const TQString &absPath)
{ {
TQString fullPath = absPath; TQString fullPath = absPath;
int i = absPath.findRev('/'); int i = absPath.findRev('/');
@ -1173,7 +1173,7 @@ TQString KStandardDirs::relativeLocation(const char *type, const TQString &absPa
} }
bool KStandardDirs::makeDir(const TQString& dir, int mode) bool TDEStandardDirs::makeDir(const TQString& dir, int mode)
{ {
// we want an absolute path // we want an absolute path
if (TQDir::isRelativePath(dir)) if (TQDir::isRelativePath(dir))
@ -1254,9 +1254,9 @@ static TQString executablePrefix()
} }
#endif #endif
TQString KStandardDirs::kfsstnd_defaultprefix() TQString TDEStandardDirs::kfsstnd_defaultprefix()
{ {
KStandardDirsSingleton* s = KStandardDirsSingleton::self(); TDEStandardDirsSingleton* s = TDEStandardDirsSingleton::self();
if (!s->defaultprefix.isEmpty()) if (!s->defaultprefix.isEmpty())
return s->defaultprefix; return s->defaultprefix;
#ifdef Q_WS_WIN #ifdef Q_WS_WIN
@ -1269,14 +1269,14 @@ TQString KStandardDirs::kfsstnd_defaultprefix()
s->defaultprefix = TDEDIR; s->defaultprefix = TDEDIR;
#endif #endif
if (s->defaultprefix.isEmpty()) { if (s->defaultprefix.isEmpty()) {
fprintf(stderr, "KStandardDirs::kfsstnd_defaultprefix(): default TDE prefix not found!\n"); fprintf(stderr, "TDEStandardDirs::kfsstnd_defaultprefix(): default TDE prefix not found!\n");
} }
return s->defaultprefix; return s->defaultprefix;
} }
TQString KStandardDirs::kfsstnd_defaultbindir() TQString TDEStandardDirs::kfsstnd_defaultbindir()
{ {
KStandardDirsSingleton* s = KStandardDirsSingleton::self(); TDEStandardDirsSingleton* s = TDEStandardDirsSingleton::self();
if (!s->defaultbindir.isEmpty()) if (!s->defaultbindir.isEmpty())
return s->defaultbindir; return s->defaultbindir;
#ifdef Q_WS_WIN #ifdef Q_WS_WIN
@ -1287,12 +1287,12 @@ TQString KStandardDirs::kfsstnd_defaultbindir()
s->defaultbindir = kfsstnd_defaultprefix() + TQString::fromLatin1("/bin"); s->defaultbindir = kfsstnd_defaultprefix() + TQString::fromLatin1("/bin");
#endif #endif
if (s->defaultbindir.isEmpty()) { if (s->defaultbindir.isEmpty()) {
fprintf(stderr, "KStandardDirs::kfsstnd_defaultbindir(): default binary TDE dir not found!\n"); fprintf(stderr, "TDEStandardDirs::kfsstnd_defaultbindir(): default binary TDE dir not found!\n");
} }
return s->defaultbindir; return s->defaultbindir;
} }
void KStandardDirs::addKDEDefaults() void TDEStandardDirs::addKDEDefaults()
{ {
TQStringList tdedirList; TQStringList tdedirList;
@ -1459,10 +1459,10 @@ void KStandardDirs::addKDEDefaults()
addResourceDir("locale", "/usr/share/locale-langpack/", true); addResourceDir("locale", "/usr/share/locale-langpack/", true);
} }
void KStandardDirs::checkConfig() const void TDEStandardDirs::checkConfig() const
{ {
if (!addedCustoms && TDEGlobal::_instance && TDEGlobal::_instance->_config) if (!addedCustoms && TDEGlobal::_instance && TDEGlobal::_instance->_config)
const_cast<KStandardDirs*>(this)->addCustomized(TDEGlobal::_instance->_config); const_cast<TDEStandardDirs*>(this)->addCustomized(TDEGlobal::_instance->_config);
} }
static TQStringList lookupProfiles(const TQString &mapFile) static TQStringList lookupProfiles(const TQString &mapFile)
@ -1534,7 +1534,7 @@ static TQStringList lookupProfiles(const TQString &mapFile)
extern bool kde_kiosk_admin; extern bool kde_kiosk_admin;
bool KStandardDirs::addCustomized(TDEConfig *config) bool TDEStandardDirs::addCustomized(TDEConfig *config)
{ {
if (addedCustoms && !d->checkRestrictions) // there are already customized entries if (addedCustoms && !d->checkRestrictions) // there are already customized entries
return false; // we just quit and hope they are the right ones return false; // we just quit and hope they are the right ones
@ -1666,19 +1666,19 @@ bool KStandardDirs::addCustomized(TDEConfig *config)
return configDirsChanged; return configDirsChanged;
} }
TQString KStandardDirs::localtdedir() const TQString TDEStandardDirs::localtdedir() const
{ {
// Return the prefix to use for saving // Return the prefix to use for saving
return prefixes.first(); return prefixes.first();
} }
TQString KStandardDirs::localxdgdatadir() const TQString TDEStandardDirs::localxdgdatadir() const
{ {
// Return the prefix to use for saving // Return the prefix to use for saving
return d->xdgdata_prefixes.first(); return d->xdgdata_prefixes.first();
} }
TQString KStandardDirs::localxdgconfdir() const TQString TDEStandardDirs::localxdgconfdir() const
{ {
// Return the prefix to use for saving // Return the prefix to use for saving
return d->xdgconf_prefixes.first(); return d->xdgconf_prefixes.first();

@ -29,7 +29,7 @@
#include <kglobal.h> #include <kglobal.h>
class TDEConfig; class TDEConfig;
class KStandardDirsPrivate; class TDEStandardDirsPrivate;
/** /**
* @short Site-independent access to standard KDE directories. * @short Site-independent access to standard KDE directories.
@ -45,12 +45,12 @@ class KStandardDirsPrivate;
* and applications always refer to a file with a resource type * and applications always refer to a file with a resource type
* (e.g. icon) and a filename (e.g. khexdit.xpm). In an ideal world * (e.g. icon) and a filename (e.g. khexdit.xpm). In an ideal world
* the application would make no assumption where this file is and * the application would make no assumption where this file is and
* leave it up to KStandardDirs::findResource("apps", "Home.desktop") * leave it up to TDEStandardDirs::findResource("apps", "Home.desktop")
* to apply this knowledge to return /opt/kde/share/applnk/Home.desktop * to apply this knowledge to return /opt/kde/share/applnk/Home.desktop
* or ::locate("data", "kgame/background.jpg") to return * or ::locate("data", "kgame/background.jpg") to return
* /opt/kde/share/apps/kgame/background.jpg * /opt/kde/share/apps/kgame/background.jpg
* *
* The main idea behind KStandardDirs is that there are several * The main idea behind TDEStandardDirs is that there are several
* toplevel prefixes below which the files lie. One of these prefixes is * toplevel prefixes below which the files lie. One of these prefixes is
* the one where the user installed tdelibs, one is where the * the one where the user installed tdelibs, one is where the
* application was installed, and one is $HOME/.trinity, but there * application was installed, and one is $HOME/.trinity, but there
@ -61,7 +61,7 @@ class KStandardDirsPrivate;
* So the search algorithm basically appends to each prefix each registered * So the search algorithm basically appends to each prefix each registered
* suffix and tries to locate the file there. * suffix and tries to locate the file there.
* To make the thing even more complex, it's also possible to register * To make the thing even more complex, it's also possible to register
* absolute paths that KStandardDirs looks up after not finding anything * absolute paths that TDEStandardDirs looks up after not finding anything
* in the former steps. They can be useful if the user wants to provide * in the former steps. They can be useful if the user wants to provide
* specific directories that aren't in his $HOME/.trinity directory for, * specific directories that aren't in his $HOME/.trinity directory for,
* for example, icons. * for example, icons.
@ -97,13 +97,13 @@ class KStandardDirsPrivate;
* So while you had to ::locate("data", "appname/filename") so you can * So while you had to ::locate("data", "appname/filename") so you can
* also write ::locate("appdata", "filename") if your TDEApplication instance * also write ::locate("appdata", "filename") if your TDEApplication instance
* is called "appname" (as set via TDEApplication's constructor or TDEAboutData, if * is called "appname" (as set via TDEApplication's constructor or TDEAboutData, if
* you use the global KStandardDirs object TDEGlobal::dirs()). * you use the global TDEStandardDirs object TDEGlobal::dirs()).
* Please note though that you cannot use the "appdata" * Please note though that you cannot use the "appdata"
* type if you intend to use it in an applet for Kicker because 'appname' would * type if you intend to use it in an applet for Kicker because 'appname' would
* be "Kicker" instead of the applet's name. Therefore, for applets, you've got * be "Kicker" instead of the applet's name. Therefore, for applets, you've got
* to work around this by using ::locate("data", "appletname/filename"). * to work around this by using ::locate("data", "appletname/filename").
* *
* <b>KStandardDirs supports the following environment variables:</b> * <b>TDEStandardDirs supports the following environment variables:</b>
* *
* @li TDEDIRS: This may set an additional number of directory prefixes to * @li TDEDIRS: This may set an additional number of directory prefixes to
* search for resources. The directories should be separated * search for resources. The directories should be separated
@ -122,18 +122,18 @@ class KStandardDirsPrivate;
* *
* @see TDEGlobalSettings * @see TDEGlobalSettings
*/ */
class TDECORE_EXPORT KStandardDirs class TDECORE_EXPORT TDEStandardDirs
{ {
public: public:
/** /**
* KStandardDirs' constructor. It just initializes the caches. * TDEStandardDirs' constructor. It just initializes the caches.
**/ **/
KStandardDirs( ); TDEStandardDirs( );
/** /**
* KStandardDirs' destructor. * TDEStandardDirs' destructor.
*/ */
virtual ~KStandardDirs(); virtual ~TDEStandardDirs();
/** /**
* Adds another search dir to front of the @p fsstnd list. * Adds another search dir to front of the @p fsstnd list.
@ -211,7 +211,7 @@ public:
* *
* The filename should be a filename relative to the base dir * The filename should be a filename relative to the base dir
* for resources. So is a way to get the path to libtdecore.la * for resources. So is a way to get the path to libtdecore.la
* to findResource("lib", "libtdecore.la"). KStandardDirs will * to findResource("lib", "libtdecore.la"). TDEStandardDirs will
* then look into the subdir lib of all elements of all prefixes * then look into the subdir lib of all elements of all prefixes
* ($TDEDIRS) for a file libtdecore.la and return the path to * ($TDEDIRS) for a file libtdecore.la and return the path to
* the first one it finds (e.g. /opt/kde/lib/libtdecore.la) * the first one it finds (e.g. /opt/kde/lib/libtdecore.la)
@ -443,7 +443,7 @@ public:
TQStringList resourceDirs(const char *type) const; TQStringList resourceDirs(const char *type) const;
/** /**
* This function will return a list of all the types that KStandardDirs * This function will return a list of all the types that TDEStandardDirs
* supports. * supports.
* *
* @return All types that KDE supports * @return All types that KDE supports
@ -545,7 +545,7 @@ public:
TQString kfsstnd_xdg_data_prefixes(); TQString kfsstnd_xdg_data_prefixes();
/** /**
* Returns the toplevel directory in which KStandardDirs * Returns the toplevel directory in which TDEStandardDirs
* will store things. Most likely $HOME/.trinity * will store things. Most likely $HOME/.trinity
* Don't use this function if you can use locateLocal * Don't use this function if you can use locateLocal
* @return the toplevel directory * @return the toplevel directory
@ -617,13 +617,13 @@ public:
mutable TQDict<TQString> savelocations; mutable TQDict<TQString> savelocations;
// Disallow assignment and copy-construction // Disallow assignment and copy-construction
KStandardDirs( const KStandardDirs& ); TDEStandardDirs( const TDEStandardDirs& );
KStandardDirs& operator= ( const KStandardDirs& ); TDEStandardDirs& operator= ( const TDEStandardDirs& );
bool addedCustoms; bool addedCustoms;
class KStandardDirsPrivate; class TDEStandardDirsPrivate;
KStandardDirsPrivate *d; TDEStandardDirsPrivate *d;
void checkConfig() const; void checkConfig() const;
void applyDataRestrictions(const TQString &) const; void applyDataRestrictions(const TQString &) const;
@ -696,14 +696,14 @@ public:
**/ **/
/*! /*!
* \relates KStandardDirs * \relates TDEStandardDirs
* This function is just for convenience. It simply calls * This function is just for convenience. It simply calls
*instance->dirs()->\link KStandardDirs::findResource() findResource\endlink(type, filename). *instance->dirs()->\link TDEStandardDirs::findResource() findResource\endlink(type, filename).
**/ **/
TDECORE_EXPORT TQString locate( const char *type, const TQString& filename, const TDEInstance* instance = TDEGlobal::instance() ); TDECORE_EXPORT TQString locate( const char *type, const TQString& filename, const TDEInstance* instance = TDEGlobal::instance() );
/*! /*!
* \relates KStandardDirs * \relates TDEStandardDirs
* This function is much like locate. However it returns a * This function is much like locate. However it returns a
* filename suitable for writing to. No check is made if the * filename suitable for writing to. No check is made if the
* specified filename actually exists. Missing directories * specified filename actually exists. Missing directories
@ -714,7 +714,7 @@ TDECORE_EXPORT TQString locate( const char *type, const TQString& filename, cons
TDECORE_EXPORT TQString locateLocal( const char *type, const TQString& filename, const TDEInstance* instance = TDEGlobal::instance() ); TDECORE_EXPORT TQString locateLocal( const char *type, const TQString& filename, const TDEInstance* instance = TDEGlobal::instance() );
/*! /*!
* \relates KStandardDirs * \relates TDEStandardDirs
* This function is much like locate. No check is made if the * This function is much like locate. No check is made if the
* specified filename actually exists. Missing directories * specified filename actually exists. Missing directories
* are created if @p createDir is true. If filename is only * are created if @p createDir is true. If filename is only

@ -45,7 +45,7 @@ class KTempDirPrivate;
* *
* KTempFile does not create any missing directories, but locateLocal() does. * KTempFile does not create any missing directories, but locateLocal() does.
* *
* See also KStandardDirs * See also TDEStandardDirs
* *
* @since 3.2 * @since 3.2
* @author Joseph Wenninger <jowenn@kde.org> * @author Joseph Wenninger <jowenn@kde.org>

@ -48,7 +48,7 @@ class KTempFilePrivate;
* *
* KTempFile does not create any missing directories, but locateLocal() does. * KTempFile does not create any missing directories, but locateLocal() does.
* *
* See also KStandardDirs * See also TDEStandardDirs
* *
* @author Waldo Bastian <bastian@kde.org> * @author Waldo Bastian <bastian@kde.org>
*/ */

@ -317,7 +317,7 @@ namespace
{ {
if (herrno) if (herrno)
{ {
tqDebug("KStandardWorker::processResults: got error %d", herrno); tqDebug("TDEStandardWorker::processResults: got error %d", herrno);
switch (herrno) switch (herrno)
{ {
case HOST_NOT_FOUND: case HOST_NOT_FOUND:
@ -368,9 +368,9 @@ namespace
{ {
sa.setHost(KIpAddress(he->h_addr_list[i], he->h_addrtype == AF_INET ? 4 : 6)); sa.setHost(KIpAddress(he->h_addr_list[i], he->h_addrtype == AF_INET ? 4 : 6));
results.prepend(KResolverEntry(sa, socktype, proto, canon, m_hostname)); results.prepend(KResolverEntry(sa, socktype, proto, canon, m_hostname));
// tqDebug("KStandardWorker::processResults: adding %s", sa.toString().latin1()); // tqDebug("TDEStandardWorker::processResults: adding %s", sa.toString().latin1());
} }
// tqDebug("KStandardWorker::processResults: added %d entries", i); // tqDebug("TDEStandardWorker::processResults: added %d entries", i);
} }
#else // HAVE_GETADDRINFO #else // HAVE_GETADDRINFO
@ -540,7 +540,7 @@ namespace
#endif // HAVE_GETADDRINFO #endif // HAVE_GETADDRINFO
} // namespace } // namespace
bool KStandardWorker::sanityCheck() bool TDEStandardWorker::sanityCheck()
{ {
// check that the requested values are sensible // check that the requested values are sensible
@ -580,7 +580,7 @@ bool KStandardWorker::sanityCheck()
return true; // it's sane return true; // it's sane
} }
bool KStandardWorker::resolveScopeId() bool TDEStandardWorker::resolveScopeId()
{ {
// we must test the original name, not the encoded one // we must test the original name, not the encoded one
scopeid = 0; scopeid = 0;
@ -606,7 +606,7 @@ bool KStandardWorker::resolveScopeId()
return true; return true;
} }
bool KStandardWorker::resolveService() bool TDEStandardWorker::resolveService()
{ {
// find the service first // find the service first
bool ok; bool ok;
@ -656,7 +656,7 @@ bool KStandardWorker::resolveService()
return true; return true;
} }
KResolver::ErrorCodes KStandardWorker::addUnix() KResolver::ErrorCodes TDEStandardWorker::addUnix()
{ {
// before trying to add, see if the user wants Unix sockets // before trying to add, see if the user wants Unix sockets
if ((familyMask() & KResolver::UnixFamily) == 0) if ((familyMask() & KResolver::UnixFamily) == 0)
@ -691,7 +691,7 @@ KResolver::ErrorCodes KStandardWorker::addUnix()
return KResolver::NoError; return KResolver::NoError;
} }
bool KStandardWorker::resolveNumerically() bool TDEStandardWorker::resolveNumerically()
{ {
// if the NoResolve flag is active, our result from this point forward // if the NoResolve flag is active, our result from this point forward
// will always be true, even if the resolution failed. // will always be true, even if the resolution failed.
@ -793,7 +793,7 @@ bool KStandardWorker::resolveNumerically()
return ok || (flags() & KResolver::NoResolve); return ok || (flags() & KResolver::NoResolve);
} }
bool KStandardWorker::preprocess() bool TDEStandardWorker::preprocess()
{ {
// check sanity // check sanity
if (!sanityCheck()) if (!sanityCheck())
@ -841,7 +841,7 @@ bool KStandardWorker::preprocess()
return true; // it's ok return true; // it's ok
} }
bool KStandardWorker::run() bool TDEStandardWorker::run()
{ {
#ifndef HAVE_GETADDRINFO #ifndef HAVE_GETADDRINFO
// check the scope id first // check the scope id first
@ -900,7 +900,7 @@ bool KStandardWorker::run()
return true; return true;
} }
bool KStandardWorker::postprocess() bool TDEStandardWorker::postprocess()
{ {
if (results.count()) if (results.count())
return true; // no need return true; // no need
@ -1020,7 +1020,7 @@ bool KGetAddrinfoWorker::wantThis(int family)
void KNetwork::Internal::initStandardWorkers() void KNetwork::Internal::initStandardWorkers()
{ {
//KResolverWorkerFactoryBase::registerNewWorker(new KResolverWorkerFactory<KBlacklistWorker>); //KResolverWorkerFactoryBase::registerNewWorker(new KResolverWorkerFactory<KBlacklistWorker>);
KResolverWorkerFactoryBase::registerNewWorker(new KResolverWorkerFactory<KStandardWorker>); KResolverWorkerFactoryBase::registerNewWorker(new KResolverWorkerFactory<TDEStandardWorker>);
#ifdef HAVE_GETADDRINFO #ifdef HAVE_GETADDRINFO
KResolverWorkerFactoryBase::registerNewWorker(new KResolverWorkerFactory<KGetAddrinfoWorker>); KResolverWorkerFactoryBase::registerNewWorker(new KResolverWorkerFactory<KGetAddrinfoWorker>);

@ -62,7 +62,7 @@ namespace KNetwork { namespace Internal
/** @internal /** @internal
* Standard worker. * Standard worker.
*/ */
class KStandardWorker: public KNetwork::KResolverWorkerBase class TDEStandardWorker: public KNetwork::KResolverWorkerBase
{ {
protected: protected:
mutable TQCString m_encodedName; mutable TQCString m_encodedName;
@ -90,7 +90,7 @@ namespace KNetwork { namespace Internal
* *
* This class does not do post-processing. * This class does not do post-processing.
*/ */
class KGetAddrinfoWorker: public KStandardWorker class KGetAddrinfoWorker: public TDEStandardWorker
{ {
public: public:
KGetAddrinfoWorker() KGetAddrinfoWorker()

@ -63,7 +63,7 @@ TDEConfig::TDEConfig( const TQString& fileName,
// read initial information off disk // read initial information off disk
reparseConfiguration(); reparseConfiguration();
// we let KStandardDirs add custom user config files. It will do // we let TDEStandardDirs add custom user config files. It will do
// this only once. So only the first call ever to this constructor // this only once. So only the first call ever to this constructor
// will anything else than return here We have to reparse here as // will anything else than return here We have to reparse here as
// configuration files may appear after customized directories have // configuration files may appear after customized directories have

@ -57,7 +57,7 @@ public:
* object will automatically become read-only if either the user does not have * object will automatically become read-only if either the user does not have
* write permission to @p fileName or if no file was specified. * write permission to @p fileName or if no file was specified.
* @param bUseKDEGlobals Toggle reading the global KDE configuration file. * @param bUseKDEGlobals Toggle reading the global KDE configuration file.
* @param resType the place to look in (config, data, etc) See KStandardDirs. * @param resType the place to look in (config, data, etc) See TDEStandardDirs.
*/ */
TDEConfig( const TQString& fileName = TQString::null, TDEConfig( const TQString& fileName = TQString::null,
bool bReadOnly = false, bool bUseKDEGlobals = true, const char *resType="config"); bool bReadOnly = false, bool bUseKDEGlobals = true, const char *resType="config");

@ -333,7 +333,7 @@ bool TDEConfigINIBackEnd::parseConfigFiles()
KURL path; KURL path;
path.setPath(mLocalFileName); path.setPath(mLocalFileName);
TQString dir=path.directory(); TQString dir=path.directory();
KStandardDirs::makeDir(dir); TDEStandardDirs::makeDir(dir);
if (checkAccess(mLocalFileName, W_OK)) if (checkAccess(mLocalFileName, W_OK))
{ {
@ -806,7 +806,7 @@ void TDEConfigINIBackEnd::sync(bool bMerge)
KURL path; KURL path;
path.setPath(mLocalFileName); path.setPath(mLocalFileName);
TQString dir=path.directory(); TQString dir=path.directory();
KStandardDirs::makeDir(dir); TDEStandardDirs::makeDir(dir);
} }
// Can we allow the write? We can, if the program // Can we allow the write? We can, if the program
@ -1177,7 +1177,7 @@ bool TDEConfigBackEnd::checkConfigFilesWritable(bool warnUser)
{ {
// Note: We don't ask the user if we should not ask this question again because we can't save the answer. // Note: We don't ask the user if we should not ask this question again because we can't save the answer.
errorMsg += i18n("Please contact your system administrator."); errorMsg += i18n("Please contact your system administrator.");
TQString cmdToExec = KStandardDirs::findExe(TQString("kdialog")); TQString cmdToExec = TDEStandardDirs::findExe(TQString("kdialog"));
TDEApplication *app = kapp; TDEApplication *app = kapp;
if (!cmdToExec.isEmpty() && app) if (!cmdToExec.isEmpty() && app)
{ {

@ -2764,7 +2764,7 @@ TDEDiskDeviceType::TDEDiskDeviceType classifyDiskType(udev_device* dev, const TQ
return disktype; return disktype;
} }
// KStandardDirs::kde_default // TDEStandardDirs::kde_default
typedef TQMap<TQString, TQString> TDEConfigMap; typedef TQMap<TQString, TQString> TDEConfigMap;

@ -136,7 +136,7 @@ public:
/** /**
* When you receive a "databaseChanged" signal, you can query here if * When you receive a "databaseChanged" signal, you can query here if
* a change has occurred in a specific resource type. * a change has occurred in a specific resource type.
* @see KStandardDirs for the various resource types. * @see TDEStandardDirs for the various resource types.
*/ */
static bool isChanged(const char *type); static bool isChanged(const char *type);

@ -7,7 +7,7 @@
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
TDEApplication a(argc, argv, "whatever", false); TDEApplication a(argc, argv, "whatever", false);
KStandardDirs t; TDEStandardDirs t;
TDEConfig config; // to add custom entries - a bit tricky :/ TDEConfig config; // to add custom entries - a bit tricky :/
TQStringList list; TQStringList list;

@ -883,7 +883,7 @@ void TDEHTMLPopupGUIClient::saveURL( const KURL &url, const KURL &destURL,
{ {
// then find the download manager location // then find the download manager location
kdDebug(1000) << "Using: "<<downloadManger <<" as Download Manager" <<endl; kdDebug(1000) << "Using: "<<downloadManger <<" as Download Manager" <<endl;
TQString cmd = KStandardDirs::findExe(downloadManger); TQString cmd = TDEStandardDirs::findExe(downloadManger);
if (cmd.isEmpty()) if (cmd.isEmpty())
{ {
TQString errMsg=i18n("The Download Manager (%1) could not be found in your $PATH ").arg(downloadManger); TQString errMsg=i18n("The Download Manager (%1) could not be found in your $PATH ").arg(downloadManger);

@ -479,7 +479,7 @@ int main(int argc, char *argv[])
if (args->isSet("xvfb")) if (args->isSet("xvfb"))
{ {
TQString xvfbPath = KStandardDirs::findExe("Xvfb"); TQString xvfbPath = TDEStandardDirs::findExe("Xvfb");
if ( xvfbPath.isEmpty() ) { if ( xvfbPath.isEmpty() ) {
fprintf( stderr, "[test_regression] ERROR: We need Xvfb to be installed for reliable results\n" ); fprintf( stderr, "[test_regression] ERROR: We need Xvfb to be installed for reliable results\n" );
exit( 1 ); exit( 1 );

@ -93,7 +93,7 @@ public:
KSSLCertificate::KSSLCertificate() { KSSLCertificate::KSSLCertificate() {
d = new KSSLCertificatePrivate; d = new KSSLCertificatePrivate;
d->m_stateCached = false; d->m_stateCached = false;
TDEGlobal::dirs()->addResourceType("kssl", KStandardDirs::kde_default("data") + "kssl"); TDEGlobal::dirs()->addResourceType("kssl", TDEStandardDirs::kde_default("data") + "kssl");
#ifdef KSSL_HAVE_SSL #ifdef KSSL_HAVE_SSL
d->m_cert = NULL; d->m_cert = NULL;
#endif #endif
@ -103,7 +103,7 @@ KSSLCertificate::KSSLCertificate() {
KSSLCertificate::KSSLCertificate(const KSSLCertificate& x) { KSSLCertificate::KSSLCertificate(const KSSLCertificate& x) {
d = new KSSLCertificatePrivate; d = new KSSLCertificatePrivate;
d->m_stateCached = false; d->m_stateCached = false;
TDEGlobal::dirs()->addResourceType("kssl", KStandardDirs::kde_default("data") + "kssl"); TDEGlobal::dirs()->addResourceType("kssl", TDEStandardDirs::kde_default("data") + "kssl");
#ifdef KSSL_HAVE_SSL #ifdef KSSL_HAVE_SSL
d->m_cert = NULL; d->m_cert = NULL;
setCert(KOSSL::self()->X509_dup(const_cast<KSSLCertificate&>(x).getCert())); setCert(KOSSL::self()->X509_dup(const_cast<KSSLCertificate&>(x).getCert()));

@ -166,7 +166,7 @@ int KSSLKeyGen::generateCSR(const TQString& name, const TQString& pass, int bits
// back from there. Yes it's inefficient, but it doesn't happen // back from there. Yes it's inefficient, but it doesn't happen
// often and this way things are uniform. // often and this way things are uniform.
TDEGlobal::dirs()->addResourceType("kssl", KStandardDirs::kde_default("data") + "kssl"); TDEGlobal::dirs()->addResourceType("kssl", TDEStandardDirs::kde_default("data") + "kssl");
TQString path = TDEGlobal::dirs()->saveLocation("kssl"); TQString path = TDEGlobal::dirs()->saveLocation("kssl");
KTempFile csrFile(path + "csr_", ".der"); KTempFile csrFile(path + "csr_", ".der");

@ -98,7 +98,7 @@ KSSLSettings::KSSLSettings(bool readConfig) {
d = new KSSLSettingsPrivate; d = new KSSLSettingsPrivate;
m_cfg = new TDEConfig("cryptodefaults", false, false); m_cfg = new TDEConfig("cryptodefaults", false, false);
if (!TDEGlobal::dirs()->addResourceType("kssl", KStandardDirs::kde_default("data") + "kssl")) { if (!TDEGlobal::dirs()->addResourceType("kssl", TDEStandardDirs::kde_default("data") + "kssl")) {
//kdDebug(7029) << "Error adding (kssl, share/apps/kssl)" << endl; //kdDebug(7029) << "Error adding (kssl, share/apps/kssl)" << endl;
} }

@ -117,7 +117,7 @@ KSSLD::KSSLD(const TQCString &name) : KDEDModule(name)
if (2 != cfg->readNumEntry("policies version", 0)) { if (2 != cfg->readNumEntry("policies version", 0)) {
::updatePoliciesConfig(cfg); ::updatePoliciesConfig(cfg);
} }
TDEGlobal::dirs()->addResourceType("kssl", KStandardDirs::kde_default("data") + "kssl"); TDEGlobal::dirs()->addResourceType("kssl", TDEStandardDirs::kde_default("data") + "kssl");
caVerifyUpdate(); caVerifyUpdate();
cacheLoadDefaultPolicies(); cacheLoadDefaultPolicies();
certList.setAutoDelete(false); certList.setAutoDelete(false);

@ -374,7 +374,7 @@ Application * KNotifyWidget::addApplicationEvents( const TQString& path )
kdDebug() << "**** knotify: adding path: " << path << endl; kdDebug() << "**** knotify: adding path: " << path << endl;
TQString relativePath = path; TQString relativePath = path;
if ( path.at(0) == '/' && KStandardDirs::exists( path ) ) if ( path.at(0) == '/' && TDEStandardDirs::exists( path ) )
relativePath = makeRelative( path ); relativePath = makeRelative( path );
if ( !relativePath.isEmpty() ) if ( !relativePath.isEmpty() )

@ -41,7 +41,7 @@ KFileBookmarkHandler::KFileBookmarkHandler( KFileDialog *dialog )
KBookmarkManager *manager = KBookmarkManager::managerForFile( file, false); KBookmarkManager *manager = KBookmarkManager::managerForFile( file, false);
// 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, manager ); importOldBookmarks( oldFile, manager );

@ -237,7 +237,7 @@ void KFileSharePropsPlugin::slotConfigureFileSharing()
if (d->m_configProc) return; if (d->m_configProc) return;
d->m_configProc = new TDEProcess(this); d->m_configProc = new TDEProcess(this);
(*d->m_configProc) << KStandardDirs::findExe("tdesu") << locate("exe", "tdecmshell") << "fileshare"; (*d->m_configProc) << TDEStandardDirs::findExe("tdesu") << locate("exe", "tdecmshell") << "fileshare";
if (!d->m_configProc->start( TDEProcess::NotifyOnExit )) if (!d->m_configProc->start( TDEProcess::NotifyOnExit ))
{ {
delete d->m_configProc; delete d->m_configProc;

@ -528,7 +528,7 @@ public:
tmpDirs << TQString::fromLatin1("/tmp"); // default value tmpDirs << TQString::fromLatin1("/tmp"); // default value
// The trick is that we also don't want the user to override globally set // The trick is that we also don't want the user to override globally set
// directories. So we have to misuse KStandardDirs :} // directories. So we have to misuse TDEStandardDirs :}
TQStringList confDirs = TDEGlobal::dirs()->resourceDirs( "config" ); TQStringList confDirs = TDEGlobal::dirs()->resourceDirs( "config" );
if ( !confDirs.isEmpty() ) if ( !confDirs.isEmpty() )
{ {

@ -79,7 +79,7 @@ void KMimeType::buildDefaultType()
else else
{ {
errorMissingMimeType( defaultMimeType() ); errorMissingMimeType( defaultMimeType() );
KStandardDirs stdDirs; TDEStandardDirs stdDirs;
TQString sDefaultMimeType = stdDirs.resourceDirs("mime").first()+defaultMimeType()+".desktop"; TQString sDefaultMimeType = stdDirs.resourceDirs("mime").first()+defaultMimeType()+".desktop";
s_pDefaultType = new KMimeType( sDefaultMimeType, defaultMimeType(), s_pDefaultType = new KMimeType( sDefaultMimeType, defaultMimeType(),
"unknown", "mime", TQStringList() ); "unknown", "mime", TQStringList() );
@ -605,9 +605,9 @@ TQString KFolderType::icon( const KURL& _url, bool _is_local ) const
u.addPath( ".directory" ); u.addPath( ".directory" );
TQString icon; TQString icon;
// 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() ) )
{ {
KSimpleConfig cfg( u.path(), true ); KSimpleConfig cfg( u.path(), true );
cfg.setDesktopGroup(); cfg.setDesktopGroup();
@ -985,7 +985,7 @@ TQValueList<KDEDesktopMimeType::Service> KDEDesktopMimeType::userDefinedServices
if ( cfg.hasKey( "TryExec" ) ) if ( cfg.hasKey( "TryExec" ) )
{ {
TQString tryexec = cfg.readPathEntry( "TryExec" ); TQString tryexec = cfg.readPathEntry( "TryExec" );
TQString exe = KStandardDirs::findExe( tryexec ); TQString exe = TDEStandardDirs::findExe( tryexec );
if (exe.isEmpty()) { if (exe.isEmpty()) {
return result; return result;
} }

@ -1549,7 +1549,7 @@ TDEProcessRunner::slotProcessExited(TDEProcess * p)
// We can't just rely on that, but it's a good hint. // We can't just rely on that, but it's a good hint.
// Before assuming its really so, we'll try to find the binName // Before assuming its really so, we'll try to find the binName
// relatively to current directory, and then in the PATH. // relatively to current directory, and then in the PATH.
if ( !TQFile( binName ).exists() && KStandardDirs::findExe( binName ).isEmpty() ) if ( !TQFile( binName ).exists() && TDEStandardDirs::findExe( binName ).isEmpty() )
{ {
kapp->ref(); kapp->ref();
KMessageBox::sorry( 0L, i18n("Could not find the program '%1'").arg( binName ) ); KMessageBox::sorry( 0L, i18n("Could not find the program '%1'").arg( binName ) );

@ -202,10 +202,10 @@ KService::init( KDesktopFile *config )
} else if (config->readBoolEntry("X-TDE-SubstituteUID")) { } else if (config->readBoolEntry("X-TDE-SubstituteUID")) {
int space = m_strExec.find(" "); int space = m_strExec.find(" ");
if (space==-1) if (space==-1)
m_strExec = KStandardDirs::findExe(m_strExec); m_strExec = TDEStandardDirs::findExe(m_strExec);
else { else {
const TQString command = m_strExec.left(space); const TQString command = m_strExec.left(space);
m_strExec.replace(command,KStandardDirs::findExe(command)); m_strExec.replace(command,TDEStandardDirs::findExe(command));
} }
} }

@ -253,7 +253,7 @@ void PreviewJob::startPreview()
if (d->width <= 128 && d->height <= 128) d->cacheWidth = d->cacheHeight = 128; if (d->width <= 128 && d->height <= 128) d->cacheWidth = d->cacheHeight = 128;
else d->cacheWidth = d->cacheHeight = 256; else d->cacheWidth = d->cacheHeight = 256;
d->thumbPath = d->thumbRoot + (d->cacheWidth == 128 ? "normal/" : "large/"); d->thumbPath = d->thumbRoot + (d->cacheWidth == 128 ? "normal/" : "large/");
KStandardDirs::makeDir(d->thumbPath, 0700); TDEStandardDirs::makeDir(d->thumbPath, 0700);
} }
else else
d->bSave = false; d->bSave = false;

@ -242,7 +242,7 @@ TQString KFileShare::findExe( const char* exeName )
{ {
// /usr/sbin on Mandrake, $PATH allows flexibility for other distributions // /usr/sbin on Mandrake, $PATH allows flexibility for other distributions
TQString path = TQString::fromLocal8Bit(getenv("PATH")) + TQString::fromLatin1(":/usr/sbin"); TQString path = TQString::fromLocal8Bit(getenv("PATH")) + TQString::fromLatin1(":/usr/sbin");
TQString exe = KStandardDirs::findExe( exeName, path ); TQString exe = TDEStandardDirs::findExe( exeName, path );
if (exe.isEmpty()) if (exe.isEmpty())
kdError() << exeName << " not found in " << path << endl; kdError() << exeName << " not found in " << path << endl;
return exe; return exe;

@ -305,11 +305,11 @@ int main(int argc, char **argv)
} }
filter( "$TDEHOME/share", tdehome+"/share", KURIFilterData::LOCAL_DIR ); filter( "$TDEHOME/share", tdehome+"/share", KURIFilterData::LOCAL_DIR );
KStandardDirs::makeDir( tdehome+"/a+plus" ); TDEStandardDirs::makeDir( tdehome+"/a+plus" );
filter( "$TDEHOME/a+plus", tdehome+"/a+plus", KURIFilterData::LOCAL_DIR ); filter( "$TDEHOME/a+plus", tdehome+"/a+plus", KURIFilterData::LOCAL_DIR );
// BR 27788 // BR 27788
KStandardDirs::makeDir( tdehome+"/share/Dir With Space" ); TDEStandardDirs::makeDir( tdehome+"/share/Dir With Space" );
filter( "$TDEHOME/share/Dir With Space", tdehome+"/share/Dir With Space", KURIFilterData::LOCAL_DIR ); filter( "$TDEHOME/share/Dir With Space", tdehome+"/share/Dir With Space", KURIFilterData::LOCAL_DIR );
// support for name filters (BR 93825) // support for name filters (BR 93825)
@ -318,11 +318,11 @@ int main(int argc, char **argv)
filter( "$TDEHOME/a?c.txt", tdehome+"/a?c.txt", KURIFilterData::LOCAL_DIR ); filter( "$TDEHOME/a?c.txt", tdehome+"/a?c.txt", KURIFilterData::LOCAL_DIR );
filter( "$TDEHOME/?c.txt", tdehome+"/?c.txt", KURIFilterData::LOCAL_DIR ); filter( "$TDEHOME/?c.txt", tdehome+"/?c.txt", KURIFilterData::LOCAL_DIR );
// but let's check that a directory with * in the name still works // but let's check that a directory with * in the name still works
KStandardDirs::makeDir( tdehome+"/share/Dir*With*Stars" ); TDEStandardDirs::makeDir( tdehome+"/share/Dir*With*Stars" );
filter( "$TDEHOME/share/Dir*With*Stars", tdehome+"/share/Dir*With*Stars", KURIFilterData::LOCAL_DIR ); filter( "$TDEHOME/share/Dir*With*Stars", tdehome+"/share/Dir*With*Stars", KURIFilterData::LOCAL_DIR );
KStandardDirs::makeDir( tdehome+"/share/Dir?QuestionMark" ); TDEStandardDirs::makeDir( tdehome+"/share/Dir?QuestionMark" );
filter( "$TDEHOME/share/Dir?QuestionMark", tdehome+"/share/Dir?QuestionMark", KURIFilterData::LOCAL_DIR ); filter( "$TDEHOME/share/Dir?QuestionMark", tdehome+"/share/Dir?QuestionMark", KURIFilterData::LOCAL_DIR );
KStandardDirs::makeDir( tdehome+"/share/Dir[Bracket" ); TDEStandardDirs::makeDir( tdehome+"/share/Dir[Bracket" );
filter( "$TDEHOME/share/Dir[Bracket", tdehome+"/share/Dir[Bracket", KURIFilterData::LOCAL_DIR ); filter( "$TDEHOME/share/Dir[Bracket", tdehome+"/share/Dir[Bracket", KURIFilterData::LOCAL_DIR );
filter( "$HOME/$TDEDIR/tdebase/kcontrol/ebrowsing", 0, KURIFilterData::ERROR ); filter( "$HOME/$TDEDIR/tdebase/kcontrol/ebrowsing", 0, KURIFilterData::ERROR );

@ -194,7 +194,7 @@ int main(int argc, char *argv[])
// //
debug("\nTrying findByURL for $TDEDIR/bin/kdesktop"); debug("\nTrying findByURL for $TDEDIR/bin/kdesktop");
KMimeType::Ptr mf = KMimeType::findByURL( KStandardDirs::findExe( "kdesktop" ), 0, KMimeType::Ptr mf = KMimeType::findByURL( TDEStandardDirs::findExe( "kdesktop" ), 0,
true, false ); true, false );
assert( mf ); assert( mf );
check( "A binary's mimetype", mf->name(), "application/x-executable" ); check( "A binary's mimetype", mf->name(), "application/x-executable" );

@ -1677,7 +1677,7 @@ bool FileProtocol::pmount(const TQString &dev)
bool FileProtocol::pumount(const TQString &point) bool FileProtocol::pumount(const TQString &point)
{ {
TQString real_point = KStandardDirs::realPath(point); TQString real_point = TDEStandardDirs::realPath(point);
KMountPoint::List mtab = KMountPoint::currentMountPoints(); KMountPoint::List mtab = KMountPoint::currentMountPoints();
@ -1690,10 +1690,10 @@ bool FileProtocol::pumount(const TQString &point)
{ {
TQString tmp = (*it)->mountedFrom(); TQString tmp = (*it)->mountedFrom();
TQString mp = (*it)->mountPoint(); TQString mp = (*it)->mountPoint();
mp = KStandardDirs::realPath(mp); mp = TDEStandardDirs::realPath(mp);
if (mp==real_point) if (mp==real_point)
dev = KStandardDirs::realPath(tmp); dev = TDEStandardDirs::realPath(tmp);
} }
if (dev.isEmpty()) return false; if (dev.isEmpty()) return false;

@ -384,7 +384,7 @@ void BrowserRun::simpleSave( const KURL & url, const TQString & suggestedFilenam
{ {
// then find the download manager location // then find the download manager location
kdDebug(1000) << "Using: "<<downloadManger <<" as Download Manager" <<endl; kdDebug(1000) << "Using: "<<downloadManger <<" as Download Manager" <<endl;
TQString cmd=KStandardDirs::findExe(downloadManger); TQString cmd=TDEStandardDirs::findExe(downloadManger);
if (cmd.isEmpty()) if (cmd.isEmpty())
{ {
TQString errMsg=i18n("The Download Manager (%1) could not be found in your $PATH ").arg(downloadManger); TQString errMsg=i18n("The Download Manager (%1) could not be found in your $PATH ").arg(downloadManger);

@ -78,7 +78,7 @@ namespace KParts
* *
* For advanced use you can also inherit from the template and re-implement additionally the * For advanced use you can also inherit from the template and re-implement additionally the
* virtual TDEInstance *createInstance() method, for example in case you want to extend the * virtual TDEInstance *createInstance() method, for example in case you want to extend the
* paths of your instance's KStandardDirs object. * paths of your instance's TDEStandardDirs object.
* *
* If a KParts::ReadOnlyPart is requested through this factory and the template argument * If a KParts::ReadOnlyPart is requested through this factory and the template argument
* implements a KParts::ReadWritePart then setReadWrite( false ) will automatically be * implements a KParts::ReadWritePart then setReadWrite( false ) will automatically be

@ -113,7 +113,7 @@ void PartBase::setInstance( TDEInstance *inst, bool bLoadPlugins )
TDEGlobal::locale()->insertCatalogue( inst->instanceName() ); TDEGlobal::locale()->insertCatalogue( inst->instanceName() );
// install 'instancename'data resource type // install 'instancename'data resource type
TDEGlobal::dirs()->addResourceType( inst->instanceName() + "data", TDEGlobal::dirs()->addResourceType( inst->instanceName() + "data",
KStandardDirs::kde_default( "data" ) TDEStandardDirs::kde_default( "data" )
+ TQString::fromLatin1( inst->instanceName() ) + '/' ); + TQString::fromLatin1( inst->instanceName() ) + '/' );
if ( bLoadPlugins ) if ( bLoadPlugins )
loadPlugins( m_obj, this, instance() ); loadPlugins( m_obj, this, instance() );

@ -628,7 +628,7 @@ DrMain* KMCupsManager::loadMaticDriver(const TQString& drname)
TQStringList comps = TQStringList::split('/', drname, false); TQStringList comps = TQStringList::split('/', drname, false);
TQString tmpFile = locateLocal("tmp", "foomatic_" + kapp->randomString(8)); TQString tmpFile = locateLocal("tmp", "foomatic_" + kapp->randomString(8));
TQString PATH = getenv("PATH") + TQString::fromLatin1(":/usr/sbin:/usr/local/sbin:/opt/sbin:/opt/local/sbin"); TQString PATH = getenv("PATH") + TQString::fromLatin1(":/usr/sbin:/usr/local/sbin:/opt/sbin:/opt/local/sbin");
TQString exe = KStandardDirs::findExe("foomatic-datafile", PATH); TQString exe = TDEStandardDirs::findExe("foomatic-datafile", PATH);
if (exe.isEmpty()) if (exe.isEmpty())
{ {
setErrorMsg(i18n("Unable to find the executable foomatic-datafile " setErrorMsg(i18n("Unable to find the executable foomatic-datafile "

@ -35,7 +35,7 @@ KFoomaticPrinterImpl::~KFoomaticPrinterImpl()
// look for executable // look for executable
TQString KFoomaticPrinterImpl::executable() TQString KFoomaticPrinterImpl::executable()
{ {
QString exe = KStandardDirs::findExe("foomatic-printjob"); QString exe = TDEStandardDirs::findExe("foomatic-printjob");
return exe; return exe;
} }

@ -297,7 +297,7 @@ void KMVirtualManager::triggerSave()
QString filename; QString filename;
if (getuid() == 0) if (getuid() == 0)
{ {
if (KStandardDirs::makeDir(TQFile::decodeName("/etc/cups"))) if (TDEStandardDirs::makeDir(TQFile::decodeName("/etc/cups")))
filename = TQFile::decodeName("/etc/cups/lpoptions"); filename = TQFile::decodeName("/etc/cups/lpoptions");
} }
else else

@ -273,7 +273,7 @@ bool KPrintPreview::preview(const TQString& file, bool previewOnly, WId parentId
if (externalPreview && isPS ) if (externalPreview && isPS )
{ {
exe = conf->readPathEntry("PreviewCommand", "gv"); exe = conf->readPathEntry("PreviewCommand", "gv");
if (KStandardDirs::findExe(exe).isEmpty()) if (TDEStandardDirs::findExe(exe).isEmpty())
{ {
QString msg = i18n("The preview program %1 cannot be found. " QString msg = i18n("The preview program %1 cannot be found. "
"Check that the program is correctly installed and " "Check that the program is correctly installed and "

@ -35,7 +35,7 @@ KLpdPrinterImpl::~KLpdPrinterImpl()
TQString KLpdPrinterImpl::executable() TQString KLpdPrinterImpl::executable()
{ {
return KStandardDirs::findExe("lpr"); return TDEStandardDirs::findExe("lpr");
} }
bool KLpdPrinterImpl::setupCommand(TQString& cmd, KPrinter *printer) bool KLpdPrinterImpl::setupCommand(TQString& cmd, KPrinter *printer)

@ -620,9 +620,9 @@ bool KMLpdManager::createSpooldir(PrintcapEntry *entry)
if (entry->arg("sd").isEmpty()) if (entry->arg("sd").isEmpty())
entry->m_args["sd"] = TQString::fromLatin1("/var/spool/lpd/")+entry->m_name; entry->m_args["sd"] = TQString::fromLatin1("/var/spool/lpd/")+entry->m_name;
QString sd = entry->arg("sd"); QString sd = entry->arg("sd");
if (!KStandardDirs::exists(sd)) if (!TDEStandardDirs::exists(sd))
{ {
if (!KStandardDirs::makeDir(sd,0750)) if (!TDEStandardDirs::makeDir(sd,0750))
return false; return false;
struct passwd *lp_pw = getpwnam("lp"); struct passwd *lp_pw = getpwnam("lp");
if (lp_pw && chown(TQFile::encodeName(sd),lp_pw->pw_uid,lp_pw->pw_gid) != 0) if (lp_pw && chown(TQFile::encodeName(sd),lp_pw->pw_uid,lp_pw->pw_gid) != 0)

@ -47,9 +47,9 @@ void KLpdUnixPrinterImpl::initLprPrint(TQString& cmd, KPrinter *printer)
// look for executable, starting with "lpr" // look for executable, starting with "lpr"
TQString KLpdUnixPrinterImpl::executable() TQString KLpdUnixPrinterImpl::executable()
{ {
QString exe = KStandardDirs::findExe("lpr"); QString exe = TDEStandardDirs::findExe("lpr");
if (exe.isEmpty()) if (exe.isEmpty())
exe = KStandardDirs::findExe("lp"); exe = TDEStandardDirs::findExe("lp");
return exe; return exe;
} }

@ -230,7 +230,7 @@ void KMLpdUnixManager::parseEtcPrintcap()
TQString getEtcPrintersConfName() TQString getEtcPrintersConfName()
{ {
TQString printersconf("/etc/printers.conf"); TQString printersconf("/etc/printers.conf");
if (!TQFile::exists(printersconf) && !KStandardDirs::findExe( "ypcat" ).isEmpty()) if (!TQFile::exists(printersconf) && !TDEStandardDirs::findExe( "ypcat" ).isEmpty())
{ {
// standard file not found, try NIS // standard file not found, try NIS
printersconf = locateLocal("tmp","printers.conf"); printersconf = locateLocal("tmp","printers.conf");

@ -216,7 +216,7 @@ PrintcapEntry* ApsHandler::createEntry(KMPrinter *prt)
return NULL; return NULL;
} }
TQString path = sysconfDir() + "/" + prt->printerName(); TQString path = sysconfDir() + "/" + prt->printerName();
if (!KStandardDirs::makeDir(path, 0755)) if (!TDEStandardDirs::makeDir(path, 0755))
{ {
manager()->setErrorMsg(i18n("Unable to create directory %1.").arg(path)); manager()->setErrorMsg(i18n("Unable to create directory %1.").arg(path));
return NULL; return NULL;

@ -28,7 +28,7 @@
KLprPrinterImpl::KLprPrinterImpl(TQObject *parent, const char *name, const TQStringList & /*args*/) KLprPrinterImpl::KLprPrinterImpl(TQObject *parent, const char *name, const TQStringList & /*args*/)
: KPrinterImpl(parent,name) : KPrinterImpl(parent,name)
{ {
m_exepath = KStandardDirs::findExe("lpr"); m_exepath = TDEStandardDirs::findExe("lpr");
} }
KLprPrinterImpl::~KLprPrinterImpl() KLprPrinterImpl::~KLprPrinterImpl()

@ -345,7 +345,7 @@ bool KMLprManager::createPrinter(KMPrinter *prt)
return false; return false;
} }
sd.append("/").append(prt->printerName()); sd.append("/").append(prt->printerName());
if (!KStandardDirs::makeDir(sd, 0755)) if (!TDEStandardDirs::makeDir(sd, 0755))
{ {
setErrorMsg(i18n("Unable to create the spool directory %1. Check that you " setErrorMsg(i18n("Unable to create the spool directory %1. Check that you "
"have the required permissions for that operation.").arg(sd)); "have the required permissions for that operation.").arg(sd));

@ -51,9 +51,9 @@ LpcHelper::LpcHelper(TQObject *parent, const char *name)
// add some specific dirs. // add some specific dirs.
TQString PATH = getenv("PATH"); TQString PATH = getenv("PATH");
PATH.append(":/usr/sbin:/usr/local/sbin:/sbin:/opt/sbin:/opt/local/sbin"); PATH.append(":/usr/sbin:/usr/local/sbin:/sbin:/opt/sbin:/opt/local/sbin");
m_exepath = KStandardDirs::findExe("lpc", PATH); m_exepath = TDEStandardDirs::findExe("lpc", PATH);
m_checkpcpath = KStandardDirs::findExe("checkpc", PATH); m_checkpcpath = TDEStandardDirs::findExe("checkpc", PATH);
m_lprmpath = KStandardDirs::findExe("lprm"); m_lprmpath = TDEStandardDirs::findExe("lprm");
} }
LpcHelper::~LpcHelper() LpcHelper::~LpcHelper()

@ -29,7 +29,7 @@
LpqHelper::LpqHelper(TQObject *parent, const char *name) LpqHelper::LpqHelper(TQObject *parent, const char *name)
: TQObject(parent, name) : TQObject(parent, name)
{ {
m_exepath = KStandardDirs::findExe("lpq"); m_exepath = TDEStandardDirs::findExe("lpq");
} }
LpqHelper::~LpqHelper() LpqHelper::~LpqHelper()

@ -46,10 +46,10 @@ MaticHandler::MaticHandler(KMManager *mgr)
{ {
TQString PATH = getenv("PATH"); TQString PATH = getenv("PATH");
PATH.append(":/usr/sbin:/usr/local/sbin:/opt/sbin:/opt/local/sbin"); PATH.append(":/usr/sbin:/usr/local/sbin:/opt/sbin:/opt/local/sbin");
m_exematicpath = KStandardDirs::findExe("lpdomatic", PATH); m_exematicpath = TDEStandardDirs::findExe("lpdomatic", PATH);
m_ncpath = KStandardDirs::findExe("nc"); m_ncpath = TDEStandardDirs::findExe("nc");
m_smbpath = KStandardDirs::findExe("smbclient"); m_smbpath = TDEStandardDirs::findExe("smbclient");
m_rlprpath = KStandardDirs::findExe("rlpr"); m_rlprpath = TDEStandardDirs::findExe("rlpr");
} }
bool MaticHandler::validate(PrintcapEntry *entry) bool MaticHandler::validate(PrintcapEntry *entry)
@ -248,7 +248,7 @@ DrMain* MaticHandler::loadDbDriver(const TQString& path)
TQString tmpFile = locateLocal("tmp", "foomatic_" + kapp->randomString(8)); TQString tmpFile = locateLocal("tmp", "foomatic_" + kapp->randomString(8));
TQString PATH = getenv("PATH") + TQString::fromLatin1(":/usr/sbin:/usr/local/sbin:/opt/sbin:/opt/local/sbin"); TQString PATH = getenv("PATH") + TQString::fromLatin1(":/usr/sbin:/usr/local/sbin:/opt/sbin:/opt/local/sbin");
TQString exe = KStandardDirs::findExe("foomatic-datafile", PATH); TQString exe = TDEStandardDirs::findExe("foomatic-datafile", PATH);
if (exe.isEmpty()) if (exe.isEmpty())
{ {
manager()->setErrorMsg(i18n("Unable to find the executable foomatic-datafile " manager()->setErrorMsg(i18n("Unable to find the executable foomatic-datafile "
@ -352,7 +352,7 @@ bool MaticHandler::savePpdFile(DrMain *driver, const TQString& filename)
return true; return true;
TQString PATH = getenv("PATH") + TQString::fromLatin1(":/usr/sbin:/usr/local/sbin:/opt/sbin:/opt/local/sbin"); TQString PATH = getenv("PATH") + TQString::fromLatin1(":/usr/sbin:/usr/local/sbin:/opt/sbin:/opt/local/sbin");
TQString exe = KStandardDirs::findExe("foomatic-datafile", PATH); TQString exe = TDEStandardDirs::findExe("foomatic-datafile", PATH);
if (exe.isEmpty()) if (exe.isEmpty())
{ {
manager()->setErrorMsg(i18n("Unable to find the executable foomatic-datafile " manager()->setErrorMsg(i18n("Unable to find the executable foomatic-datafile "

@ -91,7 +91,7 @@ bool KMDBCreator::createDriverDB(const TQString& dirname, const TQString& filena
if (exestr.isEmpty()) if (exestr.isEmpty())
msg = i18n("No executable defined for the creation of the " msg = i18n("No executable defined for the creation of the "
"driver database. This operation is not implemented."); "driver database. This operation is not implemented.");
else if (KStandardDirs::findExe(exestr).isEmpty()) else if (TDEStandardDirs::findExe(exestr).isEmpty())
msg = i18n("The executable %1 could not be found in your " msg = i18n("The executable %1 could not be found in your "
"PATH. Check that this program exists and is " "PATH. Check that this program exists and is "
"accessible in your PATH variable.").arg(exestr); "accessible in your PATH variable.").arg(exestr);

@ -47,7 +47,7 @@ bool KRlprPrinterImpl::setupCommand(TQString& cmd, KPrinter *printer)
QString host(rpr->option("host")), queue(rpr->option("queue")); QString host(rpr->option("host")), queue(rpr->option("queue"));
if (!host.isEmpty() && !queue.isEmpty()) if (!host.isEmpty() && !queue.isEmpty())
{ {
QString exestr = KStandardDirs::findExe("rlpr"); QString exestr = TDEStandardDirs::findExe("rlpr");
if (exestr.isEmpty()) if (exestr.isEmpty())
{ {
printer->setErrorMessage(i18n("The <b>%1</b> executable could not be found in your path. Check your installation.").arg("rlpr")); printer->setErrorMessage(i18n("The <b>%1</b> executable could not be found in your path. Check your installation.").arg("rlpr"));

@ -80,7 +80,7 @@ bool KdeprintChecker::checkURL(const KURL& url)
else if (prot == "exec") else if (prot == "exec")
return checkExec(url); return checkExec(url);
else if (prot == "file" || prot == "dir") else if (prot == "file" || prot == "dir")
return KStandardDirs::exists(url.url()); return TDEStandardDirs::exists(url.url());
else if (prot == "service") else if (prot == "service")
return checkService(url); return checkService(url);
return false; return false;
@ -117,7 +117,7 @@ bool KdeprintChecker::checkConfig(const KURL& url)
bool KdeprintChecker::checkExec(const KURL& url) bool KdeprintChecker::checkExec(const KURL& url)
{ {
QString execname(url.path().mid(1)); QString execname(url.path().mid(1));
return !(KStandardDirs::findExe(execname).isEmpty()); return !(TDEStandardDirs::findExe(execname).isEmpty());
} }
bool KdeprintChecker::checkService(const KURL& url) bool KdeprintChecker::checkService(const KURL& url)

@ -173,7 +173,7 @@ void EscpWidget::startCommand(const TQString& arg)
return; return;
} }
TQString exestr = KStandardDirs::findExe("escputil"); TQString exestr = TDEStandardDirs::findExe("escputil");
if (exestr.isEmpty()) if (exestr.isEmpty())
{ {
KMessageBox::error(this, i18n("The executable escputil cannot be found in your " KMessageBox::error(this, i18n("The executable escputil cannot be found in your "

@ -389,7 +389,7 @@ static TQString findDaemon()
{ {
TQString daemon = locate("bin", "tdesud"); TQString daemon = locate("bin", "tdesud");
if (daemon.isEmpty()) // if not in TDEDIRS, rely on PATH if (daemon.isEmpty()) // if not in TDEDIRS, rely on PATH
daemon = KStandardDirs::findExe("tdesud"); daemon = TDEStandardDirs::findExe("tdesud");
if (daemon.isEmpty()) if (daemon.isEmpty())
{ {

@ -375,7 +375,7 @@ int PtyProcess::exec(const TQCString &command, const 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(900) << k_lineinfo << command << " not found\n"; kdError(900) << k_lineinfo << command << " not found\n";

@ -214,7 +214,7 @@ int PTY::grantpt()
return 0; return 0;
// Use konsole_grantpty: // Use konsole_grantpty:
if (KStandardDirs::findExe("konsole_grantpty").isEmpty()) if (TDEStandardDirs::findExe("konsole_grantpty").isEmpty())
{ {
kdError(900) << k_lineinfo << "konsole_grantpty not found.\n"; kdError(900) << k_lineinfo << "konsole_grantpty not found.\n";
return -1; return -1;

@ -491,7 +491,7 @@ bool KBugReport::sendBugReport()
TQString command; TQString command;
command = locate("exe", "tdesendbugmail"); command = locate("exe", "tdesendbugmail");
if (command.isEmpty()) if (command.isEmpty())
command = KStandardDirs::findExe( TQString::fromLatin1("tdesendbugmail") ); command = TDEStandardDirs::findExe( TQString::fromLatin1("tdesendbugmail") );
KTempFile outputfile; KTempFile outputfile;
outputfile.close(); outputfile.close();

@ -816,7 +816,7 @@ void KEditToolbarWidget::setupLayout()
// "change icon" button // "change icon" button
d->m_changeIcon = new KPushButton( i18n( "Change &Icon..." ), this ); d->m_changeIcon = new KPushButton( i18n( "Change &Icon..." ), this );
TQString kdialogExe = KStandardDirs::findExe(TQString::fromLatin1("kdialog")); TQString kdialogExe = TDEStandardDirs::findExe(TQString::fromLatin1("kdialog"));
d->m_hasKDialog = !kdialogExe.isEmpty(); d->m_hasKDialog = !kdialogExe.isEmpty();
d->m_changeIcon->setEnabled( d->m_hasKDialog ); d->m_changeIcon->setEnabled( d->m_hasKDialog );
@ -1382,7 +1382,7 @@ void KEditToolbarWidget::slotChangeIcon()
return; return;
d->m_kdialogProcess = new KProcIO; d->m_kdialogProcess = new KProcIO;
TQString kdialogExe = KStandardDirs::findExe(TQString::fromLatin1("kdialog")); TQString kdialogExe = TDEStandardDirs::findExe(TQString::fromLatin1("kdialog"));
(*d->m_kdialogProcess) << kdialogExe; (*d->m_kdialogProcess) << kdialogExe;
(*d->m_kdialogProcess) << "--embed"; (*d->m_kdialogProcess) << "--embed";
(*d->m_kdialogProcess) << TQString::number( (ulong)topLevelWidget()->winId() ); (*d->m_kdialogProcess) << TQString::number( (ulong)topLevelWidget()->winId() );

@ -131,7 +131,7 @@ public:
* *
* @param parent Parent widget of TipDialog. * @param parent Parent widget of TipDialog.
* @param tipFile The name of the tip file. It has be relative to the "data" * @param tipFile The name of the tip file. It has be relative to the "data"
* resource of KStandardDirs * resource of TDEStandardDirs
* @param force If true, the dialog is show, even when the users * @param force If true, the dialog is show, even when the users
* disabled it. * disabled it.
*/ */
@ -144,7 +144,7 @@ public:
* *
* @param parent Parent widget of TipDialog. * @param parent Parent widget of TipDialog.
* @param tipFiles A List of tip files. Each has be relative to the "data" * @param tipFiles A List of tip files. Each has be relative to the "data"
* resource of KStandardDirs * resource of TDEStandardDirs
* @param force If true, the dialog is show, even when the users * @param force If true, the dialog is show, even when the users
* disabled it. * disabled it.
*/ */

@ -74,7 +74,7 @@ class KUTILS_EXPORT KPluginInfo
* *
* @param filename The filename of the .desktop file. * @param filename The filename of the .desktop file.
* @param resource If filename is relative, you need to specify a resource type * @param resource If filename is relative, you need to specify a resource type
* (e.g. "service", "apps"... KStandardDirs). Otherwise, * (e.g. "service", "apps"... TDEStandardDirs). Otherwise,
* resource isn't used. * resource isn't used.
*/ */
KPluginInfo( const TQString & filename, const char* resource = 0 ); KPluginInfo( const TQString & filename, const char* resource = 0 );
@ -125,7 +125,7 @@ class KUTILS_EXPORT KPluginInfo
/** /**
* @return A list of KPluginInfo objects constructed from a list of * @return A list of KPluginInfo objects constructed from a list of
* filenames. If you make a lookup using, for example, * filenames. If you make a lookup using, for example,
* KStandardDirs::findAllResources() you pass the list of files to this * TDEStandardDirs::findAllResources() you pass the list of files to this
* function. * function.
*/ */
static KPluginInfo::List fromFiles( const TQStringList & files, TDEConfig * config = 0, const TQString & group = TQString::null ); static KPluginInfo::List fromFiles( const TQStringList & files, TDEConfig * config = 0, const TQString & group = TQString::null );

@ -355,7 +355,7 @@ void TDECModuleProxy::runAsRoot()
cmd = TQString(cmd.remove(0,8)).stripWhiteSpace(); cmd = TQString(cmd.remove(0,8)).stripWhiteSpace();
/* Run the process */ /* Run the process */
TQString tdesu = KStandardDirs::findExe("tdesu"); TQString tdesu = TDEStandardDirs::findExe("tdesu");
if (!tdesu.isEmpty()) if (!tdesu.isEmpty())
{ {

Loading…
Cancel
Save