diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
commit | 33f08e93132a53bf14f41f5f1e567eeea832b336 (patch) | |
tree | f71204bc1c7d41a0545805a1276c5af43e1c3094 /src/archive.cpp | |
parent | 14284db4dfa93999d6227344141e8663d9fcf7f9 (diff) | |
download | basket-33f08e93132a53bf14f41f5f1e567eeea832b336.tar.gz basket-33f08e93132a53bf14f41f5f1e567eeea832b336.zip |
rename the following methods:
tqfind find
tqreplace replace
tqcontains contains
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/basket@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/archive.cpp')
-rw-r--r-- | src/archive.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/archive.cpp b/src/archive.cpp index 6541a8e..d9c76cb 100644 --- a/src/archive.cpp +++ b/src/archive.cpp @@ -102,7 +102,7 @@ void Archive::save(Basket *basket, bool withSubBaskets, const TQString &destinat TQPixmap icon = kapp->iconLoader()->loadIcon(state->emblem(), KIcon::Small, 16, KIcon::DefaultState, /*path_store=*/0L, /*canReturnNull=*/true); if (!icon.isNull()) { icon.save(tempIconFile, "PNG"); - TQString iconFileName = state->emblem().tqreplace('/', '_'); + TQString iconFileName = state->emblem().replace('/', '_'); tar.addLocalFile(tempIconFile, "tag-emblems/" + iconFileName); } } @@ -196,13 +196,13 @@ void Archive::saveBasketToArchive(Basket *basket, bool recursive, KTar *tar, TQS TQPixmap icon = kapp->iconLoader()->loadIcon(basket->icon(), KIcon::Small, 16, KIcon::DefaultState, /*path_store=*/0L, /*canReturnNull=*/true); if (!icon.isNull()) { icon.save(tempIconFile, "PNG"); - TQString iconFileName = basket->icon().tqreplace('/', '_'); + TQString iconFileName = basket->icon().replace('/', '_'); tar->addLocalFile(tempIconFile, "basket-icons/" + iconFileName); } } // Save basket backgorund image: TQString imageName = basket->backgroundImageName(); - if (!basket->backgroundImageName().isEmpty() && !backgrounds.tqcontains(imageName)) { + if (!basket->backgroundImageName().isEmpty() && !backgrounds.contains(imageName)) { TQString backgroundPath = Global::backgroundManager->pathForImageName(imageName); if (!backgroundPath.isEmpty()) { // Save the background image: @@ -267,7 +267,7 @@ void Archive::open(const TQString &path) while (!stream.atEnd()) { // Get Key/Value Pair From the Line to Read: line = stream.readLine(); - int index = line.tqfind(':'); + int index = line.find(':'); TQString key; TQString value; if (index >= 0) { @@ -306,7 +306,7 @@ void Archive::open(const TQString &path) delete buffer; // } } else if (key == "archive*") { - if (version != "0.6.1" && readCompatibleVersions.tqcontains("0.6.1") && !writeCompatibleVersions.tqcontains("0.6.1")) { + if (version != "0.6.1" && readCompatibleVersions.contains("0.6.1") && !writeCompatibleVersions.contains("0.6.1")) { KMessageBox::information( 0, i18n("This file was created with a recent version of %1. " @@ -317,7 +317,7 @@ void Archive::open(const TQString &path) i18n("Basket Archive Error") ); } - if (version != "0.6.1" && !readCompatibleVersions.tqcontains("0.6.1") && !writeCompatibleVersions.tqcontains("0.6.1")) { + if (version != "0.6.1" && !readCompatibleVersions.contains("0.6.1") && !writeCompatibleVersions.contains("0.6.1")) { KMessageBox::error( 0, i18n("This file was created with a recent version of %1. Please upgrade to a newer version to be able to open that file.") @@ -437,9 +437,9 @@ void Archive::importTagEmblems(const TQString &extractionFolder) if (emblem.isNull()) { // Of the emblem path was eg. "/home/seb/emblem.png", it was exported as "tag-emblems/_home_seb_emblem.png". // So we need to copy that image to "~/.kde/share/apps/basket/tag-emblems/emblem.png": - int slashIndex = emblemName.tqfindRev("/"); + int slashIndex = emblemName.findRev("/"); TQString emblemFileName = (slashIndex < 0 ? emblemName : emblemName.right(slashIndex - 2)); - TQString source = extractionFolder + "tag-emblems/" + emblemName.tqreplace('/', '_'); + TQString source = extractionFolder + "tag-emblems/" + emblemName.replace('/', '_'); TQString destination = Global::savesFolder() + "tag-emblems/" + emblemFileName; if (!dir.exists(destination)) copier.copyFolder(source, destination); @@ -555,9 +555,9 @@ void Archive::importBasketIcon(TQDomElement properties, const TQString &extracti FormatImporter copier; // Only used to copy files synchronously // Of the icon path was eg. "/home/seb/icon.png", it was exported as "basket-icons/_home_seb_icon.png". // So we need to copy that image to "~/.kde/share/apps/basket/basket-icons/icon.png": - int slashIndex = iconName.tqfindRev("/"); + int slashIndex = iconName.findRev("/"); TQString iconFileName = (slashIndex < 0 ? iconName : iconName.right(slashIndex - 2)); - TQString source = extractionFolder + "basket-icons/" + iconName.tqreplace('/', '_'); + TQString source = extractionFolder + "basket-icons/" + iconName.replace('/', '_'); TQString destination = Global::savesFolder() + "basket-icons/" + iconFileName; if (!dir.exists(destination)) copier.copyFolder(source, destination); @@ -584,7 +584,7 @@ void Archive::renameMergedStates(TQDomNode notes, TQMap<TQString, TQString> &mer TQStringList tagNames = TQStringList::split(";", tags); for (TQStringList::Iterator it = tagNames.begin(); it != tagNames.end(); ++it) { TQString &tag = *it; - if (mergedStates.tqcontains(tag)) { + if (mergedStates.contains(tag)) { tag = mergedStates[tag]; } } |