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 | d98fea1f859d23e1b1220a65d7a8eda3b757fd08 (patch) | |
tree | a7e6a450baf5017f93f73636f9e8f9b5e9a56f05 /src/common | |
parent | 704123e8152edcd80447659317f1c8b31a1576e6 (diff) | |
download | piklab-d98fea1f859d23e1b1220a65d7a8eda3b757fd08.tar.gz piklab-d98fea1f859d23e1b1220a65d7a8eda3b757fd08.zip |
rename the following methods:
tqfind find
tqreplace replace
tqcontains contains
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/piklab@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/common/lister.h | 4 | ||||
-rw-r--r-- | src/common/common/range.h | 6 | ||||
-rw-r--r-- | src/common/global/purl.cpp | 8 | ||||
-rw-r--r-- | src/common/gui/editlistbox.cpp | 4 | ||||
-rw-r--r-- | src/common/gui/key_gui.h | 8 | ||||
-rw-r--r-- | src/common/gui/list_container.cpp | 2 | ||||
-rw-r--r-- | src/common/gui/list_view.cpp | 4 | ||||
-rw-r--r-- | src/common/nokde/nokde_kcmdlineargs.cpp | 12 | ||||
-rw-r--r-- | src/common/port/port.cpp | 2 |
9 files changed, 25 insertions, 25 deletions
diff --git a/src/common/common/lister.h b/src/common/common/lister.h index 270aba6..db32c45 100644 --- a/src/common/common/lister.h +++ b/src/common/common/lister.h @@ -48,7 +48,7 @@ public: } const GroupType *group(const TQString &name) const { - if ( _groups.tqcontains(name) ) return _groups[name]; + if ( _groups.contains(name) ) return _groups[name]; return 0; } @@ -58,7 +58,7 @@ protected: group->_gui = gui; if (gui) gui->_group = group; group->init(); - Q_ASSERT( !_groups.tqcontains(group->name()) ); + Q_ASSERT( !_groups.contains(group->name()) ); _groups.insert(group->name(), group); } diff --git a/src/common/common/range.h b/src/common/common/range.h index d1e846f..2d4ece7 100644 --- a/src/common/common/range.h +++ b/src/common/common/range.h @@ -18,7 +18,7 @@ class GenericRange public: virtual ~GenericRange() {} virtual bool isEmpty() const = 0; - bool tqcontains(Type v) const { return !isEmpty() && v>=start && v<=end; } + bool contains(Type v) const { return !isEmpty() && v>=start && v<=end; } Type start, end; }; @@ -49,9 +49,9 @@ public: for (uint i=0; i<nb; i++) if ( !this->at(i).isEmpty() ) return false; return true; } - bool tqcontains(Type v) const { + bool contains(Type v) const { uint nb = this->count(); - for (uint i=0; i<nb; i++) if ( this->at(i).tqcontains(v) ) return true; + for (uint i=0; i<nb; i++) if ( this->at(i).contains(v) ) return true; return false; } }; diff --git a/src/common/global/purl.cpp b/src/common/global/purl.cpp index 265d5a7..ab1f8da 100644 --- a/src/common/global/purl.cpp +++ b/src/common/global/purl.cpp @@ -53,7 +53,7 @@ private: TQString PURL::Private::getWindowsDrivePath(char drive) { #if defined(Q_OS_UNIX) - if ( !_winDrives.tqcontains(drive) ) { + if ( !_winDrives.contains(drive) ) { TQStringList args; args += "-u"; TQString s; @@ -75,7 +75,7 @@ TQString PURL::Private::getWindowsDrivePath(char drive) bool PURL::Private::checkCachedPath(TQString &filepath) const { - if ( !_winPaths.tqcontains(filepath) ) return false; + if ( !_winPaths.contains(filepath) ) return false; filepath = _winPaths[filepath]; return true; } @@ -92,13 +92,13 @@ TQString PURL::Private::convertWindowsFilepath(const TQString &filepath) if ( filepath[0]=='\\' ) { TQString tmp = filepath; if ( checkCachedPath(tmp) ) return tmp; - return cachePath(filepath, convertWindowsShortFilepath(tmp.tqreplace('\\', "/"))); + return cachePath(filepath, convertWindowsShortFilepath(tmp.replace('\\', "/"))); } // appears to be a windows path with a drive if ( (filepath.length()>=2 && filepath[0].isLetter() && filepath[1]==':') ) { TQString tmp = filepath; if ( checkCachedPath(tmp) ) return tmp; - tmp = getWindowsDrivePath(filepath[0]) + tmp.mid(2).tqreplace('\\', "/"); + tmp = getWindowsDrivePath(filepath[0]) + tmp.mid(2).replace('\\', "/"); return cachePath(filepath, convertWindowsShortFilepath(tmp)); } return filepath; diff --git a/src/common/gui/editlistbox.cpp b/src/common/gui/editlistbox.cpp index 2e40b8a..62a1d98 100644 --- a/src/common/gui/editlistbox.cpp +++ b/src/common/gui/editlistbox.cpp @@ -205,7 +205,7 @@ void EditListBox::addItem(const TQString &text) { bool alreadyInList(false); //if we didn't check for dupes at the inserting we have to do it now - if ( _mode==DuplicatesDisallowed ) alreadyInList = _listView->tqfindItem(text, textColumn()); + if ( _mode==DuplicatesDisallowed ) alreadyInList = _listView->findItem(text, textColumn()); if (m_lineEdit) { bool block = m_lineEdit->signalsBlocked(); @@ -311,7 +311,7 @@ void EditListBox::updateButtons() TQString text = m_lineEdit->text(); if ( _mode!=DuplicatesCheckedAtEntering ) _addButton->setEnabled(!text.isEmpty()); else if ( text.isEmpty() ) _addButton->setEnabled(false); - else _addButton->setEnabled(!_listView->tqfindItem(text, textColumn())); + else _addButton->setEnabled(!_listView->findItem(text, textColumn())); } } if (_removeButton) _removeButton->setEnabled(item); diff --git a/src/common/gui/key_gui.h b/src/common/gui/key_gui.h index 5ae0a84..054a513 100644 --- a/src/common/gui/key_gui.h +++ b/src/common/gui/key_gui.h @@ -32,16 +32,16 @@ public: ConstIterator end() const { return _ids.end(); } uint count() const { return _ids.count(); } void appendItem(const KeyType &key, Type type) { - CRASH_ASSERT( !_ids.tqcontains(key) ); + CRASH_ASSERT( !_ids.contains(key) ); _ids[key] = append(type); } KeyType currentItem() const { return key(currentId()); } void setCurrentItem(const KeyType &key) { - if ( _ids.tqcontains(key) ) setCurrentId(_ids[key]); + if ( _ids.contains(key) ) setCurrentId(_ids[key]); } - bool tqcontains(const KeyType &key) const { return _ids.tqcontains(key); } + bool contains(const KeyType &key) const { return _ids.contains(key); } Type item(const KeyType &key) const { - CRASH_ASSERT( _ids.tqcontains(key) ); + CRASH_ASSERT( _ids.contains(key) ); return get(_ids[key]); } Type item(ConstIterator it) const { diff --git a/src/common/gui/list_container.cpp b/src/common/gui/list_container.cpp index 78f5a65..cbdec17 100644 --- a/src/common/gui/list_container.cpp +++ b/src/common/gui/list_container.cpp @@ -91,5 +91,5 @@ void ListViewItemContainer::appendItem(const TQPixmap &icon, const TQString &tit int ListViewItemContainer::id(const TQListViewItem *item) const { - return (_ids->tqcontains(item) ? int((*_ids)[item]) : -1); + return (_ids->contains(item) ? int((*_ids)[item]) : -1); } diff --git a/src/common/gui/list_view.cpp b/src/common/gui/list_view.cpp index 4d5ac14..218241d 100644 --- a/src/common/gui/list_view.cpp +++ b/src/common/gui/list_view.cpp @@ -191,9 +191,9 @@ void EditListViewItem::removeEditBox() void EditListViewItem::editDone(int col, const TQWidget *edit) { - if ( edit->tqmetaObject()->tqfindProperty("text", true)!=-1 ) + if ( edit->tqmetaObject()->findProperty("text", true)!=-1 ) emit listView()->itemRenamed(this, col, edit->property("text").toString()); - else if ( edit->tqmetaObject()->tqfindProperty("currentText", true)!=-1 ) + else if ( edit->tqmetaObject()->findProperty("currentText", true)!=-1 ) emit listView()->itemRenamed(this, col, edit->property("currentText").toString()); } diff --git a/src/common/nokde/nokde_kcmdlineargs.cpp b/src/common/nokde/nokde_kcmdlineargs.cpp index f06f20e..e73de61 100644 --- a/src/common/nokde/nokde_kcmdlineargs.cpp +++ b/src/common/nokde/nokde_kcmdlineargs.cpp @@ -409,7 +409,7 @@ findOption(const KCmdLineOptions *options, TQCString &opt, return result+0; TQCString nextOption = options->name; # if [[[TQT_VERSION IS DEPRECATED]]]<0x040000 - int p = nextOption.tqfind(' '); + int p = nextOption.find(' '); #else int p = TQString(nextOption).indexOf(' '); #endif @@ -450,7 +450,7 @@ KCmdLineArgs::findOption(const char *_opt, TQCString opt, int &i, bool _enabled, const char *def; TQCString argument; # if [[[TQT_VERSION IS DEPRECATED]]]<0x040000 - int j = opt.tqfind('='); + int j = opt.find('='); #else int j = TQString(opt).indexOf('='); #endif @@ -1107,9 +1107,9 @@ KCmdLineArgs::setOption(const TQCString &opt, bool enabled) } if (enabled) - parsedOptionList->tqreplace( opt, new TQCString("t") ); + parsedOptionList->replace( opt, new TQCString("t") ); else - parsedOptionList->tqreplace( opt, new TQCString("f") ); + parsedOptionList->replace( opt, new TQCString("f") ); } void @@ -1145,7 +1145,7 @@ KCmdLineArgs::getOption(const char *_opt) const TQCString *value = 0; if (parsedOptionList) { - value = parsedOptionList->tqfind(_opt); + value = parsedOptionList->find(_opt); } if (value) @@ -1225,7 +1225,7 @@ KCmdLineArgs::isSet(const char *_opt) const TQCString *value = 0; if (parsedOptionList) { - value = parsedOptionList->tqfind(opt); + value = parsedOptionList->find(opt); } if (value) diff --git a/src/common/port/port.cpp b/src/common/port/port.cpp index 3df2d48..a5545a4 100644 --- a/src/common/port/port.cpp +++ b/src/common/port/port.cpp @@ -92,7 +92,7 @@ PortType Port::findType(const TQString &portDevice) { FOR_EACH(PortType, type) { if ( !type.data().withDevice ) continue; - if ( probedDeviceList(type).tqcontains(portDevice) ) return type; + if ( probedDeviceList(type).contains(portDevice) ) return type; } return PortType::Nb_Types; } |