mirror of
https://invent.kde.org/system/dolphin
synced 2024-08-22 01:40:02 +00:00
Ported KIcon to QIcon
REVIEW: 120159
This commit is contained in:
parent
b111b1482a
commit
4de8cf43e6
|
@ -1461,11 +1461,11 @@ void DolphinMainWindow::updateSplitAction()
|
|||
if (tabPage->primaryViewActive()) {
|
||||
splitAction->setText(i18nc("@action:intoolbar Close left view", "Close"));
|
||||
splitAction->setToolTip(i18nc("@info", "Close left view"));
|
||||
splitAction->setIcon(KIcon("view-left-close"));
|
||||
splitAction->setIcon(QIcon::fromTheme("view-left-close"));
|
||||
} else {
|
||||
splitAction->setText(i18nc("@action:intoolbar Close right view", "Close"));
|
||||
splitAction->setToolTip(i18nc("@info", "Close right view"));
|
||||
splitAction->setIcon(KIcon("view-right-close"));
|
||||
splitAction->setIcon(QIcon::fromTheme("view-right-close"));
|
||||
}
|
||||
} else {
|
||||
splitAction->setText(i18nc("@action:intoolbar Split view", "Split"));
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#include <kio/fileundomanager.h>
|
||||
#include <ksortablelist.h>
|
||||
#include <kxmlguiwindow.h>
|
||||
#include <KIcon>
|
||||
#include <QIcon>
|
||||
#include <KUrl>
|
||||
|
||||
#include <QList>
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include <QDragEnterEvent>
|
||||
#include <KLocalizedString>
|
||||
#include <KMenu>
|
||||
#include <KIcon>
|
||||
#include <QIcon>
|
||||
#include <KUrl>
|
||||
|
||||
DolphinTabBar::DolphinTabBar(QWidget* parent) :
|
||||
|
@ -124,10 +124,10 @@ void DolphinTabBar::contextMenuEvent(QContextMenuEvent* event)
|
|||
// Tab context menu
|
||||
KMenu menu(this);
|
||||
|
||||
QAction* newTabAction = menu.addAction(KIcon("tab-new"), i18nc("@action:inmenu", "New Tab"));
|
||||
QAction* detachTabAction = menu.addAction(KIcon("tab-detach"), i18nc("@action:inmenu", "Detach Tab"));
|
||||
QAction* closeOtherTabsAction = menu.addAction(KIcon("tab-close-other"), i18nc("@action:inmenu", "Close Other Tabs"));
|
||||
QAction* closeTabAction = menu.addAction(KIcon("tab-close"), i18nc("@action:inmenu", "Close Tab"));
|
||||
QAction* newTabAction = menu.addAction(QIcon::fromTheme("tab-new"), i18nc("@action:inmenu", "New Tab"));
|
||||
QAction* detachTabAction = menu.addAction(QIcon::fromTheme("tab-detach"), i18nc("@action:inmenu", "Detach Tab"));
|
||||
QAction* closeOtherTabsAction = menu.addAction(QIcon::fromTheme("tab-close-other"), i18nc("@action:inmenu", "Close Other Tabs"));
|
||||
QAction* closeTabAction = menu.addAction(QIcon::fromTheme("tab-close"), i18nc("@action:inmenu", "Close Tab"));
|
||||
|
||||
QAction* selectedAction = menu.exec(event->globalPos());
|
||||
if (selectedAction == newTabAction) {
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include <QLabel>
|
||||
#include <QToolButton>
|
||||
|
||||
#include <KIcon>
|
||||
#include <QIcon>
|
||||
#include <KLocale>
|
||||
#include <KLineEdit>
|
||||
#include <KIconLoader>
|
||||
|
@ -36,7 +36,7 @@ FilterBar::FilterBar(QWidget* parent) :
|
|||
// Create close button
|
||||
QToolButton *closeButton = new QToolButton(this);
|
||||
closeButton->setAutoRaise(true);
|
||||
closeButton->setIcon(KIcon("dialog-close"));
|
||||
closeButton->setIcon(QIcon::fromTheme("dialog-close"));
|
||||
closeButton->setToolTip(i18nc("@info:tooltip", "Hide Filter Bar"));
|
||||
connect(closeButton, &QToolButton::clicked, this, &FilterBar::closeRequest);
|
||||
|
||||
|
@ -44,7 +44,7 @@ FilterBar::FilterBar(QWidget* parent) :
|
|||
m_lockButton = new QToolButton(this);
|
||||
m_lockButton->setAutoRaise(true);
|
||||
m_lockButton->setCheckable(true);
|
||||
m_lockButton->setIcon(KIcon("object-unlocked"));
|
||||
m_lockButton->setIcon(QIcon::fromTheme("object-unlocked"));
|
||||
m_lockButton->setToolTip(i18nc("@info:tooltip", "Keep Filter When Changing Folders"));
|
||||
connect(m_lockButton, &QToolButton::toggled, this, &FilterBar::slotToggleLockButton);
|
||||
|
||||
|
@ -103,9 +103,9 @@ void FilterBar::slotUrlChanged()
|
|||
void FilterBar::slotToggleLockButton(bool checked)
|
||||
{
|
||||
if (checked) {
|
||||
m_lockButton->setIcon(KIcon("object-locked"));
|
||||
m_lockButton->setIcon(QIcon::fromTheme("object-locked"));
|
||||
} else {
|
||||
m_lockButton->setIcon(KIcon("object-unlocked"));
|
||||
m_lockButton->setIcon(QIcon::fromTheme("object-unlocked"));
|
||||
clear();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include "private/kpixmapmodifier.h"
|
||||
|
||||
#include <KDebug>
|
||||
#include <KIcon>
|
||||
#include <QIcon>
|
||||
#include <KTextEdit>
|
||||
#include <KIconLoader>
|
||||
#include <KDateTime>
|
||||
|
@ -171,7 +171,7 @@ QPixmap KFileItemListView::createDragPixmap(const KItemSet& indexes) const
|
|||
foreach (int index, indexes) {
|
||||
QPixmap pixmap = model()->data(index).value("iconPixmap").value<QPixmap>();
|
||||
if (pixmap.isNull()) {
|
||||
KIcon icon(model()->data(index).value("iconName").toString());
|
||||
QIcon icon = QIcon::fromTheme(model()->data(index).value("iconName").toString());
|
||||
pixmap = icon.pixmap(size, size);
|
||||
} else {
|
||||
KPixmapModifier::scale(pixmap, QSize(size, size));
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "kfileitemlistview.h"
|
||||
#include "kfileitemmodel.h"
|
||||
|
||||
#include <KIcon>
|
||||
#include <QIcon>
|
||||
#include <KIconEffect>
|
||||
#include <KIconLoader>
|
||||
#include <KLocale>
|
||||
|
@ -1440,7 +1440,7 @@ QPixmap KStandardItemListWidget::pixmapForIcon(const QString& name, const QStrin
|
|||
QPixmap pixmap;
|
||||
|
||||
if (!QPixmapCache::find(key, pixmap)) {
|
||||
const KIcon icon(name);
|
||||
const QIcon icon = QIcon::fromTheme(name);
|
||||
|
||||
int requestedSize;
|
||||
if (size <= KIconLoader::SizeSmall) {
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include <KIO/DeleteJob>
|
||||
#include <KIO/JobUiDelegate>
|
||||
#include <KMenu>
|
||||
#include <KIcon>
|
||||
#include <QIcon>
|
||||
#include <KJobWidgets>
|
||||
#include <KSharedConfig>
|
||||
#include <KConfigGroup>
|
||||
|
@ -64,15 +64,15 @@ void TreeViewContextMenu::open()
|
|||
KFileItemListProperties capabilities(KFileItemList() << m_fileItem);
|
||||
|
||||
// insert 'Cut', 'Copy' and 'Paste'
|
||||
QAction* cutAction = new QAction(KIcon("edit-cut"), i18nc("@action:inmenu", "Cut"), this);
|
||||
QAction* cutAction = new QAction(QIcon::fromTheme("edit-cut"), i18nc("@action:inmenu", "Cut"), this);
|
||||
cutAction->setEnabled(capabilities.supportsMoving());
|
||||
connect(cutAction, &QAction::triggered, this, &TreeViewContextMenu::cut);
|
||||
|
||||
QAction* copyAction = new QAction(KIcon("edit-copy"), i18nc("@action:inmenu", "Copy"), this);
|
||||
QAction* copyAction = new QAction(QIcon::fromTheme("edit-copy"), i18nc("@action:inmenu", "Copy"), this);
|
||||
connect(copyAction, &QAction::triggered, this, &TreeViewContextMenu::copy);
|
||||
|
||||
const QPair<bool, QString> pasteInfo = KonqOperations::pasteInfo(m_fileItem.url());
|
||||
QAction* pasteAction = new QAction(KIcon("edit-paste"), pasteInfo.second, this);
|
||||
QAction* pasteAction = new QAction(QIcon::fromTheme("edit-paste"), pasteInfo.second, this);
|
||||
connect(pasteAction, &QAction::triggered, this, &TreeViewContextMenu::paste);
|
||||
pasteAction->setEnabled(pasteInfo.first);
|
||||
|
||||
|
@ -84,7 +84,7 @@ void TreeViewContextMenu::open()
|
|||
// insert 'Rename'
|
||||
QAction* renameAction = new QAction(i18nc("@action:inmenu", "Rename..."), this);
|
||||
renameAction->setEnabled(capabilities.supportsMoving());
|
||||
renameAction->setIcon(KIcon("edit-rename"));
|
||||
renameAction->setIcon(QIcon::fromTheme("edit-rename"));
|
||||
connect(renameAction, &QAction::triggered, this, &TreeViewContextMenu::rename);
|
||||
popup->addAction(renameAction);
|
||||
|
||||
|
@ -95,7 +95,7 @@ void TreeViewContextMenu::open()
|
|||
|
||||
const KUrl url = m_fileItem.url();
|
||||
if (url.isLocalFile()) {
|
||||
QAction* moveToTrashAction = new QAction(KIcon("user-trash"),
|
||||
QAction* moveToTrashAction = new QAction(QIcon::fromTheme("user-trash"),
|
||||
i18nc("@action:inmenu", "Move to Trash"), this);
|
||||
const bool enableMoveToTrash = capabilities.isLocal() && capabilities.supportsMoving();
|
||||
moveToTrashAction->setEnabled(enableMoveToTrash);
|
||||
|
@ -106,7 +106,7 @@ void TreeViewContextMenu::open()
|
|||
}
|
||||
|
||||
if (showDeleteCommand) {
|
||||
QAction* deleteAction = new QAction(KIcon("edit-delete"), i18nc("@action:inmenu", "Delete"), this);
|
||||
QAction* deleteAction = new QAction(QIcon::fromTheme("edit-delete"), i18nc("@action:inmenu", "Delete"), this);
|
||||
deleteAction->setEnabled(capabilities.supportsDeleting());
|
||||
connect(deleteAction, &QAction::triggered, this, &TreeViewContextMenu::deleteItem);
|
||||
popup->addAction(deleteAction);
|
||||
|
@ -134,7 +134,7 @@ void TreeViewContextMenu::open()
|
|||
if (!m_fileItem.isNull()) {
|
||||
// insert 'Properties' entry
|
||||
QAction* propertiesAction = new QAction(i18nc("@action:inmenu", "Properties"), this);
|
||||
propertiesAction->setIcon(KIcon("document-properties"));
|
||||
propertiesAction->setIcon(QIcon::fromTheme("document-properties"));
|
||||
connect(propertiesAction, &QAction::triggered, this, &TreeViewContextMenu::showProperties);
|
||||
popup->addAction(propertiesAction);
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include <KJobWidgets>
|
||||
#include <KIconEffect>
|
||||
#include <KIconLoader>
|
||||
#include <KIcon>
|
||||
#include <QIcon>
|
||||
#include <KLocale>
|
||||
#include <KMenu>
|
||||
#include <kseparator.h>
|
||||
|
@ -297,7 +297,7 @@ void InformationPanelContent::configureSettings(const QList<QAction*>& customCon
|
|||
previewAction->setChecked(InformationPanelSettings::previewsShown());
|
||||
|
||||
QAction* configureAction = popup.addAction(i18nc("@action:inmenu", "Configure..."));
|
||||
configureAction->setIcon(KIcon("configure"));
|
||||
configureAction->setIcon(QIcon::fromTheme("configure"));
|
||||
|
||||
popup.addSeparator();
|
||||
foreach (QAction* action, customContextMenuActions) {
|
||||
|
@ -332,8 +332,10 @@ void InformationPanelContent::showIcon(const KFileItem& item)
|
|||
{
|
||||
m_outdatedPreviewTimer->stop();
|
||||
if (!applyPlace(item.targetUrl())) {
|
||||
KIcon icon(item.iconName(), KIconLoader::global(), item.overlays());
|
||||
m_preview->setPixmap(icon.pixmap(KIconLoader::SizeEnormous));
|
||||
const QPixmap icon = KIconLoader::global()->loadIcon(item.iconName(), KIconLoader::Desktop,
|
||||
KIconLoader::SizeEnormous, KIconLoader::DefaultState,
|
||||
item.overlays());
|
||||
m_preview->setPixmap(icon);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -376,7 +378,7 @@ bool InformationPanelContent::applyPlace(const KUrl& url)
|
|||
const PlacesItem* item = m_placesItemModel->placesItem(i);
|
||||
if (item->url().equals(url, KUrl::CompareWithoutTrailingSlash)) {
|
||||
setNameLabelText(item->text());
|
||||
m_preview->setPixmap(KIcon(item->icon()).pixmap(128, 128));
|
||||
m_preview->setPixmap(QIcon::fromTheme(item->icon()).pixmap(128, 128));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#include <QToolButton>
|
||||
|
||||
#include <KDialog>
|
||||
#include <KIcon>
|
||||
#include <QIcon>
|
||||
#include <KIconLoader>
|
||||
#include <KUrl>
|
||||
#include <KLocale>
|
||||
|
@ -129,13 +129,13 @@ void PhononWidget::showEvent(QShowEvent *event)
|
|||
|
||||
m_playButton->setToolTip(i18n("play"));
|
||||
m_playButton->setIconSize(buttonSize);
|
||||
m_playButton->setIcon(KIcon("media-playback-start"));
|
||||
m_playButton->setIcon(QIcon::fromTheme("media-playback-start"));
|
||||
m_playButton->setAutoRaise(true);
|
||||
connect(m_playButton, &QToolButton::clicked, this, &PhononWidget::play);
|
||||
|
||||
m_stopButton->setToolTip(i18n("stop"));
|
||||
m_stopButton->setIconSize(buttonSize);
|
||||
m_stopButton->setIcon(KIcon("media-playback-stop"));
|
||||
m_stopButton->setIcon(QIcon::fromTheme("media-playback-stop"));
|
||||
m_stopButton->setAutoRaise(true);
|
||||
m_stopButton->hide();
|
||||
connect(m_stopButton, &QToolButton::clicked, this, &PhononWidget::stop);
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include <KBookmarkManager>
|
||||
#include <KDebug>
|
||||
#include <KDirLister>
|
||||
#include <KIcon>
|
||||
#include <QIcon>
|
||||
#include <KLocale>
|
||||
#include "placesitemsignalhandler.h"
|
||||
#include <QDateTime>
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "dolphin_searchsettings.h"
|
||||
#include "dolphinfacetswidget.h"
|
||||
|
||||
#include <KIcon>
|
||||
#include <QIcon>
|
||||
#include <KLineEdit>
|
||||
#include <KLocale>
|
||||
#include <KSeparator>
|
||||
|
@ -332,7 +332,7 @@ void DolphinSearchBox::init()
|
|||
// Create close button
|
||||
QToolButton* closeButton = new QToolButton(this);
|
||||
closeButton->setAutoRaise(true);
|
||||
closeButton->setIcon(KIcon("dialog-close"));
|
||||
closeButton->setIcon(QIcon::fromTheme("dialog-close"));
|
||||
closeButton->setToolTip(i18nc("@info:tooltip", "Quit searching"));
|
||||
connect(closeButton, &QToolButton::clicked, this, &DolphinSearchBox::emitCloseRequest);
|
||||
|
||||
|
@ -534,7 +534,7 @@ void DolphinSearchBox::updateFacetsToggleButton()
|
|||
{
|
||||
const bool facetsIsVisible = SearchSettings::showFacetsWidget();
|
||||
m_facetsToggleButton->setChecked(facetsIsVisible ? true : false);
|
||||
m_facetsToggleButton->setIcon(KIcon(facetsIsVisible ? "arrow-up-double" : "arrow-down-double"));
|
||||
m_facetsToggleButton->setIcon(QIcon::fromTheme(facetsIsVisible ? "arrow-up-double" : "arrow-down-double"));
|
||||
m_facetsToggleButton->setText(facetsIsVisible ? i18nc("action:button", "Fewer Options") : i18nc("action:button", "More Options"));
|
||||
}
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
#include <KLocale>
|
||||
#include <KMessageBox>
|
||||
#include <KIcon>
|
||||
#include <QIcon>
|
||||
|
||||
#include <QPushButton>
|
||||
#include <QDialogButtonBox>
|
||||
|
@ -61,42 +61,42 @@ DolphinSettingsDialog::DolphinSettingsDialog(const KUrl& url, QWidget* parent) :
|
|||
StartupSettingsPage* startupSettingsPage = new StartupSettingsPage(url, this);
|
||||
KPageWidgetItem* startupSettingsFrame = addPage(startupSettingsPage,
|
||||
i18nc("@title:group", "Startup"));
|
||||
startupSettingsFrame->setIcon(KIcon("go-home"));
|
||||
startupSettingsFrame->setIcon(QIcon::fromTheme("go-home"));
|
||||
connect(startupSettingsPage, &StartupSettingsPage::changed, this, &DolphinSettingsDialog::enableApply);
|
||||
|
||||
// View Modes
|
||||
ViewSettingsPage* viewSettingsPage = new ViewSettingsPage(this);
|
||||
KPageWidgetItem* viewSettingsFrame = addPage(viewSettingsPage,
|
||||
i18nc("@title:group", "View Modes"));
|
||||
viewSettingsFrame->setIcon(KIcon("view-choose"));
|
||||
viewSettingsFrame->setIcon(QIcon::fromTheme("view-choose"));
|
||||
connect(viewSettingsPage, &ViewSettingsPage::changed, this, &DolphinSettingsDialog::enableApply);
|
||||
|
||||
// Navigation
|
||||
NavigationSettingsPage* navigationSettingsPage = new NavigationSettingsPage(this);
|
||||
KPageWidgetItem* navigationSettingsFrame = addPage(navigationSettingsPage,
|
||||
i18nc("@title:group", "Navigation"));
|
||||
navigationSettingsFrame->setIcon(KIcon("input-mouse"));
|
||||
navigationSettingsFrame->setIcon(QIcon::fromTheme("input-mouse"));
|
||||
connect(navigationSettingsPage, &NavigationSettingsPage::changed, this, &DolphinSettingsDialog::enableApply);
|
||||
|
||||
// Services
|
||||
ServicesSettingsPage* servicesSettingsPage = new ServicesSettingsPage(this);
|
||||
KPageWidgetItem* servicesSettingsFrame = addPage(servicesSettingsPage,
|
||||
i18nc("@title:group", "Services"));
|
||||
servicesSettingsFrame->setIcon(KIcon("services"));
|
||||
servicesSettingsFrame->setIcon(QIcon::fromTheme("services"));
|
||||
connect(servicesSettingsPage, &ServicesSettingsPage::changed, this, &DolphinSettingsDialog::enableApply);
|
||||
|
||||
// Trash
|
||||
TrashSettingsPage* trashSettingsPage = new TrashSettingsPage(this);
|
||||
KPageWidgetItem* trashSettingsFrame = addPage(trashSettingsPage,
|
||||
i18nc("@title:group", "Trash"));
|
||||
trashSettingsFrame->setIcon(KIcon("user-trash"));
|
||||
trashSettingsFrame->setIcon(QIcon::fromTheme("user-trash"));
|
||||
connect(trashSettingsPage, &TrashSettingsPage::changed, this, &DolphinSettingsDialog::enableApply);
|
||||
|
||||
// General
|
||||
GeneralSettingsPage* generalSettingsPage = new GeneralSettingsPage(url, this);
|
||||
KPageWidgetItem* generalSettingsFrame = addPage(generalSettingsPage,
|
||||
i18nc("@title:group General settings", "General"));
|
||||
generalSettingsFrame->setIcon(KIcon("system-run"));
|
||||
generalSettingsFrame->setIcon(QIcon::fromTheme("system-run"));
|
||||
connect(generalSettingsPage, &GeneralSettingsPage::changed, this, &DolphinSettingsDialog::enableApply);
|
||||
|
||||
const KConfigGroup dialogConfig(KSharedConfig::openConfig("dolphinrc"), "SettingsDialog");
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include <KLocale>
|
||||
#include <KPluginFactory>
|
||||
#include <KPluginLoader>
|
||||
#include <KIcon>
|
||||
#include <QIcon>
|
||||
#include <KGlobal>
|
||||
|
||||
#include <settings/viewmodes/viewsettingstab.h>
|
||||
|
@ -56,17 +56,17 @@ DolphinViewModesConfigModule::DolphinViewModesConfigModule(QWidget* parent, cons
|
|||
|
||||
// Initialize 'Icons' tab
|
||||
ViewSettingsTab* iconsTab = new ViewSettingsTab(ViewSettingsTab::IconsMode, tabWidget);
|
||||
tabWidget->addTab(iconsTab, KIcon("view-list-icons"), i18nc("@title:tab", "Icons"));
|
||||
tabWidget->addTab(iconsTab, QIcon::fromTheme("view-list-icons"), i18nc("@title:tab", "Icons"));
|
||||
connect(iconsTab, &ViewSettingsTab::changed, this, &DolphinViewModesConfigModule::viewModeChanged);
|
||||
|
||||
// Initialize 'Compact' tab
|
||||
ViewSettingsTab* compactTab = new ViewSettingsTab(ViewSettingsTab::CompactMode, tabWidget);
|
||||
tabWidget->addTab(compactTab, KIcon("view-list-details"), i18nc("@title:tab", "Compact"));
|
||||
tabWidget->addTab(compactTab, QIcon::fromTheme("view-list-details"), i18nc("@title:tab", "Compact"));
|
||||
connect(compactTab, &ViewSettingsTab::changed, this, &DolphinViewModesConfigModule::viewModeChanged);
|
||||
|
||||
// Initialize 'Details' tab
|
||||
ViewSettingsTab* detailsTab = new ViewSettingsTab(ViewSettingsTab::DetailsMode, tabWidget);
|
||||
tabWidget->addTab(detailsTab, KIcon("view-list-tree"), i18nc("@title:tab", "Details"));
|
||||
tabWidget->addTab(detailsTab, QIcon::fromTheme("view-list-tree"), i18nc("@title:tab", "Details"));
|
||||
connect(detailsTab, &ViewSettingsTab::changed, this, &DolphinViewModesConfigModule::viewModeChanged);
|
||||
|
||||
m_tabs.append(iconsTab);
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
#include <KDebug>
|
||||
#include <KPushButton>
|
||||
#include <KIcon>
|
||||
#include <QIcon>
|
||||
|
||||
#include "servicemodel.h"
|
||||
|
||||
|
@ -94,7 +94,7 @@ void ServiceItemDelegate::updateItemWidgets(const QList<QWidget*> widgets,
|
|||
checkBox->setText(model->data(index).toString());
|
||||
const QString iconName = model->data(index, Qt::DecorationRole).toString();
|
||||
if (!iconName.isEmpty()) {
|
||||
checkBox->setIcon(KIcon(iconName));
|
||||
checkBox->setIcon(QIcon::fromTheme(iconName));
|
||||
}
|
||||
checkBox->setChecked(model->data(index, Qt::CheckStateRole).toBool());
|
||||
|
||||
|
@ -110,7 +110,7 @@ void ServiceItemDelegate::updateItemWidgets(const QList<QWidget*> widgets,
|
|||
// Update the configuration button
|
||||
if (configurable) {
|
||||
configureButton->setEnabled(checkBox->isChecked());
|
||||
configureButton->setIcon(KIcon("configure"));
|
||||
configureButton->setIcon(QIcon::fromTheme("configure"));
|
||||
configureButton->resize(configureButton->sizeHint());
|
||||
configureButton->move(option.rect.right() - configureButton->width(),
|
||||
(itemHeight - configureButton->height()) / 2);
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include <KConfigGroup>
|
||||
#include <KDesktopFile>
|
||||
#include <kdesktopfileactions.h>
|
||||
#include <KIcon>
|
||||
#include <QIcon>
|
||||
#include <KLocale>
|
||||
#include <KMessageBox>
|
||||
#include <KNS3/Button>
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "dolphin_generalsettings.h"
|
||||
|
||||
#include <KIconLoader>
|
||||
#include <KIcon>
|
||||
#include <QIcon>
|
||||
#include <KLocale>
|
||||
#include <KMenu>
|
||||
#include <KVBox>
|
||||
|
@ -81,7 +81,7 @@ DolphinStatusBar::DolphinStatusBar(QWidget* parent) :
|
|||
|
||||
// Initialize progress information
|
||||
m_stopButton = new QToolButton(this);
|
||||
m_stopButton->setIcon(KIcon("process-stop"));
|
||||
m_stopButton->setIcon(QIcon::fromTheme("process-stop"));
|
||||
m_stopButton->setAccessibleName(i18n("Stop"));
|
||||
m_stopButton->setAutoRaise(true);
|
||||
m_stopButton->setToolTip(i18nc("@tooltip", "Stop loading"));
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
#include "dolphinfileitemlistwidget.h"
|
||||
|
||||
#include <KIcon>
|
||||
#include <QIcon>
|
||||
#include <KIconLoader>
|
||||
#include <kversioncontrolplugin2.h>
|
||||
#include <QColor>
|
||||
|
@ -123,6 +123,6 @@ QPixmap DolphinFileItemListWidget::overlayForState(KVersionControlPlugin2::ItemV
|
|||
break;
|
||||
}
|
||||
|
||||
return KIcon(iconName).pixmap(QSize(overlayHeight, overlayHeight));
|
||||
return QIcon::fromTheme(iconName).pixmap(QSize(overlayHeight, overlayHeight));
|
||||
}
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
#include <KDebug>
|
||||
#include <KActionMenu>
|
||||
#include <KActionCollection>
|
||||
#include <KIcon>
|
||||
#include <QIcon>
|
||||
#include <KLocale>
|
||||
#include <KGlobal>
|
||||
#include <KMimeType>
|
||||
|
@ -49,7 +49,7 @@ DolphinRemoteEncoding::DolphinRemoteEncoding(QObject* parent, DolphinViewActionH
|
|||
m_loaded(false),
|
||||
m_idDefault(0)
|
||||
{
|
||||
m_menu = new KActionMenu(KIcon("character-set"), i18n("Select Remote Charset"), this);
|
||||
m_menu = new KActionMenu(QIcon::fromTheme("character-set"), i18n("Select Remote Charset"), this);
|
||||
m_actionHandler->actionCollection()->addAction("change_remote_encoding", m_menu);
|
||||
connect(m_menu->menu(), &QMenu::aboutToShow,
|
||||
this, &DolphinRemoteEncoding::slotAboutToShow);
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
#include <KSelectAction>
|
||||
#include <KToggleAction>
|
||||
#include <KPropertiesDialog>
|
||||
#include <KIcon>
|
||||
#include <QIcon>
|
||||
|
||||
#include <KDebug>
|
||||
|
||||
|
@ -101,7 +101,7 @@ void DolphinViewActionHandler::createActions()
|
|||
QAction* newDirAction = m_actionCollection->addAction("create_dir");
|
||||
newDirAction->setText(i18nc("@action", "Create Folder..."));
|
||||
newDirAction->setShortcut(Qt::Key_F10);
|
||||
newDirAction->setIcon(KIcon("folder-new"));
|
||||
newDirAction->setIcon(QIcon::fromTheme("folder-new"));
|
||||
newDirAction->setEnabled(false); // Will be enabled in slotWriteStateChanged(bool) if the current URL is writable
|
||||
connect(newDirAction, &QAction::triggered, this, &DolphinViewActionHandler::createDirectory);
|
||||
|
||||
|
@ -110,18 +110,18 @@ void DolphinViewActionHandler::createActions()
|
|||
QAction* rename = m_actionCollection->addAction("rename");
|
||||
rename->setText(i18nc("@action:inmenu File", "Rename..."));
|
||||
rename->setShortcut(Qt::Key_F2);
|
||||
rename->setIcon(KIcon("edit-rename"));
|
||||
rename->setIcon(QIcon::fromTheme("edit-rename"));
|
||||
connect(rename, &QAction::triggered, this, &DolphinViewActionHandler::slotRename);
|
||||
|
||||
QAction* moveToTrash = m_actionCollection->addAction("move_to_trash");
|
||||
moveToTrash->setText(i18nc("@action:inmenu File", "Move to Trash"));
|
||||
moveToTrash->setIcon(KIcon("user-trash"));
|
||||
moveToTrash->setIcon(QIcon::fromTheme("user-trash"));
|
||||
moveToTrash->setShortcut(QKeySequence::Delete);
|
||||
connect(moveToTrash, &QAction::triggered,
|
||||
this, &DolphinViewActionHandler::slotTrashActivated);
|
||||
|
||||
QAction* deleteAction = m_actionCollection->addAction("delete");
|
||||
deleteAction->setIcon(KIcon("edit-delete"));
|
||||
deleteAction->setIcon(QIcon::fromTheme("edit-delete"));
|
||||
deleteAction->setText(i18nc("@action:inmenu File", "Delete"));
|
||||
deleteAction->setShortcut(Qt::SHIFT | Qt::Key_Delete);
|
||||
connect(deleteAction, &QAction::triggered, this, &DolphinViewActionHandler::slotDeleteItems);
|
||||
|
@ -140,7 +140,7 @@ void DolphinViewActionHandler::createActions()
|
|||
QAction *propertiesAction = m_actionCollection->addAction( "properties" );
|
||||
// Well, it's the File menu in dolphinmainwindow and the Edit menu in dolphinpart... :)
|
||||
propertiesAction->setText( i18nc("@action:inmenu File", "Properties") );
|
||||
propertiesAction->setIcon(KIcon("document-properties"));
|
||||
propertiesAction->setIcon(QIcon::fromTheme("document-properties"));
|
||||
propertiesAction->setShortcuts(QList<QKeySequence>() << Qt::ALT + Qt::Key_Return << Qt::ALT + Qt::Key_Enter);
|
||||
connect(propertiesAction, &QAction::triggered, this, &DolphinViewActionHandler::slotProperties);
|
||||
|
||||
|
@ -168,7 +168,7 @@ void DolphinViewActionHandler::createActions()
|
|||
KToggleAction* showPreview = m_actionCollection->add<KToggleAction>("show_preview");
|
||||
showPreview->setText(i18nc("@action:intoolbar", "Preview"));
|
||||
showPreview->setToolTip(i18nc("@info", "Show preview of files and folders"));
|
||||
showPreview->setIcon(KIcon("view-preview"));
|
||||
showPreview->setIcon(QIcon::fromTheme("view-preview"));
|
||||
connect(showPreview, &KToggleAction::triggered, this, &DolphinViewActionHandler::togglePreview);
|
||||
|
||||
KToggleAction* sortDescending = m_actionCollection->add<KToggleAction>("descending");
|
||||
|
@ -205,7 +205,7 @@ void DolphinViewActionHandler::createActions()
|
|||
}
|
||||
|
||||
KToggleAction* showInGroups = m_actionCollection->add<KToggleAction>("show_in_groups");
|
||||
showInGroups->setIcon(KIcon("view-group"));
|
||||
showInGroups->setIcon(QIcon::fromTheme("view-group"));
|
||||
showInGroups->setText(i18nc("@action:inmenu View", "Show in Groups"));
|
||||
connect(showInGroups, &KToggleAction::triggered, this, &DolphinViewActionHandler::toggleGroupedSorting);
|
||||
|
||||
|
@ -302,7 +302,7 @@ void DolphinViewActionHandler::slotViewModeActionTriggered(QAction* action)
|
|||
m_currentView->setMode(mode);
|
||||
|
||||
QAction* viewModeMenu = m_actionCollection->action("view_mode");
|
||||
viewModeMenu->setIcon(KIcon(action->icon()));
|
||||
viewModeMenu->setIcon(action->icon());
|
||||
}
|
||||
|
||||
void DolphinViewActionHandler::slotRename()
|
||||
|
@ -365,7 +365,7 @@ void DolphinViewActionHandler::updateViewActions()
|
|||
viewModeAction->setChecked(true);
|
||||
|
||||
QAction* viewModeMenu = m_actionCollection->action("view_mode");
|
||||
viewModeMenu->setIcon(KIcon(viewModeAction->icon()));
|
||||
viewModeMenu->setIcon(viewModeAction->icon());
|
||||
}
|
||||
|
||||
QAction* showPreviewAction = m_actionCollection->action("show_preview");
|
||||
|
@ -493,7 +493,7 @@ KToggleAction* DolphinViewActionHandler::iconsModeAction()
|
|||
iconsView->setText(i18nc("@action:inmenu View Mode", "Icons"));
|
||||
iconsView->setToolTip(i18nc("@info", "Icons view mode"));
|
||||
iconsView->setShortcut(Qt::CTRL | Qt::Key_1);
|
||||
iconsView->setIcon(KIcon("view-list-icons"));
|
||||
iconsView->setIcon(QIcon::fromTheme("view-list-icons"));
|
||||
iconsView->setData(QVariant::fromValue(DolphinView::IconsView));
|
||||
return iconsView;
|
||||
}
|
||||
|
@ -504,7 +504,7 @@ KToggleAction* DolphinViewActionHandler::compactModeAction()
|
|||
iconsView->setText(i18nc("@action:inmenu View Mode", "Compact"));
|
||||
iconsView->setToolTip(i18nc("@info", "Compact view mode"));
|
||||
iconsView->setShortcut(Qt::CTRL | Qt::Key_2);
|
||||
iconsView->setIcon(KIcon("view-list-details")); // TODO: discuss with Oxygen-team the wrong (?) name
|
||||
iconsView->setIcon(QIcon::fromTheme("view-list-details")); // TODO: discuss with Oxygen-team the wrong (?) name
|
||||
iconsView->setData(QVariant::fromValue(DolphinView::CompactView));
|
||||
return iconsView;
|
||||
}
|
||||
|
@ -515,7 +515,7 @@ KToggleAction* DolphinViewActionHandler::detailsModeAction()
|
|||
detailsView->setText(i18nc("@action:inmenu View Mode", "Details"));
|
||||
detailsView->setToolTip(i18nc("@info", "Details view mode"));
|
||||
detailsView->setShortcut(Qt::CTRL | Qt::Key_3);
|
||||
detailsView->setIcon(KIcon("view-list-tree"));
|
||||
detailsView->setIcon(QIcon::fromTheme("view-list-tree"));
|
||||
detailsView->setData(QVariant::fromValue(DolphinView::DetailsView));
|
||||
return detailsView;
|
||||
}
|
||||
|
@ -528,7 +528,7 @@ void DolphinViewActionHandler::slotSortRoleChanged(const QByteArray& role)
|
|||
|
||||
if (!action->icon().isNull()) {
|
||||
QAction* sortByMenu = m_actionCollection->action("sort");
|
||||
sortByMenu->setIcon(KIcon(action->icon()));
|
||||
sortByMenu->setIcon(action->icon());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include "tooltipmanager.h"
|
||||
|
||||
#include "filemetadatatooltip.h"
|
||||
#include <KIcon>
|
||||
#include <QIcon>
|
||||
#include <KIO/JobUiDelegate>
|
||||
#include <KIO/PreviewJob>
|
||||
#include <KJobWidgets>
|
||||
|
@ -167,7 +167,7 @@ void ToolTipManager::previewFailed()
|
|||
return;
|
||||
}
|
||||
|
||||
const QPixmap pixmap = KIcon(m_item.iconName()).pixmap(128, 128);
|
||||
const QPixmap pixmap = QIcon::fromTheme(m_item.iconName()).pixmap(128, 128);
|
||||
m_fileMetaDataToolTip->setPreview(pixmap);
|
||||
if (!m_showToolTipTimer->isActive()) {
|
||||
showToolTip();
|
||||
|
|
Loading…
Reference in a new issue