diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-16 19:02:47 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-16 19:02:47 +0000 |
commit | e985f7e545f4739493965aad69bbecb136dc9346 (patch) | |
tree | 54afd409d8acd6202dd8ab611d24e78c28e4c0a0 /quanta/treeviews/filestreeview.cpp | |
parent | f7670c198945adc3b95ad69a959fe5f8ae55b493 (diff) | |
download | tdewebdev-e985f7e545f4739493965aad69bbecb136dc9346.tar.gz tdewebdev-e985f7e545f4739493965aad69bbecb136dc9346.zip |
TQt4 port kdewebdev
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1237029 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'quanta/treeviews/filestreeview.cpp')
-rw-r--r-- | quanta/treeviews/filestreeview.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/quanta/treeviews/filestreeview.cpp b/quanta/treeviews/filestreeview.cpp index fd943139..7d7146e2 100644 --- a/quanta/treeviews/filestreeview.cpp +++ b/quanta/treeviews/filestreeview.cpp @@ -40,8 +40,8 @@ //FilesTreeView implementation -FilesTreeView::FilesTreeView(KConfig *config, TQWidget *parent, const char *name) - : BaseTreeView(parent, name) +FilesTreeView::FilesTreeView(KConfig *config, TQWidget *tqparent, const char *name) + : BaseTreeView(tqparent, name) { setAcceptDrops(true); setDragEnabled(true); @@ -59,7 +59,7 @@ FilesTreeView::FilesTreeView(KConfig *config, TQWidget *parent, const char *name { url = KURL(); QuantaCommon::setUrl(url, topStrList[i]); - if (!topURLList.contains(url)) + if (!topURLList.tqcontains(url)) { topURLList.append(url); if (i < topStrAliasList.count()) @@ -74,11 +74,11 @@ FilesTreeView::FilesTreeView(KConfig *config, TQWidget *parent, const char *name { url = KURL(); url.setPath("/"); - if (!topURLList.contains(url)) + if (!topURLList.tqcontains(url)) topURLList.append(url); url = KURL(); - url.setPath(QExtFileInfo::homeDirPath() + "/"); - if (!topURLList.contains(url)) + url.setPath(TQExtFileInfo::homeDirPath() + "/"); + if (!topURLList.tqcontains(url)) topURLList.append(url); } @@ -153,7 +153,7 @@ KFileTreeBranch* FilesTreeView::newBranch(const KURL& url) newBrnch = new BaseTreeBranch(this, url, i18n("Root Folder"), SmallIcon(fileItem.iconName()), true); } else { - if (url.isLocalFile() && url.equals(KURL(QExtFileInfo::homeDirPath() + "/"), true)) + if (url.isLocalFile() && url.equals(KURL(TQExtFileInfo::homeDirPath() + "/"), true)) { newBrnch = new BaseTreeBranch(this, url, i18n("Home Folder"), SmallIcon(fileItem.iconName()), true); } else @@ -161,7 +161,7 @@ KFileTreeBranch* FilesTreeView::newBranch(const KURL& url) TQString s = url.fileName(); if (s.isEmpty()) s = "/"; - if (topURLAliases.contains(url.url())) + if (topURLAliases.tqcontains(url.url())) s = topURLAliases[url.url()]; s += " [" + url.prettyURL() + "]"; newBrnch = new BaseTreeBranch(this, url, s, SmallIcon(fileItem.iconName()), true); @@ -180,7 +180,7 @@ void FilesTreeView::slotMenu(KListView* listView, TQListViewItem *item, const TQ Q_UNUSED(listView); #ifdef ENABLE_CVSSERVICE KURL url = currentURL(); - if (Project::ref()->contains(url)) + if (Project::ref()->tqcontains(url)) CVSService::ref()->setRepository(Project::ref()->projectBaseURL().path()); else CVSService::ref()->setRepository(url.directory()); @@ -218,7 +218,7 @@ void FilesTreeView::slotMenu(KListView* listView, TQListViewItem *item, const TQ m_folderMenu->setItemVisible(m_menuFolderRename, false); m_config->setGroup("General Options"); - if ((url == KURL("file:/") || url == KURL("file:" + QExtFileInfo::homeDirPath() + "/")) && + if ((url == KURL("file:/") || url == KURL("file:" + TQExtFileInfo::homeDirPath() + "/")) && m_config->readBoolEntry("Home-Root Folder On", true) ) m_folderMenu ->setItemVisible(m_menuTop, false); m_folderMenu ->setItemVisible(m_reloadMenuId, true); @@ -227,7 +227,7 @@ void FilesTreeView::slotMenu(KListView* listView, TQListViewItem *item, const TQ { m_folderMenu->changeItem( m_menuTop, i18n("&Add Folder to Top")); url.adjustPath(+1); - m_folderMenu->setItemVisible(m_menuTop, (topURLList.findIndex(url) == -1)); + m_folderMenu->setItemVisible(m_menuTop, (topURLList.tqfindIndex(url) == -1)); m_folderMenu->setItemVisible(m_reloadMenuId, false); } m_folderMenu->popup( point); @@ -251,7 +251,7 @@ void FilesTreeView::slotAddToTop() url.adjustPath(+1); if ( curItem != curItem->branch()->root() ) //it is not a top folder { // add - if (topURLList.findIndex(url) == -1) + if (topURLList.tqfindIndex(url) == -1) { topURLList.append(url); bool ok; @@ -261,7 +261,7 @@ void FilesTreeView::slotAddToTop() topURLAliases.insert(url.url(), aliasName); newBranch(url); } else { - KMessageBox::information(this, i18n("<qt><b>%1</b> is already a toplevel entry.</qt>").arg(url.url())); + KMessageBox::information(this, i18n("<qt><b>%1</b> is already a toplevel entry.</qt>").tqarg(url.url())); } } else { // remove @@ -274,10 +274,10 @@ void FilesTreeView::slotAddToTop() void FilesTreeView::slotNewTopFolder() { - KURL url = KFileDialog::getExistingURL(TQString::null, this, i18n("Choose Local or Remote Folder")); + KURL url = KFileDialog::getExistingURL(TQString(), this, i18n("Choose Local or Remote Folder")); if (url.isEmpty()) return; url.adjustPath(+1); - if (topURLList.findIndex(url) == -1) + if (topURLList.tqfindIndex(url) == -1) { bool ok; TQString aliasName = KInputDialog::getText(i18n("Set Alias"), i18n("Alternative folder name:"), url.fileName(), &ok, this); @@ -287,7 +287,7 @@ void FilesTreeView::slotNewTopFolder() newBranch(url); topURLList.append(url); } else { - KMessageBox::information(this, i18n("<qt><b>%1</b> is already a toplevel entry.</qt>").arg(url.url())); + KMessageBox::information(this, i18n("<qt><b>%1</b> is already a toplevel entry.</qt>").tqarg(url.url())); } } @@ -313,18 +313,18 @@ void FilesTreeView::slotChangeAlias() url.adjustPath(+1); if ( curItem == curItem->branch()->root() ) //it is not a top folder { - if (topURLList.findIndex(url) != -1) + if (topURLList.tqfindIndex(url) != -1) { bool ok; TQString aliasName = KInputDialog::getText(i18n("Change Alias"), i18n("Alternative folder name:"), topURLAliases[url.url()], &ok, this); if (ok) { - topURLAliases.replace(url.url(), aliasName); + topURLAliases.tqreplace(url.url(), aliasName); removeBranch(curItem->branch()); newBranch(url); } } else { - KMessageBox::information(this, i18n("<qt><b>%1</b> is already a toplevel entry.</qt>").arg(url.url())); + KMessageBox::information(this, i18n("<qt><b>%1</b> is already a toplevel entry.</qt>").tqarg(url.url())); } } } |