summaryrefslogtreecommitdiffstats
path: root/kded
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-03 04:12:51 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-03 04:12:51 +0000
commit560378aaca1784ba19806a0414a32b20c744de39 (patch)
treece0dfd7c3febf2a1adc7603d1019a8be2083c415 /kded
parentd4d5af1cdbd3cc65d095e0afc5b1f4260091cf5d (diff)
downloadtdelibs-560378aaca1784ba19806a0414a32b20c744de39.tar.gz
tdelibs-560378aaca1784ba19806a0414a32b20c744de39.zip
Automated conversion for enhanced compatibility with TQt for Qt4 3.4.0 TP1
NOTE: This will not compile with Qt4 (yet), however it does compile with Qt3 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1211081 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 702fca853..1e0c09a14 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 find services associated with a servicetype.
+This allows to quickly tqfind 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 d1596b8cd..990ce9909 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 contains a sample implementation.
+The kdelibs/kded/test/ directory tqcontains a sample implementation.
diff --git a/kded/README.kded b/kded/README.kded
index b530d707d..65231b6ca 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 contains
+Which means that kded_foo.la is the name of the library that tqcontains
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 f8f8c34f1..9dab1fdf6 100644
--- a/kded/kbuildservicefactory.cpp
+++ b/kded/kbuildservicefactory.cpp
@@ -57,7 +57,7 @@ KBuildServiceFactory::~KBuildServiceFactory()
delete m_resourceList;
}
-KService * KBuildServiceFactory::findServiceByName(const TQString &_name)
+KService * KBuildServiceFactory::tqfindServiceByName(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.findRev('/');
+ int pos = name.tqfindRev('/');
if (pos != -1)
{
name = name.mid(pos+1);
@@ -101,11 +101,11 @@ KBuildServiceFactory::saveHeader(TQDataStream &str)
{
KSycocaFactory::saveHeader(str);
- 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;
+ 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;
}
void
@@ -190,12 +190,12 @@ KBuildServiceFactory::saveOfferList(TQDataStream &str)
it2 != services.end(); ++it2)
{
KService *service = *it2;
- str << (Q_INT32) entry->offset();
- str << (Q_INT32) service->offset();
+ str << (TQ_INT32) entry->offset();
+ str << (TQ_INT32) service->offset();
}
}
- str << (Q_INT32) 0; // End of list marker (0)
+ str << (TQ_INT32) 0; // End of list marker (0)
}
void
@@ -215,19 +215,19 @@ KBuildServiceFactory::saveInitList(TQDataStream &str)
initList.append(service);
}
}
- str << (Q_INT32) initList.count(); // Nr of init services.
+ str << (TQ_INT32) initList.count(); // Nr of init services.
for(KService::List::Iterator it = initList.begin();
it != initList.end();
++it)
{
- str << (Q_INT32) (*it)->offset();
+ str << (TQ_INT32) (*it)->offset();
}
}
void
KBuildServiceFactory::addEntry(KSycocaEntry *newEntry, const char *resource)
{
- if (m_dupeDict.find(newEntry))
+ if (m_dupeDict.tqfind(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.replace(name, service);
+ m_serviceDict.tqreplace(name, service);
TQString relName = service->desktopEntryPath();
m_relNameDict->add( relName, newEntry );
diff --git a/kded/kbuildservicefactory.h b/kded/kbuildservicefactory.h
index eca439c5d..3b6e416ae 100644
--- a/kded/kbuildservicefactory.h
+++ b/kded/kbuildservicefactory.h
@@ -43,7 +43,7 @@ public:
virtual ~KBuildServiceFactory();
- KService *findServiceByName(const TQString &_name);
+ KService *tqfindServiceByName(const TQString &_name);
/**
* Construct a KService from a config file.
diff --git a/kded/kbuildservicegroupfactory.cpp b/kded/kbuildservicegroupfactory.cpp
index e75931182..b4a9ca8e6 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->find(menuName);
+ KSycocaEntry::Ptr *ptr = m_entryDict->tqfind(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->find(menuName);
+ KSycocaEntry::Ptr *ptr = m_entryDict->tqfind(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.findRev('/');
+ int i = parent.tqfindRev('/');
if (i > 0) {
parent = parent.left(i+1);
} else {
parent = "/";
}
parentEntry = 0;
- ptr = m_entryDict->find(parent);
+ ptr = m_entryDict->tqfind(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->find(name);
+ KSycocaEntry::Ptr *ptr = m_entryDict->tqfind(name);
if (ptr)
entry = dynamic_cast<KServiceGroup *>(ptr->data());
@@ -157,7 +157,7 @@ KBuildServiceGroupFactory::saveHeader(TQDataStream &str)
{
KSycocaFactory::saveHeader(str);
- str << (Q_INT32) m_baseGroupDictOffset;
+ str << (TQ_INT32) m_baseGroupDictOffset;
}
void
diff --git a/kded/kbuildservicetypefactory.cpp b/kded/kbuildservicetypefactory.cpp
index b5259c5cd..ddeff23fe 100644
--- a/kded/kbuildservicetypefactory.cpp
+++ b/kded/kbuildservicetypefactory.cpp
@@ -54,7 +54,7 @@ KBuildServiceTypeFactory::~KBuildServiceTypeFactory()
delete m_resourceList;
}
-KServiceType * KBuildServiceTypeFactory::findServiceTypeByName(const TQString &_name)
+KServiceType * KBuildServiceTypeFactory::tqfindServiceTypeByName(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.findRev('/');
+ int pos = name.tqfindRev('/');
if (pos != -1)
{
name = name.mid(pos+1);
@@ -133,14 +133,14 @@ void
KBuildServiceTypeFactory::saveHeader(TQDataStream &str)
{
KSycocaFactory::saveHeader(str);
- str << (Q_INT32) m_fastPatternOffset;
- str << (Q_INT32) m_otherPatternOffset;
- str << (Q_INT32) m_propertyTypeDict.count();
+ str << (TQ_INT32) m_fastPatternOffset;
+ str << (TQ_INT32) m_otherPatternOffset;
+ str << (TQ_INT32) m_propertyTypeDict.count();
TQMapIterator<TQString, int> it;
for (it = m_propertyTypeDict.begin(); it != m_propertyTypeDict.end(); ++it)
{
- str << it.key() << (Q_INT32)it.data();
+ str << it.key() << (TQ_INT32)it.data();
}
}
@@ -183,8 +183,8 @@ KBuildServiceTypeFactory::savePatternLists(TQDataStream &str)
for ( ; patit != pat.end() ; ++patit )
{
const TQString &pattern = *patit;
- if ( pattern.findRev('*') == 0
- && pattern.findRev('.') == 1
+ if ( pattern.tqfindRev('*') == 0
+ && pattern.tqfindRev('.') == 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.replace( pattern, mimeType );
+ dict.tqreplace( pattern, mimeType );
}
}
}
// Sort the list - the fast one, useless for the other one
fastPatterns.sort();
- Q_INT32 entrySize = 0;
- Q_INT32 nrOfEntries = 0;
+ TQ_INT32 entrySize = 0;
+ TQ_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.contains(pit.key()))
+ if (!m_propertyTypeDict.tqcontains(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 a68b8851b..311ae4120 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 * findServiceTypeByName(const TQString &_name);
+ virtual KServiceType * tqfindServiceTypeByName(const TQString &_name);
/**
* Construct a KServiceType from a config file.
diff --git a/kded/kbuildsycoca.cpp b/kded/kbuildsycoca.cpp
index 9df927ca8..f8fb35cf4 100644
--- a/kded/kbuildsycoca.cpp
+++ b/kded/kbuildsycoca.cpp
@@ -68,13 +68,13 @@
typedef TQDict<KSycocaEntry> KBSEntryDict;
typedef TQValueList<KSycocaEntry::List> KSycocaEntryListList;
-static Q_UINT32 newTimestamp = 0;
+static TQ_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<Q_UINT32> *g_ctimeDict = 0;
+static TQDict<TQ_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::fromLatin1(line);
+ app = TQString::tqfromLatin1(line);
app.truncate(app.length()-1);
}
else if (strncmp(line+1, "mime_types=", 11) == 0)
{
- TQString mimetypes = TQString::fromLatin1(line+12);
+ TQString mimetypes = TQString::tqfromLatin1(line+12);
mimetypes.truncate(mimetypes.length()-1);
- mimetypes.replace(TQRegExp("\\*"), "all");
- KService *s = g_bsf->findServiceByName(app);
+ mimetypes.tqreplace(TQRegExp("\\*"), "all");
+ KService *s = g_bsf->tqfindServiceByName(app);
if (!s)
continue;
@@ -186,7 +186,7 @@ void KBuildSycoca::processGnomeVfs()
KSycocaEntry *KBuildSycoca::createEntry(const TQString &file, bool addToFactory)
{
- Q_UINT32 timeStamp = g_ctimeInfo->ctime(file);
+ TQ_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);
- Q_UINT32 *timeP = (*g_ctimeDict)[file];
- Q_UINT32 oldTimestamp = timeP ? *timeP : 0;
+ TQ_UINT32 *timeP = (*g_ctimeDict)[file];
+ TQ_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->find(file.left(file.length()-10));
+ entry = g_entryDict->tqfind(file.left(file.length()-10));
}
else if (g_factory == g_bsf)
{
- entry = g_entryDict->find(file);
+ entry = g_entryDict->tqfind(file);
}
else
{
- entry = g_entryDict->find(file);
+ entry = g_entryDict->tqfind(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.contains(res.resource))
+ if (!allResources.tqcontains(res.resource))
allResources.append(res.resource);
}
}
@@ -324,7 +324,7 @@ bool KBuildSycoca::build()
relFiles);
- // Now find all factories that use this resource....
+ // Now tqfind 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->layoutList);
+ entry->setLayoutInfo(kdeMenu->tqlayoutList);
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";
- Q_UINT32 timeStamp = g_ctimeInfo->ctime(directoryFile);
+ TQ_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)
{
- Q_UINT32 *timeP = (*g_ctimeDict)[directoryFile];
- Q_UINT32 oldTimestamp = timeP ? *timeP : 0;
+ TQ_UINT32 *timeP = (*g_ctimeDict)[directoryFile];
+ TQ_UINT32 oldTimestamp = timeP ? *timeP : 0;
if (timeStamp && (timeStamp == oldTimestamp))
{
- entry = dynamic_cast<KServiceGroup *> (g_serviceGroupEntryDict->find(subName));
+ entry = dynamic_cast<KServiceGroup *> (g_serviceGroupEntryDict->tqfind(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->layoutList);
+ entry->setLayoutInfo(subMenu->tqlayoutList);
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) << (Q_INT32) KSycoca::version();
+ (*m_str) << (TQ_INT32) KSycoca::version();
KSycocaFactory * servicetypeFactory = 0L;
KSycocaFactory * serviceFactory = 0L;
for(KSycocaFactory *factory = m_lstFactories->first();
factory;
factory = m_lstFactories->next())
{
- Q_INT32 aId;
- Q_INT32 aOffset;
+ TQ_INT32 aId;
+ TQ_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) << (Q_INT32) 0; // No more factories.
+ (*m_str) << (TQ_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) << (Q_INT32) KSycoca::version();
+ (*m_str) << (TQ_INT32) KSycoca::version();
for(KSycocaFactory *factory = m_lstFactories->first();
factory;
factory = m_lstFactories->next())
{
- Q_INT32 aId;
- Q_INT32 aOffset;
+ TQ_INT32 aId;
+ TQ_INT32 aOffset;
aId = factory->factoryId();
aOffset = factory->offset();
(*m_str) << aId;
(*m_str) << aOffset;
}
- (*m_str) << (Q_INT32) 0; // No more factories.
+ (*m_str) << (TQ_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( Q_UINT32 timestamp, const TQStringList &dirs )
+bool KBuildSycoca::checkTimestamps( TQ_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 QObject
+class WaitForSignal : public TQObject
{
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();
- Q_UINT32 current_update_sig = KGlobal::dirs()->calcResourceHash("services", "update_ksycoca", true);
- Q_UINT32 ksycoca_update_sig = KSycoca::self()->updateSignature();
+ TQ_UINT32 current_update_sig = KGlobal::dirs()->calcResourceHash("services", "update_ksycoca", true);
+ TQ_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;
- Q_UINT32 filestamp = 0;
+ TQ_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 = (Q_UINT32) time(0);
+ newTimestamp = (TQ_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<Q_UINT32>(523);
+ g_ctimeDict = new TQDict<TQ_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 0f90c3df6..f98001781 100644
--- a/kded/kbuildsycoca.h
+++ b/kded/kbuildsycoca.h
@@ -47,7 +47,7 @@ public:
*/
bool recreate();
- static bool checkTimestamps( Q_UINT32 timestamp, const TQStringList &dirs );
+ static bool checkTimestamps( TQ_UINT32 timestamp, const TQStringList &dirs );
static TQStringList existingResourceDirs();
diff --git a/kded/kctimefactory.cpp b/kded/kctimefactory.cpp
index 25d78bab0..15e43767a 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<Q_UINT32> it(ctimeDict);
+ TQDictIterator<TQ_UINT32> it(ctimeDict);
while( it.current())
{
str << it.currentKey() << *(it.current());
++it;
}
- str << TQString::null << (Q_UINT32) 0;
+ str << TQString::null << (TQ_UINT32) 0;
int endOfFactoryData = str.device()->at();
@@ -69,31 +69,31 @@ KCTimeInfo::save(TQDataStream &str)
}
void
-KCTimeInfo::addCTime(const TQString &path, Q_UINT32 ctime)
+KCTimeInfo::addCTime(const TQString &path, TQ_UINT32 ctime)
{
assert(!path.isEmpty());
- ctimeDict.replace(path, new Q_UINT32(ctime));
+ ctimeDict.tqreplace(path, new TQ_UINT32(ctime));
}
-Q_UINT32
+TQ_UINT32
KCTimeInfo::ctime(const TQString &path)
{
- Q_UINT32 *ctimeP = ctimeDict[path];
+ TQ_UINT32 *ctimeP = ctimeDict[path];
return ctimeP ? *ctimeP : 0;
}
void
-KCTimeInfo::fillCTimeDict(TQDict<Q_UINT32> &dict)
+KCTimeInfo::fillCTimeDict(TQDict<TQ_UINT32> &dict)
{
assert(m_str);
m_str->device()->at(m_dictOffset);
TQString path;
- Q_UINT32 ctime;
+ TQ_UINT32 ctime;
while(true)
{
KSycocaEntry::read(*m_str, path);
(*m_str) >> ctime;
if (path.isEmpty()) break;
- dict.replace(path, new Q_UINT32(ctime));
+ dict.tqreplace(path, new TQ_UINT32(ctime));
}
}
diff --git a/kded/kctimefactory.h b/kded/kctimefactory.h
index b878b3033..64cfe6c19 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, Q_UINT32 ctime);
+ void addCTime(const TQString &path, TQ_UINT32 ctime);
- Q_UINT32 ctime(const TQString &path);
+ TQ_UINT32 ctime(const TQString &path);
- void fillCTimeDict(TQDict<Q_UINT32> &dict);
+ void fillCTimeDict(TQDict<TQ_UINT32> &dict);
protected:
- TQDict<Q_UINT32> ctimeDict;
+ TQDict<TQ_UINT32> ctimeDict;
int m_dictOffset;
};
diff --git a/kded/kde-menu.cpp b/kded/kde-menu.cpp
index 89ee5a857..142ed3916 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 contains\nthe application"), 0 },
- { "print-menu-name", I18N_NOOP("Print menu name (caption) of the menu that\ncontains the application"), 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 },
{ "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 findMenuEntry(KServiceGroup::Ptr parent, const TQString &name, const TQString &menuId)
+static void tqfindMenuEntry(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 findMenuEntry(KServiceGroup::Ptr parent, const TQString &name, const
{
KServiceGroup::Ptr g(static_cast<KServiceGroup *>(e));
- findMenuEntry(g, name.isEmpty() ? g->caption() : name+"/"+g->caption(), menuId);
+ tqfindMenuEntry(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 find in which menu a specific application is shown.\n"
+ "This tool can be used to tqfind 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));
- findMenuEntry(KServiceGroup::root(), "", menuId);
+ tqfindMenuEntry(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 d33bfc6b3..59933c8f3 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.find(obj);
+ KDEDModule *module = m_modules.tqfind(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.find(obj);
+ KDEDModule *oldModule = m_modules.tqfind(obj);
if (oldModule)
return oldModule;
@@ -374,7 +374,7 @@ void Kded::slotApplicationRemoved(const TQCString &appId)
it.current()->removeAll(appId);
}
- TQValueList<long> *windowIds = m_windowIdList.find(appId);
+ TQValueList<long> *windowIds = m_windowIdList.tqfind(appId);
if (windowIds)
{
for( TQValueList<long>::ConstIterator it = windowIds->begin();
@@ -428,7 +428,7 @@ void Kded::updateResourceList()
it != dirs.end();
++it )
{
- if (m_allResourceDirs.find(*it) == m_allResourceDirs.end())
+ if (m_allResourceDirs.tqfind(*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->contains( path ) ) // Already seen this one?
+ if ( m_pDirWatch->tqcontains( 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.find(windowId) != 0;
+ return m_globalWindowIdList.tqfind(windowId) != 0;
}
// DCOP
void Kded::registerWindowId(long windowId)
{
- m_globalWindowIdList.replace(windowId, &windowId);
+ m_globalWindowIdList.tqreplace(windowId, &windowId);
TQCString sender = callingDcopClient()->senderId();
if( sender.isEmpty()) // local call
sender = callingDcopClient()->appId();
- TQValueList<long> *windowIds = m_windowIdList.find(sender);
+ TQValueList<long> *windowIds = m_windowIdList.tqfind(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.find(sender);
+ TQValueList<long> *windowIds = m_windowIdList.tqfind(sender);
if (windowIds)
{
windowIds->remove(windowId);
@@ -674,7 +674,7 @@ KUpdateD::KUpdateD()
if (path[path.length()-1] != '/')
path += "/";
- if (!m_pDirWatch->contains(path))
+ if (!m_pDirWatch->tqcontains(path))
m_pDirWatch->addDir(path);
}
}
diff --git a/kded/kded.h b/kded/kded.h
index 1b6ebe481..b30549083 100644
--- a/kded/kded.h
+++ b/kded/kded.h
@@ -173,7 +173,7 @@ private:
static Kded *_self;
};
-class KUpdateD : public QObject
+class KUpdateD : public TQObject
{
Q_OBJECT
public:
@@ -200,7 +200,7 @@ private:
TQTimer* m_pTimer;
};
-class KHostnameD : public QObject
+class KHostnameD : public TQObject
{
Q_OBJECT
public:
diff --git a/kded/kdedmodule.cpp b/kded/kdedmodule.cpp
index ca28a5c62..cc65abcde 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->replace(appKey, 0);
+ d->objMap->tqreplace(appKey, 0);
KEntryKey indexKey(app, key);
// Prevent deletion in case the same object is inserted again.
KSharedPtr<KShared> _obj = obj;
- d->objMap->replace(indexKey, _obj);
+ d->objMap->tqreplace(indexKey, _obj);
resetIdle();
}
-KShared * KDEDModule::find(const TQCString &app, const TQCString &key)
+KShared * KDEDModule::tqfind(const TQCString &app, const TQCString &key)
{
if (!d->objMap)
return 0;
KEntryKey indexKey(app, key);
- KDEDObjectMap::Iterator it = d->objMap->find(indexKey);
+ KDEDObjectMap::Iterator it = d->objMap->tqfind(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->find(indexKey);
+ KDEDObjectMap::Iterator it = d->objMap->tqfind(indexKey);
while (it != d->objMap->end())
{
KDEDObjectMap::Iterator it2 = it++;
diff --git a/kded/kdedmodule.h b/kded/kdedmodule.h
index 041f50303..1bd0eeebc 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 contains at least one factory function like this:
+ * that tqcontains 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 *find(const TQCString &app, const TQCString &key);
+ KShared *tqfind(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 0fa837a2c..3e9740054 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.replace(TQRegExp("\\.[0-9]+$"), "");
+ display.tqreplace(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.findRev(':');
+ int i = netId.tqfindRev(':');
if (i == -1)
continue;
TQCString netDisplay = netId.mid(i);
if (netDisplay != display)
continue;
- i = netId.find('/');
+ i = netId.tqfind('/');
if (i == -1)
continue;
@@ -208,7 +208,7 @@ void KHostName::changeDcop()
if (!newName.isEmpty())
{
- int i = line1.findRev(':');
+ int i = line1.tqfindRev(':');
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.contains(xauthlocalhostname))
+ if (!xauthlocalhostname || !oldNetId.tqcontains(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.findRev(':');
+ int i = sm.tqfindRev(':');
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 b48662cb2..e939d40e9 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.find(s);
+ TQMap<TQString,TQDomElement>::iterator it = dupeList.tqfind(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 replaceNode(TQDomElement &docElem, TQDomNode &n, const TQStringList &list, const TQString &tag)
+static void tqreplaceNode(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 replaceNode(TQDomElement &docElem, TQDomNode &n, const TQStringList
void VFolderMenu::registerFile(const TQString &file)
{
- int i = file.findRev('/');
+ int i = file.tqfindRev('/');
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->find(menuId))
- printf("%s: %s INCL %d EXCL %d\n", menuName.latin1(), comment.latin1(), includeList->find(menuId) ? 1 : 0, excludeList->find(menuId) ? 1 : 0);
+ 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);
}
void
@@ -117,7 +117,7 @@ VFolderMenu::includeItems(TQDict<KService> *items1, TQDict<KService> *items2)
{
for(TQDictIterator<KService> it(*items2); it.current(); ++it)
{
- items1->replace(it.current()->menuId(), it.current());
+ items1->tqreplace(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->find(id))
+ if (!items2->tqfind(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.find('/');
+ int i = menuName.tqfind('/');
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->layoutNode.isNull())
- menu1->layoutNode = menu2->layoutNode;
+ if (menu1->tqlayoutNode.isNull())
+ menu1->tqlayoutNode = menu2->tqlayoutNode;
}
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->layoutNode.isNull())
- menu1->layoutNode = menu2->layoutNode;
+ if (!menu2->tqlayoutNode.isNull())
+ menu1->tqlayoutNode = menu2->tqlayoutNode;
}
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.find('/');
+ int i = menuName.tqfind('/');
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.find('/');
+ int i = name.tqfind('/');
if (i == -1)
{
// Add it here
- parentMenu->items.replace(newService->menuId(), newService);
+ parentMenu->items.tqreplace(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.find(category); \
+ KService::List *list = info->dictCategories.tqfind(category); \
if (list) for(KService::List::ConstIterator it = list->begin(); \
it != list->end(); ++it) \
{
#define FOR_CATEGORY_END } }
KService *
-VFolderMenu::findApplication(const TQString &relPath)
+VFolderMenu::tqfindApplication(const TQString &relPath)
{
for(appsInfo *info = m_appsInfoStack.first();
info; info = m_appsInfoStack.next())
{
- KService *s = info->applications.find(relPath);
+ KService *s = info->applications.tqfind(relPath);
if (s)
return s;
}
@@ -347,7 +347,7 @@ void
VFolderMenu::addApplication(const TQString &id, KService *service)
{
service->setMenuId(id);
- m_appsInfo->applications.replace(id, service);
+ m_appsInfo->applications.tqreplace(id, service);
}
void
@@ -364,7 +364,7 @@ VFolderMenu::buildApplicationIndex(bool unusedOnly)
KService *s = it.current();
TQDictIterator<KService> tmpIt = it;
++it;
- if (unusedOnly && m_usedAppsDict.find(s->menuId()))
+ if (unusedOnly && m_usedAppsDict.tqfind(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.find(cat);
+ KService::List *list = info->dictCategories.tqfind(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 layoutNode;
+ TQDomElement tqlayoutNode;
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
- replaceNode(docElem, n, m_defaultAppDirs, "AppDir");
+ tqreplaceNode(docElem, n, m_defaultAppDirs, "AppDir");
continue;
}
else if( e.tagName() == "DefaultDirectoryDirs") {
// Replace with m_defaultDirectoryDirs
- replaceNode(docElem, n, m_defaultDirectoryDirs, "DirectoryDir");
+ tqreplaceNode(docElem, n, m_defaultDirectoryDirs, "DirectoryDir");
continue;
}
else if( e.tagName() == "DefaultMergeDirs") {
// Replace with m_defaultMergeDirs
- replaceNode(docElem, n, m_defaultMergeDirs, "MergeDir");
+ tqreplaceNode(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.find(name);
+ TQMap<TQString,TQDomElement>::iterator it = menuNodes.tqfind(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 (!layoutNode.isNull())
- docElem.removeChild(layoutNode);
- layoutNode = e;
+ if (!tqlayoutNode.isNull())
+ docElem.removeChild(tqlayoutNode);
+ tqlayoutNode = e;
}
n = n.nextSibling();
}
@@ -719,7 +719,7 @@ VFolderMenu::pushDocInfo(const TQString &fileName, const TQString &baseDir)
return;
}
int i;
- i = baseName.findRev('/');
+ i = baseName.tqfindRev('/');
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.findRev('/')+1);
+ TQString fileName = basePath.mid(basePath.tqfindRev('/')+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->replace(s->menuId(), s);
+ items->tqreplace(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->replace(s->menuId(), s);
+ items->tqreplace(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->replace(s->menuId(), s);
+ items->tqreplace(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 = findApplication(filename);
+ KService *s = tqfindApplication(filename);
if (s)
- items->replace(filename, s);
+ items->tqreplace(filename, s);
}
}
@@ -1071,7 +1071,7 @@ kdDebug(7021) << "processKDELegacyDirs()" << endl;
{
TQString id = name;
// Strip path from id
- int i = id.findRev('/');
+ int i = id.tqfindRev('/');
if (i >= 0)
id = id.mid(i+1);
@@ -1079,7 +1079,7 @@ kdDebug(7021) << "processKDELegacyDirs()" << endl;
// TODO: add Legacy category
addApplication(id, service);
- items.replace(service->menuId(), service);
+ items.tqreplace(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.replace(service->menuId(), service);
+ items.tqreplace(service->menuId(), service);
if (service->categories().isEmpty())
- m_currentMenu->items.replace(id, service);
+ m_currentMenu->items.tqreplace(id, service);
}
}
}
@@ -1169,7 +1169,7 @@ VFolderMenu::processMenu(TQDomElement &docElem, int pass)
bool isDeleted = false;
bool kdeLegacyDirsDone = false;
TQDomElement defaultLayoutNode;
- TQDomElement layoutNode;
+ TQDomElement tqlayoutNode;
TQDomElement query;
TQDomNode n = docElem.firstChild();
@@ -1211,7 +1211,7 @@ VFolderMenu::processMenu(TQDomElement &docElem, int pass)
}
else if (e.tagName() == "Layout")
{
- layoutNode = e;
+ tqlayoutNode = e;
}
n = n.nextSibling();
}
@@ -1256,7 +1256,7 @@ VFolderMenu::processMenu(TQDomElement &docElem, int pass)
m_currentMenu->isDeleted = isDeleted;
m_currentMenu->defaultLayoutNode = defaultLayoutNode;
- m_currentMenu->layoutNode = layoutNode;
+ m_currentMenu->tqlayoutNode = tqlayoutNode;
}
else
{
@@ -1305,7 +1305,7 @@ kdDebug(7021) << "Processing KDE Legacy dirs for <KDE>" << endl;
processKDELegacyDirs();
- m_legacyNodes.replace("<KDE>", m_currentMenu);
+ m_legacyNodes.tqreplace("<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.contains(dir))
+ if (m_defaultLegacyDirs.tqcontains(dir))
{
if (!kdeLegacyDirsDone)
{
@@ -1328,7 +1328,7 @@ kdDebug(7021) << "Processing KDE Legacy dirs for " << dir << endl;
processKDELegacyDirs();
- m_legacyNodes.replace("<KDE>", m_currentMenu);
+ m_legacyNodes.tqreplace("<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.replace(dir, m_currentMenu);
+ m_legacyNodes.tqreplace(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.find(dir);
+ SubMenu *legacyMenu = m_legacyNodes.tqfind(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.find(dir);
+ SubMenu *legacyMenu = m_legacyNodes.tqfind(dir);
if (legacyMenu)
{
mergeMenu(m_currentMenu, legacyMenu);
@@ -1546,70 +1546,70 @@ static TQString parseAttribute( const TQDomElement &e)
static TQStringList parseLayoutNode(const TQDomElement &docElem)
{
- TQStringList layout;
+ TQStringList tqlayout;
TQString optionDefaultLayout;
if( docElem.tagName()=="DefaultLayout")
optionDefaultLayout = parseAttribute( docElem);
if ( !optionDefaultLayout.isEmpty() )
- layout.append( optionDefaultLayout );
+ tqlayout.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")
{
- layout.append(":S");
+ tqlayout.append(":S");
}
else if (e.tagName() == "Filename")
{
- layout.append(e.text());
+ tqlayout.append(e.text());
}
else if (e.tagName() == "Menuname")
{
- layout.append("/"+e.text());
+ tqlayout.append("/"+e.text());
TQString option = parseAttribute( e );
if( !option.isEmpty())
- layout.append( option );
+ tqlayout.append( option );
}
else if (e.tagName() == "Merge")
{
TQString type = e.attributeNode("type").value();
if (type == "files")
- layout.append(":F");
+ tqlayout.append(":F");
else if (type == "menus")
- layout.append(":M");
+ tqlayout.append(":M");
else if (type == "all")
- layout.append(":A");
+ tqlayout.append(":A");
}
n = n.nextSibling();
}
- return layout;
+ return tqlayout;
}
void
-VFolderMenu::layoutMenu(VFolderMenu::SubMenu *menu, TQStringList defaultLayout)
+VFolderMenu::tqlayoutMenu(VFolderMenu::SubMenu *menu, TQStringList defaultLayout)
{
if (!menu->defaultLayoutNode.isNull())
{
defaultLayout = parseLayoutNode(menu->defaultLayoutNode);
}
- if (menu->layoutNode.isNull())
+ if (menu->tqlayoutNode.isNull())
{
- menu->layoutList = defaultLayout;
+ menu->tqlayoutList = defaultLayout;
}
else
{
- menu->layoutList = parseLayoutNode(menu->layoutNode);
- if (menu->layoutList.isEmpty())
- menu->layoutList = defaultLayout;
+ menu->tqlayoutList = parseLayoutNode(menu->tqlayoutNode);
+ if (menu->tqlayoutList.isEmpty())
+ menu->tqlayoutList = defaultLayout;
}
for(VFolderMenu::SubMenu *subMenu = menu->subMenus.first(); subMenu; subMenu = menu->subMenus.next())
{
- layoutMenu(subMenu, defaultLayout);
+ tqlayoutMenu(subMenu, defaultLayout);
}
}
@@ -1618,7 +1618,7 @@ VFolderMenu::markUsedApplications(TQDict<KService> *items)
{
for(TQDictIterator<KService> it(*items); it.current(); ++it)
{
- m_usedAppsDict.replace(it.current()->menuId(), it.current());
+ m_usedAppsDict.tqreplace(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
- layoutMenu(m_rootMenu, defaultLayout);
+ tqlayoutMenu(m_rootMenu, defaultLayout);
}
}
diff --git a/kded/vfolder_menu.h b/kded/vfolder_menu.h
index ce7183056..83d6dab64 100644
--- a/kded/vfolder_menu.h
+++ b/kded/vfolder_menu.h
@@ -29,7 +29,7 @@
#include <kservice.h>
-class VFolderMenu : public QObject
+class VFolderMenu : public TQObject
{
Q_OBJECT
public:
@@ -46,9 +46,9 @@ public:
TQDict<KService> items;
TQDict<KService> excludeItems; // Needed when merging due to Move.
TQDomElement defaultLayoutNode;
- TQDomElement layoutNode;
+ TQDomElement tqlayoutNode;
bool isDeleted;
- TQStringList layoutList;
+ TQStringList tqlayoutList;
appsInfo *apps_info;
};
@@ -56,7 +56,7 @@ public:
~VFolderMenu();
/**
- * Parses VFolder menu defintion and generates a menu layout.
+ * Parses VFolder menu defintion and generates a menu tqlayout.
* The newService signals is used as callback to load
* a specific service description.
*
@@ -148,12 +148,12 @@ private:
/**
* Lookup application by relative path
*/
- KService *findApplication(const TQString &relPath);
+ KService *tqfindApplication(const TQString &relPath);
/**
* Lookup applications by category
*/
- TQPtrList<KService::List> findCategory(const TQString &category);
+ TQPtrList<KService::List> tqfindCategory(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 layoutMenu(VFolderMenu::SubMenu *menu, TQStringList defaultLayout);
+ void tqlayoutMenu(VFolderMenu::SubMenu *menu, TQStringList defaultLayout);
void processCondition(TQDomElement &docElem, TQDict<KService> *items);
void initDirs();