From 1b4572dac9fb529d31b786f93e4f02c6f8aeeb21 Mon Sep 17 00:00:00 2001 From: Lukáš Tinkl Date: Tue, 21 Oct 2014 21:18:43 +0200 Subject: port Dolphin from KUrl to QUrl REVIEW: 120688 --- src/panels/places/placesitem.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/panels/places/placesitem.cpp') diff --git a/src/panels/places/placesitem.cpp b/src/panels/places/placesitem.cpp index edfe02343..b1f62b982 100644 --- a/src/panels/places/placesitem.cpp +++ b/src/panels/places/placesitem.cpp @@ -51,16 +51,16 @@ PlacesItem::~PlacesItem() delete m_trashDirLister; } -void PlacesItem::setUrl(const KUrl& url) +void PlacesItem::setUrl(const QUrl &url) { // The default check in KStandardItem::setDataValue() // for equal values does not work with a custom value - // like KUrl. Hence do a manual check to prevent that + // like QUrl. Hence do a manual check to prevent that // setting an equal URL results in an itemsChanged() // signal. - if (dataValue("url").value() != url) { + if (dataValue("url").value() != url) { delete m_trashDirLister; - if (url.protocol() == QLatin1String("trash")) { + if (url.scheme() == QLatin1String("trash")) { // The trash icon must always be updated dependent on whether // the trash is empty or not. We use a KDirLister that automatically // watches for changes if the number of items has been changed. @@ -77,9 +77,9 @@ void PlacesItem::setUrl(const KUrl& url) } } -KUrl PlacesItem::url() const +QUrl PlacesItem::url() const { - return dataValue("url").value(); + return dataValue("url").value(); } void PlacesItem::setUdi(const QString& udi) @@ -170,7 +170,7 @@ KBookmark PlacesItem::bookmark() const PlacesItem::GroupType PlacesItem::groupType() const { if (udi().isEmpty()) { - const QString protocol = url().protocol(); + const QString protocol = url().scheme(); if (protocol == QLatin1String("timeline")) { return RecentlySavedType; } @@ -196,7 +196,7 @@ bool PlacesItem::storageSetupNeeded() const KBookmark PlacesItem::createBookmark(KBookmarkManager* manager, const QString& text, - const KUrl& url, + const QUrl& url, const QString& iconName) { KBookmarkGroup root = manager->root(); -- cgit v1.3.1