┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/panels/places/placesitem.cpp
diff options
context:
space:
mode:
authorLukáš Tinkl <[email protected]>2014-10-21 21:18:43 +0200
committerLukáš Tinkl <[email protected]>2014-10-21 21:19:14 +0200
commit1b4572dac9fb529d31b786f93e4f02c6f8aeeb21 (patch)
treecf88750183dbc93db5357be4a359c421c29d049c /src/panels/places/placesitem.cpp
parent3653c8ad6bfb21a4b098f4e89d5ff34ed6df2901 (diff)
port Dolphin from KUrl to QUrl
REVIEW: 120688
Diffstat (limited to 'src/panels/places/placesitem.cpp')
-rw-r--r--src/panels/places/placesitem.cpp16
1 files changed, 8 insertions, 8 deletions
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<KUrl>() != url) {
+ if (dataValue("url").value<QUrl>() != 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<KUrl>();
+ return dataValue("url").value<QUrl>();
}
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();