summaryrefslogtreecommitdiffstats
path: root/kconf_update/kconf_update.cpp
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 /kconf_update/kconf_update.cpp
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 'kconf_update/kconf_update.cpp')
-rw-r--r--kconf_update/kconf_update.cpp46
1 files changed, 23 insertions, 23 deletions
diff --git a/kconf_update/kconf_update.cpp b/kconf_update/kconf_update.cpp
index a3a165ab8..57f63d013 100644
--- a/kconf_update/kconf_update.cpp
+++ b/kconf_update/kconf_update.cpp
@@ -51,7 +51,7 @@ class KonfUpdate
public:
KonfUpdate();
~KonfUpdate();
- TQStringList findUpdateFiles(bool dirtyOnly);
+ TQStringList tqfindUpdateFiles(bool dirtyOnly);
TQTextStream &log();
@@ -147,7 +147,7 @@ KonfUpdate::KonfUpdate()
{
if (config->readBoolEntry("autoUpdateDisabled", false))
return;
- updateFiles = findUpdateFiles(true);
+ updateFiles = tqfindUpdateFiles(true);
updateAll = true;
}
@@ -163,7 +163,7 @@ KonfUpdate::KonfUpdate()
if (updateAll && !config->readBoolEntry("updateInfoAdded", false))
{
config->writeEntry("updateInfoAdded", true);
- updateFiles = findUpdateFiles(false);
+ updateFiles = tqfindUpdateFiles(false);
for(TQStringList::ConstIterator it = updateFiles.begin();
it != updateFiles.end();
@@ -201,12 +201,12 @@ KonfUpdate::log()
}
}
- (*m_textStream) << TQDateTime::currentDateTime().toString( Qt::ISODate ) << " ";
+ (*m_textStream) << TQDateTime::tqcurrentDateTime().toString( Qt::ISODate ) << " ";
return *m_textStream;
}
-TQStringList KonfUpdate::findUpdateFiles(bool dirtyOnly)
+TQStringList KonfUpdate::tqfindUpdateFiles(bool dirtyOnly)
{
TQStringList result;
TQStringList list = KGlobal::dirs()->findAllResources("data", "kconf_update/*.upd", false, true);
@@ -218,7 +218,7 @@ TQStringList KonfUpdate::findUpdateFiles(bool dirtyOnly)
struct stat buff;
if (stat( TQFile::encodeName(file), &buff) == 0)
{
- int i = file.findRev('/');
+ int i = file.tqfindRev('/');
if (i != -1)
file = file.mid(i+1);
config->setGroup(file);
@@ -237,7 +237,7 @@ TQStringList KonfUpdate::findUpdateFiles(bool dirtyOnly)
bool KonfUpdate::checkFile(const TQString &filename)
{
currentFilename = filename;
- int i = currentFilename.findRev('/');
+ int i = currentFilename.tqfindRev('/');
if (i != -1)
currentFilename = currentFilename.mid(i+1);
skip = true;
@@ -268,7 +268,7 @@ bool KonfUpdate::checkFile(const TQString &filename)
void KonfUpdate::checkGotFile(const TQString &_file, const TQString &id)
{
TQString file;
- int i = _file.find(',');
+ int i = _file.tqfind(',');
if (i == -1)
{
file = _file.stripWhiteSpace();
@@ -283,7 +283,7 @@ void KonfUpdate::checkGotFile(const TQString &_file, const TQString &id)
KSimpleConfig cfg(file);
cfg.setGroup("$Version");
TQStringList ids = cfg.readListEntry("update_info");
- if (ids.contains(id))
+ if (ids.tqcontains(id))
return;
ids.append(id);
cfg.writeEntry("update_info", ids);
@@ -311,7 +311,7 @@ void KonfUpdate::checkGotFile(const TQString &_file, const TQString &id)
bool KonfUpdate::updateFile(const TQString &filename)
{
currentFilename = filename;
- int i = currentFilename.findRev('/');
+ int i = currentFilename.tqfindRev('/');
if (i != -1)
currentFilename = currentFilename.mid(i+1);
skip = true;
@@ -398,7 +398,7 @@ void KonfUpdate::gotId(const TQString &_id)
{
config->setGroup(currentFilename);
TQStringList ids = config->readListEntry("done");
- if (!ids.contains(id))
+ if (!ids.tqcontains(id))
{
ids.append(id);
config->writeEntry("done", ids);
@@ -413,7 +413,7 @@ void KonfUpdate::gotId(const TQString &_id)
TQStringList ids = config->readListEntry("done");
if (!_id.isEmpty())
{
- if (ids.contains(_id))
+ if (ids.tqcontains(_id))
{
//qDebug("Id '%s' was already in done-list", _id.latin1());
if (!m_bUseConfigInfo)
@@ -445,7 +445,7 @@ void KonfUpdate::gotFile(const TQString &_file)
oldConfig2->setGroup("$Version");
TQStringList ids = oldConfig2->readListEntry("update_info");
TQString cfg_id = currentFilename + ":" + id;
- if (!ids.contains(cfg_id) && !skip)
+ if (!ids.tqcontains(cfg_id) && !skip)
{
ids.append(cfg_id);
oldConfig2->writeEntry("update_info", ids);
@@ -473,7 +473,7 @@ void KonfUpdate::gotFile(const TQString &_file)
newConfig->setGroup("$Version");
TQStringList ids = newConfig->readListEntry("update_info");
TQString cfg_id = currentFilename + ":" + id;
- if (!ids.contains(cfg_id) && !skip)
+ if (!ids.tqcontains(cfg_id) && !skip)
{
ids.append(cfg_id);
newConfig->writeEntry("update_info", ids);
@@ -486,7 +486,7 @@ void KonfUpdate::gotFile(const TQString &_file)
}
newConfig = 0;
- int i = _file.find(',');
+ int i = _file.tqfind(',');
if (i == -1)
{
oldFile = _file.stripWhiteSpace();
@@ -505,7 +505,7 @@ void KonfUpdate::gotFile(const TQString &_file)
TQString cfg_id = currentFilename + ":" + id;
oldConfig2->setGroup("$Version");
TQStringList ids = oldConfig2->readListEntry("update_info");
- if (ids.contains(cfg_id))
+ if (ids.tqcontains(cfg_id))
{
skip = true;
newFile = TQString::null;
@@ -517,7 +517,7 @@ void KonfUpdate::gotFile(const TQString &_file)
newConfig = new KConfig(newFile, false, false);
newConfig->setGroup("$Version");
ids = newConfig->readListEntry("update_info");
- if (ids.contains(cfg_id))
+ if (ids.tqcontains(cfg_id))
{
skip = true;
log() << currentFilename << ": Skipping update '" << id << "'" << endl;
@@ -541,7 +541,7 @@ void KonfUpdate::gotFile(const TQString &_file)
void KonfUpdate::gotGroup(const TQString &_group)
{
- int i = _group.find(',');
+ int i = _group.tqfind(',');
if (i == -1)
{
oldGroup = _group.stripWhiteSpace();
@@ -574,7 +574,7 @@ void KonfUpdate::gotRemoveGroup(const TQString &_group)
void KonfUpdate::gotKey(const TQString &_key)
{
- int i = _key.find(',');
+ int i = _key.tqfind(',');
if (i == -1)
{
oldKey = _key.stripWhiteSpace();
@@ -724,7 +724,7 @@ void KonfUpdate::gotScriptArguments(const TQString &_arguments)
void KonfUpdate::gotScript(const TQString &_script)
{
TQString script, interpreter;
- int i = _script.find(',');
+ int i = _script.tqfind(',');
if (i == -1)
{
script = _script.stripWhiteSpace();
@@ -860,7 +860,7 @@ void KonfUpdate::gotScript(const TQString &_script)
TQString line = ts.readLine();
if (line.startsWith("["))
{
- int j = line.find(']')+1;
+ int j = line.tqfind(']')+1;
if (j > 0)
group = line.mid(1, j-2);
}
@@ -869,7 +869,7 @@ void KonfUpdate::gotScript(const TQString &_script)
TQString key = line.mid(9);
if (key[0] == '[')
{
- int j = key.find(']')+1;
+ int j = key.tqfind(']')+1;
if (j > 0)
{
group = key.mid(1,j-2);
@@ -888,7 +888,7 @@ void KonfUpdate::gotScript(const TQString &_script)
TQString key = line.mid(13).stripWhiteSpace();
if (key[0] == '[')
{
- int j = key.find(']')+1;
+ int j = key.tqfind(']')+1;
if (j > 0)
{
group = key.mid(1,j-2);