Commit ff2963f3 authored by Laurent Montel's avatar Laurent Montel 😁

Port to QIcon

parent 51d19b4d
......@@ -86,10 +86,10 @@ KCookiesPolicies::KCookiesPolicies (const KComponentData& componentData, QWidget
columns.append (0);
mUi.kListViewSearchLine->setSearchColumns (columns);
mUi.pbNew->setIcon (KIcon ("list-add"));
mUi.pbChange->setIcon (KIcon ("edit-rename"));
mUi.pbDelete->setIcon (KIcon ("list-remove"));
mUi.pbDeleteAll->setIcon (KIcon ("edit-delete"));
mUi.pbNew->setIcon (QIcon::fromTheme("list-add"));
mUi.pbChange->setIcon (QIcon::fromTheme("edit-rename"));
mUi.pbDelete->setIcon (QIcon::fromTheme("list-remove"));
mUi.pbDeleteAll->setIcon (QIcon::fromTheme("edit-delete"));
// Connect the main swicth :) Enable/disable cookie support
connect (mUi.cbEnableCookies, SIGNAL (toggled (bool)),
......
......@@ -58,10 +58,10 @@ UserAgentDlg::UserAgentDlg (QWidget* parent, const QVariantList&)
m_config (0)
{
ui.setupUi (this);
ui.newButton->setIcon (KIcon ("list-add"));
ui.changeButton->setIcon (KIcon ("edit-rename"));
ui.deleteButton->setIcon (KIcon ("list-remove"));
ui.deleteAllButton->setIcon (KIcon ("edit-delete"));
ui.newButton->setIcon (QIcon::fromTheme("list-add"));
ui.changeButton->setIcon (QIcon::fromTheme("edit-rename"));
ui.deleteButton->setIcon (QIcon::fromTheme("list-remove"));
ui.deleteAllButton->setIcon (QIcon::fromTheme("edit-delete"));
}
UserAgentDlg::~UserAgentDlg()
......
......@@ -126,16 +126,16 @@ KCMFilter::KCMFilter( QWidget *parent, const QVariantList& )
connect( &mAutomaticFilterModel, SIGNAL(changed(bool)), this, SIGNAL(changed(bool)) );
connect( mRefreshFreqSpinBox, SIGNAL(valueChanged(int)), this, SLOT(spinBoxChanged(int)) );
mInsertButton = new KPushButton( KIcon("list-add"), i18n("Insert"), buttonBox );
mInsertButton = new KPushButton( QIcon::fromTheme("list-add"), i18n("Insert"), buttonBox );
connect( mInsertButton, SIGNAL(clicked()), SLOT(insertFilter()) );
mUpdateButton = new KPushButton( KIcon("document-edit"), i18n("Update"), buttonBox );
mUpdateButton = new KPushButton( QIcon::fromTheme("document-edit"), i18n("Update"), buttonBox );
connect( mUpdateButton, SIGNAL(clicked()), SLOT(updateFilter()) );
mRemoveButton = new KPushButton( KIcon("list-remove"), i18n("Remove"), buttonBox );
mRemoveButton = new KPushButton( QIcon::fromTheme("list-remove"), i18n("Remove"), buttonBox );
connect( mRemoveButton, SIGNAL(clicked()), SLOT(removeFilter()) );
mImportButton = new KPushButton( KIcon("document-import"), i18n("Import..."),buttonBox);
mImportButton = new KPushButton( QIcon::fromTheme("document-import"), i18n("Import..."),buttonBox);
connect( mImportButton, SIGNAL(clicked()), SLOT(importFilters()) );
mExportButton = new KPushButton( KIcon("document-export"), i18n("Export..."),buttonBox);
mExportButton = new KPushButton( QIcon::fromTheme("document-export"), i18n("Export..."),buttonBox);
connect( mExportButton, SIGNAL(clicked()), SLOT(exportFilters()) );
KHBox *impexpBox = new KHBox;
......
......@@ -29,7 +29,7 @@
// KDE
#include <kprocess.h>
#include <kapplication.h>
#include <kicon.h>
#include <QIcon>
#include <kdebug.h>
#include <kfiledialog.h>
#include <kiconloader.h>
......@@ -561,7 +561,7 @@ void KPluginOptions::pluginLoad( KSharedConfig::Ptr /*config*/ )
QTreeWidgetItem *root = new QTreeWidgetItem( m_widget.pluginList, QStringList() << i18n("Netscape Plugins") );
root->setFlags( Qt::ItemIsEnabled );
root->setExpanded( true );
root->setIcon(0, KIcon("netscape"));
root->setIcon(0, QIcon::fromTheme("netscape"));
// read in cache
QString line, plugin;
......
......@@ -27,7 +27,7 @@
#include <QDebug>
#include <QTreeView>
#include <kicon.h>
#include <QIcon>
#include <klocale.h>
#include <kpluginfactory.h>
......@@ -124,7 +124,7 @@ public:
Q_UNUSED(existingModules);
QAction* action = new QAction(parent);
action->setText(i18nc("@action:inmenu Add", "History Sidebar Module"));
action->setIcon(KIcon("view-history"));
action->setIcon(QIcon::fromTheme("view-history"));
return QList<QAction *>() << action;
}
......
......@@ -36,7 +36,7 @@
#include <kdialog.h>
#include <kfontdialog.h>
#include <kglobal.h>
#include <kicon.h>
#include <QIcon>
#include <klocale.h>
#include <kmessagebox.h>
#include <knuminput.h>
......@@ -250,7 +250,7 @@ void HistorySidebarConfig::slotGetFontOlder()
void HistorySidebarConfig::slotClearHistory()
{
KGuiItem guiitem = KStandardGuiItem::clear();
guiitem.setIcon( KIcon("edit-clear-history"));
guiitem.setIcon( QIcon::fromTheme("edit-clear-history"));
if ( KMessageBox::warningContinueCancel( this,
i18n("Do you really want to clear "
"the entire history?"),
......
......@@ -21,7 +21,7 @@
#include "places_module.h"
#include <kfileplacesmodel.h>
#include <kicon.h>
#include <QIcon>
#include <klocale.h>
#include <kpluginfactory.h>
......@@ -117,7 +117,7 @@ public:
Q_UNUSED(unused);
QAction* action = new QAction(parent);
action->setText(i18nc("@action:inmenu Add", "Places Sidebar Module"));
action->setIcon(KIcon("folder-favorites"));
action->setIcon(QIcon::fromTheme("folder-favorites"));
return QList<QAction *>() << action;
}
......
......@@ -40,7 +40,7 @@
#include <kdesktopfile.h>
#include <kiconloader.h>
#include <kicondialog.h>
#include <kicon.h>
#include <QIcon>
#include <kmessagebox.h>
#include <kinputdialog.h>
#include <konq_events.h>
......@@ -150,7 +150,7 @@ Sidebar_Widget::Sidebar_Widget(QWidget *parent, KParts::ReadOnlyPart *par, const
this, SLOT(slotUrlsDropped(KUrl::List)));
m_menu = new QMenu(this);
m_menu->setIcon(KIcon("configure"));
m_menu->setIcon(QIcon::fromTheme("configure"));
m_menu->setTitle(i18n("Configure Sidebar"));
m_addMenu = m_menu->addMenu(i18n("Add New"));
......@@ -163,7 +163,7 @@ Sidebar_Widget::Sidebar_Widget(QWidget *parent, KParts::ReadOnlyPart *par, const
m_showConfigButton = m_menu->addAction(i18n("Show Configuration Button"), this, SLOT(slotShowConfigurationButton()));
m_showConfigButton->setCheckable(true);
m_menu->addSeparator();
m_menu->addAction(KIcon("window-close"), i18n("Close Sidebar"),
m_menu->addAction(QIcon::fromTheme("window-close"), i18n("Close Sidebar"),
par, SLOT(deleteLater()));
connect(m_menu, SIGNAL(aboutToShow()),
......@@ -546,11 +546,11 @@ bool Sidebar_Widget::eventFilter(QObject *obj, QEvent *ev)
{
KMenu *buttonPopup=new KMenu(this);
buttonPopup->addTitle(SmallIcon(currentButtonInfo().iconName), currentButtonInfo().displayName);
buttonPopup->addAction(KIcon("edit-rename"), i18n("Set Name..."), this, SLOT(slotSetName())); // Item to open a dialog to change the name of the sidebar item (by Pupeno)
buttonPopup->addAction(KIcon("internet-web-browser"), i18n("Set URL..."), this, SLOT(slotSetURL()));
buttonPopup->addAction(KIcon("preferences-desktop-icons"), i18n("Set Icon..."), this, SLOT(slotSetIcon()));
buttonPopup->addAction(QIcon::fromTheme("edit-rename"), i18n("Set Name..."), this, SLOT(slotSetName())); // Item to open a dialog to change the name of the sidebar item (by Pupeno)
buttonPopup->addAction(QIcon::fromTheme("internet-web-browser"), i18n("Set URL..."), this, SLOT(slotSetURL()));
buttonPopup->addAction(QIcon::fromTheme("preferences-desktop-icons"), i18n("Set Icon..."), this, SLOT(slotSetIcon()));
buttonPopup->addSeparator();
buttonPopup->addAction(KIcon("edit-delete"), i18n("Remove"), this, SLOT(slotRemove()));
buttonPopup->addAction(QIcon::fromTheme("edit-delete"), i18n("Remove"), this, SLOT(slotRemove()));
buttonPopup->addSeparator();
buttonPopup->addMenu(m_menu);
buttonPopup->exec(QCursor::pos());
......
......@@ -37,7 +37,7 @@
#include <kbookmark.h>
#include <kbookmarkmanager.h>
#include <kdebug.h>
#include <kicon.h>
#include <QIcon>
#include <kiconloader.h>
#include <klineedit.h>
#include <kmessagebox.h>
......@@ -71,35 +71,35 @@ KonqSidebarBookmarkModule::KonqSidebarBookmarkModule( KonqSidebarTree * parentTr
m_collection = new KActionCollection( this );
QAction *action = m_collection->addAction("create_folder");
action->setIcon( KIcon("folder-new") );
action->setIcon( QIcon::fromTheme("folder-new") );
action->setText( i18n("&Create New Folder") );
connect(action, SIGNAL(triggered(bool)), SLOT(slotCreateFolder()));
action = m_collection->addAction("delete_folder");
action->setIcon( KIcon("edit-delete") );
action->setIcon( QIcon::fromTheme("edit-delete") );
action->setText( i18n("Delete Folder") );
connect(action, SIGNAL(triggered(bool)), SLOT(slotDelete()));
action = m_collection->addAction("delete_bookmark");
action->setIcon( KIcon("edit-delete") );
action->setIcon( QIcon::fromTheme("edit-delete") );
action->setText( i18n("Delete Bookmark") );
connect(action, SIGNAL(triggered(bool)), SLOT(slotDelete()));
action = m_collection->addAction("item_properties");
action->setIcon( KIcon("document-properties") );
action->setIcon( QIcon::fromTheme("document-properties") );
action->setText( i18n("Properties") );
connect(action, SIGNAL(triggered(bool)), SLOT(slotProperties()));
action = m_collection->addAction("open_window");
action->setIcon( KIcon("window-new") );
action->setIcon( QIcon::fromTheme("window-new") );
action->setText( i18n("Open in New Window") );
connect(action, SIGNAL(triggered(bool)), SLOT(slotOpenNewWindow()));
action = m_collection->addAction("open_tab");
action->setIcon( KIcon("tab-new") );
action->setIcon( QIcon::fromTheme("tab-new") );
action->setText( i18n("Open in New Tab") );
connect(action, SIGNAL(triggered(bool)), SLOT(slotOpenTab()));
action = m_collection->addAction("folder_open_tabs");
action->setIcon( KIcon("tab-new") );
action->setIcon( QIcon::fromTheme("tab-new") );
action->setText( i18n("Open Folder in Tabs") );
connect(action, SIGNAL(triggered(bool)), SLOT(slotOpenTab()));
action = m_collection->addAction("copy_location");
action->setIcon( KIcon("edit-copy") );
action->setIcon( QIcon::fromTheme("edit-copy") );
action->setText( i18n("Copy Link Address") );
connect(action, SIGNAL(triggered(bool)), SLOT(slotCopyLocation()));
......
......@@ -41,7 +41,7 @@
#include <kdesktopfile.h>
#include <kglobalsettings.h>
#include <klibrary.h>
#include <kicon.h>
#include <QIcon>
#include <kiconloader.h>
#include <kinputdialog.h>
#include <kio/netaccess.h>
......@@ -200,40 +200,40 @@ KonqSidebarTree::KonqSidebarTree( KonqSidebarOldTreeModule *parent, QWidget *par
m_collection = new KActionCollection(this);
m_collection->addAssociatedWidget(this);
m_collection->setObjectName( QLatin1String("bookmark actions" ));
QAction *action = new KAction(KIcon("folder-new"), i18n("&Create New Folder..."), this);
QAction *action = new KAction(QIcon::fromTheme("folder-new"), i18n("&Create New Folder..."), this);
m_collection->addAction("create_folder", action);
connect(action, SIGNAL(triggered(bool)), SLOT(slotCreateFolder()));
action = new KAction(KIcon("edit-delete"), i18n("Delete Folder"), this);
action = new KAction(QIcon::fromTheme("edit-delete"), i18n("Delete Folder"), this);
m_collection->addAction("delete", action);
connect(action, SIGNAL(triggered(bool)), SLOT(slotDelete()));
action = new KAction(KIcon("user-trash"), i18n("Move to Trash"), this);
action = new KAction(QIcon::fromTheme("user-trash"), i18n("Move to Trash"), this);
m_collection->addAction("trash", action);
connect(action, SIGNAL(triggered(bool)), SLOT(slotTrash()));
action = new KAction(i18n("Rename"), this);
action->setIcon(KIcon("edit-rename"));
action->setIcon(QIcon::fromTheme("edit-rename"));
m_collection->addAction("rename", action);
connect(action, SIGNAL(triggered(bool)), SLOT(slotRename()));
action = new KAction(KIcon("edit-delete"), i18n("Delete Link"), this);
action = new KAction(QIcon::fromTheme("edit-delete"), i18n("Delete Link"), this);
m_collection->addAction("delete_link", action);
connect(action, SIGNAL(triggered(bool)), SLOT(slotDelete()));
action = new KAction(KIcon("document-properties"), i18n("Properties"), this);
action = new KAction(QIcon::fromTheme("document-properties"), i18n("Properties"), this);
m_collection->addAction("item_properties", action);
connect(action, SIGNAL(triggered(bool)), SLOT(slotProperties()));
action = new KAction(KIcon("window-new"), i18n("Open in New Window"), this);
action = new KAction(QIcon::fromTheme("window-new"), i18n("Open in New Window"), this);
m_collection->addAction("open_window", action);
connect(action, SIGNAL(triggered(bool)), SLOT(slotOpenNewWindow()));
action = new KAction(KIcon("tab-new"), i18n("Open in New Tab"), this);
action = new KAction(QIcon::fromTheme("tab-new"), i18n("Open in New Tab"), this);
m_collection->addAction("open_tab", action);
connect(action, SIGNAL(triggered(bool)), SLOT(slotOpenTab()));
action = new KAction(KIcon("edit-copy"), i18n("Copy Link Address"), this);
action = new KAction(QIcon::fromTheme("edit-copy"), i18n("Copy Link Address"), this);
m_collection->addAction("copy_location", action);
connect(action, SIGNAL(triggered(bool)), SLOT(slotCopyLocation()));
}
......
......@@ -149,7 +149,7 @@ public:
//action->setText(i18nc("@action:inmenu Add folder sidebar module", "Folder"));
action->setText(name);
action->setData(desktopFile);
action->setIcon(KIcon(df.readIcon()));
action->setIcon(QIcon::fromTheme(df.readIcon()));
actions.append(action);
}
}
......
......@@ -66,12 +66,12 @@ KHTMLSideBar::KHTMLSideBar()
_menu = new KMenu(widget());
KAction* reloadAction = new KAction(i18n("&Reload"), this);
reloadAction->setIcon(KIcon("view-refresh"));
reloadAction->setIcon(QIcon::fromTheme("view-refresh"));
_menu->addAction(reloadAction);
connect(reloadAction, SIGNAL(triggered()), this, SIGNAL(reload()));
KAction* autoReloadAction = new KAction(i18n("Set &Automatic Reload"), this);
autoReloadAction->setIcon(KIcon("view-refresh"));
autoReloadAction->setIcon(QIcon::fromTheme("view-refresh"));
_menu->addAction(autoReloadAction);
connect(autoReloadAction, SIGNAL(triggered()), this, SIGNAL(setAutoReload()));
......@@ -278,7 +278,7 @@ public:
Q_UNUSED(existingModules);
QAction* action = new QAction(parent);
action->setText(i18nc("@action:inmenu Add", "Web Sidebar Module"));
action->setIcon(KIcon("internet-web-browser"));
action->setIcon(QIcon::fromTheme("internet-web-browser"));
return QList<QAction *>() << action;
}
......
......@@ -24,7 +24,7 @@
#include <kcolorscheme.h>
#include <kiconloader.h>
#include <kicon.h>
#include <QIcon>
#include <klocale.h>
#include <kdebug.h>
......@@ -76,7 +76,7 @@ KonqStatusBarMessageLabel::KonqStatusBarMessageLabel(QWidget* parent) :
d->m_closeButton = new QToolButton(this);
d->m_closeButton->setAutoRaise(true);
d->m_closeButton->setIcon(KIcon("dialog-close"));
d->m_closeButton->setIcon(QIcon::fromTheme("dialog-close"));
d->m_closeButton->setToolTip(i18nc("@info", "Close"));
d->m_closeButton->setAccessibleName(i18n("Close"));
d->m_closeButton->hide();
......
......@@ -24,7 +24,7 @@
#include "konqpixmapprovider.h"
#include <kdebug.h>
#include <kicon.h>
#include <QIcon>
#include <kmenu.h>
#include <kglobal.h>
#include <kaction.h>
......@@ -59,7 +59,7 @@ void KonqActions::fillHistoryPopup(const QList<HistoryEntry*> &history, int hist
text = fm.elidedText(text, Qt::ElideMiddle, fm.maxWidth() * 30);
text.replace( '&', "&&" );
const QString iconName = KonqPixmapProvider::self()->iconNameFor(history[index]->url);
KAction* action = new KAction(KIcon(iconName), text, popup);
KAction* action = new KAction(QIcon::fromTheme(iconName), text, popup);
action->setData(index - historyIndex);
//kDebug() << text << index - historyIndex;
popup->addAction(action);
......@@ -76,7 +76,7 @@ static int s_maxEntries = 0;
KonqMostOftenURLSAction::KonqMostOftenURLSAction( const QString& text,
QObject* parent )
: KActionMenu( KIcon("go-jump"), text, parent ),
: KActionMenu( QIcon::fromTheme("go-jump"), text, parent ),
m_parsingDone(false)
{
setDelayed( false );
......@@ -177,7 +177,7 @@ static void createHistoryAction(const KonqHistoryEntry& entry, QMenu* menu)
entry.typedUrl) :
entry.title;
KAction* action = new KAction(
KIcon(KonqPixmapProvider::self()->iconNameFor(entry.url)),
QIcon::fromTheme(KonqPixmapProvider::self()->iconNameFor(entry.url)),
text, menu);
action->setData(entry.url);
menu->addAction(action);
......@@ -206,7 +206,7 @@ void KonqMostOftenURLSAction::slotActivated(QAction* action)
///////////////////////////////
KonqHistoryAction::KonqHistoryAction(const QString& text, QObject* parent)
: KActionMenu(KIcon("go-jump"), text, parent)
: KActionMenu(QIcon::fromTheme("go-jump"), text, parent)
{
setDelayed(false);
connect(menu(), SIGNAL(aboutToShow()), SLOT(slotFillMenu()));
......
......@@ -28,7 +28,7 @@
#include <kdebug.h>
#include <kglobal.h>
#include <kglobalsettings.h>
#include <kicon.h>
#include <QIcon>
#include <kiconeffect.h>
#include <konqpixmapprovider.h>
#include <kcolorscheme.h>
......@@ -39,7 +39,7 @@
class KonqIcon {
public:
KonqIcon()
: image(KIcon("konqueror").pixmap(16).toImage())
: image(QIcon::fromTheme("konqueror").pixmap(16).toImage())
{
KIconEffect::deSaturate(image, 0.60f);
}
......
......@@ -37,7 +37,7 @@
// KDE
#include <kactioncollection.h>
#include <kdebug.h>
#include <kicon.h>
#include <QIcon>
#include <kiconloader.h>
#include <klocale.h>
#include <kurl.h>
......
......@@ -31,7 +31,7 @@
#include <klocale.h>
#include <kactioncollection.h>
#include <kaction.h>
#include <kicon.h>
#include <QIcon>
static QPixmap statusBarIcon(const char* name)
{
......@@ -162,7 +162,7 @@ void KonqFrameStatusBar::splitFrameMenu()
// We have to ship the remove view action ourselves,
// since this may not be the active view (passive view)
KAction actRemoveView(KIcon("view-close"), i18n("Close View"), 0);
KAction actRemoveView(QIcon::fromTheme("view-close"), i18n("Close View"), 0);
actRemoveView.setObjectName( QLatin1String("removethisview" ));
connect(&actRemoveView, &KAction::triggered, m_pParentKonqFrame, &KonqFrame::slotRemoveView);
actRemoveView.setEnabled( mw->mainViewsCount() > 1 || m_pParentKonqFrame->childView()->isToggleView() || m_pParentKonqFrame->childView()->isPassiveMode() );
......
......@@ -23,7 +23,7 @@
// KDE
#include <ktoggleaction.h>
#include <kdebug.h>
#include <kicon.h>
#include <QIcon>
#include <kiconloader.h>
#include <klocale.h>
#include <kmenubar.h>
......@@ -87,7 +87,7 @@ QAction* PopupMenuGUIClient::addEmbeddingService( int idx, const QString &name,
{
QAction *act = m_actionCollection.addAction( QByteArray::number( idx ) );
act->setText( name );
act->setIcon( KIcon(service->icon()) );
act->setIcon( QIcon::fromTheme(service->icon()) );
QObject::connect(act, &QAction::triggered, this, &PopupMenuGUIClient::slotOpenEmbedded);
return act;
}
......@@ -140,7 +140,7 @@ ToggleViewGUIClient::ToggleViewGUIClient( KonqMainWindow *mainWindow )
// HACK
if ( (*cIt)->icon() != "unknown" )
action->setIcon( KIcon((*cIt)->icon()) );
action->setIcon( QIcon::fromTheme((*cIt)->icon()) );
connect( action, SIGNAL(toggled(bool)),
this, SLOT(slotToggleView(bool)) );
......
......@@ -36,7 +36,7 @@
#include <kactioncollection.h>
#include <kguiitem.h>
#include <kglobal.h>
#include <kicon.h>
#include <QIcon>
#include <klocale.h>
#include <klineedit.h>
#include <ktoggleaction.h>
......@@ -61,7 +61,7 @@ KonqHistoryDialog::KonqHistoryDialog(KonqMainWindow *parent)
toolBar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
QToolButton *sortButton = new QToolButton(toolBar);
sortButton->setText(i18nc("@action:inmenu Parent of 'By Name' and 'By Date'", "Sort"));
sortButton->setIcon(KIcon("view-sort-ascending"));
sortButton->setIcon(QIcon::fromTheme("view-sort-ascending"));
sortButton->setPopupMode(QToolButton::InstantPopup);
sortButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
QMenu *sortMenu = new QMenu(sortButton);
......
......@@ -23,7 +23,7 @@
#include "konq_historyprovider.h"
#include <kglobal.h>
#include <kicon.h>
#include <QIcon>
#include <kiconloader.h>
#include <klocale.h>
#include <kmimetype.h>
......@@ -166,7 +166,7 @@ GroupEntry::GroupEntry(const KUrl &_url, const QString &_key)
{
const QString iconPath = KMimeType::favIconForUrl(url);
if (iconPath.isEmpty()) {
icon = KIcon("folder");
icon = QIcon::fromTheme("folder");
} else {
icon = QIcon(SmallIcon(iconPath));
hasFavIcon = true;
......
......@@ -34,7 +34,7 @@
#include <kactioncollection.h>
#include <kaction.h>
#include <kdebug.h>
#include <kicon.h>
#include <QIcon>
#include <klineedit.h>
#include <klocale.h>
#include <kmessagebox.h>
......@@ -58,12 +58,12 @@ KonqHistoryView::KonqHistoryView(QWidget* parent)
m_collection = new KActionCollection(this);
m_collection->addAssociatedWidget(m_treeView); // make shortcuts work
QAction *action = m_collection->addAction("open_new");
action->setIcon(KIcon("window-new"));
action->setIcon(QIcon::fromTheme("window-new"));
action->setText(i18n("Open in New &Window"));
connect(action, &QAction::triggered, this, &KonqHistoryView::slotNewWindow);
action = m_collection->addAction("open_tab");
action->setIcon(KIcon("tab-new"));
action->setIcon(QIcon::fromTheme("tab-new"));
action->setText(i18n("Open in New Tab"));
connect(action, &QAction::triggered, this, &KonqHistoryView::slotNewTab);
......@@ -72,19 +72,19 @@ KonqHistoryView::KonqHistoryView(QWidget* parent)
connect(action, &QAction::triggered, this, &KonqHistoryView::slotCopyLinkLocation);
action = m_collection->addAction("remove");
action->setIcon(KIcon("edit-delete"));
action->setIcon(QIcon::fromTheme("edit-delete"));
action->setText(i18n("&Remove Entry"));
action->setShortcut(Qt::Key_Delete); // #135966
action->setShortcutContext(Qt::WidgetWithChildrenShortcut);
connect(action, &QAction::triggered, this, &KonqHistoryView::slotRemoveEntry);
action = m_collection->addAction("clear");
action->setIcon(KIcon("edit-clear-history"));
action->setIcon(QIcon::fromTheme("edit-clear-history"));
action->setText(i18n("C&lear History"));
connect(action, &QAction::triggered, this, &KonqHistoryView::slotClearHistory);
action = m_collection->addAction("preferences");
action->setIcon(KIcon("configure"));
action->setIcon(QIcon::fromTheme("configure"));
action->setText(i18n("&Preferences..."));
connect(action, &QAction::triggered, this, &KonqHistoryView::slotPreferences);
......@@ -165,7 +165,7 @@ void KonqHistoryView::slotRemoveEntry()
void KonqHistoryView::slotClearHistory()
{
KGuiItem guiitem = KStandardGuiItem::clear();
guiitem.setIcon(KIcon("edit-clear-history"));
guiitem.setIcon(QIcon::fromTheme("edit-clear-history"));
if (KMessageBox::warningContinueCancel(this,
i18n("Do you really want to clear the entire history?"),
......
This diff is collapsed.
......@@ -36,7 +36,7 @@
#include <ktempdir.h>
#include <kio/renamedialog.h>
#include <kfileitemdelegate.h>
#include <kicon.h>
#include <QIcon>
#include <kdirlister.h>
#include <kdirmodel.h>
#include <kstandardguiitem.h>
......@@ -80,10 +80,10 @@ KonqSessionDlg::KonqSessionDlg( KonqViewManager *manager, QWidget *parent )
setDefaultButton( Close );
setButtonGuiItem( BTN_OPEN, KGuiItem( i18n( "&Open" ), "document-open" ) );
d->m_pSaveCurrentButton->setIcon(KIcon("document-save"));
d->m_pRenameButton->setIcon(KIcon("edit-rename"));
d->m_pDeleteButton->setIcon(KIcon("edit-delete"));
d->m_pNewButton->setIcon(KIcon("document-new"));
d->m_pSaveCurrentButton->setIcon(QIcon::fromTheme("document-save"));
d->m_pRenameButton->setIcon(QIcon::fromTheme("edit-rename"));
d->m_pDeleteButton->setIcon(QIcon::fromTheme("edit-delete"));
d->m_pNewButton->setIcon(QIcon::fromTheme("document-new"));
QString dir = KStandardDirs::locateLocal("appdata", "sessions/");
......
......@@ -35,7 +35,7 @@
#include <klocale.h>
#include <kdialog.h>
#include <kurl.h>
#include <kicon.h>
#include <QIcon>
#include <ktempdir.h>
#include <ksqueezedtextlabel.h>
......@@ -118,7 +118,7 @@ SessionRestoreDialog::SessionRestoreDialog(const QStringList& sessionFilePaths,