diff --git a/plasma/applets/quicklaunch/launcherdata.cpp b/plasma/applets/quicklaunch/launcherdata.cpp index 8aced166..77d47558 100644 --- a/plasma/applets/quicklaunch/launcherdata.cpp +++ b/plasma/applets/quicklaunch/launcherdata.cpp @@ -35,14 +35,10 @@ namespace Quicklaunch { +// KUrl::url() takes care of improperly escaped characters and +// resolves pure paths into file:/// URLs LauncherData::LauncherData(const KUrl& url) -: - // KUrl::url() takes care of improperly escaped characters and - // resolves pure paths into file:/// URLs - m_url(url.url()), - m_name(), - m_description(), - m_icon() + : m_url(url.url()) { if (m_url.isLocalFile() && KDesktopFile::isDesktopFile(m_url.toLocalFile())) { @@ -67,12 +63,8 @@ LauncherData::LauncherData(const KUrl& url) } LauncherData::LauncherData() -: - m_url(), - m_name(), - m_description(), - m_icon() -{} +{ +} KUrl LauncherData::url() const { @@ -96,11 +88,12 @@ QString LauncherData::icon() const bool LauncherData::operator==(const LauncherData& other) const { - return + return ( m_url == other.m_url && m_name == other.m_name && m_description == other.m_description && - m_icon == other.m_icon; + m_icon == other.m_icon + ); } bool LauncherData::operator!=(const LauncherData& other) const @@ -113,8 +106,7 @@ void LauncherData::populateMimeData(QMimeData *mimeData) // Use the bookmarks API to do the heavy lifting KBookmark::List bookmarkList; - KBookmark bookmark = - KBookmark::standaloneBookmark(m_name, m_url, m_icon); + KBookmark bookmark = KBookmark::standaloneBookmark(m_name, m_url, m_icon); bookmark.setDescription(m_description); diff --git a/plasma/runners/locations/locationrunner.cpp b/plasma/runners/locations/locationrunner.cpp index 48911832..c9aff0ae 100644 --- a/plasma/runners/locations/locationrunner.cpp +++ b/plasma/runners/locations/locationrunner.cpp @@ -29,7 +29,7 @@ #include #include #include - +#include LocationsRunner::LocationsRunner(QObject *parent, const QVariantList& args) : Plasma::AbstractRunner(parent, args) @@ -55,7 +55,7 @@ void LocationsRunner::match(Plasma::RunnerContext &context) match.setText(i18n("Open %1", term)); if (type == Plasma::RunnerContext::File) { - match.setIcon(KIcon(KMimeType::iconNameForUrl(KUrl(term)))); + match.setIcon(KIcon(KIO::pixmapForUrl(KUrl(term)))); } else { match.setIcon(KIcon("system-file-manager")); }