diff options
| author | Emmanuel Pescosta <[email protected]> | 2014-09-12 13:02:43 +0200 |
|---|---|---|
| committer | Emmanuel Pescosta <[email protected]> | 2014-09-12 13:15:54 +0200 |
| commit | 4de8cf43e62e23b766d9d457e060670401ce6128 (patch) | |
| tree | da56202877e50acbaac6c07c903d467460f70673 /src/panels/places | |
| parent | b111b1482ad7f2fe7989e3ee53ddfe04eb73fa9c (diff) | |
Ported KIcon to QIcon
REVIEW: 120159
Diffstat (limited to 'src/panels/places')
| -rw-r--r-- | src/panels/places/placesitem.cpp | 2 | ||||
| -rw-r--r-- | src/panels/places/placesitemmodel.cpp | 6 | ||||
| -rw-r--r-- | src/panels/places/placespanel.cpp | 16 |
3 files changed, 12 insertions, 12 deletions
diff --git a/src/panels/places/placesitem.cpp b/src/panels/places/placesitem.cpp index 0fd430abc..b82e50256 100644 --- a/src/panels/places/placesitem.cpp +++ b/src/panels/places/placesitem.cpp @@ -25,7 +25,7 @@ #include <KBookmarkManager> #include <KDebug> #include <KDirLister> -#include <KIcon> +#include <QIcon> #include <KLocale> #include "placesitemsignalhandler.h" #include <QDateTime> diff --git a/src/panels/places/placesitemmodel.cpp b/src/panels/places/placesitemmodel.cpp index 3eedec5e6..8eb79a8a8 100644 --- a/src/panels/places/placesitemmodel.cpp +++ b/src/panels/places/placesitemmodel.cpp @@ -30,7 +30,7 @@ #include <KBookmarkManager> #include <KComponentData> #include <KDebug> -#include <KIcon> +#include <QIcon> #include <kprotocolinfo.h> #include <KLocale> #include <KStandardDirs> @@ -255,7 +255,7 @@ QAction* PlacesItemModel::ejectAction(int index) const { const PlacesItem* item = placesItem(index); if (item && item->device().is<Solid::OpticalDisc>()) { - return new QAction(KIcon("media-eject"), i18nc("@item", "Eject '%1'", item->text()), 0); + return new QAction(QIcon::fromTheme("media-eject"), i18nc("@item", "Eject '%1'", item->text()), 0); } return 0; @@ -304,7 +304,7 @@ QAction* PlacesItemModel::teardownAction(int index) const return new QAction(text, 0); } - return new QAction(KIcon(iconName), text, 0); + return new QAction(QIcon::fromTheme(iconName), text, 0); } void PlacesItemModel::requestEject(int index) diff --git a/src/panels/places/placespanel.cpp b/src/panels/places/placespanel.cpp index 37965eb90..0c111390c 100644 --- a/src/panels/places/placespanel.cpp +++ b/src/panels/places/placespanel.cpp @@ -27,7 +27,7 @@ #include <KDebug> #include <KDirNotify> -#include <KIcon> +#include <QIcon> #include <KIO/Job> #include <KIO/EmptyTrashJob> #include <KIO/JobUiDelegate> @@ -185,25 +185,25 @@ void PlacesPanel::slotItemContextMenuRequested(int index, const QPointF& pos) } } else { if (item->url() == KUrl("trash:/")) { - emptyTrashAction = menu.addAction(KIcon("trash-empty"), i18nc("@action:inmenu", "Empty Trash")); + emptyTrashAction = menu.addAction(QIcon::fromTheme("trash-empty"), i18nc("@action:inmenu", "Empty Trash")); emptyTrashAction->setEnabled(item->icon() == "user-trash-full"); menu.addSeparator(); } - addAction = menu.addAction(KIcon("document-new"), i18nc("@item:inmenu", "Add Entry...")); + addAction = menu.addAction(QIcon::fromTheme("document-new"), i18nc("@item:inmenu", "Add Entry...")); mainSeparator = menu.addSeparator(); - editAction = menu.addAction(KIcon("document-properties"), i18nc("@item:inmenu", "Edit '%1'...", label)); + editAction = menu.addAction(QIcon::fromTheme("document-properties"), i18nc("@item:inmenu", "Edit '%1'...", label)); } if (!addAction) { - addAction = menu.addAction(KIcon("document-new"), i18nc("@item:inmenu", "Add Entry...")); + addAction = menu.addAction(QIcon::fromTheme("document-new"), i18nc("@item:inmenu", "Add Entry...")); } QAction* openInNewTabAction = menu.addAction(i18nc("@item:inmenu", "Open '%1' in New Tab", label)); - openInNewTabAction->setIcon(KIcon("tab-new")); + openInNewTabAction->setIcon(QIcon::fromTheme("tab-new")); QAction* removeAction = 0; if (!isDevice && !item->isSystemItem()) { - removeAction = menu.addAction(KIcon("edit-delete"), i18nc("@item:inmenu", "Remove '%1'", label)); + removeAction = menu.addAction(QIcon::fromTheme("edit-delete"), i18nc("@item:inmenu", "Remove '%1'", label)); } QAction* hideAction = menu.addAction(i18nc("@item:inmenu", "Hide '%1'", label)); @@ -305,7 +305,7 @@ void PlacesPanel::slotViewContextMenuRequested(const QPointF& pos) { KMenu menu(this); - QAction* addAction = menu.addAction(KIcon("document-new"), i18nc("@item:inmenu", "Add Entry...")); + QAction* addAction = menu.addAction(QIcon::fromTheme("document-new"), i18nc("@item:inmenu", "Add Entry...")); QAction* showAllAction = 0; if (m_model->hiddenCount() > 0) { |
