summaryrefslogtreecommitdiffstats
path: root/kded
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-07 03:45:53 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-07 03:45:53 +0000
commit10308be19ef7fa44699562cc75946e7ea1fdf6b9 (patch)
tree4bc444c00a79e88105f2cfce5b6209994c413ca0 /kded
parent307136d8eef0ba133b78ceee8e901138d4c996a1 (diff)
downloadtdelibs-10308be19ef7fa44699562cc75946e7ea1fdf6b9.tar.gz
tdelibs-10308be19ef7fa44699562cc75946e7ea1fdf6b9.zip
Revert automated changes
Sorry guys, they are just not ready for prime time Work will continue as always git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1212479 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kded')
-rw-r--r--kded/DESIGN2
-rw-r--r--kded/HOWTO2
-rw-r--r--kded/README.kded2
-rw-r--r--kded/kbuildservicefactory.cpp28
-rw-r--r--kded/kbuildservicefactory.h2
-rw-r--r--kded/kbuildservicegroupfactory.cpp12
-rw-r--r--kded/kbuildservicetypefactory.cpp24
-rw-r--r--kded/kbuildservicetypefactory.h2
-rw-r--r--kded/kbuildsycoca.cpp70
-rw-r--r--kded/kbuildsycoca.h2
-rw-r--r--kded/kctimefactory.cpp18
-rw-r--r--kded/kctimefactory.h8
-rw-r--r--kded/kde-menu.cpp12
-rw-r--r--kded/kded.cpp20
-rw-r--r--kded/kded.h4
-rw-r--r--kded/kdedmodule.cpp10
-rw-r--r--kded/kdedmodule.h4
-rw-r--r--kded/khostname.cpp12
-rw-r--r--kded/vfolder_menu.cpp136
-rw-r--r--kded/vfolder_menu.h14
20 files changed, 192 insertions, 192 deletions
diff --git a/kded/DESIGN b/kded/DESIGN
index 1e0c09a14..702fca853 100644
--- a/kded/DESIGN
+++ b/kded/DESIGN
@@ -59,7 +59,7 @@ Offer list
| * servicetype offset, service offset
| * servicetype offset, service offset
| * 0
-This allows to quickly tqfind services associated with a servicetype.
+This allows to quickly find services associated with a servicetype.
It does NOT reflect the user profile, which is stored in profilerc and
implemented in KServiceTypeProfile.
diff --git a/kded/HOWTO b/kded/HOWTO
index 990ce9909..d1596b8cd 100644
--- a/kded/HOWTO
+++ b/kded/HOWTO
@@ -15,4 +15,4 @@ the name of the DCOP object that is implemented by the module.
The desktop file needs to define the library in which the module is
implemented. The name of the library always starts with kded_.
-The kdelibs/kded/test/ directory tqcontains a sample implementation.
+The kdelibs/kded/test/ directory contains a sample implementation.
diff --git a/kded/README.kded b/kded/README.kded
index 65231b6ca..b530d707d 100644
--- a/kded/README.kded
+++ b/kded/README.kded
@@ -121,7 +121,7 @@ Further it should contain:
X-KDE-Library=foo
X-KDE-FactoryName=foo
-Which means that kded_foo.la is the name of the library that tqcontains
+Which means that kded_foo.la is the name of the library that contains
the module and KDEDModule *create_foo(const QCString &) is the factory
function that should be called.
diff --git a/kded/kbuildservicefactory.cpp b/kded/kbuildservicefactory.cpp
index 9dab1fdf6..f8f8c34f1 100644
--- a/kded/kbuildservicefactory.cpp
+++ b/kded/kbuildservicefactory.cpp
@@ -57,7 +57,7 @@ KBuildServiceFactory::~KBuildServiceFactory()
delete m_resourceList;
}
-KService * KBuildServiceFactory::tqfindServiceByName(const TQString &_name)
+KService * KBuildServiceFactory::findServiceByName(const TQString &_name)
{
return m_serviceDict[_name];
}
@@ -67,7 +67,7 @@ KSycocaEntry *
KBuildServiceFactory::createEntry( const TQString& file, const char *resource )
{
TQString name = file;
- int pos = name.tqfindRev('/');
+ int pos = name.findRev('/');
if (pos != -1)
{
name = name.mid(pos+1);
@@ -101,11 +101,11 @@ KBuildServiceFactory::saveHeader(TQDataStream &str)
{
KSycocaFactory::saveHeader(str);
- str << (TQ_INT32) m_nameDictOffset;
- str << (TQ_INT32) m_relNameDictOffset;
- str << (TQ_INT32) m_offerListOffset;
- str << (TQ_INT32) m_initListOffset;
- str << (TQ_INT32) m_menuIdDictOffset;
+ str << (Q_INT32) m_nameDictOffset;
+ str << (Q_INT32) m_relNameDictOffset;
+ str << (Q_INT32) m_offerListOffset;
+ str << (Q_INT32) m_initListOffset;
+ str << (Q_INT32) m_menuIdDictOffset;
}
void
@@ -190,12 +190,12 @@ KBuildServiceFactory::saveOfferList(TQDataStream &str)
it2 != services.end(); ++it2)
{
KService *service = *it2;
- str << (TQ_INT32) entry->offset();
- str << (TQ_INT32) service->offset();
+ str << (Q_INT32) entry->offset();
+ str << (Q_INT32) service->offset();
}
}
- str << (TQ_INT32) 0; // End of list marker (0)
+ str << (Q_INT32) 0; // End of list marker (0)
}
void
@@ -215,19 +215,19 @@ KBuildServiceFactory::saveInitList(TQDataStream &str)
initList.append(service);
}
}
- str << (TQ_INT32) initList.count(); // Nr of init services.
+ str << (Q_INT32) initList.count(); // Nr of init services.
for(KService::List::Iterator it = initList.begin();
it != initList.end();
++it)
{
- str << (TQ_INT32) (*it)->offset();
+ str << (Q_INT32) (*it)->offset();
}
}
void
KBuildServiceFactory::addEntry(KSycocaEntry *newEntry, const char *resource)
{
- if (m_dupeDict.tqfind(newEntry))
+ if (m_dupeDict.find(newEntry))
return;
KSycocaFactory::addEntry(newEntry, resource);
@@ -244,7 +244,7 @@ KBuildServiceFactory::addEntry(KSycocaEntry *newEntry, const char *resource)
TQString name = service->desktopEntryName();
m_nameDict->add( name, newEntry );
- m_serviceDict.tqreplace(name, service);
+ m_serviceDict.replace(name, service);
TQString relName = service->desktopEntryPath();
m_relNameDict->add( relName, newEntry );
diff --git a/kded/kbuildservicefactory.h b/kded/kbuildservicefactory.h
index 3b6e416ae..eca439c5d 100644
--- a/kded/kbuildservicefactory.h
+++ b/kded/kbuildservicefactory.h
@@ -43,7 +43,7 @@ public:
virtual ~KBuildServiceFactory();
- KService *tqfindServiceByName(const TQString &_name);
+ KService *findServiceByName(const TQString &_name);
/**
* Construct a KService from a config file.
diff --git a/kded/kbuildservicegroupfactory.cpp b/kded/kbuildservicegroupfactory.cpp
index b4a9ca8e6..e75931182 100644
--- a/kded/kbuildservicegroupfactory.cpp
+++ b/kded/kbuildservicegroupfactory.cpp
@@ -59,7 +59,7 @@ KBuildServiceGroupFactory::createEntry( const TQString&, const char * )
void KBuildServiceGroupFactory::addNewEntryTo( const TQString &menuName, KService *newEntry)
{
KServiceGroup *entry = 0;
- KSycocaEntry::Ptr *ptr = m_entryDict->tqfind(menuName);
+ KSycocaEntry::Ptr *ptr = m_entryDict->find(menuName);
if (ptr)
entry = dynamic_cast<KServiceGroup *>(ptr->data());
@@ -74,7 +74,7 @@ void KBuildServiceGroupFactory::addNewEntryTo( const TQString &menuName, KServic
KServiceGroup *
KBuildServiceGroupFactory::addNew( const TQString &menuName, const TQString& file, KServiceGroup *entry, bool isDeleted)
{
- KSycocaEntry::Ptr *ptr = m_entryDict->tqfind(menuName);
+ KSycocaEntry::Ptr *ptr = m_entryDict->find(menuName);
if (ptr)
{
kdWarning(7021) << "KBuildServiceGroupFactory::addNew( " << menuName << ", " << file << " ): menu already exists!" << endl;
@@ -94,14 +94,14 @@ KBuildServiceGroupFactory::addNew( const TQString &menuName, const TQString& fil
// Make sure parent dir exists.
KServiceGroup *parentEntry = 0;
TQString parent = menuName.left(menuName.length()-1);
- int i = parent.tqfindRev('/');
+ int i = parent.findRev('/');
if (i > 0) {
parent = parent.left(i+1);
} else {
parent = "/";
}
parentEntry = 0;
- ptr = m_entryDict->tqfind(parent);
+ ptr = m_entryDict->find(parent);
if (ptr)
parentEntry = dynamic_cast<KServiceGroup *>(ptr->data());
if (!parentEntry)
@@ -123,7 +123,7 @@ KBuildServiceGroupFactory::addNewChild( const TQString &parent, const char *reso
TQString name = "#parent#"+parent;
KServiceGroup *entry = 0;
- KSycocaEntry::Ptr *ptr = m_entryDict->tqfind(name);
+ KSycocaEntry::Ptr *ptr = m_entryDict->find(name);
if (ptr)
entry = dynamic_cast<KServiceGroup *>(ptr->data());
@@ -157,7 +157,7 @@ KBuildServiceGroupFactory::saveHeader(TQDataStream &str)
{
KSycocaFactory::saveHeader(str);
- str << (TQ_INT32) m_baseGroupDictOffset;
+ str << (Q_INT32) m_baseGroupDictOffset;
}
void
diff --git a/kded/kbuildservicetypefactory.cpp b/kded/kbuildservicetypefactory.cpp
index ddeff23fe..b5259c5cd 100644
--- a/kded/kbuildservicetypefactory.cpp
+++ b/kded/kbuildservicetypefactory.cpp
@@ -54,7 +54,7 @@ KBuildServiceTypeFactory::~KBuildServiceTypeFactory()
delete m_resourceList;
}
-KServiceType * KBuildServiceTypeFactory::tqfindServiceTypeByName(const TQString &_name)
+KServiceType * KBuildServiceTypeFactory::findServiceTypeByName(const TQString &_name)
{
assert (KSycoca::self()->isBuilding());
// We're building a database - the service type must be in memory
@@ -69,7 +69,7 @@ KSycocaEntry *
KBuildServiceTypeFactory::createEntry(const TQString &file, const char *resource)
{
TQString name = file;
- int pos = name.tqfindRev('/');
+ int pos = name.findRev('/');
if (pos != -1)
{
name = name.mid(pos+1);
@@ -133,14 +133,14 @@ void
KBuildServiceTypeFactory::saveHeader(TQDataStream &str)
{
KSycocaFactory::saveHeader(str);
- str << (TQ_INT32) m_fastPatternOffset;
- str << (TQ_INT32) m_otherPatternOffset;
- str << (TQ_INT32) m_propertyTypeDict.count();
+ str << (Q_INT32) m_fastPatternOffset;
+ str << (Q_INT32) m_otherPatternOffset;
+ str << (Q_INT32) m_propertyTypeDict.count();
TQMapIterator<TQString, int> it;
for (it = m_propertyTypeDict.begin(); it != m_propertyTypeDict.end(); ++it)
{
- str << it.key() << (TQ_INT32)it.data();
+ str << it.key() << (Q_INT32)it.data();
}
}
@@ -183,8 +183,8 @@ KBuildServiceTypeFactory::savePatternLists(TQDataStream &str)
for ( ; patit != pat.end() ; ++patit )
{
const TQString &pattern = *patit;
- if ( pattern.tqfindRev('*') == 0
- && pattern.tqfindRev('.') == 1
+ if ( pattern.findRev('*') == 0
+ && pattern.findRev('.') == 1
&& pattern.length() <= 6 )
// it starts with "*.", has no other '*' and no other '.', and is max 6 chars
// => fast patttern
@@ -193,15 +193,15 @@ KBuildServiceTypeFactory::savePatternLists(TQDataStream &str)
otherPatterns.append( pattern );
// Assumption : there is only one mimetype for that pattern
// It doesn't really make sense otherwise, anyway.
- dict.tqreplace( pattern, mimeType );
+ dict.replace( pattern, mimeType );
}
}
}
// Sort the list - the fast one, useless for the other one
fastPatterns.sort();
- TQ_INT32 entrySize = 0;
- TQ_INT32 nrOfEntries = 0;
+ Q_INT32 entrySize = 0;
+ Q_INT32 nrOfEntries = 0;
m_fastPatternOffset = str.device()->at();
@@ -267,7 +267,7 @@ KBuildServiceTypeFactory::addEntry(KSycocaEntry *newEntry, const char *resource)
TQMap<TQString,TQVariant::Type>::ConstIterator pit = pd.begin();
for( ; pit != pd.end(); ++pit )
{
- if (!m_propertyTypeDict.tqcontains(pit.key()))
+ if (!m_propertyTypeDict.contains(pit.key()))
m_propertyTypeDict.insert(pit.key(), pit.data());
else if (m_propertyTypeDict[pit.key()] != pit.data())
kdWarning(7021) << "Property '"<< pit.key() << "' is defined multiple times ("<< serviceType->name() <<")" <<endl;
diff --git a/kded/kbuildservicetypefactory.h b/kded/kbuildservicetypefactory.h
index 311ae4120..a68b8851b 100644
--- a/kded/kbuildservicetypefactory.h
+++ b/kded/kbuildservicetypefactory.h
@@ -41,7 +41,7 @@ public:
* Find a service type in the database file
* @return a pointer to the servicetype in the memory dict (don't free!)
*/
- virtual KServiceType * tqfindServiceTypeByName(const TQString &_name);
+ virtual KServiceType * findServiceTypeByName(const TQString &_name);
/**
* Construct a KServiceType from a config file.
diff --git a/kded/kbuildsycoca.cpp b/kded/kbuildsycoca.cpp
index f8fb35cf4..9df927ca8 100644
--- a/kded/kbuildsycoca.cpp
+++ b/kded/kbuildsycoca.cpp
@@ -68,13 +68,13 @@
typedef TQDict<KSycocaEntry> KBSEntryDict;
typedef TQValueList<KSycocaEntry::List> KSycocaEntryListList;
-static TQ_UINT32 newTimestamp = 0;
+static Q_UINT32 newTimestamp = 0;
static KBuildServiceFactory *g_bsf = 0;
static KBuildServiceGroupFactory *g_bsgf = 0;
static KSycocaFactory *g_factory = 0;
static KCTimeInfo *g_ctimeInfo = 0;
-static TQDict<TQ_UINT32> *g_ctimeDict = 0;
+static TQDict<Q_UINT32> *g_ctimeDict = 0;
static const char *g_resource = 0;
static KBSEntryDict *g_entryDict = 0;
static KBSEntryDict *g_serviceGroupEntryDict = 0;
@@ -160,15 +160,15 @@ void KBuildSycoca::processGnomeVfs()
if (line[0] != '\t')
{
- app = TQString::tqfromLatin1(line);
+ app = TQString::fromLatin1(line);
app.truncate(app.length()-1);
}
else if (strncmp(line+1, "mime_types=", 11) == 0)
{
- TQString mimetypes = TQString::tqfromLatin1(line+12);
+ TQString mimetypes = TQString::fromLatin1(line+12);
mimetypes.truncate(mimetypes.length()-1);
- mimetypes.tqreplace(TQRegExp("\\*"), "all");
- KService *s = g_bsf->tqfindServiceByName(app);
+ mimetypes.replace(TQRegExp("\\*"), "all");
+ KService *s = g_bsf->findServiceByName(app);
if (!s)
continue;
@@ -186,7 +186,7 @@ void KBuildSycoca::processGnomeVfs()
KSycocaEntry *KBuildSycoca::createEntry(const TQString &file, bool addToFactory)
{
- TQ_UINT32 timeStamp = g_ctimeInfo->ctime(file);
+ Q_UINT32 timeStamp = g_ctimeInfo->ctime(file);
if (!timeStamp)
{
timeStamp = KGlobal::dirs()->calcResourceHash( g_resource, file, true);
@@ -195,23 +195,23 @@ KSycocaEntry *KBuildSycoca::createEntry(const TQString &file, bool addToFactory)
if (g_allEntries)
{
assert(g_ctimeDict);
- TQ_UINT32 *timeP = (*g_ctimeDict)[file];
- TQ_UINT32 oldTimestamp = timeP ? *timeP : 0;
+ Q_UINT32 *timeP = (*g_ctimeDict)[file];
+ Q_UINT32 oldTimestamp = timeP ? *timeP : 0;
if (timeStamp && (timeStamp == oldTimestamp))
{
// Re-use old entry
if (g_factory == g_bsgf) // Strip .directory from service-group entries
{
- entry = g_entryDict->tqfind(file.left(file.length()-10));
+ entry = g_entryDict->find(file.left(file.length()-10));
}
else if (g_factory == g_bsf)
{
- entry = g_entryDict->tqfind(file);
+ entry = g_entryDict->find(file);
}
else
{
- entry = g_entryDict->tqfind(file);
+ entry = g_entryDict->find(file);
}
// remove from g_ctimeDict; if g_ctimeDict is not empty
// after all files have been processed, it means
@@ -300,7 +300,7 @@ bool KBuildSycoca::build()
++it1 )
{
KSycocaResource res = (*it1);
- if (!allResources.tqcontains(res.resource))
+ if (!allResources.contains(res.resource))
allResources.append(res.resource);
}
}
@@ -324,7 +324,7 @@ bool KBuildSycoca::build()
relFiles);
- // Now tqfind all factories that use this resource....
+ // Now find all factories that use this resource....
// For each factory
g_entryDict = entryDictList->first();
for (g_factory = m_lstFactories->first();
@@ -382,7 +382,7 @@ bool KBuildSycoca::build()
VFolderMenu::SubMenu *kdeMenu = g_vfolder->parseMenu("applications.menu", true);
KServiceGroup *entry = g_bsgf->addNew("/", kdeMenu->directoryFile, 0, false);
- entry->setLayoutInfo(kdeMenu->tqlayoutList);
+ entry->setLayoutInfo(kdeMenu->layoutList);
createMenu(TQString::null, TQString::null, kdeMenu);
KServiceGroup::Ptr g(entry);
@@ -414,7 +414,7 @@ void KBuildSycoca::createMenu(TQString caption, TQString name, VFolderMenu::SubM
TQString directoryFile = subMenu->directoryFile;
if (directoryFile.isEmpty())
directoryFile = subName+".directory";
- TQ_UINT32 timeStamp = g_ctimeInfo->ctime(directoryFile);
+ Q_UINT32 timeStamp = g_ctimeInfo->ctime(directoryFile);
if (!timeStamp)
{
timeStamp = KGlobal::dirs()->calcResourceHash( g_resource, directoryFile, true);
@@ -423,12 +423,12 @@ void KBuildSycoca::createMenu(TQString caption, TQString name, VFolderMenu::SubM
KServiceGroup* entry = 0;
if (g_allEntries)
{
- TQ_UINT32 *timeP = (*g_ctimeDict)[directoryFile];
- TQ_UINT32 oldTimestamp = timeP ? *timeP : 0;
+ Q_UINT32 *timeP = (*g_ctimeDict)[directoryFile];
+ Q_UINT32 oldTimestamp = timeP ? *timeP : 0;
if (timeStamp && (timeStamp == oldTimestamp))
{
- entry = dynamic_cast<KServiceGroup *> (g_serviceGroupEntryDict->tqfind(subName));
+ entry = dynamic_cast<KServiceGroup *> (g_serviceGroupEntryDict->find(subName));
if (entry && (entry->directoryEntryPath() != directoryFile))
entry = 0; // Can't reuse this one!
}
@@ -436,7 +436,7 @@ void KBuildSycoca::createMenu(TQString caption, TQString name, VFolderMenu::SubM
g_ctimeInfo->addCTime(directoryFile, timeStamp);
entry = g_bsgf->addNew(subName, subMenu->directoryFile, entry, subMenu->isDeleted);
- entry->setLayoutInfo(subMenu->tqlayoutList);
+ entry->setLayoutInfo(subMenu->layoutList);
if (! (bMenuTest && entry->noDisplay()) )
createMenu(caption + entry->caption() + "/", subName, subMenu);
}
@@ -543,15 +543,15 @@ void KBuildSycoca::save()
// Write header (#pass 1)
m_str->device()->at(0);
- (*m_str) << (TQ_INT32) KSycoca::version();
+ (*m_str) << (Q_INT32) KSycoca::version();
KSycocaFactory * servicetypeFactory = 0L;
KSycocaFactory * serviceFactory = 0L;
for(KSycocaFactory *factory = m_lstFactories->first();
factory;
factory = m_lstFactories->next())
{
- TQ_INT32 aId;
- TQ_INT32 aOffset;
+ Q_INT32 aId;
+ Q_INT32 aOffset;
aId = factory->factoryId();
if ( aId == KST_KServiceTypeFactory )
servicetypeFactory = factory;
@@ -561,7 +561,7 @@ void KBuildSycoca::save()
(*m_str) << aId;
(*m_str) << aOffset;
}
- (*m_str) << (TQ_INT32) 0; // No more factories.
+ (*m_str) << (Q_INT32) 0; // No more factories.
// Write KDEDIRS
(*m_str) << KGlobal::dirs()->kfsstnd_prefixes();
(*m_str) << newTimestamp;
@@ -584,19 +584,19 @@ void KBuildSycoca::save()
// Write header (#pass 2)
m_str->device()->at(0);
- (*m_str) << (TQ_INT32) KSycoca::version();
+ (*m_str) << (Q_INT32) KSycoca::version();
for(KSycocaFactory *factory = m_lstFactories->first();
factory;
factory = m_lstFactories->next())
{
- TQ_INT32 aId;
- TQ_INT32 aOffset;
+ Q_INT32 aId;
+ Q_INT32 aOffset;
aId = factory->factoryId();
aOffset = factory->offset();
(*m_str) << aId;
(*m_str) << aOffset;
}
- (*m_str) << (TQ_INT32) 0; // No more factories.
+ (*m_str) << (Q_INT32) 0; // No more factories.
// Jump to end of database
m_str->device()->at(endOfData);
@@ -640,7 +640,7 @@ bool KBuildSycoca::checkDirTimestamps( const TQString& dirname, const TQDateTime
// and also their directories
// if all of them all older than the timestamp in file ksycocastamp, this
// means that there's no need to rebuild ksycoca
-bool KBuildSycoca::checkTimestamps( TQ_UINT32 timestamp, const TQStringList &dirs )
+bool KBuildSycoca::checkTimestamps( Q_UINT32 timestamp, const TQStringList &dirs )
{
kdDebug( 7021 ) << "checking file timestamps" << endl;
TQDateTime stamp;
@@ -709,7 +709,7 @@ static KCmdLineOptions options[] = {
static const char appName[] = "kbuildsycoca";
static const char appVersion[] = "1.1";
-class WaitForSignal : public TQObject
+class WaitForSignal : public QObject
{
public:
~WaitForSignal() { kapp->eventLoop()->exitLoop(); }
@@ -806,8 +806,8 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
KSycoca::self()->disableAutoRebuild(); // Prevent deadlock
TQString current_language = KGlobal::locale()->language();
TQString ksycoca_language = KSycoca::self()->language();
- TQ_UINT32 current_update_sig = KGlobal::dirs()->calcResourceHash("services", "update_ksycoca", true);
- TQ_UINT32 ksycoca_update_sig = KSycoca::self()->updateSignature();
+ Q_UINT32 current_update_sig = KGlobal::dirs()->calcResourceHash("services", "update_ksycoca", true);
+ Q_UINT32 ksycoca_update_sig = KSycoca::self()->updateSignature();
if ((current_update_sig != ksycoca_update_sig) ||
(current_language != ksycoca_language) ||
@@ -822,7 +822,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
g_changeList = new TQStringList;
bool checkstamps = incremental && args->isSet("checkstamps") && checkfiles;
- TQ_UINT32 filestamp = 0;
+ Q_UINT32 filestamp = 0;
TQStringList oldresourcedirs;
if( checkstamps && incremental )
{
@@ -859,7 +859,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
cSycocaPath = 0;
}
- newTimestamp = (TQ_UINT32) time(0);
+ newTimestamp = (Q_UINT32) time(0);
if( checkfiles && ( !checkstamps || !KBuildSycoca::checkTimestamps( filestamp, oldresourcedirs )))
{
@@ -874,7 +874,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
KSycoca *oldSycoca = KSycoca::self();
KSycocaFactoryList *factories = new KSycocaFactoryList;
g_allEntries = new KSycocaEntryListList;
- g_ctimeDict = new TQDict<TQ_UINT32>(523);
+ g_ctimeDict = new TQDict<Q_UINT32>(523);
// Must be in same order as in KBuildSycoca::recreate()!
factories->append( new KServiceTypeFactory );
diff --git a/kded/kbuildsycoca.h b/kded/kbuildsycoca.h
index f98001781..0f90c3df6 100644
--- a/kded/kbuildsycoca.h
+++ b/kded/kbuildsycoca.h
@@ -47,7 +47,7 @@ public:
*/
bool recreate();
- static bool checkTimestamps( TQ_UINT32 timestamp, const TQStringList &dirs );
+ static bool checkTimestamps( Q_UINT32 timestamp, const TQStringList &dirs );
static TQStringList existingResourceDirs();
diff --git a/kded/kctimefactory.cpp b/kded/kctimefactory.cpp
index 15e43767a..25d78bab0 100644
--- a/kded/kctimefactory.cpp
+++ b/kded/kctimefactory.cpp
@@ -54,13 +54,13 @@ KCTimeInfo::save(TQDataStream &str)
KSycocaFactory::save(str);
m_dictOffset = str.device()->at();
- TQDictIterator<TQ_UINT32> it(ctimeDict);
+ TQDictIterator<Q_UINT32> it(ctimeDict);
while( it.current())
{
str << it.currentKey() << *(it.current());
++it;
}
- str << TQString::null << (TQ_UINT32) 0;
+ str << TQString::null << (Q_UINT32) 0;
int endOfFactoryData = str.device()->at();
@@ -69,31 +69,31 @@ KCTimeInfo::save(TQDataStream &str)
}
void
-KCTimeInfo::addCTime(const TQString &path, TQ_UINT32 ctime)
+KCTimeInfo::addCTime(const TQString &path, Q_UINT32 ctime)
{
assert(!path.isEmpty());
- ctimeDict.tqreplace(path, new TQ_UINT32(ctime));
+ ctimeDict.replace(path, new Q_UINT32(ctime));
}
-TQ_UINT32
+Q_UINT32
KCTimeInfo::ctime(const TQString &path)
{
- TQ_UINT32 *ctimeP = ctimeDict[path];
+ Q_UINT32 *ctimeP = ctimeDict[path];
return ctimeP ? *ctimeP : 0;
}
void
-KCTimeInfo::fillCTimeDict(TQDict<TQ_UINT32> &dict)
+KCTimeInfo::fillCTimeDict(TQDict<Q_UINT32> &dict)
{
assert(m_str);
m_str->device()->at(m_dictOffset);
TQString path;
- TQ_UINT32 ctime;
+ Q_UINT32 ctime;
while(true)
{
KSycocaEntry::read(*m_str, path);
(*m_str) >> ctime;
if (path.isEmpty()) break;
- dict.tqreplace(path, new TQ_UINT32(ctime));
+ dict.replace(path, new Q_UINT32(ctime));
}
}
diff --git a/kded/kctimefactory.h b/kded/kctimefactory.h
index 64cfe6c19..b878b3033 100644
--- a/kded/kctimefactory.h
+++ b/kded/kctimefactory.h
@@ -50,14 +50,14 @@ public:
KSycocaEntry * createEntry(const TQString &, const char *) { return 0; }
KSycocaEntry * createEntry(int) { return 0; }
- void addCTime(const TQString &path, TQ_UINT32 ctime);
+ void addCTime(const TQString &path, Q_UINT32 ctime);
- TQ_UINT32 ctime(const TQString &path);
+ Q_UINT32 ctime(const TQString &path);
- void fillCTimeDict(TQDict<TQ_UINT32> &dict);
+ void fillCTimeDict(TQDict<Q_UINT32> &dict);
protected:
- TQDict<TQ_UINT32> ctimeDict;
+ TQDict<Q_UINT32> ctimeDict;
int m_dictOffset;
};
diff --git a/kded/kde-menu.cpp b/kded/kde-menu.cpp
index 142ed3916..89ee5a857 100644
--- a/kded/kde-menu.cpp
+++ b/kded/kde-menu.cpp
@@ -34,8 +34,8 @@
static KCmdLineOptions options[] = {
{ "utf8", I18N_NOOP("Output data in UTF-8 instead of local encoding"), 0 },
- { "print-menu-id", I18N_NOOP("Print menu-id of the menu that tqcontains\nthe application"), 0 },
- { "print-menu-name", I18N_NOOP("Print menu name (caption) of the menu that\ntqcontains the application"), 0 },
+ { "print-menu-id", I18N_NOOP("Print menu-id of the menu that contains\nthe application"), 0 },
+ { "print-menu-name", I18N_NOOP("Print menu name (caption) of the menu that\ncontains the application"), 0 },
{ "highlight", I18N_NOOP("Highlight the entry in the menu"), 0 },
{ "nocache-update", I18N_NOOP("Do not check if sycoca database is up to date"), 0 },
{ "+<application-id>", I18N_NOOP("The id of the menu entry to locate"), 0 },
@@ -64,7 +64,7 @@ static void error(int exitCode, const TQString &txt)
exit(exitCode);
}
-static void tqfindMenuEntry(KServiceGroup::Ptr parent, const TQString &name, const TQString &menuId)
+static void findMenuEntry(KServiceGroup::Ptr parent, const TQString &name, const TQString &menuId)
{
KServiceGroup::List list = parent->entries(true, true, false);
KServiceGroup::List::ConstIterator it = list.begin();
@@ -76,7 +76,7 @@ static void tqfindMenuEntry(KServiceGroup::Ptr parent, const TQString &name, con
{
KServiceGroup::Ptr g(static_cast<KServiceGroup *>(e));
- tqfindMenuEntry(g, name.isEmpty() ? g->caption() : name+"/"+g->caption(), menuId);
+ findMenuEntry(g, name.isEmpty() ? g->caption() : name+"/"+g->caption(), menuId);
}
else if (e->isType(KST_KService))
{
@@ -109,7 +109,7 @@ int main(int argc, char **argv)
{
KLocale::setMainCatalogue("kdelibs");
const char *description = I18N_NOOP("KDE Menu query tool.\n"
- "This tool can be used to tqfind in which menu a specific application is shown.\n"
+ "This tool can be used to find in which menu a specific application is shown.\n"
"The --highlight option can be used to visually indicate to the user where\n"
"in the KDE menu a specific application is located.");
@@ -163,7 +163,7 @@ int main(int argc, char **argv)
if (!s)
error(1, i18n("No menu item '%1'.").arg(menuId));
- tqfindMenuEntry(KServiceGroup::root(), "", menuId);
+ findMenuEntry(KServiceGroup::root(), "", menuId);
error(2, i18n("Menu item '%1' not found in menu.").arg(menuId));
return 2;
diff --git a/kded/kded.cpp b/kded/kded.cpp
index 59933c8f3..d33bfc6b3 100644
--- a/kded/kded.cpp
+++ b/kded/kded.cpp
@@ -247,7 +247,7 @@ void Kded::noDemandLoad(const TQString &obj)
KDEDModule *Kded::loadModule(const TQCString &obj, bool onDemand)
{
- KDEDModule *module = m_modules.tqfind(obj);
+ KDEDModule *module = m_modules.find(obj);
if (module)
return module;
KService::Ptr s = KService::serviceByDesktopPath("kded/"+obj+".desktop");
@@ -260,7 +260,7 @@ KDEDModule *Kded::loadModule(const KService *s, bool onDemand)
if (s && !s->library().isEmpty())
{
TQCString obj = s->desktopEntryName().latin1();
- KDEDModule *oldModule = m_modules.tqfind(obj);
+ KDEDModule *oldModule = m_modules.find(obj);
if (oldModule)
return oldModule;
@@ -374,7 +374,7 @@ void Kded::slotApplicationRemoved(const TQCString &appId)
it.current()->removeAll(appId);
}
- TQValueList<long> *windowIds = m_windowIdList.tqfind(appId);
+ TQValueList<long> *windowIds = m_windowIdList.find(appId);
if (windowIds)
{
for( TQValueList<long>::ConstIterator it = windowIds->begin();
@@ -428,7 +428,7 @@ void Kded::updateResourceList()
it != dirs.end();
++it )
{
- if (m_allResourceDirs.tqfind(*it) == m_allResourceDirs.end())
+ if (m_allResourceDirs.find(*it) == m_allResourceDirs.end())
{
m_allResourceDirs.append(*it);
readDirectory(*it);
@@ -562,7 +562,7 @@ void Kded::readDirectory( const TQString& _path )
if ( path.right(1) != "/" )
path += "/";
- if ( m_pDirWatch->tqcontains( path ) ) // Already seen this one?
+ if ( m_pDirWatch->contains( path ) ) // Already seen this one?
return;
TQDir d( _path, TQString::null, TQDir::Unsorted, TQDir::Readable | TQDir::Executable | TQDir::Dirs | TQDir::Hidden );
@@ -603,18 +603,18 @@ void Kded::readDirectory( const TQString& _path )
bool Kded::isWindowRegistered(long windowId)
{
- return m_globalWindowIdList.tqfind(windowId) != 0;
+ return m_globalWindowIdList.find(windowId) != 0;
}
// DCOP
void Kded::registerWindowId(long windowId)
{
- m_globalWindowIdList.tqreplace(windowId, &windowId);
+ m_globalWindowIdList.replace(windowId, &windowId);
TQCString sender = callingDcopClient()->senderId();
if( sender.isEmpty()) // local call
sender = callingDcopClient()->appId();
- TQValueList<long> *windowIds = m_windowIdList.tqfind(sender);
+ TQValueList<long> *windowIds = m_windowIdList.find(sender);
if (!windowIds)
{
windowIds = new TQValueList<long>;
@@ -636,7 +636,7 @@ void Kded::unregisterWindowId(long windowId)
TQCString sender = callingDcopClient()->senderId();
if( sender.isEmpty()) // local call
sender = callingDcopClient()->appId();
- TQValueList<long> *windowIds = m_windowIdList.tqfind(sender);
+ TQValueList<long> *windowIds = m_windowIdList.find(sender);
if (windowIds)
{
windowIds->remove(windowId);
@@ -674,7 +674,7 @@ KUpdateD::KUpdateD()
if (path[path.length()-1] != '/')
path += "/";
- if (!m_pDirWatch->tqcontains(path))
+ if (!m_pDirWatch->contains(path))
m_pDirWatch->addDir(path);
}
}
diff --git a/kded/kded.h b/kded/kded.h
index b30549083..1b6ebe481 100644
--- a/kded/kded.h
+++ b/kded/kded.h
@@ -173,7 +173,7 @@ private:
static Kded *_self;
};
-class KUpdateD : public TQObject
+class KUpdateD : public QObject
{
Q_OBJECT
public:
@@ -200,7 +200,7 @@ private:
TQTimer* m_pTimer;
};
-class KHostnameD : public TQObject
+class KHostnameD : public QObject
{
Q_OBJECT
public:
diff --git a/kded/kdedmodule.cpp b/kded/kdedmodule.cpp
index cc65abcde..ca28a5c62 100644
--- a/kded/kdedmodule.cpp
+++ b/kded/kdedmodule.cpp
@@ -69,24 +69,24 @@ void KDEDModule::insert(const TQCString &app, const TQCString &key, KShared *obj
// appKey acts as a placeholder
KEntryKey appKey(app, 0);
- d->objMap->tqreplace(appKey, 0);
+ d->objMap->replace(appKey, 0);
KEntryKey indexKey(app, key);
// Prevent deletion in case the same object is inserted again.
KSharedPtr<KShared> _obj = obj;
- d->objMap->tqreplace(indexKey, _obj);
+ d->objMap->replace(indexKey, _obj);
resetIdle();
}
-KShared * KDEDModule::tqfind(const TQCString &app, const TQCString &key)
+KShared * KDEDModule::find(const TQCString &app, const TQCString &key)
{
if (!d->objMap)
return 0;
KEntryKey indexKey(app, key);
- KDEDObjectMap::Iterator it = d->objMap->tqfind(indexKey);
+ KDEDObjectMap::Iterator it = d->objMap->find(indexKey);
if (it == d->objMap->end())
return 0;
@@ -111,7 +111,7 @@ void KDEDModule::removeAll(const TQCString &app)
KEntryKey indexKey(app, 0);
// Search for placeholder.
- KDEDObjectMap::Iterator it = d->objMap->tqfind(indexKey);
+ KDEDObjectMap::Iterator it = d->objMap->find(indexKey);
while (it != d->objMap->end())
{
KDEDObjectMap::Iterator it2 = it++;
diff --git a/kded/kdedmodule.h b/kded/kdedmodule.h
index 1bd0eeebc..041f50303 100644
--- a/kded/kdedmodule.h
+++ b/kded/kdedmodule.h
@@ -36,7 +36,7 @@ class Kded;
* libraries that are loaded on-demand into kded at runtime.
*
* To write a config module, you have to create a library
- * that tqcontains at least one factory function like this:
+ * that contains at least one factory function like this:
*
* \code
* extern "C" {
@@ -96,7 +96,7 @@ public:
/**
* Lookup object indexed with @p app and @p key
*/
- KShared *tqfind(const TQCString &app, const TQCString &key);
+ KShared *find(const TQCString &app, const TQCString &key);
/**
* remove object indexed with @p app and @p key.
diff --git a/kded/khostname.cpp b/kded/khostname.cpp
index 3e9740054..0fa837a2c 100644
--- a/kded/khostname.cpp
+++ b/kded/khostname.cpp
@@ -82,7 +82,7 @@ KHostName::KHostName()
display = ::getenv("DISPLAY");
// strip the screen number from the display
- display.tqreplace(TQRegExp("\\.[0-9]+$"), "");
+ display.replace(TQRegExp("\\.[0-9]+$"), "");
if (display.isEmpty())
{
fprintf(stderr, "%s", i18n("Error: DISPLAY environment variable not set.\n").local8Bit().data());
@@ -145,14 +145,14 @@ void KHostName::changeX()
TQCString authName = entries[1];
TQCString authKey = entries[2];
- int i = netId.tqfindRev(':');
+ int i = netId.findRev(':');
if (i == -1)
continue;
TQCString netDisplay = netId.mid(i);
if (netDisplay != display)
continue;
- i = netId.tqfind('/');
+ i = netId.find('/');
if (i == -1)
continue;
@@ -208,7 +208,7 @@ void KHostName::changeDcop()
if (!newName.isEmpty())
{
- int i = line1.tqfindRev(':');
+ int i = line1.findRev(':');
if (i == -1)
{
fprintf(stderr, "Warning: File '%s' has unexpected format.\n", fname.data());
@@ -286,7 +286,7 @@ void KHostName::changeDcop()
// Remove old entries, but only if XAUTHLOCALHOSTNAME doesn't point
// to it
char* xauthlocalhostname = getenv("XAUTHLOCALHOSTNAME");
- if (!xauthlocalhostname || !oldNetId.tqcontains(xauthlocalhostname))
+ if (!xauthlocalhostname || !oldNetId.contains(xauthlocalhostname))
{
TQString cmd = "iceauth remove "+KProcess::quote("netid="+oldNetId);
system(TQFile::encodeName(cmd));
@@ -340,7 +340,7 @@ void KHostName::changeSessionManager()
fprintf(stderr, "Warning: No session management specified.\n");
return;
}
- int i = sm.tqfindRev(':');
+ int i = sm.findRev(':');
if ((i == -1) || (sm.left(6) != "local/"))
{
fprintf(stderr, "Warning: Session Management socket '%s' has unexpected format.\n", sm.data());
diff --git a/kded/vfolder_menu.cpp b/kded/vfolder_menu.cpp
index e939d40e9..b48662cb2 100644
--- a/kded/vfolder_menu.cpp
+++ b/kded/vfolder_menu.cpp
@@ -39,7 +39,7 @@ static void foldNode(TQDomElement &docElem, TQDomElement &e, TQMap<TQString,TQDo
{
if (s.isEmpty())
s = e.text();
- TQMap<TQString,TQDomElement>::iterator it = dupeList.tqfind(s);
+ TQMap<TQString,TQDomElement>::iterator it = dupeList.find(s);
if (it != dupeList.end())
{
kdDebug(7021) << e.tagName() << " and " << s << " requires combining!" << endl;
@@ -50,7 +50,7 @@ static void foldNode(TQDomElement &docElem, TQDomElement &e, TQMap<TQString,TQDo
dupeList.insert(s, e);
}
-static void tqreplaceNode(TQDomElement &docElem, TQDomNode &n, const TQStringList &list, const TQString &tag)
+static void replaceNode(TQDomElement &docElem, TQDomNode &n, const TQStringList &list, const TQString &tag)
{
for(TQStringList::ConstIterator it = list.begin();
it != list.end(); ++it)
@@ -69,7 +69,7 @@ static void tqreplaceNode(TQDomElement &docElem, TQDomNode &n, const TQStringLis
void VFolderMenu::registerFile(const TQString &file)
{
- int i = file.tqfindRev('/');
+ int i = file.findRev('/');
if (i < 0)
return;
@@ -108,8 +108,8 @@ TQStringList VFolderMenu::allDirectories()
static void
track(const TQString &menuId, const TQString &menuName, TQDict<KService> *includeList, TQDict<KService> *excludeList, TQDict<KService> *itemList, const TQString &comment)
{
- if (itemList->tqfind(menuId))
- printf("%s: %s INCL %d EXCL %d\n", menuName.latin1(), comment.latin1(), includeList->tqfind(menuId) ? 1 : 0, excludeList->tqfind(menuId) ? 1 : 0);
+ if (itemList->find(menuId))
+ printf("%s: %s INCL %d EXCL %d\n", menuName.latin1(), comment.latin1(), includeList->find(menuId) ? 1 : 0, excludeList->find(menuId) ? 1 : 0);
}
void
@@ -117,7 +117,7 @@ VFolderMenu::includeItems(TQDict<KService> *items1, TQDict<KService> *items2)
{
for(TQDictIterator<KService> it(*items2); it.current(); ++it)
{
- items1->tqreplace(it.current()->menuId(), it.current());
+ items1->replace(it.current()->menuId(), it.current());
}
}
@@ -128,7 +128,7 @@ VFolderMenu::matchItems(TQDict<KService> *items1, TQDict<KService> *items2)
{
TQString id = it.current()->menuId();
++it;
- if (!items2->tqfind(id))
+ if (!items2->find(id))
items1->remove(id);
}
}
@@ -145,7 +145,7 @@ VFolderMenu::excludeItems(TQDict<KService> *items1, TQDict<KService> *items2)
VFolderMenu::SubMenu*
VFolderMenu::takeSubMenu(SubMenu *parentMenu, const TQString &menuName)
{
- int i = menuName.tqfind('/');
+ int i = menuName.find('/');
TQString s1 = i > 0 ? menuName.left(i) : menuName;
TQString s2 = menuName.mid(i+1);
@@ -205,8 +205,8 @@ VFolderMenu::mergeMenu(SubMenu *menu1, SubMenu *menu2, bool reversePriority)
menu1->directoryFile = menu2->directoryFile;
if (menu1->defaultLayoutNode.isNull())
menu1->defaultLayoutNode = menu2->defaultLayoutNode;
- if (menu1->tqlayoutNode.isNull())
- menu1->tqlayoutNode = menu2->tqlayoutNode;
+ if (menu1->layoutNode.isNull())
+ menu1->layoutNode = menu2->layoutNode;
}
else
{
@@ -215,8 +215,8 @@ VFolderMenu::mergeMenu(SubMenu *menu1, SubMenu *menu2, bool reversePriority)
menu1->directoryFile = menu2->directoryFile;
if (!menu2->defaultLayoutNode.isNull())
menu1->defaultLayoutNode = menu2->defaultLayoutNode;
- if (!menu2->tqlayoutNode.isNull())
- menu1->tqlayoutNode = menu2->tqlayoutNode;
+ if (!menu2->layoutNode.isNull())
+ menu1->layoutNode = menu2->layoutNode;
}
if (m_track)
@@ -231,7 +231,7 @@ VFolderMenu::mergeMenu(SubMenu *menu1, SubMenu *menu2, bool reversePriority)
void
VFolderMenu::insertSubMenu(SubMenu *parentMenu, const TQString &menuName, SubMenu *newMenu, bool reversePriority)
{
- int i = menuName.tqfind('/');
+ int i = menuName.find('/');
TQString s1 = menuName.left(i);
TQString s2 = menuName.mid(i+1);
@@ -271,12 +271,12 @@ VFolderMenu::insertSubMenu(SubMenu *parentMenu, const TQString &menuName, SubMen
void
VFolderMenu::insertService(SubMenu *parentMenu, const TQString &name, KService *newService)
{
- int i = name.tqfind('/');
+ int i = name.find('/');
if (i == -1)
{
// Add it here
- parentMenu->items.tqreplace(newService->menuId(), newService);
+ parentMenu->items.replace(newService->menuId(), newService);
return;
}
@@ -324,19 +324,19 @@ VFolderMenu::~VFolderMenu()
for(appsInfo *info = m_appsInfoStack.first(); \
info; info = m_appsInfoStack.next()) \
{ \
- KService::List *list = info->dictCategories.tqfind(category); \
+ KService::List *list = info->dictCategories.find(category); \
if (list) for(KService::List::ConstIterator it = list->begin(); \
it != list->end(); ++it) \
{
#define FOR_CATEGORY_END } }
KService *
-VFolderMenu::tqfindApplication(const TQString &relPath)
+VFolderMenu::findApplication(const TQString &relPath)
{
for(appsInfo *info = m_appsInfoStack.first();
info; info = m_appsInfoStack.next())
{
- KService *s = info->applications.tqfind(relPath);
+ KService *s = info->applications.find(relPath);
if (s)
return s;
}
@@ -347,7 +347,7 @@ void
VFolderMenu::addApplication(const TQString &id, KService *service)
{
service->setMenuId(id);
- m_appsInfo->applications.tqreplace(id, service);
+ m_appsInfo->applications.replace(id, service);
}
void
@@ -364,7 +364,7 @@ VFolderMenu::buildApplicationIndex(bool unusedOnly)
KService *s = it.current();
TQDictIterator<KService> tmpIt = it;
++it;
- if (unusedOnly && m_usedAppsDict.tqfind(s->menuId()))
+ if (unusedOnly && m_usedAppsDict.find(s->menuId()))
{
// Remove and skip this one
info->applications.remove(tmpIt.currentKey());
@@ -376,7 +376,7 @@ VFolderMenu::buildApplicationIndex(bool unusedOnly)
it2 != cats.end(); ++it2)
{
const TQString &cat = *it2;
- KService::List *list = info->dictCategories.tqfind(cat);
+ KService::List *list = info->dictCategories.find(cat);
if (!list)
{
list = new KService::List();
@@ -546,7 +546,7 @@ VFolderMenu::mergeMenus(TQDomElement &docElem, TQString &name)
TQMap<TQString,TQDomElement> directoryDirNodes;
TQMap<TQString,TQDomElement> legacyDirNodes;
TQDomElement defaultLayoutNode;
- TQDomElement tqlayoutNode;
+ TQDomElement layoutNode;
TQDomNode n = docElem.firstChild();
while( !n.isNull() ) {
@@ -556,17 +556,17 @@ VFolderMenu::mergeMenus(TQDomElement &docElem, TQString &name)
}
else if( e.tagName() == "DefaultAppDirs") {
// Replace with m_defaultAppDirs
- tqreplaceNode(docElem, n, m_defaultAppDirs, "AppDir");
+ replaceNode(docElem, n, m_defaultAppDirs, "AppDir");
continue;
}
else if( e.tagName() == "DefaultDirectoryDirs") {
// Replace with m_defaultDirectoryDirs
- tqreplaceNode(docElem, n, m_defaultDirectoryDirs, "DirectoryDir");
+ replaceNode(docElem, n, m_defaultDirectoryDirs, "DirectoryDir");
continue;
}
else if( e.tagName() == "DefaultMergeDirs") {
// Replace with m_defaultMergeDirs
- tqreplaceNode(docElem, n, m_defaultMergeDirs, "MergeDir");
+ replaceNode(docElem, n, m_defaultMergeDirs, "MergeDir");
continue;
}
else if( e.tagName() == "AppDir") {
@@ -603,7 +603,7 @@ VFolderMenu::mergeMenus(TQDomElement &docElem, TQString &name)
else if( e.tagName() == "Menu") {
TQString name;
mergeMenus(e, name);
- TQMap<TQString,TQDomElement>::iterator it = menuNodes.tqfind(name);
+ TQMap<TQString,TQDomElement>::iterator it = menuNodes.find(name);
if (it != menuNodes.end())
{
TQDomElement docElem2 = *it;
@@ -684,9 +684,9 @@ VFolderMenu::mergeMenus(TQDomElement &docElem, TQString &name)
defaultLayoutNode = e;
}
else if( e.tagName() == "Layout") {
- if (!tqlayoutNode.isNull())
- docElem.removeChild(tqlayoutNode);
- tqlayoutNode = e;
+ if (!layoutNode.isNull())
+ docElem.removeChild(layoutNode);
+ layoutNode = e;
}
n = n.nextSibling();
}
@@ -719,7 +719,7 @@ VFolderMenu::pushDocInfo(const TQString &fileName, const TQString &baseDir)
return;
}
int i;
- i = baseName.tqfindRev('/');
+ i = baseName.findRev('/');
if (i > 0)
{
m_docInfo.baseDir = baseName.left(i+1);
@@ -739,7 +739,7 @@ VFolderMenu::pushDocInfoParent(const TQString &basePath, const TQString &baseDir
m_docInfo.baseDir = baseDir;
- TQString fileName = basePath.mid(basePath.tqfindRev('/')+1);
+ TQString fileName = basePath.mid(basePath.findRev('/')+1);
m_docInfo.baseName = fileName.left( fileName.length() - 5 );
TQString baseName = TQDir::cleanDirPath(m_docInfo.baseDir + fileName);
@@ -937,7 +937,7 @@ VFolderMenu::processCondition(TQDomElement &domElem, TQDict<KService> *items)
FOR_ALL_APPLICATIONS(it)
{
KService *s = it.current();
- items->tqreplace(s->menuId(), s);
+ items->replace(s->menuId(), s);
}
FOR_ALL_APPLICATIONS_END
@@ -958,7 +958,7 @@ VFolderMenu::processCondition(TQDomElement &domElem, TQDict<KService> *items)
FOR_CATEGORY(domElem.text(), it)
{
KService *s = *it;
- items->tqreplace(s->menuId(), s);
+ items->replace(s->menuId(), s);
}
FOR_CATEGORY_END
}
@@ -967,7 +967,7 @@ VFolderMenu::processCondition(TQDomElement &domElem, TQDict<KService> *items)
FOR_ALL_APPLICATIONS(it)
{
KService *s = it.current();
- items->tqreplace(s->menuId(), s);
+ items->replace(s->menuId(), s);
}
FOR_ALL_APPLICATIONS_END
}
@@ -975,9 +975,9 @@ VFolderMenu::processCondition(TQDomElement &domElem, TQDict<KService> *items)
{
TQString filename = domElem.text();
kdDebug(7021) << "Adding file " << filename << endl;
- KService *s = tqfindApplication(filename);
+ KService *s = findApplication(filename);
if (s)
- items->tqreplace(filename, s);
+ items->replace(filename, s);
}
}
@@ -1071,7 +1071,7 @@ kdDebug(7021) << "processKDELegacyDirs()" << endl;
{
TQString id = name;
// Strip path from id
- int i = id.tqfindRev('/');
+ int i = id.findRev('/');
if (i >= 0)
id = id.mid(i+1);
@@ -1079,7 +1079,7 @@ kdDebug(7021) << "processKDELegacyDirs()" << endl;
// TODO: add Legacy category
addApplication(id, service);
- items.tqreplace(service->menuId(), service);
+ items.replace(service->menuId(), service);
if (service->categories().isEmpty())
insertService(m_currentMenu, name, service);
@@ -1144,10 +1144,10 @@ kdDebug(7021) << "processLegacyDir(" << dir << ", " << relDir << ", " << prefix
// TODO: Add legacy category
addApplication(id, service);
- items.tqreplace(service->menuId(), service);
+ items.replace(service->menuId(), service);
if (service->categories().isEmpty())
- m_currentMenu->items.tqreplace(id, service);
+ m_currentMenu->items.replace(id, service);
}
}
}
@@ -1169,7 +1169,7 @@ VFolderMenu::processMenu(TQDomElement &docElem, int pass)
bool isDeleted = false;
bool kdeLegacyDirsDone = false;
TQDomElement defaultLayoutNode;
- TQDomElement tqlayoutNode;
+ TQDomElement layoutNode;
TQDomElement query;
TQDomNode n = docElem.firstChild();
@@ -1211,7 +1211,7 @@ VFolderMenu::processMenu(TQDomElement &docElem, int pass)
}
else if (e.tagName() == "Layout")
{
- tqlayoutNode = e;
+ layoutNode = e;
}
n = n.nextSibling();
}
@@ -1256,7 +1256,7 @@ VFolderMenu::processMenu(TQDomElement &docElem, int pass)
m_currentMenu->isDeleted = isDeleted;
m_currentMenu->defaultLayoutNode = defaultLayoutNode;
- m_currentMenu->tqlayoutNode = tqlayoutNode;
+ m_currentMenu->layoutNode = layoutNode;
}
else
{
@@ -1305,7 +1305,7 @@ kdDebug(7021) << "Processing KDE Legacy dirs for <KDE>" << endl;
processKDELegacyDirs();
- m_legacyNodes.tqreplace("<KDE>", m_currentMenu);
+ m_legacyNodes.replace("<KDE>", m_currentMenu);
m_currentMenu = oldMenu;
kdeLegacyDirsDone = true;
@@ -1318,7 +1318,7 @@ kdDebug(7021) << "Processing KDE Legacy dirs for <KDE>" << endl;
TQString prefix = e.attributes().namedItem("prefix").toAttr().value();
- if (m_defaultLegacyDirs.tqcontains(dir))
+ if (m_defaultLegacyDirs.contains(dir))
{
if (!kdeLegacyDirsDone)
{
@@ -1328,7 +1328,7 @@ kdDebug(7021) << "Processing KDE Legacy dirs for " << dir << endl;
processKDELegacyDirs();
- m_legacyNodes.tqreplace("<KDE>", m_currentMenu);
+ m_legacyNodes.replace("<KDE>", m_currentMenu);
m_currentMenu = oldMenu;
kdeLegacyDirsDone = true;
@@ -1343,7 +1343,7 @@ kdDebug(7021) << "Processing KDE Legacy dirs for " << dir << endl;
processLegacyDir(dir, TQString::null, prefix);
- m_legacyNodes.tqreplace(dir, m_currentMenu);
+ m_legacyNodes.replace(dir, m_currentMenu);
m_currentMenu = oldMenu;
}
}
@@ -1421,7 +1421,7 @@ kdDebug(7021) << "Processing KDE Legacy dirs for " << dir << endl;
{
// Add legacy nodes to Menu structure
TQString dir = absoluteDir(e.text(), e.attribute("__BaseDir"));
- SubMenu *legacyMenu = m_legacyNodes.tqfind(dir);
+ SubMenu *legacyMenu = m_legacyNodes.find(dir);
if (legacyMenu)
{
mergeMenu(m_currentMenu, legacyMenu);
@@ -1432,7 +1432,7 @@ kdDebug(7021) << "Processing KDE Legacy dirs for " << dir << endl;
{
// Add legacy nodes to Menu structure
TQString dir = "<KDE>";
- SubMenu *legacyMenu = m_legacyNodes.tqfind(dir);
+ SubMenu *legacyMenu = m_legacyNodes.find(dir);
if (legacyMenu)
{
mergeMenu(m_currentMenu, legacyMenu);
@@ -1546,70 +1546,70 @@ static TQString parseAttribute( const TQDomElement &e)
static TQStringList parseLayoutNode(const TQDomElement &docElem)
{
- TQStringList tqlayout;
+ TQStringList layout;
TQString optionDefaultLayout;
if( docElem.tagName()=="DefaultLayout")
optionDefaultLayout = parseAttribute( docElem);
if ( !optionDefaultLayout.isEmpty() )
- tqlayout.append( optionDefaultLayout );
+ layout.append( optionDefaultLayout );
TQDomNode n = docElem.firstChild();
while( !n.isNull() ) {
TQDomElement e = n.toElement(); // try to convert the node to an element.
if (e.tagName() == "Separator")
{
- tqlayout.append(":S");
+ layout.append(":S");
}
else if (e.tagName() == "Filename")
{
- tqlayout.append(e.text());
+ layout.append(e.text());
}
else if (e.tagName() == "Menuname")
{
- tqlayout.append("/"+e.text());
+ layout.append("/"+e.text());
TQString option = parseAttribute( e );
if( !option.isEmpty())
- tqlayout.append( option );
+ layout.append( option );
}
else if (e.tagName() == "Merge")
{
TQString type = e.attributeNode("type").value();
if (type == "files")
- tqlayout.append(":F");
+ layout.append(":F");
else if (type == "menus")
- tqlayout.append(":M");
+ layout.append(":M");
else if (type == "all")
- tqlayout.append(":A");
+ layout.append(":A");
}
n = n.nextSibling();
}
- return tqlayout;
+ return layout;
}
void
-VFolderMenu::tqlayoutMenu(VFolderMenu::SubMenu *menu, TQStringList defaultLayout)
+VFolderMenu::layoutMenu(VFolderMenu::SubMenu *menu, TQStringList defaultLayout)
{
if (!menu->defaultLayoutNode.isNull())
{
defaultLayout = parseLayoutNode(menu->defaultLayoutNode);
}
- if (menu->tqlayoutNode.isNull())
+ if (menu->layoutNode.isNull())
{
- menu->tqlayoutList = defaultLayout;
+ menu->layoutList = defaultLayout;
}
else
{
- menu->tqlayoutList = parseLayoutNode(menu->tqlayoutNode);
- if (menu->tqlayoutList.isEmpty())
- menu->tqlayoutList = defaultLayout;
+ menu->layoutList = parseLayoutNode(menu->layoutNode);
+ if (menu->layoutList.isEmpty())
+ menu->layoutList = defaultLayout;
}
for(VFolderMenu::SubMenu *subMenu = menu->subMenus.first(); subMenu; subMenu = menu->subMenus.next())
{
- tqlayoutMenu(subMenu, defaultLayout);
+ layoutMenu(subMenu, defaultLayout);
}
}
@@ -1618,7 +1618,7 @@ VFolderMenu::markUsedApplications(TQDict<KService> *items)
{
for(TQDictIterator<KService> it(*items); it.current(); ++it)
{
- m_usedAppsDict.tqreplace(it.current()->menuId(), it.current());
+ m_usedAppsDict.replace(it.current()->menuId(), it.current());
}
}
@@ -1660,7 +1660,7 @@ VFolderMenu::parseMenu(const TQString &file, bool forceLegacyLoad)
TQStringList defaultLayout;
defaultLayout << ":M"; // Sub-Menus
defaultLayout << ":F"; // Individual entries
- tqlayoutMenu(m_rootMenu, defaultLayout);
+ layoutMenu(m_rootMenu, defaultLayout);
}
}
diff --git a/kded/vfolder_menu.h b/kded/vfolder_menu.h
index 83d6dab64..ce7183056 100644
--- a/kded/vfolder_menu.h
+++ b/kded/vfolder_menu.h
@@ -29,7 +29,7 @@
#include <kservice.h>
-class VFolderMenu : public TQObject
+class VFolderMenu : public QObject
{
Q_OBJECT
public:
@@ -46,9 +46,9 @@ public:
TQDict<KService> items;
TQDict<KService> excludeItems; // Needed when merging due to Move.
TQDomElement defaultLayoutNode;
- TQDomElement tqlayoutNode;
+ TQDomElement layoutNode;
bool isDeleted;
- TQStringList tqlayoutList;
+ TQStringList layoutList;
appsInfo *apps_info;
};
@@ -56,7 +56,7 @@ public:
~VFolderMenu();
/**
- * Parses VFolder menu defintion and generates a menu tqlayout.
+ * Parses VFolder menu defintion and generates a menu layout.
* The newService signals is used as callback to load
* a specific service description.
*
@@ -148,12 +148,12 @@ private:
/**
* Lookup application by relative path
*/
- KService *tqfindApplication(const TQString &relPath);
+ KService *findApplication(const TQString &relPath);
/**
* Lookup applications by category
*/
- TQPtrList<KService::List> tqfindCategory(const TQString &category);
+ TQPtrList<KService::List> findCategory(const TQString &category);
/**
* Add new application
@@ -253,7 +253,7 @@ private:
void processKDELegacyDirs();
void processLegacyDir(const TQString &dir, const TQString &relDir, const TQString &prefix);
void processMenu(TQDomElement &docElem, int pass);
- void tqlayoutMenu(VFolderMenu::SubMenu *menu, TQStringList defaultLayout);
+ void layoutMenu(VFolderMenu::SubMenu *menu, TQStringList defaultLayout);
void processCondition(TQDomElement &docElem, TQDict<KService> *items);
void initDirs();