rename the following methods:

tqfind find
tqreplace replace
tqcontains contains


git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/dolphin@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 13 years ago
parent 7b65a26139
commit 10b4cb5e88

@ -44,7 +44,7 @@ noinst_HEADERS = bookmarkselector.h bookmarkssettingspage.h \
METASOURCES = AUTO
messages: rc.cpp
$(EXTRACTRC) `tqfind . -name \*.ui -o -name \*.rc` > rc.cpp
$(EXTRACTRC) `find . -name \*.ui -o -name \*.rc` > rc.cpp
$(XGETTEXT) *.cpp -o $(podir)/d3lphin.pot

@ -452,17 +452,17 @@ void Dolphin::createFile()
// Get the source path of the template which should be copied.
// The source path is part of the URL entry of the desktop file.
const int pos = entry.templatePath.tqfindRev('/');
const int pos = entry.templatePath.findRev('/');
TQString sourcePath(entry.templatePath.left(pos + 1));
sourcePath += KDesktopFile(entry.templatePath, true).readPathEntry("URL");
TQString name(i18n(entry.name.ascii()));
// Most entry names end with "..." (e. g. "HTML File..."), which is ok for
// menus but no good choice for a new file name -> remove the dots...
name.tqreplace("...", TQString());
name.replace("...", TQString());
// add the file extension to the name
name.append(sourcePath.right(sourcePath.length() - sourcePath.tqfindRev('.')));
name.append(sourcePath.right(sourcePath.length() - sourcePath.findRev('.')));
// Check whether a file with the current name already exists. If yes suggest automatically
// a unique file name (e. g. "HTML File" will be replaced by "HTML File_1").
@ -931,7 +931,7 @@ void Dolphin::openTerminal()
void Dolphin::findFile()
{
KRun::run("ktqfind", m_activeView->url());
KRun::run("kfind", m_activeView->url());
}
void Dolphin::compareFiles()
@ -1032,7 +1032,7 @@ void Dolphin::addUndoOperation(KIO::Job* job)
const KURL::List::Iterator sourceEnd = sourceURLs.end();
while (sourceIt != sourceEnd) {
TQMap<TQString, TQString>::ConstIterator metaIt = metaData.tqfind("trashURL-" + (*sourceIt).path());
TQMap<TQString, TQString>::ConstIterator metaIt = metaData.find("trashURL-" + (*sourceIt).path());
if (metaIt != metaData.end()) {
newSourceURLs.append(KURL(metaIt.data()));
}
@ -1330,7 +1330,7 @@ void Dolphin::setupActions()
KAction* findFileAction = new KAction(i18n("Find File..."), "Ctrl+F",
TQT_TQOBJECT(this), TQT_SLOT(findFile()),
actionCollection(), "find_file");
findFileAction->setIcon("filetqfind");
findFileAction->setIcon("filefind");
new KToggleAction(i18n("Show Filter Bar"), "filter", "/",
TQT_TQOBJECT(this), TQT_SLOT(showFilterBar()),

@ -401,11 +401,11 @@ void DolphinContextMenu::insertActionItems(KPopupMenu* popup,
insert = true;
while (insert && ((item = mimeIt.current()) != 0)) {
const TQString mimeType((*mimeIt)->mimetype());
const TQString mimeGroup(mimeType.left(mimeType.tqfind('/')));
const TQString mimeGroup(mimeType.left(mimeType.find('/')));
insert = (*it == mimeType) ||
((*it).right(1) == "*") &&
((*it).left((*it).tqfind('/')) == mimeGroup);
((*it).left((*it).find('/')) == mimeGroup);
++mimeIt;
}
}

@ -578,7 +578,7 @@ void DolphinDetailsView::slotAutoScroll()
const bool scroll = !TQRect(scrollMargin,
scrollMargin,
viewport()->width() - 2 * scrollMargin,
viewport()->height() - 2 * scrollMargin).tqcontains(pos);
viewport()->height() - 2 * scrollMargin).contains(pos);
if (scroll) {
if (m_scrollTimer == 0) {
m_scrollTimer = new TQTimer( this );

@ -232,8 +232,8 @@ void DolphinIconsView::arrangeItemsInGrid( bool updated )
TQString mimetype;
while (item != 0) {
mimetype = item->fileInfo()->mimetype();
const bool fixSize = mimetype.tqcontains("text") ||
mimetype.tqcontains("application/x-");
const bool fixSize = mimetype.contains("text") ||
mimetype.contains("application/x-");
if (fixSize) {
item->setPixmapSize(TQSize(m_previewIconSize, m_previewIconSize));
}
@ -360,7 +360,7 @@ void DolphinIconsView::contentsDragMoveEvent(TQDragMoveEvent* event)
// If a dragging is done above a directory, show the icon as 'active' for
// a visual feedback
KFileIconViewItem* item = static_cast<KFileIconViewItem*>(tqfindItem(contentsToViewport(event->pos())));
KFileIconViewItem* item = static_cast<KFileIconViewItem*>(findItem(contentsToViewport(event->pos())));
bool showActive = false;
if (item != 0) {
@ -387,7 +387,7 @@ void DolphinIconsView::contentsDropEvent(TQDropEvent* event)
return;
}
KFileIconViewItem* item = static_cast<KFileIconViewItem*>(tqfindItem(contentsToViewport(event->pos())));
KFileIconViewItem* item = static_cast<KFileIconViewItem*>(findItem(contentsToViewport(event->pos())));
const bool accept = KURLDrag::canDecode(event) &&
(event->action() == TQDropEvent::Copy ||
event->action() == TQDropEvent::Move ||

@ -224,7 +224,7 @@ void DolphinView::renameSelectedItems()
UndoManager& undoMan = UndoManager::instance();
undoMan.beginMacro();
assert(newName.tqcontains('#'));
assert(newName.contains('#'));
const int urlsCount = urls.count();
ProgressIndicator* progressIndicator =
@ -233,12 +233,12 @@ void DolphinView::renameSelectedItems()
urlsCount);
// iterate through all selected items and rename them...
const int replaceIndex = newName.tqfind('#');
const int replaceIndex = newName.find('#');
assert(replaceIndex >= 0);
for (int i = 0; i < urlsCount; ++i) {
const KURL& source = urls[i];
TQString name(newName);
name.tqreplace(replaceIndex, 1, renameIndexPresentation(i + 1, urlsCount));
name.replace(replaceIndex, 1, renameIndexPresentation(i + 1, urlsCount));
if (source.fileName() != name) {
KURL dest(source.upURL());

@ -471,11 +471,11 @@ void InfoSidebarPage::insertActions()
insert = true;
while (insert && ((item = mimeIt.current()) != 0)) {
const TQString mimeType((*mimeIt)->mimetype());
const TQString mimeGroup(mimeType.left(mimeType.tqfind('/')));
const TQString mimeGroup(mimeType.left(mimeType.find('/')));
insert = (*it == mimeType) ||
((*it).right(1) == "*") &&
((*it).left((*it).tqfind('/')) == mimeGroup);
((*it).left((*it).find('/')) == mimeGroup);
++mimeIt;
}
}

@ -49,7 +49,7 @@ RenameDialog::RenameDialog(const KURL::List& items) :
// case, add this postfix to the name suggestion.
postfix.insert(0, '.');
for (int i = 1; i < itemCount; ++i) {
if (!items[i].prettyURL().tqcontains(postfix)) {
if (!items[i].prettyURL().contains(postfix)) {
// at least one item does not have the same postfix
postfix.truncate(0);
break;
@ -79,7 +79,7 @@ RenameDialog::~RenameDialog()
void RenameDialog::slotOk()
{
m_newName = m_lineEdit->text();
if (m_newName.tqcontains('#') != 1) {
if (m_newName.contains('#') != 1) {
m_newName.truncate(0);
}

@ -179,7 +179,7 @@ void URLNavigator::setURL(const KURL& url)
if (urlStr.at(0) == '~') {
// tqreplace '~' by the home directory
// replace '~' by the home directory
urlStr.remove(0, 1);
urlStr.insert(0, TQDir::home().path());
}
@ -451,8 +451,8 @@ void URLNavigator::updateContent()
// path. E. g. "fish://root@192.168.0.2/var/lib" writes
// "fish://root@192.168.0.2" to 'bookmarkPath', which leads to the
// navigation indication 'Custom Path > var > lib".
int idx = path.tqfind(TQString("//"));
idx = path.tqfind("/", (idx < 0) ? 0 : idx + 2);
int idx = path.find(TQString("//"));
idx = path.find("/", (idx < 0) ? 0 : idx + 2);
bookmarkPath = (idx < 0) ? path : path.left(idx);
}
else {

Loading…
Cancel
Save