From kde-commits Sat Apr 30 18:34:49 2016 From: David Faure Date: Sat, 30 Apr 2016 18:34:49 +0000 To: kde-commits Subject: [kde-baseapps/frameworks] konqueror: KUrl -> QUrl, using convert-kurl.pl Message-Id: X-MARC-Message: https://marc.info/?l=kde-commits&m=146204130419952 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 = //KDELibs4Support -#include +#include #include = #include @@ -328,7 +328,7 @@ static QString konqyToReuse(const QString &url, const Q= String &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/setting= s/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 #include = -#include +#include #include = // 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/setting= s/konqhtml/filteropts.cpp index a8d5185..b9b8340 100644 --- a/konqueror/settings/konqhtml/filteropts.cpp +++ b/konqueror/settings/konqhtml/filteropts.cpp @@ -46,7 +46,7 @@ #include #include = -#include +#include #include = KCMFilter::KCMFilter(QWidget *parent, const QVariantList &) @@ -257,7 +257,7 @@ void KCMFilter::updateButton() = void KCMFilter::importFilters() { - QString inFile =3D KFileDialog::getOpenFileName(KUrl(), QString(), thi= s); + QString inFile =3D KFileDialog::getOpenFileName(QUrl(), QString(), thi= s); if (!inFile.isEmpty()) { QFile f(inFile); if (f.open(QIODevice::ReadOnly)) { @@ -302,7 +302,7 @@ void KCMFilter::importFilters() = void KCMFilter::exportFilters() { - QString outFile =3D KFileDialog::getSaveFileName(KUrl(), QString(), th= is); + QString outFile =3D KFileDialog::getSaveFileName(QUrl(), QString(), th= is); if (!outFile.isEmpty()) { = QFile f(outFile); diff --git a/konqueror/settings/konqhtml/generalopts.cpp b/konqueror/settin= gs/konqhtml/generalopts.cpp index 55e1956..38e978a 100644 --- a/konqueror/settings/konqhtml/generalopts.cpp +++ b/konqueror/settings/konqhtml/generalopts.cpp @@ -31,7 +31,7 @@ #include #include #include -#include +#include // Local #include "ui_advancedTabOptions.h" #include @@ -208,7 +208,7 @@ void KKonqGeneralOptions::load() = void KKonqGeneralOptions::defaults() { - homeURL->setUrl(KUrl(DEFAULT_HOMEPAGE)); + homeURL->setUrl(QUrl(DEFAULT_HOMEPAGE)); = bool old =3D m_pConfig->readDefaults(); m_pConfig->setReadDefaults(true); diff --git a/konqueror/settings/konqhtml/pluginopts.cpp b/konqueror/setting= s/konqhtml/pluginopts.cpp index ae77480..d1dfc9b 100644 --- a/konqueror/settings/konqhtml/pluginopts.cpp +++ b/konqueror/settings/konqhtml/pluginopts.cpp @@ -42,7 +42,7 @@ #include #include #include -#include +#include #include #include // Local @@ -224,7 +224,7 @@ void KPluginOptions::load() KSharedConfig::Ptr config =3D 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 =3D KSharedConfig::openConfig(QString(), KCo= nfig::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(KonqSide= barBookmarkItem *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/konq= ueror/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 =3D true; // For local dirs, find out if they have no children, to remove the "+" if (m_fileItem.isDir()) { - KUrl url =3D m_fileItem.url(); + QUrl url =3D m_fileItem.url(); if (url.isLocalFile()) { struct stat buff; if (KDE::stat(url.toLocalFile(), &buff) !=3D -1) { @@ -89,7 +89,7 @@ void KonqSidebarDirTreeItem::reset() } } setExpandable(expandable); - id =3D m_fileItem.url().url(KUrl::RemoveTrailingSlash); + id =3D 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 =3D QApplication::clipboard()->mimeData(); - const KUrl::List urls =3D KUrl::List::fromMimeData(mimeData); + const QList urls =3D mimeData->urls(); const QList urls =3D const bool paste =3D !urls.isEmpty(); tree()->enableActions(true, true, paste); @@ -297,7 +297,7 @@ void KonqSidebarDirTreeItem::del() = void KonqSidebarDirTreeItem::delOperation(KonqOperations::Operation method) { - KUrl::List lst; + QList 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/konque= ror/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 -#include +#include #include = #include diff --git a/konqueror/sidebar/trees/dirtree_module/dirtree_module.cpp b/ko= nqueror/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 KonqSidebarDirTreeModule::selectedUrls() { - KUrl::List lst; + QList lst; KonqSidebarDirTreeItem *selection =3D static_cast(m_pTree->selectedItem()); if (!selection) { kError() << "no selection!" << endl; @@ -70,7 +70,7 @@ void KonqSidebarDirTreeModule::addTopLevelItem(KonqSideba= rTreeTopLevelItem *item KDesktopFile cfg(item->path()); KConfigGroup desktopGroup =3D cfg.desktopGroup(); = - KUrl targetURL; + QUrl targetURL; targetURL.setPath(item->path()); = if (cfg.hasLinkType()) { @@ -99,7 +99,7 @@ void KonqSidebarDirTreeModule::addTopLevelItem(KonqSideba= rTreeTopLevelItem *item } = bool bListable =3D KProtocolManager::supportsListing(targetURL); - //kDebug(1201) << targetURL.prettyUrl() << " listable : " << bListable; + //kDebug(1201) << targetURL.toDisplayString() << " listable : " << bLi= stable; = if (!bListable) { item->setExpandable(false); @@ -121,7 +121,7 @@ void KonqSidebarDirTreeModule::openTopLevelItem(KonqSid= ebarTreeTopLevelItem *ite = void KonqSidebarDirTreeModule::addSubDir(KonqSidebarTreeItem *item) { - QString id =3D item->externalURL().url(KUrl::RemoveTrailingSlash); + QString id =3D item->externalURL().adjusted(QUrl::StripTrailingSlash).= toString(); kDebug(1201) << this << id; m_dictSubDirs.insert(id, item); = @@ -266,7 +266,7 @@ void KonqSidebarDirTreeModule::removeSubDir(KonqSidebar= TreeItem *item, bool chil } = if (!childrenOnly) { - QString id =3D item->externalURL().url(KUrl::RemoveTrailingSlash); + QString id =3D item->externalURL().adjusted(QUrl::StripTrailingSla= sh).toString(); remove(m_dictSubDirs, id, item); while (!(item->alias.isEmpty())) { remove(m_dictSubDirs, item->alias.front(), item); @@ -298,12 +298,12 @@ void KonqSidebarDirTreeModule::openSubFolder(KonqSide= barTreeItem *item) this, SLOT(slotRefreshItems(QList >))); 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(KonqSideba= rTreeItem *item) void KonqSidebarDirTreeModule::listDirectory(KonqSidebarTreeItem *item) { // This causes a reparsing, but gets rid of the trailing slash - QString strUrl =3D item->externalURL().url(KUrl::RemoveTrailingSlash); - KUrl url(strUrl); + QString strUrl =3D item->externalURL().adjusted(QUrl::StripTrailingSla= sh).toString(); + QUrl url(strUrl); = Q3PtrList *itemList; KonqSidebarTreeItem *openItem; @@ -389,21 +389,22 @@ void KonqSidebarDirTreeModule::slotNewItems(const KFi= leItemList &entries) const KFileItem firstItem =3D 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=3D" << dir.url(KUrl::RemoveTrailingSlash); + QUrl dir(firstItem.url().adjusted(QUrl::StripTrailingSlash).toString()= ); + dir =3D dir.adjusted(QUrl::RemoveFilename); + dir.setPath(dir.path() + ""); + kDebug(1201) << this << "dir=3D" << dir.adjusted(QUrl::StripTrailingSl= ash).toString(); = Q3PtrList *parentItemList; KonqSidebarTreeItem *parentItem; - lookupItems(m_dictSubDirs, dir.url(KUrl::RemoveTrailingSlash), parentI= tem, parentItemList); + lookupItems(m_dictSubDirs, dir.adjusted(QUrl::StripTrailingSlash).toSt= ring(), 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), par= entItem, 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= QListisTopLevelItem()) { // we only have dirs and one top= level item in the dict - kWarning(1201) << "entry for " << oldFileItem.url().url(KU= rl::RemoveTrailingSlash) << "matches against toplevel."; + kWarning(1201) << "entry for " << oldFileItem.url().adjust= ed(QUrl::StripTrailingSlash).toString() << "matches against toplevel."; break; } = KonqSidebarDirTreeItem *dirTreeItem =3D static_cast(item); // Item renamed ? - if (dirTreeItem->id !=3D fileItem.url().url(KUrl::RemoveTraili= ngSlash)) { + if (dirTreeItem->id !=3D fileItem.url().adjusted(QUrl::StripTr= ailingSlash).toString()) { kDebug(1201) << "renaming" << oldFileItem << "->" << fileI= tem; // 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 *itemList; KonqSidebarTreeItem *item; - lookupItems(m_dictSubDirs, fileItem.url().url(KUrl::RemoveTrailingSlas= h), item, itemList); + lookupItems(m_dictSubDirs, fileItem.url().adjusted(QUrl::StripTrailing= Slash).toString(), item, itemList); while (item) { removeSubDir(item); delete item; @@ -512,12 +513,12 @@ void KonqSidebarDirTreeModule::slotDeleteItem(const K= FileItem &fileItem) delete itemList; } = -void KonqSidebarDirTreeModule::slotRedirection(const KUrl &oldUrl, const K= Url &newUrl) +void KonqSidebarDirTreeModule::slotRedirection(const QUrl &oldUrl, const Q= Url &newUrl) { kDebug(1201) << newUrl; = - QString oldUrlStr =3D oldUrl.url(KUrl::RemoveTrailingSlash); - QString newUrlStr =3D newUrl.url(KUrl::RemoveTrailingSlash); + QString oldUrlStr =3D oldUrl.adjusted(QUrl::StripTrailingSlash).toStri= ng(); + QString newUrlStr =3D newUrl.adjusted(QUrl::StripTrailingSlash).toStri= ng(); = Q3PtrList *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 *itemList; KonqSidebarTreeItem *item; - lookupItems(m_dictSubDirs, url.url(KUrl::RemoveTrailingSlash), item, i= temList); + lookupItems(m_dictSubDirs, url.adjusted(QUrl::StripTrailingSlash).toSt= ring(), item, itemList); = while (item) { if (item->childCount() =3D=3D 0) { @@ -564,41 +565,41 @@ void KonqSidebarDirTreeModule::slotListingStopped(con= st KUrl &url) = //kDebug(1201) << "m_selectAfterOpening " << m_selectAfterOpening.pret= tyUrl(); if (!m_selectAfterOpening.isEmpty() && url.isParentOf(m_selectAfterOpe= ning)) { - KUrl theURL(m_selectAfterOpening); - m_selectAfterOpening =3D KUrl(); + QUrl theURL(m_selectAfterOpening); + m_selectAfterOpening =3D QUrl(); followURL(theURL); } } = -void KonqSidebarDirTreeModule::followURL(const KUrl &url) +void KonqSidebarDirTreeModule::followURL(const QUrl &url) { // Check if we already know this URL - KonqSidebarTreeItem *item =3D m_dictSubDirs[ url.url(KUrl::RemoveTrail= ingSlash) ]; + KonqSidebarTreeItem *item =3D m_dictSubDirs[ url.adjusted(QUrl::StripT= railingSlash).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 =3D 0L; // Go up to the first known parent do { uParent =3D uParent.upUrl(); - parentItem =3D m_dictSubDirs[ uParent.url(KUrl::RemoveTrailingSlas= h) ]; + parentItem =3D m_dictSubDirs[ uParent.adjusted(QUrl::StripTrailing= Slash).toString() ]; } while (!parentItem && !uParent.path().isEmpty() && uParent.path() != =3D "/"); = // 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::Remov= eTrailingSlash) ]) { + 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/konq= ueror/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 > &); 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 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/sideb= ar/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 =3D static_cast(= selectedItem()); - if (selection && selection->externalURL().equals(url, KUrl::CompareWit= houtTrailingSlash)) { + if (selection && selection->externalURL().equals(url, QUrl::CompareWit= houtTrailingSlash)) { ensureItemVisible(selection); return; } @@ -360,9 +360,9 @@ void KonqSidebarTree::contentsDropEvent(QDropEvent *ev) = if (!selectedItem()) { // KonqOperations::doDrop( 0L, m_dirtreeDir.dir, ev, th= is ); - KUrl::List urls; + QList urls; if (K3URLDrag::decode(ev, urls)) { - for (KUrl::List::ConstIterator it =3D urls.constBegin(); + for (QList::ConstIterator it =3D urls.constBegin(); it !=3D urls.constEnd(); ++it) { addUrl(0, *it); } @@ -400,7 +400,7 @@ void KonqSidebarTree::addUrl(KonqSidebarTreeTopLevelIte= m *item, const QUrl &url) path =3D m_dirtreeDir.dir.path(); } = - KUrl destUrl; + QUrl destUrl; = if (url.isLocalFile() && url.fileName().endsWith(".desktop")) { QString filename =3D findUniqueFilename(path, url.fileName()); @@ -424,7 +424,7 @@ void KonqSidebarTree::addUrl(KonqSidebarTreeTopLevelIte= m *item, const QUrl &url) icon =3D KMimeType::favIconForUrl(url); } if (icon.isEmpty()) { - icon =3D KProtocolInfo::icon(url.protocol()); + icon =3D KProtocolInfo::icon(url.scheme()); } cfg.writeEntry("Icon", icon); cfg.writeEntry("Name", name); @@ -432,7 +432,7 @@ void KonqSidebarTree::addUrl(KonqSidebarTreeTopLevelIte= m *item, const QUrl &url) cfg.sync(); } = - destUrl.setPath(destUrl.directory()); + destUrl.setPath(destUrl.adjusted(QUrl::RemoveFilename|QUrl::StripTrail= ingSlash).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 =3D true; // is this needed? - KUrl externalURL =3D dItem->externalURL(); + QUrl externalURL =3D 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 QStringLis= t &urls) { //kDebug(1201) << "KonqSidebarTree::slotFilesRemoved " << urls.count(); for (QStringList::ConstIterator it =3D urls.constBegin(); it !=3D 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 dlg(new KPropertiesDialog(url, this)); dlg->setFileNameReadOnly(true); @@ -1032,7 +1032,7 @@ void KonqSidebarTree::slotCopyLocation() if (!m_currentTopLevelItem) { return; } - KUrl url =3D m_currentTopLevelItem->externalURL(); + QUrl url =3D 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/s= idebar/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/kon= queror/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 fil= es :-} - KUrl::List lst; + QList lst; if (K3URLDrag::decode(ev, lst) && !lst.isEmpty()) { // Are they = urls ? - KUrl::List::Iterator it =3D lst.begin(); + QList::Iterator it =3D lst.begin(); for (; it !=3D 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" (sho= ws the wrong name, // i.e. the filename instead of the Name field). There's the Rename it= em for that. @@ -138,8 +138,8 @@ void KonqSidebarTreeTopLevelItem::del() = void KonqSidebarTreeTopLevelItem::delOperation(KonqOperations::Operation m= ethod) { - KUrl url(m_path); - KUrl::List lst; + QUrl url(m_path); + QList lst; lst.append(url); = KonqOperations::del(tree(), method, lst); @@ -155,7 +155,7 @@ void KonqSidebarTreeTopLevelItem::paste() kDebug(1201) << "move (from clipboard data) =3D " << 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 =3D m_path; @@ -184,7 +184,7 @@ void KonqSidebarTreeTopLevelItem::rename(const QString = &name) cfg.sync(); = // Notify about the change - KUrl::List lst; + QList lst; lst.append(url); OrgKdeKDirNotifyInterface::emitFilesChanged(lst.toStringList()); } diff --git a/konqueror/sidebar/trees/konqsidebar_oldtreemodule.cpp b/konque= ror/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 =3D df.desktopGroup(); - KUrl url =3D desktopGroup.readEntry("X-KDE-Default-URL"); - KNameAndUrlInputDialog dlg(i18nc("@label", "Name:"), i18nc("@label= ", "Path or URL:"), KUrl(), parentWidget); + QUrl url =3D 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/konqmainwindo= w.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 mod= es. - KUrl::List filesToSelect =3D childView->part()->property("filesToS= elect").value(); + QList filesToSelect =3D childView->part()->property("filesTo= Select").value>(); #endif = m_currentView->changePart(m_currentView->serviceType(), modeName); QUrl locURL(locationBarURL); QString nameFilter =3D detectNameFilter(locURL); #if 0 - childView->part()->setProperty("filesToSelect", KUrl::List(req.fil= esToSelect)); + childView->part()->setProperty("filesToSelect", QList(req.fi= lesToSelect)); #endif m_currentView->openUrl(locURL, locationBarURL, nameFilter); } diff --git a/konqueror/src/konqsessionmanager.cpp b/konqueror/src/konqsessi= onmanager.cpp index b09d359..9fcc2fd 100644 --- a/konqueror/src/konqsessionmanager.cpp +++ b/konqueror/src/konqsessionmanager.cpp @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/konqueror/src/konqviewmanager.cpp b/konqueror/src/konqviewmana= ger.cpp index 9942497..cf24e6f 100644 --- a/konqueror/src/konqviewmanager.cpp +++ b/konqueror/src/konqviewmanager.cpp @@ -1279,7 +1279,7 @@ void KonqViewManager::loadItem(const KConfigGroup &cf= g, 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 ins= tance) KonqOpenURLRequest req; if (url.scheme() !=3D "about") { diff --git a/konqueror/src/tests/historymanagertest.cpp b/konqueror/src/tes= ts/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"); 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 =3D "http://www.example.net"; const QString title =3D "The Title"; mgr.addPending(url, typedUrl, title); diff --git a/konqueror/src/tests/konqhtmltest.cpp b/konqueror/src/tests/kon= qhtmltest.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 Kon= qRun - mainWindow.openUrl(0, KUrl("data:text/html,

Hello World

"), = "text/html"); + mainWindow.openUrl(0, QUrl("data:text/html,

Hello World

"), = "text/html"); KonqView *view =3D 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 =3D 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 mainWindow =3D new KonqMainWindow; // we specify the mimetype so that we don't have to wait for a Kon= qRun - mainWindow->openUrl(0, KUrl( + mainWindow->openUrl(0, QUrl( "data:text/html, " ); @@ -135,7 +135,7 @@ private Q_SLOTS: = KonqMainWindow *mainWindow =3D new KonqMainWindow; const QString profile =3D QStandardPaths::locate(QStandardPaths::G= enericDataLocation, "konqueror/profiles/webbrowsing"); - mainWindow->viewManager()->loadViewProfileFromFile(profile, "webbr= owsing", KUrl(origFile)); + mainWindow->viewManager()->loadViewProfileFromFile(profile, "webbr= owsing", QUrl(origFile)); QCOMPARE(KMainWindow::memberList().count(), 1); KonqView *view =3D 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 Kon= qRun - mainWindow.openUrl(0, KUrl("data:text/html,

Hello World

"), "text/html"); + mainWindow.openUrl(0, QUrl("data:text/html,

Hello World

"), "text/html"); KonqView *view =3D 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 (swit= ching parts in new tab) - mainWindow.openUrl(0, KUrl("data:text/html, Click me"), "text/html"); + mainWindow.openUrl(0, QUrl("data:text/html, Click me"), "text/html"); KonqView *view =3D 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 =3D view->url(); + QUrl origUrl =3D 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 ne= w tab" openHtmlWithLink(mainWindow); KonqFrameTabs *tabs =3D 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::OpenUr= lArguments(), KParts::BrowserArguments()); QMetaObject::invokeMethod(&mainWindow, "slotPopupNewTab"); QTest::qWait(1000); @@ -448,7 +448,7 @@ void ViewMgrTest::testPopupNewWindow() // RMB, "Open ne= w 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::OpenUr= lArguments(), 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.toUtf8() + "</tit= le>"), QString("http://loc.bar.url")); + view->openUrl(QUrl("data:text/html, <title>" + title.toUtf8() + "</tit= le>"), 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 &m= ainWindow) const QString profile =3D QStandardPaths::locate(QStandardPaths::Gener= icDataLocation, "konqueror/profiles/filemanagement"); QVERIFY(!profile.isEmpty()); const QString path =3D QDir::homePath(); - mainWindow.viewManager()->loadViewProfileFromFile(profile, "filemanage= ment", KUrl(path)); + mainWindow.viewManager()->loadViewProfileFromFile(profile, "filemanage= ment", 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 =3D KIO::file_copy(profileSrc, profile, -1, KIO:= :Overwrite); QVERIFY(job->exec()); const QString path =3D QDir::homePath(); - mainWindow.viewManager()->loadViewProfileFromFile(profile, "filemanage= ment", KUrl(path)); + mainWindow.viewManager()->loadViewProfileFromFile(profile, "filemanage= ment", 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 =3D mainWindow.viewManager(); KonqView *view2 =3D 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 =3D 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>"), "tex= t/html"); + mainWindow.openUrl(0, QUrl("data:text/html, <p>Hello World</p>"), "tex= t/html"); KonqViewManager *viewManager =3D mainWindow.viewManager(); KonqView *viewTab2 =3D viewManager->addTab("text/html"); KonqView *splitted =3D 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>"), "tex= t/html"); + mainWindow.openUrl(0, QUrl("data:text/html, <p>Hello World</p>"), "tex= t/html"); KonqViewManager *viewManager =3D mainWindow.viewManager(); KTabWidget *tabWidget =3D 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>"), "tex= t/html"); + mainWindow.openUrl(0, QUrl("data:text/html, <p>Hello World</p>"), "tex= t/html"); KonqViewManager *viewManager =3D 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>"), "tex= t/html"); + mainWindow.openUrl(0, QUrl("data:text/html, <p>Hello World</p>"), "tex= t/html"); KParts::OpenUrlArguments urlArgs; KParts::BrowserArguments browserArgs; browserArgs.setNewTab(true); KonqView *view =3D mainWindow.currentView(); KParts::BrowserExtension *ext =3D 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>"), "tex= t/html"); + mainWindow.openUrl(0, QUrl("data:text/html, <p>Hello World</p>"), "tex= t/html"); KonqViewManager *viewManager =3D mainWindow.viewManager(); KonqView *view1 =3D 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 =3D 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 =3D mainWindow.findChild<KTabWidget *>(); tabWidget->setCurrentIndex(2); diff --git a/konqueror/src/tests/konqviewtest.cpp b/konqueror/src/tests/kon= qviewtest.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 Kon= qRun KonqOpenURLRequest req; req.forceAutoEmbed =3D 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 =3D 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 =3D "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() !=3D 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 =3D mainWindow.currentView(); QVERIFY(view); QPointer<KParts::ReadOnlyPart> part =3D 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")); }