summaryrefslogtreecommitdiffstats
path: root/kconf_update
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
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')
-rw-r--r--kconf_update/README.kconf_update8
-rw-r--r--kconf_update/kconf_update.cpp46
2 files changed, 27 insertions, 27 deletions
diff --git a/kconf_update/README.kconf_update b/kconf_update/README.kconf_update
index 14d50ad66..63f0214c9 100644
--- a/kconf_update/README.kconf_update
+++ b/kconf_update/README.kconf_update
@@ -28,7 +28,7 @@ How it works
Applications can install so called "update files" under
$KDEDIR/share/apps/kconf_update. An update file has ".upd" as extension and
-contains instructions for transferring/converting configuration information
+tqcontains instructions for transferring/converting configuration information
from one place to another.
Updating the configuration happens automatically, either when KDE gets started
@@ -39,7 +39,7 @@ section describing a configuration change has been applied, the Id will be
stored in the file "kconf_updaterc". This information is used to make sure
that a configuration update is only performed once.
-If you overwrite an existing update file with a new version that contains a
+If you overwrite an existing update file with a new version that tqcontains a
new section, only the update instructions from this extra section will be
performed.
@@ -77,7 +77,7 @@ adding lines with "# DELETE [group]key" in the output of the script.
To delete a whole group use "# DELETEGROUP [group]".
<script> should be installed into $(kde_datadir)/kconf_update, or
-kconf_update will not be able to find it. It is not portable to install
+kconf_update will not be able to tqfind it. It is not portable to install
binary applications in $kde_datadir, so you have to stick with interpreted
scripts like sh or perl scripts. From KDE 3.2 onwards it's also possible
to install kconf_update applications in $(kde_bindir)/kconf_update_bin,
@@ -85,7 +85,7 @@ which opens the door to kconf_update applications that are written in C++
and use Qt's powerful string API instead.
A workaround for KDE 3.1.x and older is to install a .sh script in
-$(kde_datadir) that contains a simple exec:
+$(kde_datadir) that tqcontains a simple exec:
exec "`kde-config --prefix`/bin/kconf_update_bin/my_update_app"
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);