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 | 9a3f0aacd44fb866833ebcb852df3cd31475cb33 (patch) | |
tree | 9f699684624f4e78e13e7dd2393a103cc6fa8274 /kmenuedit | |
parent | 341ad02235b9c85cd31782225181ed475b74eaa3 (diff) | |
download | tdebase-9a3f0aacd44fb866833ebcb852df3cd31475cb33.tar.gz tdebase-9a3f0aacd44fb866833ebcb852df3cd31475cb33.zip |
rename the following methods:
tqfind find
tqreplace replace
tqcontains contains
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kmenuedit')
-rw-r--r-- | kmenuedit/menufile.cpp | 6 | ||||
-rw-r--r-- | kmenuedit/menuinfo.cpp | 10 | ||||
-rw-r--r-- | kmenuedit/treeview.cpp | 26 |
3 files changed, 21 insertions, 21 deletions
diff --git a/kmenuedit/menufile.cpp b/kmenuedit/menufile.cpp index db4c64cdf..d1582c23b 100644 --- a/kmenuedit/menufile.cpp +++ b/kmenuedit/menufile.cpp @@ -123,7 +123,7 @@ TQDomElement MenuFile::findMenu(TQDomElement elem, const TQString &menuName, boo { TQString menuNodeName; TQString subMenuName; - int i = menuName.tqfind('/'); + int i = menuName.find('/'); if (i >= 0) { menuNodeName = menuName.left(i); @@ -200,7 +200,7 @@ static TQString entryToDirId(const TQString &path) if (local.isEmpty() || local.startsWith("/")) { // What now? Use filename only and hope for the best. - local = path.mid(path.tqfindRev('/')+1); + local = path.mid(path.findRev('/')+1); } return local; } @@ -468,7 +468,7 @@ TQString MenuFile::uniqueMenuName(const TQString &menuName, const TQString &newM for(int n = 1; ++n; ) { - if (findMenu(elem, result, false).isNull() && !excludeList.tqcontains(result)) + if (findMenu(elem, result, false).isNull() && !excludeList.contains(result)) return result; result.truncate(trunc); diff --git a/kmenuedit/menuinfo.cpp b/kmenuedit/menuinfo.cpp index db5df8281..68aae34ba 100644 --- a/kmenuedit/menuinfo.cpp +++ b/kmenuedit/menuinfo.cpp @@ -53,13 +53,13 @@ void MenuFolderInfo::add(MenuFolderInfo *info, bool initial) // Remove sub menu (without deleting it) void MenuFolderInfo::take(MenuFolderInfo *info) { - subFolders.take(subFolders.tqfindRef(info)); + subFolders.take(subFolders.findRef(info)); } // Remove sub menu (without deleting it) bool MenuFolderInfo::takeRecursive(MenuFolderInfo *info) { - int i = subFolders.tqfindRef(info); + int i = subFolders.findRef(info); if (i >= 0) { subFolders.take(i); @@ -489,14 +489,14 @@ bool MenuEntryInfo::isShortcutAvailable(const KShortcut &_shortcut) { s_allShortcuts = new TQStringList(KHotKeys::allShortCuts()); } - available = !s_allShortcuts->tqcontains(shortcutKey); + available = !s_allShortcuts->contains(shortcutKey); if (available && s_newShortcuts) { - available = !s_newShortcuts->tqcontains(shortcutKey); + available = !s_newShortcuts->contains(shortcutKey); } if (!available && s_freeShortcuts) { - available = s_freeShortcuts->tqcontains(shortcutKey); + available = s_freeShortcuts->contains(shortcutKey); } return available; } diff --git a/kmenuedit/treeview.cpp b/kmenuedit/treeview.cpp index ef2e0508a..c657120ef 100644 --- a/kmenuedit/treeview.cpp +++ b/kmenuedit/treeview.cpp @@ -278,7 +278,7 @@ void TreeView::readMenuFolderInfo(MenuFolderInfo *folderInfo, KServiceGroup::Ptr folderInfo->directoryFile = folder->directoryEntryPath(); folderInfo->icon = folder->icon(); TQString id = folder->relPath(); - int i = id.tqfindRev('/', -2); + int i = id.findRev('/', -2); id = id.mid(i+1); folderInfo->id = id; folderInfo->fullId = prefix + id; @@ -472,7 +472,7 @@ void TreeView::selectMenu(const TQString &menu) TreeItem *item = 0; do { - int i = restMenu.tqfind("/"); + int i = restMenu.find("/"); TQString subMenu = restMenu.left(i+1); restMenu = restMenu.mid(i+1); @@ -592,7 +592,7 @@ TQStringList TreeView::fileList(const TQString& rPath) TQString relativePath = rPath; // truncate "/.directory" - int pos = relativePath.tqfindRev("/.directory"); + int pos = relativePath.findRev("/.directory"); if (pos > 0) relativePath.truncate(pos); TQStringList filelist; @@ -611,7 +611,7 @@ TQStringList TreeView::fileList(const TQString& rPath) TQStringList files = dir.entryList(); for (TQStringList::ConstIterator it = files.begin(); it != files.end(); ++it) { // does not work?! - //if (filelist.tqcontains(*it)) continue; + //if (filelist.contains(*it)) continue; if (relativePath.isEmpty()) { filelist.remove(*it); // hack @@ -631,7 +631,7 @@ TQStringList TreeView::dirList(const TQString& rPath) TQString relativePath = rPath; // truncate "/.directory" - int pos = relativePath.tqfindRev("/.directory"); + int pos = relativePath.findRev("/.directory"); if (pos > 0) relativePath.truncate(pos); TQStringList dirlist; @@ -649,7 +649,7 @@ TQStringList TreeView::dirList(const TQString& rPath) for (TQStringList::ConstIterator it = subdirs.begin(); it != subdirs.end(); ++it) { if ((*it) == "." || (*it) == "..") continue; // does not work?! - // if (dirlist.tqcontains(*it)) continue; + // if (dirlist.contains(*it)) continue; if (relativePath.isEmpty()) { dirlist.remove(*it); //hack @@ -679,8 +679,8 @@ bool TreeView::acceptDrag(TQDropEvent* e) const static TQString createDesktopFile(const TQString &file, TQString *menuId, TQStringList *excludeList) { - TQString base = file.mid(file.tqfindRev('/')+1); - base = base.left(base.tqfindRev('.')); + TQString base = file.mid(file.findRev('/')+1); + base = base.left(base.findRev('.')); TQRegExp r("(.*)(?=-\\d+)"); base = (r.search(base) > -1) ? r.cap(1) : base; @@ -703,8 +703,8 @@ static KDesktopFile *copyDesktopFile(MenuEntryInfo *entryInfo, TQString *menuId, static TQString createDirectoryFile(const TQString &file, TQStringList *excludeList) { - TQString base = file.mid(file.tqfindRev('/')+1); - base = base.left(base.tqfindRev('.')); + TQString base = file.mid(file.findRev('/')+1); + base = base.left(base.findRev('.')); TQString result; int i = 1; @@ -715,7 +715,7 @@ static TQString createDirectoryFile(const TQString &file, TQStringList *excludeL else result = base + TQString("-%1.directory").arg(i); - if (!excludeList->tqcontains(result)) + if (!excludeList->contains(result)) { if (locate("xdgdata-dirs", result).isEmpty()) break; @@ -997,7 +997,7 @@ void TreeView::newsubmenu() if (!ok) return; TQString file = caption; - file.tqreplace('/', '-'); + file.replace('/', '-'); file = createDirectoryFile(file, &m_newDirectoryList); // Create @@ -1069,7 +1069,7 @@ void TreeView::newitem() TQString menuId; TQString file = caption; - file.tqreplace('/', '-'); + file.replace('/', '-'); file = createDesktopFile(file, &menuId, &m_newMenuIds); // Create |