diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-01-24 13:47:22 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-01-24 13:47:22 -0600 |
commit | 28edc0aa2ab09297288186f5bc15765eb7be58c0 (patch) | |
tree | 7b7a01768b3781763186c825af21bb14717d2c32 /kded | |
parent | 07c48c43ff72c237e4028154f4594102b798073f (diff) | |
download | tdelibs-28edc0aa2ab09297288186f5bc15765eb7be58c0.tar.gz tdelibs-28edc0aa2ab09297288186f5bc15765eb7be58c0.zip |
Rename KGlobal, KProcess, and KClipboard to avoid conflicts with KDE4
Diffstat (limited to 'kded')
-rw-r--r-- | kded/kbuildsycoca.cpp | 32 | ||||
-rw-r--r-- | kded/kde-menu.cpp | 2 | ||||
-rw-r--r-- | kded/kded.cpp | 4 | ||||
-rw-r--r-- | kded/khostname.cpp | 24 | ||||
-rw-r--r-- | kded/vfolder_menu.cpp | 26 |
5 files changed, 44 insertions, 44 deletions
diff --git a/kded/kbuildsycoca.cpp b/kded/kbuildsycoca.cpp index 958f38303..59ff8bc18 100644 --- a/kded/kbuildsycoca.cpp +++ b/kded/kbuildsycoca.cpp @@ -104,13 +104,13 @@ static TQString sycocaPath() if (bGlobalDatabase) { - path = KGlobal::dirs()->saveLocation("services")+"ksycoca"; + path = TDEGlobal::dirs()->saveLocation("services")+"ksycoca"; } else { TQCString ksycoca_env = getenv("TDESYCOCA"); if (ksycoca_env.isEmpty()) - path = KGlobal::dirs()->saveLocation("cache")+"ksycoca"; + path = TDEGlobal::dirs()->saveLocation("cache")+"ksycoca"; else path = TQFile::decodeName(ksycoca_env); } @@ -122,7 +122,7 @@ static TQString oldSycocaPath() { TQCString ksycoca_env = getenv("TDESYCOCA"); if (ksycoca_env.isEmpty()) - return KGlobal::dirs()->saveLocation("tmp")+"ksycoca"; + return TDEGlobal::dirs()->saveLocation("tmp")+"ksycoca"; return TQString::null; } @@ -189,7 +189,7 @@ KSycocaEntry *KBuildSycoca::createEntry(const TQString &file, bool addToFactory) TQ_UINT32 timeStamp = g_ctimeInfo->ctime(file); if (!timeStamp) { - timeStamp = KGlobal::dirs()->calcResourceHash( g_resource, file, true); + timeStamp = TDEGlobal::dirs()->calcResourceHash( g_resource, file, true); } KSycocaEntry* entry = 0; if (g_allEntries) @@ -317,7 +317,7 @@ bool KBuildSycoca::build() TQStringList relFiles; - (void) KGlobal::dirs()->findAllResources( g_resource, + (void) TDEGlobal::dirs()->findAllResources( g_resource, TQString::null, true, // Recursive! true, // uniq @@ -417,7 +417,7 @@ void KBuildSycoca::createMenu(TQString caption, TQString name, VFolderMenu::SubM TQ_UINT32 timeStamp = g_ctimeInfo->ctime(directoryFile); if (!timeStamp) { - timeStamp = KGlobal::dirs()->calcResourceHash( g_resource, directoryFile, true); + timeStamp = TDEGlobal::dirs()->calcResourceHash( g_resource, directoryFile, true); } KServiceGroup* entry = 0; @@ -563,10 +563,10 @@ void KBuildSycoca::save() } (*m_str) << (TQ_INT32) 0; // No more factories. // Write TDEDIRS - (*m_str) << KGlobal::dirs()->kfsstnd_prefixes(); + (*m_str) << TDEGlobal::dirs()->kfsstnd_prefixes(); (*m_str) << newTimestamp; - (*m_str) << KGlobal::locale()->language(); - (*m_str) << KGlobal::dirs()->calcResourceHash("services", "update_ksycoca", true); + (*m_str) << TDEGlobal::locale()->language(); + (*m_str) << TDEGlobal::dirs()->calcResourceHash("services", "update_ksycoca", true); (*m_str) << (*g_allResourceDirs); // Write factory data.... @@ -673,7 +673,7 @@ TQStringList KBuildSycoca::existingResourceDirs() while( !resources.empty()) { TQString res = resources.front(); - *dirs += KGlobal::dirs()->resourceDirs( res.latin1()); + *dirs += TDEGlobal::dirs()->resourceDirs( res.latin1()); resources.remove( res ); // remove this 'res' and all its duplicates } @@ -767,8 +767,8 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv) KLocale::setMainCatalogue("tdelibs"); // force generating of KLocale object. if not, the database will get // be translated - KGlobal::locale(); - KGlobal::dirs()->addResourceType("app-reg", "share/application-registry" ); + TDEGlobal::locale(); + TDEGlobal::dirs()->addResourceType("app-reg", "share/application-registry" ); DCOPClient *dcopClient = new DCOPClient(); @@ -804,9 +804,9 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv) if (incremental || !checkfiles) { KSycoca::self()->disableAutoRebuild(); // Prevent deadlock - TQString current_language = KGlobal::locale()->language(); + TQString current_language = TDEGlobal::locale()->language(); TQString ksycoca_language = KSycoca::self()->language(); - TQ_UINT32 current_update_sig = KGlobal::dirs()->calcResourceHash("services", "update_ksycoca", true); + TQ_UINT32 current_update_sig = TDEGlobal::dirs()->calcResourceHash("services", "update_ksycoca", true); TQ_UINT32 ksycoca_update_sig = KSycoca::self()->updateSignature(); if ((current_update_sig != ksycoca_update_sig) || @@ -914,9 +914,9 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv) { // These directories may have been created with 0700 permission // better delete them if they are empty - TQString applnkDir = KGlobal::dirs()->saveLocation("apps", TQString::null, false); + TQString applnkDir = TDEGlobal::dirs()->saveLocation("apps", TQString::null, false); ::rmdir(TQFile::encodeName(applnkDir)); - TQString servicetypesDir = KGlobal::dirs()->saveLocation("servicetypes", TQString::null, false); + TQString servicetypesDir = TDEGlobal::dirs()->saveLocation("servicetypes", TQString::null, false); ::rmdir(TQFile::encodeName(servicetypesDir)); } } diff --git a/kded/kde-menu.cpp b/kded/kde-menu.cpp index 7c73fb226..5c1a38b4d 100644 --- a/kded/kde-menu.cpp +++ b/kded/kde-menu.cpp @@ -151,7 +151,7 @@ int main(int argc, char **argv) if (!DCOPRef(_launcher, _launcher).call("tdeinit_exec_wait", command, args).isValid()) { tqWarning("Can't talk to klauncher!"); - command = KGlobal::dirs()->findExe(command); + command = TDEGlobal::dirs()->findExe(command); command += " " + args.join(" "); system(command.local8Bit()); } diff --git a/kded/kded.cpp b/kded/kded.cpp index 84db43b46..efbde0011 100644 --- a/kded/kded.cpp +++ b/kded/kded.cpp @@ -106,7 +106,7 @@ Kded::Kded(bool checkUpdates, bool new_startup) TQCString cPath; TQCString ksycoca_env = getenv("TDESYCOCA"); if (ksycoca_env.isEmpty()) - cPath = TQFile::encodeName(KGlobal::dirs()->saveLocation("tmp")+"ksycoca"); + cPath = TQFile::encodeName(TDEGlobal::dirs()->saveLocation("tmp")+"ksycoca"); else cPath = ksycoca_env; m_pTimer = new TQTimer(this); @@ -665,7 +665,7 @@ KUpdateD::KUpdateD() TQObject::connect( m_pDirWatch, TQT_SIGNAL(dirty(const TQString&)), this, TQT_SLOT(slotNewUpdateFile())); - TQStringList dirs = KGlobal::dirs()->findDirs("data", "kconf_update"); + TQStringList dirs = TDEGlobal::dirs()->findDirs("data", "kconf_update"); for( TQStringList::ConstIterator it = dirs.begin(); it != dirs.end(); ++it ) diff --git a/kded/khostname.cpp b/kded/khostname.cpp index bd0980a2b..7e080378b 100644 --- a/kded/khostname.cpp +++ b/kded/khostname.cpp @@ -166,15 +166,15 @@ void KHostName::changeX() // don't nuke the xauth when XAUTHLOCALHOSTNAME points to it if (!xauthlocalhostname || oldNetId != xauthlocalhostname) { - cmd = "xauth -n remove "+KProcess::quote(netId); + cmd = "xauth -n remove "+TDEProcess::quote(netId); system(TQFile::encodeName(cmd)); } cmd = "xauth -n add "; - cmd += KProcess::quote(newNetId); + cmd += TDEProcess::quote(newNetId); cmd += " "; - cmd += KProcess::quote(authName); + cmd += TDEProcess::quote(authName); cmd += " "; - cmd += KProcess::quote(authKey); + cmd += TDEProcess::quote(authKey); system(TQFile::encodeName(cmd)); } } @@ -236,7 +236,7 @@ void KHostName::changeDcop() ::symlink(fname.data(), compatLink.data()); // Compatibility link // Update .ICEauthority - TQString cmd = "iceauth list "+KProcess::quote("netid="+oldNetId); + TQString cmd = "iceauth list "+TDEProcess::quote("netid="+oldNetId); FILE *iceFile = popen(TQFile::encodeName(cmd), "r"); if (!iceFile) { @@ -272,13 +272,13 @@ void KHostName::changeDcop() continue; cmd = "iceauth add "; - cmd += KProcess::quote(protName); + cmd += TDEProcess::quote(protName); cmd += " '' "; - cmd += KProcess::quote(newNetId); + cmd += TDEProcess::quote(newNetId); cmd += " "; - cmd += KProcess::quote(authName); + cmd += TDEProcess::quote(authName); cmd += " "; - cmd += KProcess::quote(authKey); + cmd += TDEProcess::quote(authKey); system(TQFile::encodeName(cmd)); } } @@ -288,7 +288,7 @@ void KHostName::changeDcop() char* xauthlocalhostname = getenv("XAUTHLOCALHOSTNAME"); if (!xauthlocalhostname || !oldNetId.contains(xauthlocalhostname)) { - TQString cmd = "iceauth remove "+KProcess::quote("netid="+oldNetId); + TQString cmd = "iceauth remove "+TDEProcess::quote("netid="+oldNetId); system(TQFile::encodeName(cmd)); unlink(origFName.data()); origFName = DCOPClient::dcopServerFileOld(oldName); // Compatibility link @@ -299,8 +299,8 @@ void KHostName::changeDcop() void KHostName::changeStdDirs(const TQCString &type) { // We make links to the old dirs cause we can't delete the old dirs. - TQCString oldDir = TQFile::encodeName(TQString("%1%2-%3").arg(KGlobal::dirs()->localtdedir()).arg(type.data()).arg(oldName.data())); - TQCString newDir = TQFile::encodeName(TQString("%1%2-%3").arg(KGlobal::dirs()->localtdedir()).arg(type.data()).arg(newName.data())); + TQCString oldDir = TQFile::encodeName(TQString("%1%2-%3").arg(TDEGlobal::dirs()->localtdedir()).arg(type.data()).arg(oldName.data())); + TQCString newDir = TQFile::encodeName(TQString("%1%2-%3").arg(TDEGlobal::dirs()->localtdedir()).arg(type.data()).arg(newName.data())); KDE_struct_stat st_buf; diff --git a/kded/vfolder_menu.cpp b/kded/vfolder_menu.cpp index e147dcfaf..b00b3553d 100644 --- a/kded/vfolder_menu.cpp +++ b/kded/vfolder_menu.cpp @@ -441,10 +441,10 @@ VFolderMenu::absoluteDir(const TQString &_dir, const TQString &baseDir, bool kee if (TQDir::isRelativePath(dir) && !keepRelativeToCfg) { - dir = KGlobal::dirs()->findResource("xdgconf-menu", dir); + dir = TDEGlobal::dirs()->findResource("xdgconf-menu", dir); } - dir = KGlobal::dirs()->realPath(dir); + dir = TDEGlobal::dirs()->realPath(dir); return dir; } @@ -642,7 +642,7 @@ VFolderMenu::mergeMenus(TQDomElement &docElem, TQString &name) else if( e.tagName() == "MergeDir") { TQString dir = absoluteDir(e.text(), e.attribute("__BaseDir"), true); - TQStringList dirs = KGlobal::dirs()->findDirs("xdgconf-menu", dir); + TQStringList dirs = TDEGlobal::dirs()->findDirs("xdgconf-menu", dir); for(TQStringList::ConstIterator it=dirs.begin(); it != dirs.end(); ++it) { @@ -653,12 +653,12 @@ VFolderMenu::mergeMenus(TQDomElement &docElem, TQString &name) if (!TQDir::isRelativePath(dir)) { // Absolute - fileList = KGlobal::dirs()->findAllResources("xdgconf-menu", dir+"*.menu", false, false); + fileList = TDEGlobal::dirs()->findAllResources("xdgconf-menu", dir+"*.menu", false, false); } else { // Relative - (void) KGlobal::dirs()->findAllResources("xdgconf-menu", dir+"*.menu", false, true, fileList); + (void) TDEGlobal::dirs()->findAllResources("xdgconf-menu", dir+"*.menu", false, true, fileList); } for(TQStringList::ConstIterator it=fileList.begin(); @@ -699,7 +699,7 @@ VFolderMenu::pushDocInfo(const TQString &fileName, const TQString &baseDir) if (!baseDir.isEmpty()) { if (!TQDir::isRelativePath(baseDir)) - m_docInfo.baseDir = KGlobal::dirs()->relativeLocation("xdgconf-menu", baseDir); + m_docInfo.baseDir = TDEGlobal::dirs()->relativeLocation("xdgconf-menu", baseDir); else m_docInfo.baseDir = baseDir; } @@ -743,7 +743,7 @@ VFolderMenu::pushDocInfoParent(const TQString &basePath, const TQString &baseDir m_docInfo.baseName = fileName.left( fileName.length() - 5 ); TQString baseName = TQDir::cleanDirPath(m_docInfo.baseDir + fileName); - TQStringList result = KGlobal::dirs()->findAllResources("xdgconf-menu", baseName); + TQStringList result = TDEGlobal::dirs()->findAllResources("xdgconf-menu", baseName); while( !result.isEmpty() && (result[0] != basePath)) result.remove(result.begin()); @@ -830,13 +830,13 @@ VFolderMenu::locateDirectoryFile(const TQString &fileName) void VFolderMenu::initDirs() { - m_defaultDataDirs = TQStringList::split(':', KGlobal::dirs()->kfsstnd_prefixes()); + m_defaultDataDirs = TQStringList::split(':', TDEGlobal::dirs()->kfsstnd_prefixes()); TQString localDir = m_defaultDataDirs.first(); m_defaultDataDirs.remove(localDir); // Remove local dir - m_defaultAppDirs = KGlobal::dirs()->findDirs("xdgdata-apps", TQString::null); - m_defaultDirectoryDirs = KGlobal::dirs()->findDirs("xdgdata-dirs", TQString::null); - m_defaultLegacyDirs = KGlobal::dirs()->resourceDirs("apps"); + m_defaultAppDirs = TDEGlobal::dirs()->findDirs("xdgdata-apps", TQString::null); + m_defaultDirectoryDirs = TDEGlobal::dirs()->findDirs("xdgdata-dirs", TQString::null); + m_defaultLegacyDirs = TDEGlobal::dirs()->resourceDirs("apps"); } void @@ -1038,7 +1038,7 @@ kdDebug(7021) << "processKDELegacyDirs()" << endl; TQRegExp files("\\.(desktop|kdelnk)$"); TQRegExp dirs("\\.directory$"); - (void) KGlobal::dirs()->findAllResources( "apps", + (void) TDEGlobal::dirs()->findAllResources( "apps", TQString::null, true, // Recursive! true, // uniq @@ -1629,7 +1629,7 @@ VFolderMenu::parseMenu(const TQString &file, bool forceLegacyLoad) m_legacyLoaded = false; m_appsInfo = 0; - TQStringList dirs = KGlobal::dirs()->resourceDirs("xdgconf-menu"); + TQStringList dirs = TDEGlobal::dirs()->resourceDirs("xdgconf-menu"); for(TQStringList::ConstIterator it=dirs.begin(); it != dirs.end(); ++it) { |