[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kde-baseapps/frameworks] konqueror: KUrl -> QUrl, using convert-kurl.pl
From: David Faure <faure () kde ! org>
Date: 2016-04-30 18:34:49
Message-ID: E1awZj7-0007LT-Ck () scm ! kde ! org
[Download RAW message or body]
Git commit 10441fdbec11ad6f2d64761131429ac4d08d7519 by David Faure.
Committed on 30/04/2016 at 10:15.
Pushed by dfaure into branch 'frameworks'.
KUrl -> QUrl, using convert-kurl.pl
M +3 -3 konqueror/client/kfmclient.cpp
M +2 -2 konqueror/settings/konqhtml/css/kcmcss.cpp
M +3 -3 konqueror/settings/konqhtml/filteropts.cpp
M +2 -2 konqueror/settings/konqhtml/generalopts.cpp
M +3 -3 konqueror/settings/konqhtml/pluginopts.cpp
M +1 -1 konqueror/sidebar/trees/bookmark_module/bookmark_module.cpp
M +7 -6 konqueror/sidebar/trees/dirtree_module/dirtree_item.cpp
M +1 -1 konqueror/sidebar/trees/dirtree_module/dirtree_item.h
M +42 -41 konqueror/sidebar/trees/dirtree_module/dirtree_module.cpp
M +6 -6 konqueror/sidebar/trees/dirtree_module/dirtree_module.h
M +12 -12 konqueror/sidebar/trees/konq_sidebartree.cpp
M +1 -1 konqueror/sidebar/trees/konq_sidebartree.h
M +1 -1 konqueror/sidebar/trees/konq_sidebartreemodule.h
M +8 -8 konqueror/sidebar/trees/konq_sidebartreetoplevelitem.cpp
M +2 -2 konqueror/sidebar/trees/konqsidebar_oldtreemodule.cpp
M +2 -2 konqueror/src/konqmainwindow.cpp
M +1 -1 konqueror/src/konqsessionmanager.cpp
M +1 -1 konqueror/src/konqviewmanager.cpp
M +1 -1 konqueror/src/tests/historymanagertest.cpp
M +6 -6 konqueror/src/tests/konqhtmltest.cpp
M +19 -19 konqueror/src/tests/konqviewmgrtest.cpp
M +4 -4 konqueror/src/tests/konqviewtest.cpp
http://commits.kde.org/kde-baseapps/10441fdbec11ad6f2d64761131429ac4d08d7519
diff --git a/konqueror/client/kfmclient.cpp b/konqueror/client/kfmclient.cpp
index b6ffc42..e34811a 100644
--- a/konqueror/client/kfmclient.cpp
+++ b/konqueror/client/kfmclient.cpp
@@ -39,7 +39,7 @@
#include <KJobWidgets>
//KDELibs4Support
-#include <KUrl>
+#include <QUrl>
#include <kdeversion.h>
#include <konq_mainwindow_interface.h>
@@ -328,7 +328,7 @@ static QString konqyToReuse(const QString &url, const QString \
&mimetype, const Q return QString();
}
-static KUrl filteredUrl(KCmdLineArgs *args)
+static QUrl filteredUrl(KCmdLineArgs *args)
{
if (args) {
KUriFilterData data;
@@ -340,7 +340,7 @@ static KUrl filteredUrl(KCmdLineArgs *args)
return data.uri();
}
}
- return KUrl();
+ return QUrl();
}
void ClientApp::sendASNChange()
diff --git a/konqueror/settings/konqhtml/css/kcmcss.cpp \
b/konqueror/settings/konqhtml/css/kcmcss.cpp index a9f0193..440df56 100644
--- a/konqueror/settings/konqhtml/css/kcmcss.cpp
+++ b/konqueror/settings/konqhtml/css/kcmcss.cpp
@@ -21,7 +21,7 @@
#include <kparts/part.h>
#include <kparts/openurlarguments.h>
-#include <kurl.h>
+#include <QUrl>
#include <QStandardPaths>
// Local
@@ -197,7 +197,7 @@ void CSSConfig::defaults()
configWidget->useDefault->setChecked(true);
configWidget->useUser->setChecked(false);
configWidget->useAccess->setChecked(false);
- configWidget->urlRequester->setUrl(KUrl());
+ configWidget->urlRequester->setUrl(QUrl());
customDialog->basefontsize->setEditText(QString::number(12));
customDialog->dontScale->setChecked(false);
diff --git a/konqueror/settings/konqhtml/filteropts.cpp \
b/konqueror/settings/konqhtml/filteropts.cpp index a8d5185..b9b8340 100644
--- a/konqueror/settings/konqhtml/filteropts.cpp
+++ b/konqueror/settings/konqhtml/filteropts.cpp
@@ -46,7 +46,7 @@
#include <KTabWidget>
#include <KConfigGroup>
-#include <kurl.h>
+#include <QUrl>
#include <KSharedConfig>
KCMFilter::KCMFilter(QWidget *parent, const QVariantList &)
@@ -257,7 +257,7 @@ void KCMFilter::updateButton()
void KCMFilter::importFilters()
{
- QString inFile = KFileDialog::getOpenFileName(KUrl(), QString(), this);
+ QString inFile = KFileDialog::getOpenFileName(QUrl(), QString(), this);
if (!inFile.isEmpty()) {
QFile f(inFile);
if (f.open(QIODevice::ReadOnly)) {
@@ -302,7 +302,7 @@ void KCMFilter::importFilters()
void KCMFilter::exportFilters()
{
- QString outFile = KFileDialog::getSaveFileName(KUrl(), QString(), this);
+ QString outFile = KFileDialog::getSaveFileName(QUrl(), QString(), this);
if (!outFile.isEmpty()) {
QFile f(outFile);
diff --git a/konqueror/settings/konqhtml/generalopts.cpp \
b/konqueror/settings/konqhtml/generalopts.cpp index 55e1956..38e978a 100644
--- a/konqueror/settings/konqhtml/generalopts.cpp
+++ b/konqueror/settings/konqhtml/generalopts.cpp
@@ -31,7 +31,7 @@
#include <kurlrequester.h>
#include <KConfigGroup>
#include <KGlobal>
-#include <KUrl>
+#include <QUrl>
// Local
#include "ui_advancedTabOptions.h"
#include <KPluginFactory>
@@ -208,7 +208,7 @@ void KKonqGeneralOptions::load()
void KKonqGeneralOptions::defaults()
{
- homeURL->setUrl(KUrl(DEFAULT_HOMEPAGE));
+ homeURL->setUrl(QUrl(DEFAULT_HOMEPAGE));
bool old = m_pConfig->readDefaults();
m_pConfig->setReadDefaults(true);
diff --git a/konqueror/settings/konqhtml/pluginopts.cpp \
b/konqueror/settings/konqhtml/pluginopts.cpp index ae77480..d1dfc9b 100644
--- a/konqueror/settings/konqhtml/pluginopts.cpp
+++ b/konqueror/settings/konqhtml/pluginopts.cpp
@@ -42,7 +42,7 @@
#include <KGuiItem>
#include <KStandardGuiItem>
#include <KGlobal>
-#include <KUrl>
+#include <QUrl>
#include <QStandardPaths>
#include <KSharedConfig>
// Local
@@ -224,7 +224,7 @@ void KPluginOptions::load()
KSharedConfig::Ptr config = KSharedConfig::openConfig("kcmnspluginrc");
KConfigGroup cg(config, "Misc");
- m_widget.dirEdit->setUrl(KUrl());
+ m_widget.dirEdit->setUrl(QUrl());
m_widget.dirEdit->setEnabled(false);
m_widget.dirRemove->setEnabled(false);
m_widget.dirUp->setEnabled(false);
@@ -252,7 +252,7 @@ void KPluginOptions::defaults()
KSharedConfig::Ptr config = KSharedConfig::openConfig(QString(), \
KConfig::NoGlobals);
- m_widget.dirEdit->setUrl(KUrl());
+ m_widget.dirEdit->setUrl(QUrl());
m_widget.dirEdit->setEnabled(false);
m_widget.dirRemove->setEnabled(false);
diff --git a/konqueror/sidebar/trees/bookmark_module/bookmark_module.cpp \
b/konqueror/sidebar/trees/bookmark_module/bookmark_module.cpp index 9355ef4..1bc0be8 \
100644
--- a/konqueror/sidebar/trees/bookmark_module/bookmark_module.cpp
+++ b/konqueror/sidebar/trees/bookmark_module/bookmark_module.cpp
@@ -400,7 +400,7 @@ void \
KonqSidebarBookmarkModule::slotProperties(KonqSidebarBookmarkItem *bi)
makeTextNodeMod(bookmark, "title", dlg.finalTitle());
if (!dlg.finalUrl().isNull()) {
- KUrl u(dlg.finalUrl());
+ QUrl u(dlg.finalUrl());
bookmark.internalElement().setAttribute("href", u.url());
}
diff --git a/konqueror/sidebar/trees/dirtree_module/dirtree_item.cpp \
b/konqueror/sidebar/trees/dirtree_module/dirtree_item.cpp index 92ed39d..4f6d6fc \
100644
--- a/konqueror/sidebar/trees/dirtree_module/dirtree_item.cpp
+++ b/konqueror/sidebar/trees/dirtree_module/dirtree_item.cpp
@@ -70,7 +70,7 @@ void KonqSidebarDirTreeItem::reset()
bool expandable = true;
// For local dirs, find out if they have no children, to remove the "+"
if (m_fileItem.isDir()) {
- KUrl url = m_fileItem.url();
+ QUrl url = m_fileItem.url();
if (url.isLocalFile()) {
struct stat buff;
if (KDE::stat(url.toLocalFile(), &buff) != -1) {
@@ -89,7 +89,7 @@ void KonqSidebarDirTreeItem::reset()
}
}
setExpandable(expandable);
- id = m_fileItem.url().url(KUrl::RemoveTrailingSlash);
+ id = m_fileItem.url().adjusted(QUrl::StripTrailingSlash).toString();
}
void KonqSidebarDirTreeItem::setOpen(bool open)
@@ -185,7 +185,7 @@ bool KonqSidebarDirTreeItem::populateMimeData(QMimeData \
*mimeData, bool move) void KonqSidebarDirTreeItem::itemSelected()
{
const QMimeData *mimeData = QApplication::clipboard()->mimeData();
- const KUrl::List urls = KUrl::List::fromMimeData(mimeData);
+ const QList<QUrl> urls = mimeData->urls();
const QList<QUrl> urls =
const bool paste = !urls.isEmpty();
tree()->enableActions(true, true, paste);
@@ -297,7 +297,7 @@ void KonqSidebarDirTreeItem::del()
void KonqSidebarDirTreeItem::delOperation(KonqOperations::Operation method)
{
- KUrl::List lst;
+ QList<QUrl> lst;
lst.append(m_fileItem.url());
KonqOperations::del(tree(), method, lst);
@@ -315,8 +315,9 @@ void KonqSidebarDirTreeItem::rename()
void KonqSidebarDirTreeItem::rename(const QString &name)
{
- KUrl url(m_fileItem.url());
+ QUrl url(m_fileItem.url());
KonqOperations::rename(tree(), url, name);
- url.setPath(url.directory(KUrl::AppendTrailingSlash) + name);
+ url.setPath(url.adjusted(QUrl::RemoveFilename).path() + name);
m_fileItem.setUrl(url);
}
+
diff --git a/konqueror/sidebar/trees/dirtree_module/dirtree_item.h \
b/konqueror/sidebar/trees/dirtree_module/dirtree_item.h index 175d816..0f3a0b0 100644
--- a/konqueror/sidebar/trees/dirtree_module/dirtree_item.h
+++ b/konqueror/sidebar/trees/dirtree_module/dirtree_item.h
@@ -22,7 +22,7 @@
#include "konq_sidebartreeitem.h"
#include <kfileitem.h>
-#include <kurl.h>
+#include <QUrl>
#include <konq_operations.h>
#include <QtCore/QStringList>
diff --git a/konqueror/sidebar/trees/dirtree_module/dirtree_module.cpp \
b/konqueror/sidebar/trees/dirtree_module/dirtree_module.cpp index 2237600..b2bffff \
100644
--- a/konqueror/sidebar/trees/dirtree_module/dirtree_module.cpp
+++ b/konqueror/sidebar/trees/dirtree_module/dirtree_module.cpp
@@ -43,15 +43,15 @@ KonqSidebarDirTreeModule::~KonqSidebarDirTreeModule()
{
// KDirLister may still emit canceled while being deleted.
if (m_dirLister) {
- disconnect(m_dirLister, SIGNAL(canceled(KUrl)),
- this, SLOT(slotListingStopped(KUrl)));
+ disconnect(m_dirLister, SIGNAL(canceled(QUrl)),
+ this, SLOT(slotListingStopped(QUrl)));
delete m_dirLister;
}
}
-KUrl::List KonqSidebarDirTreeModule::selectedUrls()
+QList<QUrl> KonqSidebarDirTreeModule::selectedUrls()
{
- KUrl::List lst;
+ QList<QUrl> lst;
KonqSidebarDirTreeItem *selection = static_cast<KonqSidebarDirTreeItem \
*>(m_pTree->selectedItem()); if (!selection) {
kError() << "no selection!" << endl;
@@ -70,7 +70,7 @@ void \
KonqSidebarDirTreeModule::addTopLevelItem(KonqSidebarTreeTopLevelItem *item \
KDesktopFile cfg(item->path()); KConfigGroup desktopGroup = cfg.desktopGroup();
- KUrl targetURL;
+ QUrl targetURL;
targetURL.setPath(item->path());
if (cfg.hasLinkType()) {
@@ -99,7 +99,7 @@ void \
KonqSidebarDirTreeModule::addTopLevelItem(KonqSidebarTreeTopLevelItem *item }
bool bListable = KProtocolManager::supportsListing(targetURL);
- //kDebug(1201) << targetURL.prettyUrl() << " listable : " << bListable;
+ //kDebug(1201) << targetURL.toDisplayString() << " listable : " << bListable;
if (!bListable) {
item->setExpandable(false);
@@ -121,7 +121,7 @@ void \
KonqSidebarDirTreeModule::openTopLevelItem(KonqSidebarTreeTopLevelItem *ite
void KonqSidebarDirTreeModule::addSubDir(KonqSidebarTreeItem *item)
{
- QString id = item->externalURL().url(KUrl::RemoveTrailingSlash);
+ QString id = item->externalURL().adjusted(QUrl::StripTrailingSlash).toString();
kDebug(1201) << this << id;
m_dictSubDirs.insert(id, item);
@@ -266,7 +266,7 @@ void KonqSidebarDirTreeModule::removeSubDir(KonqSidebarTreeItem \
*item, bool chil }
if (!childrenOnly) {
- QString id = item->externalURL().url(KUrl::RemoveTrailingSlash);
+ QString id = \
item->externalURL().adjusted(QUrl::StripTrailingSlash).toString(); \
remove(m_dictSubDirs, id, item); while (!(item->alias.isEmpty())) {
remove(m_dictSubDirs, item->alias.front(), item);
@@ -298,12 +298,12 @@ void \
KonqSidebarDirTreeModule::openSubFolder(KonqSidebarTreeItem *item)
this, SLOT(slotRefreshItems(QList<QPair<KFileItem,KFileItem> >)));
connect(m_dirLister, SIGNAL(deleteItem(KFileItem)),
this, SLOT(slotDeleteItem(KFileItem)));
- connect(m_dirLister, SIGNAL(completed(KUrl)),
- this, SLOT(slotListingStopped(KUrl)));
- connect(m_dirLister, SIGNAL(canceled(KUrl)),
- this, SLOT(slotListingStopped(KUrl)));
- connect(m_dirLister, SIGNAL(redirection(KUrl,KUrl)),
- this, SLOT(slotRedirection(KUrl,KUrl)));
+ connect(m_dirLister, SIGNAL(completed(QUrl)),
+ this, SLOT(slotListingStopped(QUrl)));
+ connect(m_dirLister, SIGNAL(canceled(QUrl)),
+ this, SLOT(slotListingStopped(QUrl)));
+ connect(m_dirLister, SIGNAL(redirection(QUrl,QUrl)),
+ this, SLOT(slotRedirection(QUrl,QUrl)));
}
if (!item->isTopLevelItem() &&
@@ -321,8 +321,8 @@ void KonqSidebarDirTreeModule::openSubFolder(KonqSidebarTreeItem \
*item) void KonqSidebarDirTreeModule::listDirectory(KonqSidebarTreeItem *item)
{
// This causes a reparsing, but gets rid of the trailing slash
- QString strUrl = item->externalURL().url(KUrl::RemoveTrailingSlash);
- KUrl url(strUrl);
+ QString strUrl = \
item->externalURL().adjusted(QUrl::StripTrailingSlash).toString(); + QUrl \
url(strUrl);
Q3PtrList<KonqSidebarTreeItem> *itemList;
KonqSidebarTreeItem *openItem;
@@ -389,21 +389,22 @@ void KonqSidebarDirTreeModule::slotNewItems(const KFileItemList \
&entries) const KFileItem firstItem = entries.first();
// Find parent item - it's the same for all the items
- KUrl dir(firstItem.url().url(KUrl::RemoveTrailingSlash));
- dir.setFileName("");
- kDebug(1201) << this << "dir=" << dir.url(KUrl::RemoveTrailingSlash);
+ QUrl dir(firstItem.url().adjusted(QUrl::StripTrailingSlash).toString());
+ dir = dir.adjusted(QUrl::RemoveFilename);
+ dir.setPath(dir.path() + "");
+ kDebug(1201) << this << "dir=" << \
dir.adjusted(QUrl::StripTrailingSlash).toString();
Q3PtrList<KonqSidebarTreeItem> *parentItemList;
KonqSidebarTreeItem *parentItem;
- lookupItems(m_dictSubDirs, dir.url(KUrl::RemoveTrailingSlash), parentItem, \
parentItemList); + lookupItems(m_dictSubDirs, \
dir.adjusted(QUrl::StripTrailingSlash).toString(), parentItem, parentItemList);
if (!parentItem) { // hack for dnssd://domain/type/service listed in \
dnssd:/type/ dir dir.setHost(QString());
- lookupItems(m_dictSubDirs, dir.url(KUrl::RemoveTrailingSlash), parentItem, \
parentItemList); + lookupItems(m_dictSubDirs, \
dir.adjusted(QUrl::StripTrailingSlash).toString(), parentItem, parentItemList); }
if (!parentItem) {
- KMessageBox::error(tree(), i18n("Cannot find parent item %1 in the tree. \
Internal error.", dir.url(KUrl::RemoveTrailingSlash))); + \
KMessageBox::error(tree(), i18n("Cannot find parent item %1 in the tree. Internal \
error.", dir.adjusted(QUrl::StripTrailingSlash).toString())); return;
}
@@ -455,19 +456,19 @@ void KonqSidebarDirTreeModule::slotRefreshItems(const \
QList<QPair<KFileItem, KFi lookupItems(m_ptrdictSubDirs, oldFileItem, item, \
itemList);
if (!item) {
- kWarning(1201) << "can't find old entry for " << \
oldFileItem.url().url(KUrl::RemoveTrailingSlash); + kWarning(1201) << \
"can't find old entry for " << \
oldFileItem.url().adjusted(QUrl::StripTrailingSlash).toString(); continue;
}
do {
if (item->isTopLevelItem()) { // we only have dirs and one toplevel item \
in the dict
- kWarning(1201) << "entry for " << \
oldFileItem.url().url(KUrl::RemoveTrailingSlash) << "matches against toplevel."; + \
kWarning(1201) << "entry for " << \
oldFileItem.url().adjusted(QUrl::StripTrailingSlash).toString() << "matches against \
toplevel."; break;
}
KonqSidebarDirTreeItem *dirTreeItem = static_cast<KonqSidebarDirTreeItem \
*>(item); // Item renamed ?
- if (dirTreeItem->id != fileItem.url().url(KUrl::RemoveTrailingSlash)) {
+ if (dirTreeItem->id != \
fileItem.url().adjusted(QUrl::StripTrailingSlash).toString()) {
kDebug(1201) << "renaming" << oldFileItem << "->" << fileItem;
// We need to update the URL in m_dictSubDirs, and to get rid of the \
child items, so remove and add. // Then remove + delete
@@ -497,12 +498,12 @@ void KonqSidebarDirTreeModule::slotRefreshItems(const \
QList<QPair<KFileItem, KFi
void KonqSidebarDirTreeModule::slotDeleteItem(const KFileItem &fileItem)
{
- kDebug(1201) << fileItem.url().url(KUrl::RemoveTrailingSlash);
+ kDebug(1201) << fileItem.url().adjusted(QUrl::StripTrailingSlash).toString();
// All items are in m_ptrdictSubDirs, so look it up fast
Q3PtrList<KonqSidebarTreeItem> *itemList;
KonqSidebarTreeItem *item;
- lookupItems(m_dictSubDirs, fileItem.url().url(KUrl::RemoveTrailingSlash), item, \
itemList); + lookupItems(m_dictSubDirs, \
fileItem.url().adjusted(QUrl::StripTrailingSlash).toString(), item, itemList); while \
(item) { removeSubDir(item);
delete item;
@@ -512,12 +513,12 @@ void KonqSidebarDirTreeModule::slotDeleteItem(const KFileItem \
&fileItem) delete itemList;
}
-void KonqSidebarDirTreeModule::slotRedirection(const KUrl &oldUrl, const KUrl \
&newUrl) +void KonqSidebarDirTreeModule::slotRedirection(const QUrl &oldUrl, const \
QUrl &newUrl) {
kDebug(1201) << newUrl;
- QString oldUrlStr = oldUrl.url(KUrl::RemoveTrailingSlash);
- QString newUrlStr = newUrl.url(KUrl::RemoveTrailingSlash);
+ QString oldUrlStr = oldUrl.adjusted(QUrl::StripTrailingSlash).toString();
+ QString newUrlStr = newUrl.adjusted(QUrl::StripTrailingSlash).toString();
Q3PtrList<KonqSidebarTreeItem> *itemList;
KonqSidebarTreeItem *item;
@@ -543,13 +544,13 @@ void KonqSidebarDirTreeModule::slotRedirection(const KUrl \
&oldUrl, const KUrl &n delete itemList;
}
-void KonqSidebarDirTreeModule::slotListingStopped(const KUrl &url)
+void KonqSidebarDirTreeModule::slotListingStopped(const QUrl &url)
{
//kDebug(1201) << url;
Q3PtrList<KonqSidebarTreeItem> *itemList;
KonqSidebarTreeItem *item;
- lookupItems(m_dictSubDirs, url.url(KUrl::RemoveTrailingSlash), item, itemList);
+ lookupItems(m_dictSubDirs, url.adjusted(QUrl::StripTrailingSlash).toString(), \
item, itemList);
while (item) {
if (item->childCount() == 0) {
@@ -564,41 +565,41 @@ void KonqSidebarDirTreeModule::slotListingStopped(const KUrl \
&url)
//kDebug(1201) << "m_selectAfterOpening " << m_selectAfterOpening.prettyUrl();
if (!m_selectAfterOpening.isEmpty() && url.isParentOf(m_selectAfterOpening)) {
- KUrl theURL(m_selectAfterOpening);
- m_selectAfterOpening = KUrl();
+ QUrl theURL(m_selectAfterOpening);
+ m_selectAfterOpening = QUrl();
followURL(theURL);
}
}
-void KonqSidebarDirTreeModule::followURL(const KUrl &url)
+void KonqSidebarDirTreeModule::followURL(const QUrl &url)
{
// Check if we already know this URL
- KonqSidebarTreeItem *item = m_dictSubDirs[ url.url(KUrl::RemoveTrailingSlash) ];
+ KonqSidebarTreeItem *item = m_dictSubDirs[ \
url.adjusted(QUrl::StripTrailingSlash).toString() ]; if (item) { // found it -> \
ensure visible, select, return. m_pTree->ensureItemVisible(item);
m_pTree->setSelected(item, true);
return;
}
- KUrl uParent(url);
+ QUrl uParent(url);
KonqSidebarTreeItem *parentItem = 0L;
// Go up to the first known parent
do {
uParent = uParent.upUrl();
- parentItem = m_dictSubDirs[ uParent.url(KUrl::RemoveTrailingSlash) ];
+ parentItem = m_dictSubDirs[ \
uParent.adjusted(QUrl::StripTrailingSlash).toString() ];
} while (!parentItem && !uParent.path().isEmpty() && uParent.path() != "/");
// Not found !?!
if (!parentItem) {
- kDebug() << "No parent found for url " << url.prettyUrl();
+ kDebug() << "No parent found for url " << url.toDisplayString();
return;
}
- kDebug() << "Found parent " << uParent.prettyUrl();
+ kDebug() << "Found parent " << uParent.toDisplayString();
// That's the parent directory we found. Open if not open...
if (!parentItem->isOpen()) {
parentItem->setOpen(true);
- if (parentItem->childCount() && m_dictSubDirs[ \
url.url(KUrl::RemoveTrailingSlash) ]) { + if (parentItem->childCount() && \
m_dictSubDirs[ url.adjusted(QUrl::StripTrailingSlash).toString() ]) { // Immediate \
opening, if the dir was already listed followURL(url); // equivalent to a \
goto-beginning-of-method } else {
diff --git a/konqueror/sidebar/trees/dirtree_module/dirtree_module.h \
b/konqueror/sidebar/trees/dirtree_module/dirtree_module.h index bd8388c..e04ad33 \
100644
--- a/konqueror/sidebar/trees/dirtree_module/dirtree_module.h
+++ b/konqueror/sidebar/trees/dirtree_module/dirtree_module.h
@@ -40,7 +40,7 @@ public:
virtual void openTopLevelItem(KonqSidebarTreeTopLevelItem *item);
- virtual void followURL(const KUrl &url);
+ virtual void followURL(const QUrl &url);
// Called by KonqSidebarDirTreeItem
void openSubFolder(KonqSidebarTreeItem *item);
@@ -51,13 +51,13 @@ private Q_SLOTS:
void slotNewItems(const KFileItemList &);
void slotRefreshItems(const QList<QPair<KFileItem, KFileItem> > &);
void slotDeleteItem(const KFileItem &item);
- void slotRedirection(const KUrl &oldUrl, const KUrl &newUrl);
- void slotListingStopped(const KUrl &url);
+ void slotRedirection(const QUrl &oldUrl, const QUrl &newUrl);
+ void slotListingStopped(const QUrl &url);
private:
- //KonqSidebarTreeItem * findDir( const KUrl &_url );
+ //KonqSidebarTreeItem * findDir( const QUrl &_url );
void listDirectory(KonqSidebarTreeItem *item);
- KUrl::List selectedUrls();
+ QList<QUrl> selectedUrls();
// URL -> item
// Each KonqSidebarDirTreeItem is indexed on item->id() and
@@ -69,7 +69,7 @@ private:
KDirLister *m_dirLister;
- KUrl m_selectAfterOpening;
+ QUrl m_selectAfterOpening;
KonqSidebarTreeTopLevelItem *m_topLevelItem;
diff --git a/konqueror/sidebar/trees/konq_sidebartree.cpp \
b/konqueror/sidebar/trees/konq_sidebartree.cpp index 5cee9d6..9f4c4a7 100644
--- a/konqueror/sidebar/trees/konq_sidebartree.cpp
+++ b/konqueror/sidebar/trees/konq_sidebartree.cpp
@@ -264,11 +264,11 @@ void KonqSidebarTree::clearTree()
}
}
-void KonqSidebarTree::followURL(const KUrl &url)
+void KonqSidebarTree::followURL(const QUrl &url)
{
// Maybe we're there already ?
KonqSidebarTreeItem *selection = static_cast<KonqSidebarTreeItem \
*>(selectedItem());
- if (selection && selection->externalURL().equals(url, \
KUrl::CompareWithoutTrailingSlash)) { + if (selection && \
selection->externalURL().equals(url, QUrl::CompareWithoutTrailingSlash)) { \
ensureItemVisible(selection); return;
}
@@ -360,9 +360,9 @@ void KonqSidebarTree::contentsDropEvent(QDropEvent *ev)
if (!selectedItem()) {
// KonqOperations::doDrop( 0L, m_dirtreeDir.dir, ev, this );
- KUrl::List urls;
+ QList<QUrl> urls;
if (K3URLDrag::decode(ev, urls)) {
- for (KUrl::List::ConstIterator it = urls.constBegin();
+ for (QList<QUrl>::ConstIterator it = urls.constBegin();
it != urls.constEnd(); ++it) {
addUrl(0, *it);
}
@@ -400,7 +400,7 @@ void KonqSidebarTree::addUrl(KonqSidebarTreeTopLevelItem *item, \
const QUrl &url) path = m_dirtreeDir.dir.path();
}
- KUrl destUrl;
+ QUrl destUrl;
if (url.isLocalFile() && url.fileName().endsWith(".desktop")) {
QString filename = findUniqueFilename(path, url.fileName());
@@ -424,7 +424,7 @@ void KonqSidebarTree::addUrl(KonqSidebarTreeTopLevelItem *item, \
const QUrl &url) icon = KMimeType::favIconForUrl(url);
}
if (icon.isEmpty()) {
- icon = KProtocolInfo::icon(url.protocol());
+ icon = KProtocolInfo::icon(url.scheme());
}
cfg.writeEntry("Icon", icon);
cfg.writeEntry("Name", name);
@@ -432,7 +432,7 @@ void KonqSidebarTree::addUrl(KonqSidebarTreeTopLevelItem *item, \
const QUrl &url) cfg.sync();
}
- destUrl.setPath(destUrl.directory());
+ destUrl.setPath(destUrl.adjusted(QUrl::RemoveFilename|QUrl::StripTrailingSlash).path());
OrgKdeKDirNotifyInterface::emitFilesAdded(destUrl.url());
if (item) {
@@ -515,7 +515,7 @@ void KonqSidebarTree::slotExecuted(Q3ListViewItem *item)
args.setMimeType(dItem->externalMimeType());
KParts::BrowserArguments browserArgs;
browserArgs.trustedSource = true; // is this needed?
- KUrl externalURL = dItem->externalURL();
+ QUrl externalURL = dItem->externalURL();
if (!externalURL.isEmpty()) {
openUrlRequest(externalURL, args, browserArgs);
}
@@ -588,7 +588,7 @@ void KonqSidebarTree::slotSelectionChanged()
void KonqSidebarTree::slotFilesAdded(const QString &dir)
{
- KUrl urlDir(dir);
+ QUrl urlDir(dir);
kDebug(1201) << dir;
if (m_dirtreeDir.dir.isParentOf(urlDir))
// We use a timer in case of DBus re-entrance..
@@ -601,7 +601,7 @@ void KonqSidebarTree::slotFilesRemoved(const QStringList &urls)
{
//kDebug(1201) << "KonqSidebarTree::slotFilesRemoved " << urls.count();
for (QStringList::ConstIterator it = urls.constBegin(); it != urls.constEnd(); \
++it) {
- KUrl u(*it);
+ QUrl u(*it);
//kDebug(1201) << "KonqSidebarTree::slotFilesRemoved " << u;
if (m_dirtreeDir.dir.isParentOf(u)) {
QTimer::singleShot(0, this, SLOT(rescanConfiguration()));
@@ -990,7 +990,7 @@ void KonqSidebarTree::slotProperties()
return;
}
- KUrl url(m_currentTopLevelItem->path());
+ QUrl url(m_currentTopLevelItem->path());
QPointer<KPropertiesDialog> dlg(new KPropertiesDialog(url, this));
dlg->setFileNameReadOnly(true);
@@ -1032,7 +1032,7 @@ void KonqSidebarTree::slotCopyLocation()
if (!m_currentTopLevelItem) {
return;
}
- KUrl url = m_currentTopLevelItem->externalURL();
+ QUrl url = m_currentTopLevelItem->externalURL();
qApp->clipboard()->setMimeData(mimeDataFor(url), QClipboard::Selection);
qApp->clipboard()->setMimeData(mimeDataFor(url), QClipboard::Clipboard);
}
diff --git a/konqueror/sidebar/trees/konq_sidebartree.h \
b/konqueror/sidebar/trees/konq_sidebartree.h index 7f66943..b9d1194 100644
--- a/konqueror/sidebar/trees/konq_sidebartree.h
+++ b/konqueror/sidebar/trees/konq_sidebartree.h
@@ -198,7 +198,7 @@ private:
QTimer *m_autoOpenTimer;
// The base URL for our configuration directory
- //KUrl m_dirtreeDir;
+ //QUrl m_dirtreeDir;
DirTreeConfigData m_dirtreeDir;
bool m_scrollingLocked;
diff --git a/konqueror/sidebar/trees/konq_sidebartreemodule.h \
b/konqueror/sidebar/trees/konq_sidebartreemodule.h index 775f859..6590f5a 100644
--- a/konqueror/sidebar/trees/konq_sidebartreemodule.h
+++ b/konqueror/sidebar/trees/konq_sidebartreemodule.h
@@ -46,7 +46,7 @@ public:
// Follow a URL opened in another view - only implement if the module
// has anything to do with URLs
- virtual void followURL(const KUrl &) {}
+ virtual void followURL(const QUrl &) {}
KonqSidebarTree *tree() const
{
diff --git a/konqueror/sidebar/trees/konq_sidebartreetoplevelitem.cpp \
b/konqueror/sidebar/trees/konq_sidebartreetoplevelitem.cpp index 933ffc9..49238d6 \
100644
--- a/konqueror/sidebar/trees/konq_sidebartreetoplevelitem.cpp
+++ b/konqueror/sidebar/trees/konq_sidebartreetoplevelitem.cpp
@@ -70,9 +70,9 @@ void KonqSidebarTreeTopLevelItem::drop(QDropEvent *ev)
if (m_bTopLevelGroup) {
// When dropping something to "Network" or its subdirs, we want to create
// a desktop link, not to move/copy/link - except for .desktop files :-}
- KUrl::List lst;
+ QList<QUrl> lst;
if (K3URLDrag::decode(ev, lst) && !lst.isEmpty()) { // Are they urls ?
- KUrl::List::Iterator it = lst.begin();
+ QList<QUrl>::Iterator it = lst.begin();
for (; it != lst.end(); it++) {
tree()->addUrl(this, *it);
}
@@ -115,7 +115,7 @@ void KonqSidebarTreeTopLevelItem::middleButtonClicked()
void KonqSidebarTreeTopLevelItem::rightButtonPressed()
{
- KUrl url;
+ QUrl url;
url.setPath(m_path);
// We don't show "edit file type" (useless here) and "properties" (shows the \
wrong name,
// i.e. the filename instead of the Name field). There's the Rename item for \
that. @@ -138,8 +138,8 @@ void KonqSidebarTreeTopLevelItem::del()
void KonqSidebarTreeTopLevelItem::delOperation(KonqOperations::Operation method)
{
- KUrl url(m_path);
- KUrl::List lst;
+ QUrl url(m_path);
+ QList<QUrl> lst;
lst.append(url);
KonqOperations::del(tree(), method, lst);
@@ -155,7 +155,7 @@ void KonqSidebarTreeTopLevelItem::paste()
kDebug(1201) << "move (from clipboard data) = " << move;
}
- KUrl destURL;
+ QUrl destURL;
if (m_bTopLevelGroup) {
destURL.setPath(m_path);
} else {
@@ -172,7 +172,7 @@ void KonqSidebarTreeTopLevelItem::rename()
void KonqSidebarTreeTopLevelItem::rename(const QString &name)
{
- KUrl url(m_path);
+ QUrl url(m_path);
// Adjust the Name field of the .directory or desktop file
QString desktopFile = m_path;
@@ -184,7 +184,7 @@ void KonqSidebarTreeTopLevelItem::rename(const QString &name)
cfg.sync();
// Notify about the change
- KUrl::List lst;
+ QList<QUrl> lst;
lst.append(url);
OrgKdeKDirNotifyInterface::emitFilesChanged(lst.toStringList());
}
diff --git a/konqueror/sidebar/trees/konqsidebar_oldtreemodule.cpp \
b/konqueror/sidebar/trees/konqsidebar_oldtreemodule.cpp index aa52c5b..27feee2 100644
--- a/konqueror/sidebar/trees/konqsidebar_oldtreemodule.cpp
+++ b/konqueror/sidebar/trees/konqsidebar_oldtreemodule.cpp
@@ -180,8 +180,8 @@ public:
Q_UNUSED(unused);
const KDesktopFile df(actionData.toString());
const KConfigGroup desktopGroup = df.desktopGroup();
- KUrl url = desktopGroup.readEntry("X-KDE-Default-URL");
- KNameAndUrlInputDialog dlg(i18nc("@label", "Name:"), i18nc("@label", "Path \
or URL:"), KUrl(), parentWidget); + QUrl url = \
desktopGroup.readEntry("X-KDE-Default-URL"); + KNameAndUrlInputDialog \
dlg(i18nc("@label", "Name:"), i18nc("@label", "Path or URL:"), \
QUrl(), parentWidget);
dlg.setCaption(i18nc("@title:window", "Add folder sidebar module"));
dlg.setSuggestedName(df.readName());
if (!dlg.exec()) {
diff --git a/konqueror/src/konqmainwindow.cpp b/konqueror/src/konqmainwindow.cpp
index f4961e7..7979eb3 100644
--- a/konqueror/src/konqmainwindow.cpp
+++ b/konqueror/src/konqmainwindow.cpp
@@ -1654,14 +1654,14 @@ void KonqMainWindow::slotViewModeTriggered(QAction *action)
#if 0
// Problem: dolphinpart doesn't currently implement it. But we don't need it \
that much
// now that it's the main filemanagement part for all standard modes.
- KUrl::List filesToSelect = \
childView->part()->property("filesToSelect").value<KUrl::List>(); + \
QList<QUrl> filesToSelect = \
childView->part()->property("filesToSelect").value<QList<QUrl>>(); #endif
m_currentView->changePart(m_currentView->serviceType(), modeName);
QUrl locURL(locationBarURL);
QString nameFilter = detectNameFilter(locURL);
#if 0
- childView->part()->setProperty("filesToSelect", \
KUrl::List(req.filesToSelect)); + \
childView->part()->setProperty("filesToSelect", QList<QUrl>(req.filesToSelect)); \
#endif m_currentView->openUrl(locURL, locationBarURL, nameFilter);
}
diff --git a/konqueror/src/konqsessionmanager.cpp \
b/konqueror/src/konqsessionmanager.cpp index b09d359..9fcc2fd 100644
--- a/konqueror/src/konqsessionmanager.cpp
+++ b/konqueror/src/konqsessionmanager.cpp
@@ -34,7 +34,7 @@
#include <khbox.h>
#include <KLocalizedString>
#include <kdialog.h>
-#include <kurl.h>
+#include <QUrl>
#include <QIcon>
#include <ktempdir.h>
#include <ksqueezedtextlabel.h>
diff --git a/konqueror/src/konqviewmanager.cpp b/konqueror/src/konqviewmanager.cpp
index 9942497..cf24e6f 100644
--- a/konqueror/src/konqviewmanager.cpp
+++ b/konqueror/src/konqviewmanager.cpp
@@ -1279,7 +1279,7 @@ void KonqViewManager::loadItem(const KConfigGroup &cfg, \
KonqFrameContainerBase *
if (!url.isEmpty()) {
//qDebug() << "calling openUrl" << url;
- //childView->openUrl( url, url.prettyUrl() );
+ //childView->openUrl( url, url.toDisplayString() );
// We need view-follows-view (for the dirtree, for instance)
KonqOpenURLRequest req;
if (url.scheme() != "about") {
diff --git a/konqueror/src/tests/historymanagertest.cpp \
b/konqueror/src/tests/historymanagertest.cpp index 7bd2478..c1997af 100644
--- a/konqueror/src/tests/historymanagertest.cpp
+++ b/konqueror/src/tests/historymanagertest.cpp
@@ -73,7 +73,7 @@ void HistoryManagerTest::testAddHistoryEntry()
qRegisterMetaType<KonqHistoryEntry>("KonqHistoryEntry");
QSignalSpy addedSpy(&mgr, SIGNAL(entryAdded(KonqHistoryEntry)));
QSignalSpy removedSpy(&mgr, SIGNAL(entryRemoved(KonqHistoryEntry)));
- const KUrl url("http://user@historymgrtest.org/");
+ const QUrl url("http://user@historymgrtest.org/");
const QString typedUrl = "http://www.example.net";
const QString title = "The Title";
mgr.addPending(url, typedUrl, title);
diff --git a/konqueror/src/tests/konqhtmltest.cpp \
b/konqueror/src/tests/konqhtmltest.cpp index 6fee320..881c426 100644
--- a/konqueror/src/tests/konqhtmltest.cpp
+++ b/konqueror/src/tests/konqhtmltest.cpp
@@ -69,7 +69,7 @@ private Q_SLOTS:
{
KonqMainWindow mainWindow;
// we specify the mimetype so that we don't have to wait for a KonqRun
- mainWindow.openUrl(0, KUrl("data:text/html, <p>Hello World</p>"), \
"text/html"); + mainWindow.openUrl(0, QUrl("data:text/html, <p>Hello \
World</p>"), "text/html"); KonqView *view = mainWindow.currentView();
QVERIFY(view);
QVERIFY(view->part());
@@ -82,7 +82,7 @@ private Q_SLOTS:
void loadDirectory() // #164495
{
KonqMainWindow mainWindow;
- mainWindow.openUrl(0, KUrl(QDir::homePath()), "text/html");
+ mainWindow.openUrl(0, QUrl(QDir::homePath()), "text/html");
KonqView *view = mainWindow.currentView();
kDebug() << "Waiting for first completed signal";
QVERIFY(QTest::kWaitForSignal(view, SIGNAL(viewCompleted(KonqView*)), \
20000)); // error calls openUrlRequest @@ -95,7 +95,7 @@ private Q_SLOTS:
{
QPointer<KonqMainWindow> mainWindow = new KonqMainWindow;
// we specify the mimetype so that we don't have to wait for a KonqRun
- mainWindow->openUrl(0, KUrl(
+ mainWindow->openUrl(0, QUrl(
"data:text/html, <script type=\"text/javascript\">"
"function closeMe() { window.close(); } "
"document.onmousedown = closeMe; "
@@ -125,7 +125,7 @@ private Q_SLOTS:
QVERIFY(origTempFile.open());
origTempFile.write(
"<html><script>"
- "function openWindow() { window.open('" + \
KUrl(tempFile.fileName()).url().toUtf8() + "'); } " + "function \
openWindow() { window.open('" + QUrl(tempFile.fileName()).url().toUtf8() + "'); } " \
"document.onmousedown = openWindow; " "</script>"
);
@@ -135,7 +135,7 @@ private Q_SLOTS:
KonqMainWindow *mainWindow = new KonqMainWindow;
const QString profile = \
QStandardPaths::locate(QStandardPaths::GenericDataLocation, \
"konqueror/profiles/webbrowsing");
- mainWindow->viewManager()->loadViewProfileFromFile(profile, "webbrowsing", \
KUrl(origFile)); + mainWindow->viewManager()->loadViewProfileFromFile(profile, \
"webbrowsing", QUrl(origFile)); QCOMPARE(KMainWindow::memberList().count(), 1);
KonqView *view = mainWindow->currentView();
QVERIFY(view);
@@ -174,7 +174,7 @@ private Q_SLOTS:
// would lead to double deletion (#228255)
KonqMainWindow mainWindow;
// we specify the mimetype so that we don't have to wait for a KonqRun
- mainWindow.openUrl(0, KUrl("data:text/html, \
<script>window.foo=bar</script><p>Hello World</p>"), "text/html"); + \
mainWindow.openUrl(0, QUrl("data:text/html, <script>window.foo=bar</script><p>Hello \
World</p>"), "text/html"); KonqView *view = mainWindow.currentView();
QVERIFY(view);
QVERIFY(view->part());
diff --git a/konqueror/src/tests/konqviewmgrtest.cpp \
b/konqueror/src/tests/konqviewmgrtest.cpp index 5ebd7fa..d2a7312 100644
--- a/konqueror/src/tests/konqviewmgrtest.cpp
+++ b/konqueror/src/tests/konqviewmgrtest.cpp
@@ -370,7 +370,7 @@ static void openHtmlWithLink(KonqMainWindow &mainWindow)
{
// Much like KonqHtmlTest::loadSimpleHtml.
// We use text/plain as the linked file, in order to test #67956 (switching \
parts in new tab)
- mainWindow.openUrl(0, KUrl("data:text/html, <a href=\"data:text/plain, Link \
target\">Click me</a>"), "text/html"); + mainWindow.openUrl(0, \
QUrl("data:text/html, <a href=\"data:text/plain, Link target\">Click me</a>"), \
"text/html"); KonqView *view = mainWindow.currentView();
QVERIFY(view);
QVERIFY(QTest::kWaitForSignal(view, SIGNAL(viewCompleted(KonqView*)), 20000));
@@ -390,7 +390,7 @@ void ViewMgrTest::testLinkedViews()
QCOMPARE(view2->serviceType(), QString("text/html"));
QCOMPARE(DebugFrameVisitor::inspect(&mainWindow), QString("MT[C(FF)].")); // \
mainWindow, tab widget, one splitter, two frames
QVERIFY(QTest::kWaitForSignal(view2, SIGNAL(viewCompleted(KonqView*)), 20000));
- KUrl origUrl = view->url();
+ QUrl origUrl = view->url();
QCOMPARE(view2->url().url(), origUrl.url());
QCOMPARE(mainWindow.linkableViewsCount(), 2);
view->setLinkedView(true);
@@ -409,7 +409,7 @@ void ViewMgrTest::testLinkedViews()
QTest::qWait(0);
// Check that the link opened in the 2nd view, not the first one
QCOMPARE(view->url().url(), origUrl.url());
- QCOMPARE(view2->url().url(), KUrl("data:text/plain, Link target").url());
+ QCOMPARE(view2->url().url(), QUrl("data:text/plain, Link target").url());
}
void ViewMgrTest::testPopupNewTab() // RMB, "Open in new tab"
@@ -418,7 +418,7 @@ void ViewMgrTest::testPopupNewTab() // RMB, "Open in new tab"
openHtmlWithLink(mainWindow);
KonqFrameTabs *tabs = mainWindow.viewManager()->tabContainer();
QCOMPARE(tabs->currentIndex(), 0);
- KFileItem item(KUrl("data:text/html, hello"), "text/html", S_IFREG);
+ KFileItem item(QUrl("data:text/html, hello"), "text/html", S_IFREG);
mainWindow.prepareForPopupMenu(KFileItemList() << item, \
KParts::OpenUrlArguments(), KParts::BrowserArguments()); \
QMetaObject::invokeMethod(&mainWindow, "slotPopupNewTab"); QTest::qWait(1000);
@@ -448,7 +448,7 @@ void ViewMgrTest::testPopupNewWindow() // RMB, "Open new window"
{
KonqMainWindow mainWindow;
openHtmlWithLink(mainWindow);
- KFileItem item(KUrl("data:text/html, hello"), "text/html", S_IFREG);
+ KFileItem item(QUrl("data:text/html, hello"), "text/html", S_IFREG);
mainWindow.prepareForPopupMenu(KFileItemList() << item, \
KParts::OpenUrlArguments(), KParts::BrowserArguments()); \
QMetaObject::invokeMethod(&mainWindow, "slotPopupNewWindow"); QTest::qWait(100);
@@ -521,7 +521,7 @@ static void openTabWithTitle(KonqMainWindow &mainWindow, const \
QString &title, K // correct since it's a subclass of text/html, khtml can display \
it QVERIFY(view->supportsMimeType("application/x-netscape-bookmarks"));
// Tab caption test
- view->openUrl(KUrl("data:text/html, <title>" + title.toUtf8() + "</title>"), \
QString("http://loc.bar.url")); + view->openUrl(QUrl("data:text/html, <title>" + \
title.toUtf8() + "</title>"), QString("http://loc.bar.url"));
QVERIFY(QTest::kWaitForSignal(view, SIGNAL(viewCompleted(KonqView*)), 10000));
QCOMPARE(view->caption(), title);
QCOMPARE(view->locationBarURL(), QString("http://loc.bar.url"));
@@ -680,7 +680,7 @@ static void loadFileManagementProfile(KonqMainWindow &mainWindow)
const QString profile = \
QStandardPaths::locate(QStandardPaths::GenericDataLocation, \
"konqueror/profiles/filemanagement"); QVERIFY(!profile.isEmpty());
const QString path = QDir::homePath();
- mainWindow.viewManager()->loadViewProfileFromFile(profile, "filemanagement", \
KUrl(path)); + mainWindow.viewManager()->loadViewProfileFromFile(profile, \
"filemanagement", QUrl(path));
QCOMPARE(DebugFrameVisitor::inspect(&mainWindow), QString("MC(FT[F]).")); // \
mainWindow, splitter, frame, tab widget, one frame \
QCOMPARE(mainWindow.locationBarURL(), path); \
QCOMPARE(mainWindow.currentView()->locationBarURL(), path); @@ -731,7 +731,7 @@ void \
ViewMgrTest::testLoadOldProfile()
KIO::FileCopyJob *job = KIO::file_copy(profileSrc, profile, -1, KIO::Overwrite);
QVERIFY(job->exec());
const QString path = QDir::homePath();
- mainWindow.viewManager()->loadViewProfileFromFile(profile, "filemanagement", \
KUrl(path)); + mainWindow.viewManager()->loadViewProfileFromFile(profile, \
"filemanagement", QUrl(path));
QCOMPARE(DebugFrameVisitor::inspect(&mainWindow), QString("MC(FT[F]).")); // \
mainWindow, splitter, frame, tab widget, one frame \
QCOMPARE(mainWindow.locationBarURL(), path); \
QCOMPARE(mainWindow.currentView()->locationBarURL(), path); @@ -741,11 +741,11 @@ \
void ViewMgrTest::testLoadOldProfile() void ViewMgrTest::testSaveProfile()
{
KonqMainWindow mainWindow;
- const KUrl url("data:text/html, <p>Hello World</p>");
+ const QUrl url("data:text/html, <p>Hello World</p>");
mainWindow.openUrl(0, url, "text/html");
KonqViewManager *viewManager = mainWindow.viewManager();
KonqView *view2 = viewManager->addTab("text/html");
- const KUrl url2("data:text/html, <p>view2</p>");
+ const QUrl url2("data:text/html, <p>view2</p>");
view2->openUrl(url2, "2");
KTabWidget *tabWidget = mainWindow.findChild<KTabWidget *>();
QVERIFY(tabWidget);
@@ -783,7 +783,7 @@ void ViewMgrTest::testSaveProfile()
void ViewMgrTest::testDuplicateWindow()
{
KonqMainWindow mainWindow;
- mainWindow.openUrl(0, KUrl("data:text/html, <p>Hello World</p>"), "text/html");
+ mainWindow.openUrl(0, QUrl("data:text/html, <p>Hello World</p>"), "text/html");
KonqViewManager *viewManager = mainWindow.viewManager();
KonqView *viewTab2 = viewManager->addTab("text/html");
KonqView *splitted = viewManager->splitView(viewTab2, Qt::Horizontal);
@@ -797,7 +797,7 @@ void ViewMgrTest::testDuplicateWindow()
void ViewMgrTest::testCloseOtherTabs()
{
KonqMainWindow mainWindow;
- mainWindow.openUrl(0, KUrl("data:text/html, <p>Hello World</p>"), "text/html");
+ mainWindow.openUrl(0, QUrl("data:text/html, <p>Hello World</p>"), "text/html");
KonqViewManager *viewManager = mainWindow.viewManager();
KTabWidget *tabWidget = mainWindow.findChild<KTabWidget *>();
QVERIFY(tabWidget);
@@ -824,7 +824,7 @@ void ViewMgrTest::testCloseOtherTabs()
void ViewMgrTest::testCloseTabsFast() // #210551/#150162
{
KonqMainWindow mainWindow;
- mainWindow.openUrl(0, KUrl("data:text/html, <p>Hello World</p>"), "text/html");
+ mainWindow.openUrl(0, QUrl("data:text/html, <p>Hello World</p>"), "text/html");
KonqViewManager *viewManager = mainWindow.viewManager();
viewManager->addTab("text/html");
viewManager->addTab("text/html");
@@ -852,20 +852,20 @@ void ViewMgrTest::testDuplicateWindowWithSidebar()
void ViewMgrTest::testBrowserArgumentsNewTab()
{
KonqMainWindow mainWindow;
- mainWindow.openUrl(0, KUrl("data:text/html, <p>Hello World</p>"), "text/html");
+ mainWindow.openUrl(0, QUrl("data:text/html, <p>Hello World</p>"), "text/html");
KParts::OpenUrlArguments urlArgs;
KParts::BrowserArguments browserArgs;
browserArgs.setNewTab(true);
KonqView *view = mainWindow.currentView();
KParts::BrowserExtension *ext = view->browserExtension();
QVERIFY(ext);
- emit ext->openUrlRequest(KUrl("data:text/html, <p>Second tab test</p>"), \
urlArgs, browserArgs); + emit ext->openUrlRequest(QUrl("data:text/html, <p>Second \
tab test</p>"), urlArgs, browserArgs); QTest::qWait(5000);
QCOMPARE(DebugFrameVisitor::inspect(&mainWindow), QString("MT[FF].")); // \
mainWindow, tab widget, two tabs QCOMPARE(view->url(), QUrl("data:text/html, \
<p>Hello World</p>"));
// compare the url of the new view... how to?
-// QCOMPARE(view->url(), KUrl("data:text/html, <p>Second tab test</p>"));
+// QCOMPARE(view->url(), QUrl("data:text/html, <p>Second tab test</p>"));
}
void ViewMgrTest::testBreakOffTab()
@@ -924,12 +924,12 @@ void ViewMgrTest::testBreakOffTab()
void ViewMgrTest::moveTabLeft()
{
KonqMainWindow mainWindow;
- mainWindow.openUrl(0, KUrl("data:text/html, <p>Hello World</p>"), "text/html");
+ mainWindow.openUrl(0, QUrl("data:text/html, <p>Hello World</p>"), "text/html");
KonqViewManager *viewManager = mainWindow.viewManager();
KonqView *view1 = viewManager->addTab("text/html");
- view1->openUrl(KUrl("data:text/html, <p>view1</p>"), "1");
+ view1->openUrl(QUrl("data:text/html, <p>view1</p>"), "1");
KonqView *view2 = viewManager->addTab("text/html");
- view2->openUrl(KUrl("data:text/html, <p>view2</p>"), "2");
+ view2->openUrl(QUrl("data:text/html, <p>view2</p>"), "2");
QCOMPARE(DebugFrameVisitor::inspect(&mainWindow), QString("MT[FFF].")); // \
mainWindow, tab widget, 3 simple tabs KTabWidget *tabWidget = \
mainWindow.findChild<KTabWidget *>(); tabWidget->setCurrentIndex(2);
diff --git a/konqueror/src/tests/konqviewtest.cpp \
b/konqueror/src/tests/konqviewtest.cpp index 4af23c2..bc4c15c 100644
--- a/konqueror/src/tests/konqviewtest.cpp
+++ b/konqueror/src/tests/konqviewtest.cpp
@@ -32,7 +32,7 @@ private Q_SLOTS:
KonqMainWindow mainWindow;
// we specify the mimetype so that we don't have to wait for a KonqRun
KonqOpenURLRequest req; req.forceAutoEmbed = true;
- mainWindow.openUrl(0, KUrl("data:text/plain, Hello World"), "text/plain", \
req); + mainWindow.openUrl(0, QUrl("data:text/plain, Hello World"), \
"text/plain", req); KonqView *view = mainWindow.currentView();
QVERIFY(view);
QVERIFY(view->part());
@@ -44,7 +44,7 @@ private Q_SLOTS:
// Now open HTML, as if we typed a URL in the location bar.
KonqOpenURLRequest req2; req2.typedUrl = "http://www.kde.org";
- mainWindow.openUrl(0, KUrl("data:text/html, <p>Hello World</p>"), \
"text/html", req2); + mainWindow.openUrl(0, QUrl("data:text/html, <p>Hello \
World</p>"), "text/html", req2); qDebug() << view->service()->entryPath();
QVERIFY(view->service()->entryPath() != firstService);
}
@@ -53,7 +53,7 @@ private Q_SLOTS:
{
// Related to the previous test; ensure we keep the same viewmode when \
switching between folders KonqMainWindow mainWindow;
- mainWindow.openUrl(0, KUrl(QDir::homePath()));
+ mainWindow.openUrl(0, QUrl(QDir::homePath()));
KonqView *view = mainWindow.currentView();
QVERIFY(view);
QPointer<KParts::ReadOnlyPart> part = view->part();
@@ -64,7 +64,7 @@ private Q_SLOTS:
view->setInternalViewMode("details");
QCOMPARE(view->internalViewMode(), QString("details"));
- mainWindow.openUrl(0, KUrl("applications:/"));
+ mainWindow.openUrl(0, QUrl("applications:/"));
QCOMPARE(static_cast<KParts::ReadOnlyPart *>(part), view->part());
QCOMPARE(view->internalViewMode(), QString("details"));
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic