summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2014-10-14 21:18:31 +0200
committerMontel Laurent <[email protected]>2014-10-14 21:18:31 +0200
commit0b6473e158092825b123d8c27d12d2e1698aef9b (patch)
tree9333532179d2fd2512ef18362337609811e2fe6f
parent50adda3e79ee68c94a459ba9ef9fee1ba7b50932 (diff)
kicon->QIcon, KPushButton->QPushButton etc.
-rw-r--r--conf/autopastemodel.cpp4
-rw-r--r--conf/dlgintegration.ui13
-rw-r--r--conf/integrationpreferences.cpp14
-rw-r--r--conf/transfersgroupwidget.cpp6
-rw-r--r--core/transfergrouphandler.cpp6
-rw-r--r--extensions/konqueror/kget_plug_in.cpp4
-rw-r--r--mainwindow.cpp68
-rw-r--r--plasma/applet/common/kgetapplet.cpp4
-rw-r--r--plasma/applet/common/kgetappletutils.cpp12
-rw-r--r--plasma/applet/panelbar/kgetpanelbar.cpp6
-rw-r--r--plasma/applet/piechart/kgetpiechart.cpp2
-rw-r--r--plasma/runner/kgetrunner.cpp4
-rw-r--r--plasma/runner/kgetrunner.h2
-rw-r--r--transfer-plugins/bittorrent/advanceddetails/btadvanceddetailswidget.cpp12
-rw-r--r--transfer-plugins/bittorrent/advanceddetails/fileview.cpp2
-rw-r--r--transfer-plugins/bittorrent/advanceddetails/peerview.cpp6
-rw-r--r--transfer-plugins/bittorrent/advanceddetails/peerviewmodel.cpp10
-rw-r--r--transfer-plugins/bittorrent/advanceddetails/peerviewmodel.h2
-rw-r--r--transfer-plugins/bittorrent/advanceddetails/torrentfilelistmodel.cpp6
-rw-r--r--transfer-plugins/bittorrent/advanceddetails/torrentfiletreemodel.cpp6
-rw-r--r--transfer-plugins/bittorrent/advanceddetails/trackerview.cpp8
-rw-r--r--transfer-plugins/bittorrent/advanceddetails/trackerview.ui13
-rw-r--r--transfer-plugins/bittorrent/advanceddetails/webseedstab.cpp4
-rw-r--r--transfer-plugins/bittorrent/bttransferfactory.cpp4
-rw-r--r--transfer-plugins/bittorrent/scandlg.h4
-rw-r--r--transfer-plugins/bittorrent/scandlg.ui7
-rw-r--r--transfer-plugins/checksumsearch/checksumsearch.ui9
-rw-r--r--transfer-plugins/contentfetch/dlgcontentfetchsettingwidget.cpp4
-rw-r--r--ui/contextmenu.cpp2
-rw-r--r--ui/history/rangetreewidget.cpp2
-rw-r--r--ui/history/transferhistory.cpp16
-rw-r--r--ui/history/transferhistory.h6
-rw-r--r--ui/history/transferhistory.ui9
-rw-r--r--ui/history/transferhistoryitemdelegate.cpp8
-rw-r--r--ui/linkview/importlinkdialog.ui13
-rw-r--r--ui/linkview/kget_linkview.cpp18
-rw-r--r--ui/metalinkcreator/filedlg.cpp9
-rw-r--r--ui/metalinkcreator/filedlg.ui9
-rw-r--r--ui/metalinkcreator/files.ui13
-rw-r--r--ui/metalinkcreator/localemodels.cpp4
-rw-r--r--ui/metalinkcreator/localemodels.h2
-rw-r--r--ui/metalinkcreator/metalinkcreator.cpp16
-rw-r--r--ui/metalinkcreator/urlwidget.cpp11
-rw-r--r--ui/metalinkcreator/urlwidget.ui9
-rw-r--r--ui/mirror/mirrorsettings.cpp9
-rw-r--r--ui/mirror/mirrorsettings.ui9
-rw-r--r--ui/signaturedlg.cpp12
-rw-r--r--ui/signaturedlg.ui9
-rw-r--r--ui/transfersettingsdialog.cpp8
-rw-r--r--ui/transfersettingsdialog.ui13
-rw-r--r--ui/transfersviewdelegate.cpp6
-rw-r--r--ui/verificationdialog.cpp10
-rw-r--r--ui/verificationdialog.ui11
53 files changed, 208 insertions, 268 deletions
diff --git a/conf/autopastemodel.cpp b/conf/autopastemodel.cpp
index 1cf096a..482af7a 100644
--- a/conf/autopastemodel.cpp
+++ b/conf/autopastemodel.cpp
@@ -21,7 +21,7 @@
#include "settings.h"
#include <KComboBox>
-#include <KIcon>
+#include <QIcon>
#include <KLineEdit>
#include <KLocale>
@@ -192,7 +192,7 @@ QVariant AutoPasteModel::data(const QModelIndex &index, int role) const
switch (column) {
case Type: {
if (role == Qt::DecorationRole) {
- return (m_data[row].type == Include ? KIcon("list-add") : KIcon("list-remove"));
+ return (m_data[row].type == Include ? QIcon::fromTheme("list-add") : QIcon::fromTheme("list-remove"));
} else if ((role == Qt::UserRole) || (role == Qt::EditRole)) {
return m_data[row].type;
}
diff --git a/conf/dlgintegration.ui b/conf/dlgintegration.ui
index c349430..8ae2291 100644
--- a/conf/dlgintegration.ui
+++ b/conf/dlgintegration.ui
@@ -82,20 +82,20 @@
<item>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
- <widget class="KPushButton" name="add"/>
+ <widget class="QPushButton" name="add"/>
</item>
<item>
- <widget class="KPushButton" name="remove"/>
+ <widget class="QPushButton" name="remove"/>
</item>
<item>
- <widget class="KPushButton" name="increase">
+ <widget class="QPushButton" name="increase">
<property name="text">
<string>&amp;Increase Priority</string>
</property>
</widget>
</item>
<item>
- <widget class="KPushButton" name="decrease">
+ <widget class="QPushButton" name="decrease">
<property name="text">
<string>&amp;Decrease Priority</string>
</property>
@@ -134,11 +134,6 @@
<extends>QLineEdit</extends>
<header>klineedit.h</header>
</customwidget>
- <customwidget>
- <class>KPushButton</class>
- <extends>QPushButton</extends>
- <header>kpushbutton.h</header>
- </customwidget>
</customwidgets>
<resources/>
<connections/>
diff --git a/conf/integrationpreferences.cpp b/conf/integrationpreferences.cpp
index 5a84f94..8db6434 100644
--- a/conf/integrationpreferences.cpp
+++ b/conf/integrationpreferences.cpp
@@ -23,6 +23,8 @@
#include <KConfigDialog>
#include <KLocale>
+#include <KGuiItem>
+#include <KStandardGuiItem>
IntegrationPreferences::IntegrationPreferences(KConfigDialog *parent, Qt::WindowFlags f)
: QWidget(parent, f)
@@ -36,8 +38,8 @@ IntegrationPreferences::IntegrationPreferences(KConfigDialog *parent, Qt::Window
ui.patternSyntax->addItem(i18n("Escape sequences"), AutoPasteModel::Wildcard);
ui.patternSyntax->addItem(i18n("Regular expression"), AutoPasteModel::RegExp);
- ui.add->setGuiItem(KStandardGuiItem::add());
- ui.remove->setGuiItem(KStandardGuiItem::remove());
+ KGuiItem::assign(ui.add, KStandardGuiItem::add());
+ KGuiItem::assign(ui.remove, KStandardGuiItem::remove());
ui.increase->setIcon(QIcon::fromTheme("arrow-up"));
ui.decrease->setIcon(QIcon::fromTheme("arrow-down"));
@@ -58,10 +60,10 @@ IntegrationPreferences::IntegrationPreferences(KConfigDialog *parent, Qt::Window
connect(ui.list->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)), this, SLOT(slotUpdateButtons()));
connect(ui.pattern, &KLineEdit::textChanged, this, &IntegrationPreferences::slotUpdateButtons);
connect(ui.pattern, &KLineEdit::returnPressed, this, &IntegrationPreferences::slotAddItem);
- connect(ui.add, &KPushButton::clicked, this, &IntegrationPreferences::slotAddItem);
- connect(ui.remove, &KPushButton::clicked, this, &IntegrationPreferences::slotRemoveItem);
- connect(ui.increase, &KPushButton::clicked, this, &IntegrationPreferences::slotIncreasePriority);
- connect(ui.decrease, &KPushButton::clicked, this, &IntegrationPreferences::slotDecreasePriority);
+ connect(ui.add, &QPushButton::clicked, this, &IntegrationPreferences::slotAddItem);
+ connect(ui.remove, &QPushButton::clicked, this, &IntegrationPreferences::slotRemoveItem);
+ connect(ui.increase, &QPushButton::clicked, this, &IntegrationPreferences::slotIncreasePriority);
+ connect(ui.decrease, &QPushButton::clicked, this, &IntegrationPreferences::slotDecreasePriority);
connect(parent, SIGNAL(rejected()), m_model, SLOT(load()));
connect(parent, SIGNAL(applyClicked()), m_model, SLOT(save()));
connect(parent, SIGNAL(okClicked()), m_model, SLOT(save()));
diff --git a/conf/transfersgroupwidget.cpp b/conf/transfersgroupwidget.cpp
index 8a15f60..ce3d5b4 100644
--- a/conf/transfersgroupwidget.cpp
+++ b/conf/transfersgroupwidget.cpp
@@ -19,7 +19,7 @@
#include "core/transfertreemodel.h"
#include "core/transfertreeselectionmodel.h"
-#include <KPushButton>
+#include <QPushButton>
TransfersGroupWidget::TransfersGroupWidget(QWidget *parent)
: QWidget(parent)
@@ -40,8 +40,8 @@ TransfersGroupWidget::TransfersGroupWidget(QWidget *parent)
ui.rename->setIcon(QIcon::fromTheme("edit-rename"));
ui.selectIcon->setIcon(QIcon::fromTheme("preferences-desktop-icons"));
- connect(ui.add, &KPushButton::clicked, ui.treeView, &TransfersGroupTree::addGroup);
- connect(ui.remove, &KPushButton::clicked, ui.treeView, &TransfersGroupTree::deleteSelectedGroup);
+ connect(ui.add, &QPushButton::clicked, ui.treeView, &TransfersGroupTree::addGroup);
+ connect(ui.remove, &QPushButton::clicked, ui.treeView, &TransfersGroupTree::deleteSelectedGroup);
connect(ui.rename, &QPushButton::clicked, ui.treeView, &TransfersGroupTree::renameSelectedGroup);
connect(ui.selectIcon, &KIconButton::iconChanged, ui.treeView, &TransfersGroupTree::changeIcon);
connect(ui.configure, SIGNAL(clicked()), KGet::actionCollection()->action("transfer_group_settings"), SLOT(trigger()));
diff --git a/core/transfergrouphandler.cpp b/core/transfergrouphandler.cpp
index 72d16ec..2e796c0 100644
--- a/core/transfergrouphandler.cpp
+++ b/core/transfergrouphandler.cpp
@@ -22,7 +22,7 @@
#include <QAction>
#include <kactioncollection.h>
#include <klocale.h>
-#include <kicon.h>
+#include <QIcon>
TransferGroupHandler::TransferGroupHandler(Scheduler * scheduler, TransferGroup * parent)
: Handler(scheduler, parent),
@@ -167,13 +167,13 @@ void TransferGroupHandler::createActions()
QAction *startAction = KGet::actionCollection()->addAction("transfer_group_start");
startAction->setText(i18nc("start transfergroup downloads", "Start"));
- startAction->setIcon(KIcon("media-playback-start"));
+ startAction->setIcon(QIcon::fromTheme("media-playback-start"));
QObject::connect(startAction, SIGNAL(triggered()), SLOT(start()));
m_actions.append(startAction);
QAction *stopAction = KGet::actionCollection()->addAction("transfer_group_stop");
stopAction->setText(i18nc("stop transfergroup downloads", "Stop"));
- stopAction->setIcon(KIcon("media-playback-pause"));
+ stopAction->setIcon(QIcon::fromTheme("media-playback-pause"));
QObject::connect(stopAction, SIGNAL(triggered()), SLOT(stop()));
m_actions.append(stopAction);
diff --git a/extensions/konqueror/kget_plug_in.cpp b/extensions/konqueror/kget_plug_in.cpp
index f680dba..9337184 100644
--- a/extensions/konqueror/kget_plug_in.cpp
+++ b/extensions/konqueror/kget_plug_in.cpp
@@ -25,7 +25,7 @@
#include <KMessageBox>
#include <QMenu>
#include <KRun>
-#include <KIcon>
+#include <QIcon>
#include <KToolInvocation>
#include <KGenericFactory>
#include <KProtocolInfo>
@@ -52,7 +52,7 @@ static QWidget* partWidget(QObject* obj)
KGetPlugin::KGetPlugin(QObject *parent, const QVariantList&)
:KParts::Plugin(parent)
{
- KActionMenu *menu = new KActionMenu(KIcon("kget"), i18n("Download Manager"), actionCollection());
+ KActionMenu *menu = new KActionMenu(QIcon::fromTheme("kget"), i18n("Download Manager"), actionCollection());
actionCollection()->addAction("kget_menu", menu);
menu->setDelayed( false );
diff --git a/mainwindow.cpp b/mainwindow.cpp
index 941988d..43d9c26 100644
--- a/mainwindow.cpp
+++ b/mainwindow.cpp
@@ -49,7 +49,7 @@
#include <kiconloader.h>
#include <kstandardaction.h>
#include <klocale.h>
-#include <kicon.h>
+#include <QIcon>
#include <kactionmenu.h>
#include <KSelectAction>
#include <KRun>
@@ -141,7 +141,7 @@ void MainWindow::setupActions()
{
QAction *newDownloadAction = actionCollection()->addAction("new_download");
newDownloadAction->setText(i18n("&New Download..."));
- newDownloadAction->setIcon(KIcon("document-new"));
+ newDownloadAction->setIcon(QIcon::fromTheme("document-new"));
//newDownloadAction->setShortcut(QKeySequence(i18n("Ctrl+N")));
newDownloadAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_N));
//newDownloadAction->setHelpText(i18n("Opens a dialog to add a transfer to the list"));
@@ -149,48 +149,48 @@ void MainWindow::setupActions()
QAction *openAction = actionCollection()->addAction("import_transfers");
openAction->setText(i18n("&Import Transfers..."));
- openAction->setIcon(KIcon("document-open"));
+ openAction->setIcon(QIcon::fromTheme("document-open"));
openAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_I));
//openAction->setHelpText(i18n("Imports a list of transfers"));
connect(openAction, SIGNAL(triggered()), SLOT(slotImportTransfers()));
QAction *exportAction = actionCollection()->addAction("export_transfers");
exportAction->setText(i18n("&Export Transfers List..."));
- exportAction->setIcon(KIcon("document-export"));
+ exportAction->setIcon(QIcon::fromTheme("document-export"));
exportAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_E));
//exportAction->setHelpText(i18n("Exports the current transfers into a file"));
connect(exportAction, SIGNAL(triggered()), SLOT(slotExportTransfers()));
QAction *createMetalinkAction = actionCollection()->addAction("create_metalink");
createMetalinkAction->setText(i18n("&Create a Metalink..."));
- createMetalinkAction->setIcon(KIcon("journal-new"));
+ createMetalinkAction->setIcon(QIcon::fromTheme("journal-new"));
//createMetalinkAction->setHelpText(i18n("Creates or modifies a metalink and saves it on disk"));
connect(createMetalinkAction, SIGNAL(triggered()), SLOT(slotCreateMetalink()));
QAction *priorityTop = actionCollection()->addAction("priority_top");
priorityTop->setText(i18n("Top Priority"));
- priorityTop->setIcon(KIcon("arrow-up-double"));
+ priorityTop->setIcon(QIcon::fromTheme("arrow-up-double"));
priorityTop->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_PageUp));
//priorityTop->setHelpText(i18n("Download selected transfer first"));
connect(priorityTop, SIGNAL(triggered()), this, SLOT(slotPriorityTop()));
QAction *priorityBottom = actionCollection()->addAction("priority_bottom");
priorityBottom->setText(i18n("Least Priority"));
- priorityBottom->setIcon(KIcon("arrow-down-double"));
+ priorityBottom->setIcon(QIcon::fromTheme("arrow-down-double"));
priorityBottom->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_PageDown));
//priorityBottom->setHelpText(i18n("Download selected transfer last"));
connect(priorityBottom, SIGNAL(triggered()), this, SLOT(slotPriorityBottom()));
QAction *priorityUp = actionCollection()->addAction("priority_up");
priorityUp->setText(i18n("Increase Priority"));
- priorityUp->setIcon(KIcon("arrow-up"));
+ priorityUp->setIcon(QIcon::fromTheme("arrow-up"));
priorityUp->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Up));
//priorityUp->setHelpText(i18n("Increase priority for selected transfer"));
connect(priorityUp, SIGNAL(triggered()), this, SLOT(slotPriorityUp()));
QAction *priorityDown = actionCollection()->addAction("priority_down");
priorityDown->setText(i18n("Decrease Priority"));
- priorityDown->setIcon(KIcon("arrow-down"));
+ priorityDown->setIcon(QIcon::fromTheme("arrow-down"));
priorityDown->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Down));
//priorityDown->setHelpText(i18n("Decrease priority for selected transfer"));
connect(priorityDown, SIGNAL(triggered()), this, SLOT(slotPriorityDown()));
@@ -198,22 +198,22 @@ void MainWindow::setupActions()
//FIXME: Not needed maybe because the normal delete already deletes groups?
QAction *deleteGroupAction = actionCollection()->addAction("delete_groups");
deleteGroupAction->setText(i18n("Delete Group"));
- deleteGroupAction->setIcon(KIcon("edit-delete"));
+ deleteGroupAction->setIcon(QIcon::fromTheme("edit-delete"));
//deleteGroupAction->setHelpText(i18n("Delete selected group"));
connect(deleteGroupAction, SIGNAL(triggered()), SLOT(slotDeleteGroup()));
QAction *renameGroupAction = actionCollection()->addAction("rename_groups");
renameGroupAction->setText(i18n("Rename Group..."));
- renameGroupAction->setIcon(KIcon("edit-rename"));
+ renameGroupAction->setIcon(QIcon::fromTheme("edit-rename"));
connect(renameGroupAction, SIGNAL(triggered()), SLOT(slotRenameGroup()));
QAction *setIconGroupAction = actionCollection()->addAction("seticon_groups");
setIconGroupAction->setText(i18n("Set Icon..."));
- setIconGroupAction->setIcon(KIcon("preferences-desktop-icons"));
+ setIconGroupAction->setIcon(QIcon::fromTheme("preferences-desktop-icons"));
//setIconGroupAction->setHelpText(i18n("Select a custom icon for the selected group"));
connect(setIconGroupAction, SIGNAL(triggered()), SLOT(slotSetIconGroup()));
- m_autoPasteAction = new KToggleAction(KIcon("edit-paste"),
+ m_autoPasteAction = new KToggleAction(QIcon::fromTheme("edit-paste"),
i18n("Auto-Paste Mode"), actionCollection());
actionCollection()->addAction("auto_paste", m_autoPasteAction);
m_autoPasteAction->setChecked(Settings::autoPaste());
@@ -222,7 +222,7 @@ void MainWindow::setupActions()
"the clipboard for URLs and paste them automatically."));
connect(m_autoPasteAction, SIGNAL(triggered()), SLOT(slotToggleAutoPaste()));
- m_konquerorIntegration = new KToggleAction(KIcon("konqueror"),
+ m_konquerorIntegration = new KToggleAction(QIcon::fromTheme("konqueror"),
i18n("Use KGet as Konqueror Download Manager"), actionCollection());
actionCollection()->addAction("konqueror_integration", m_konquerorIntegration);
connect(m_konquerorIntegration, SIGNAL(triggered(bool)), SLOT(slotTrayKonquerorIntegration(bool)));
@@ -242,55 +242,55 @@ void MainWindow::setupActions()
QAction *deleteSelectedAction = actionCollection()->addAction("delete_selected_download");
deleteSelectedAction->setText(i18nc("delete selected transfer item", "Remove Selected"));
- deleteSelectedAction->setIcon(KIcon("edit-delete"));
+ deleteSelectedAction->setIcon(QIcon::fromTheme("edit-delete"));
deleteSelectedAction->setShortcut(QKeySequence(Qt::Key_Delete));
// deleteSelectedAction->setHelpText(i18n("Removes selected transfer and deletes files from disk if it's not finished"));
connect(deleteSelectedAction, SIGNAL(triggered()), SLOT(slotDeleteSelected()));
QAction *deleteAllFinishedAction = actionCollection()->addAction("delete_all_finished");
deleteAllFinishedAction->setText(i18nc("delete all finished transfers", "Remove All Finished"));
- deleteAllFinishedAction->setIcon(KIcon("edit-clear-list"));
+ deleteAllFinishedAction->setIcon(QIcon::fromTheme("edit-clear-list"));
// deleteAllFinishedAction->setHelpText(i18n("Removes all finished transfers and leaves all files on disk"));
connect(deleteAllFinishedAction, SIGNAL(triggered()), SLOT(slotDeleteFinished()));
QAction *deleteSelectedIncludingFilesAction = actionCollection()->addAction("delete_selected_download_including_files");
deleteSelectedIncludingFilesAction->setText(i18nc("delete selected transfer item and files", "Remove Selected and Delete Files"));
- deleteSelectedIncludingFilesAction->setIcon(KIcon("edit-delete"));
+ deleteSelectedIncludingFilesAction->setIcon(QIcon::fromTheme("edit-delete"));
// deleteSelectedIncludingFilesAction->setHelpText(i18n("Removes selected transfer and deletes files from disk in any case"));
connect(deleteSelectedIncludingFilesAction, SIGNAL(triggered()), SLOT(slotDeleteSelectedIncludingFiles()));
QAction *redownloadSelectedAction = actionCollection()->addAction("redownload_selected_download");
redownloadSelectedAction->setText(i18nc("redownload selected transfer item", "Redownload Selected"));
- redownloadSelectedAction->setIcon(KIcon("view-refresh"));
+ redownloadSelectedAction->setIcon(QIcon::fromTheme("view-refresh"));
connect(redownloadSelectedAction, SIGNAL(triggered()), SLOT(slotRedownloadSelected()));
QAction *startAllAction = actionCollection()->addAction("start_all_download");
startAllAction->setText(i18n("Start All"));
- startAllAction->setIcon(KIcon("media-seek-forward"));
+ startAllAction->setIcon(QIcon::fromTheme("media-seek-forward"));
startAllAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_R));
// startAllAction->setHelpText(i18n("Starts / resumes all transfers"));
connect(startAllAction, SIGNAL(triggered()), SLOT(slotStartAllDownload()));
QAction *startSelectedAction = actionCollection()->addAction("start_selected_download");
startSelectedAction->setText(i18n("Start Selected"));
- startSelectedAction->setIcon(KIcon("media-playback-start"));
+ startSelectedAction->setIcon(QIcon::fromTheme("media-playback-start"));
// startSelectedAction->setHelpText(i18n("Starts / resumes selected transfer"));
connect(startSelectedAction, SIGNAL(triggered()), SLOT(slotStartSelectedDownload()));
QAction *stopAllAction = actionCollection()->addAction("stop_all_download");
stopAllAction->setText(i18n("Pause All"));
- stopAllAction->setIcon(KIcon("media-playback-pause"));
+ stopAllAction->setIcon(QIcon::fromTheme("media-playback-pause"));
stopAllAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_P));
// stopAllAction->setHelpText(i18n("Pauses all transfers"));
connect(stopAllAction, SIGNAL(triggered()), SLOT(slotStopAllDownload()));
QAction *stopSelectedAction = actionCollection()->addAction("stop_selected_download");
stopSelectedAction->setText(i18n("Stop Selected"));
- stopSelectedAction->setIcon(KIcon("media-playback-pause"));
+ stopSelectedAction->setIcon(QIcon::fromTheme("media-playback-pause"));
//stopSelectedAction->setHelpText(i18n("Pauses selected transfer"));
connect(stopSelectedAction, SIGNAL(triggered()), SLOT(slotStopSelectedDownload()));
- KActionMenu *startActionMenu = new KActionMenu(KIcon("media-playback-start"), i18n("Start"),
+ KActionMenu *startActionMenu = new KActionMenu(QIcon::fromTheme("media-playback-start"), i18n("Start"),
actionCollection());
actionCollection()->addAction("start_menu", startActionMenu);
startActionMenu->setDelayed(true);
@@ -298,7 +298,7 @@ void MainWindow::setupActions()
startActionMenu->addAction(startAllAction);
connect(startActionMenu, SIGNAL(triggered()), SLOT(slotStartDownload()));
- KActionMenu *stopActionMenu = new KActionMenu(KIcon("media-playback-pause"), i18n("Pause"),
+ KActionMenu *stopActionMenu = new KActionMenu(QIcon::fromTheme("media-playback-pause"), i18n("Pause"),
actionCollection());
actionCollection()->addAction("stop_menu", stopActionMenu);
stopActionMenu->setDelayed(true);
@@ -308,44 +308,44 @@ void MainWindow::setupActions()
QAction *openDestAction = actionCollection()->addAction("transfer_open_dest");
openDestAction->setText(i18n("Open Destination"));
- openDestAction->setIcon(KIcon("document-open"));
+ openDestAction->setIcon(QIcon::fromTheme("document-open"));
connect(openDestAction, SIGNAL(triggered()), SLOT(slotTransfersOpenDest()));
QAction *openFileAction = actionCollection()->addAction("transfer_open_file");
openFileAction->setText(i18n("Open File"));
- openFileAction->setIcon(KIcon("document-open"));
+ openFileAction->setIcon(QIcon::fromTheme("document-open"));
connect(openFileAction, SIGNAL(triggered()), SLOT(slotTransfersOpenFile()));
- QAction *showDetailsAction = new KToggleAction(KIcon("document-properties"), i18n("Show Details"), actionCollection());
+ QAction *showDetailsAction = new KToggleAction(QIcon::fromTheme("document-properties"), i18n("Show Details"), actionCollection());
actionCollection()->addAction("transfer_show_details", showDetailsAction);
connect(showDetailsAction, SIGNAL(triggered()), SLOT(slotTransfersShowDetails()));
QAction *copyUrlAction = actionCollection()->addAction("transfer_copy_source_url");
copyUrlAction->setText(i18n("Copy URL to Clipboard"));
- copyUrlAction->setIcon(KIcon("edit-copy"));
+ copyUrlAction->setIcon(QIcon::fromTheme("edit-copy"));
connect(copyUrlAction, SIGNAL(triggered()), SLOT(slotTransfersCopySourceUrl()));
QAction *transferHistoryAction = actionCollection()->addAction("transfer_history");
transferHistoryAction->setText(i18n("&Transfer History"));
- transferHistoryAction->setIcon(KIcon("view-history"));
+ transferHistoryAction->setIcon(QIcon::fromTheme("view-history"));
transferHistoryAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_H));
connect(transferHistoryAction, SIGNAL(triggered()), SLOT(slotTransferHistory()));
QAction *transferGroupSettingsAction = actionCollection()->addAction("transfer_group_settings");
transferGroupSettingsAction->setText(i18n("&Group Settings"));
- transferGroupSettingsAction->setIcon(KIcon("preferences-system"));
+ transferGroupSettingsAction->setIcon(QIcon::fromTheme("preferences-system"));
transferGroupSettingsAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_G));
connect(transferGroupSettingsAction, SIGNAL(triggered()), SLOT(slotTransferGroupSettings()));
QAction *transferSettingsAction = actionCollection()->addAction("transfer_settings");
transferSettingsAction->setText(i18n("&Transfer Settings"));
- transferSettingsAction->setIcon(KIcon("preferences-system"));
+ transferSettingsAction->setIcon(QIcon::fromTheme("preferences-system"));
transferSettingsAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_T));
connect(transferSettingsAction, SIGNAL(triggered()), SLOT(slotTransferSettings()));
QAction *listLinksAction = actionCollection()->addAction("import_links");
listLinksAction->setText(i18n("Import &Links..."));
- listLinksAction->setIcon(KIcon("view-list-text"));
+ listLinksAction->setIcon(QIcon::fromTheme("view-list-text"));
listLinksAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_L));
connect(listLinksAction, SIGNAL(triggered()), SLOT(slotShowListLinks()));
@@ -1197,8 +1197,8 @@ void MainWindow::dropEvent(QDropEvent * event)
if (list.count() == 1 && list.first().url().endsWith(QLatin1String(".kgt")))
{
int msgBoxResult = KMessageBox::questionYesNoCancel(this, i18n("The dropped file is a KGet Transfer List"), "KGet",
- KGuiItem(i18n("&Download"), KIcon("document-save")),
- KGuiItem(i18n("&Load transfer list"), KIcon("list-add")), KStandardGuiItem::cancel());
+ KGuiItem(i18n("&Download"), QIcon::fromTheme("document-save")),
+ KGuiItem(i18n("&Load transfer list"), QIcon::fromTheme("list-add")), KStandardGuiItem::cancel());
if (msgBoxResult == 3) //Download
NewTransferDialogHandler::showNewTransferDialog(list.first().url());
diff --git a/plasma/applet/common/kgetapplet.cpp b/plasma/applet/common/kgetapplet.cpp
index 9b0679f..67d6e48 100644
--- a/plasma/applet/common/kgetapplet.cpp
+++ b/plasma/applet/common/kgetapplet.cpp
@@ -37,7 +37,7 @@
#include <QDBusConnectionInterface>
#include <KUrl>
#include <KLocale>
-#include <KIcon>
+#include <QIcon>
const int ProxyWidget::MARGIN = 20;
const int ProxyWidget::TOP_MARGIN = 55;
@@ -80,7 +80,7 @@ void ProxyWidget::paint(QPainter * p, const QStyleOptionGraphicsItem * option, Q
QRect iconRect(QPoint(rect.x() + SPACING + 10, rect.y() + SPACING + 10), QSize(m_textHeight, m_textHeight));
- KIcon("kget").paint(p, iconRect);
+ QIcon::fromTheme("kget").paint(p, iconRect);
p->drawText(QRectF(rect.x() + SPACING * 2 + 10 + iconRect.width(), rect.y() + SPACING + 10,
m_textWidth, m_textHeight), i18n("KGet"));
p->drawLine(QPointF(rect.x() + SPACING + 10, rect.y() + SPACING * 2 + 10 + m_textHeight),
diff --git a/plasma/applet/common/kgetappletutils.cpp b/plasma/applet/common/kgetappletutils.cpp
index 4c8d17c..cfb719d 100644
--- a/plasma/applet/common/kgetappletutils.cpp
+++ b/plasma/applet/common/kgetappletutils.cpp
@@ -37,9 +37,9 @@
#include <QPushButton>
#include <QTimer>
-#include <KIcon>
+#include <QIcon>
#include <KLocale>
-#include <KPushButton>
+#include <QPushButton>
const int KGetAppletUtils::SPACING = 4;
@@ -57,8 +57,8 @@ void KGetAppletUtils::paintTitle(QPainter *p, Plasma::Svg *svg, const QRect &rec
p->setPen(Plasma::Theme::defaultTheme()->color(Plasma::Theme::TextColor));
QRect iconRect(QPoint(rect.x() + SPACING + 10, rect.y() + SPACING + 10), QSize(metrics.height(), metrics.height()));
- KIcon("kget").paint(p, iconRect);
- //p->drawPixmap(QPointF(rect.x() + SPACING + 10, rect.y() + SPACING + 10), KIcon("kget").pixmap(iconRect.width(), iconRect.height()), iconRect);
+ QIcon::fromTheme("kget").paint(p, iconRect);
+ //p->drawPixmap(QPointF(rect.x() + SPACING + 10, rect.y() + SPACING + 10), QIcon::fromTheme("kget").pixmap(iconRect.width(), iconRect.height()), iconRect);
//svg->paint(p, QRect(rect.x() + SPACING + 10,
// rect.y() + SPACING + 10, 111, 35), "title");
//p->setPen(Qt::black);
@@ -91,11 +91,11 @@ ErrorWidget::ErrorWidget(const QString &message, QGraphicsWidget *parent)
m_errorLabel->setText(message);
m_errorLabel->nativeWidget()->setAlignment(Qt::AlignCenter);
- m_icon = new Plasma::IconWidget(KIcon("dialog-warning"),"", this);
+ m_icon = new Plasma::IconWidget(QIcon::fromTheme("dialog-warning"),"", this);
m_launchButton = new Plasma::PushButton(this);
m_launchButton->setText(i18n("Launch KGet"));
- m_launchButton->nativeWidget()->setIcon(KIcon("kget"));
+ m_launchButton->nativeWidget()->setIcon(QIcon::fromTheme("kget"));
m_layout->addItem(m_errorLabel);
m_layout->addItem(m_icon);
diff --git a/plasma/applet/panelbar/kgetpanelbar.cpp b/plasma/applet/panelbar/kgetpanelbar.cpp
index 9de1ec3..5c3626b 100644
--- a/plasma/applet/panelbar/kgetpanelbar.cpp
+++ b/plasma/applet/panelbar/kgetpanelbar.cpp
@@ -30,7 +30,7 @@
#include <QProgressBar>
#include <KDebug>
-#include <KIcon>
+#include <QIcon>
#include <KIconLoader>
#include <KLocale>
#include <KTitleWidget>
@@ -60,7 +60,7 @@ KGetPanelBar::Private::Private(QWidget *parent) : Plasma::Dialog(parent),
KTitleWidget *title = new KTitleWidget(this);
title->setText(i18n("KGet transfers"));
- title->setPixmap(KIcon("kget").pixmap(22, 22), KTitleWidget::ImageRight);
+ title->setPixmap(QIcon::fromTheme("kget").pixmap(22, 22), KTitleWidget::ImageRight);
m_dialogLayout->addWidget(title, 0, 0, 1, 3);
}
@@ -171,7 +171,7 @@ void KGetPanelBar::init()
//KF5 port: remove this line and define TRANSLATION_DOMAIN in CMakeLists.txt instead
//KLocale::global()->insertCatalog("plasma_applet_kget");
- m_icon = new Plasma::IconWidget(KIcon("go-down"), QString(), this);
+ m_icon = new Plasma::IconWidget(QIcon::fromTheme("go-down"), QString(), this);
m_layout = new QGraphicsLinearLayout(Qt::Horizontal, this);
m_layout->addItem(m_icon);
diff --git a/plasma/applet/piechart/kgetpiechart.cpp b/plasma/applet/piechart/kgetpiechart.cpp
index b99aaa8..6d55a62 100644
--- a/plasma/applet/piechart/kgetpiechart.cpp
+++ b/plasma/applet/piechart/kgetpiechart.cpp
@@ -38,7 +38,7 @@
#include <QProgressBar>
#include <KDebug>
-#include <KIcon>
+#include <QIcon>
#include <KLocale>
#include <KGlobal>
diff --git a/plasma/runner/kgetrunner.cpp b/plasma/runner/kgetrunner.cpp
index 2171709..47abc8a 100644
--- a/plasma/runner/kgetrunner.cpp
+++ b/plasma/runner/kgetrunner.cpp
@@ -77,7 +77,7 @@ void KGetRunner::run(const Plasma::RunnerContext& /*context*/, const Plasma::Que
if(connection->lastError().type() != QDBusError::NoError) {
KNotification::event(KNotification::Error,
i18n("<p>KGet Runner could not communicate with KGet.</p><p style=\"font-size: small;\">Response from DBus:<br/>%1</p>", connection->lastError().message()),
- KIcon("dialog-warning").pixmap(KIconLoader::SizeSmall)/*, 0, KNotification::Persistant*/);
+ QIcon::fromTheme("dialog-warning").pixmap(KIconLoader::SizeSmall)/*, 0, KNotification::Persistant*/);
return;
}
@@ -105,7 +105,7 @@ void KGetRunner::callFinished(QDBusPendingCallWatcher* call)
// Send a notification about the error to the user.
KNotification::event(KNotification::Error,
i18n("<p>KGet Runner could not communicate with KGet.</p><p style=\"font-size: small;\">Response from DBus:<br/>%1</p>", reply.error().message()),
- KIcon("dialog-warning").pixmap(KIconLoader::SizeSmall)/*, 0, KNotification::Persistant*/);
+ QIcon::fromTheme("dialog-warning").pixmap(KIconLoader::SizeSmall)/*, 0, KNotification::Persistant*/);
}
}
diff --git a/plasma/runner/kgetrunner.h b/plasma/runner/kgetrunner.h
index b407a4a..29b696f 100644
--- a/plasma/runner/kgetrunner.h
+++ b/plasma/runner/kgetrunner.h
@@ -17,7 +17,7 @@
#include "kget_interface.h"
#include <Plasma/AbstractRunner>
-#include <KIcon>
+#include <QIcon>
class QDBusConnectionInterface;
class QDBusPendingCallWatcher;
diff --git a/transfer-plugins/bittorrent/advanceddetails/btadvanceddetailswidget.cpp b/transfer-plugins/bittorrent/advanceddetails/btadvanceddetailswidget.cpp
index ce0a649..7584d5c 100644
--- a/transfer-plugins/bittorrent/advanceddetails/btadvanceddetailswidget.cpp
+++ b/transfer-plugins/bittorrent/advanceddetails/btadvanceddetailswidget.cpp
@@ -53,25 +53,25 @@ void BTAdvancedDetailsWidget::init()
QGridLayout *layout = new QGridLayout();
KTitleWidget *titleWidget = new KTitleWidget(this);
titleWidget->setText(i18n("Advanced Details for %1", m_transfer->source().fileName()));
- titleWidget->setPixmap(KIcon("dialog-information"));
+ titleWidget->setPixmap(QIcon::fromTheme("dialog-information"));
layout->addWidget(titleWidget);
tabWidget = new KTabWidget(this);
layout->addWidget(tabWidget);
setLayout(layout);
file_view = new FileView(this);
file_view->changeTC(tc, KSharedConfig::openConfig());
- tabWidget->insertTab(0, file_view, KIcon("inode-directory"), i18n("Files"));
+ tabWidget->insertTab(0, file_view, QIcon::fromTheme("inode-directory"), i18n("Files"));
//peer_view = new PeerView(this);
- //tabWidget->insertTab(1, peer_view, KIcon("system-users"), i18n("Peers"));
+ //tabWidget->insertTab(1, peer_view, QIcon::fromTheme("system-users"), i18n("Peers"));
//cd_view = new ChunkDownloadView(this);
//cd_view->changeTC(tc);
- //tabWidget->insertTab(2, cd_view, KIcon("preferences-plugin"), i18n("Chunks"));
+ //tabWidget->insertTab(2, cd_view, QIcon::fromTheme("preferences-plugin"), i18n("Chunks"));
tracker_view = new TrackerView(this);
tracker_view->changeTC(tc);
- tabWidget->insertTab(1, tracker_view, KIcon("network-server"), i18n("Trackers"));
+ tabWidget->insertTab(1, tracker_view, QIcon::fromTheme("network-server"), i18n("Trackers"));
webseeds_tab = new WebSeedsTab(this);
webseeds_tab->changeTC(tc);
- tabWidget->insertTab(2, webseeds_tab, KIcon("network-server"), i18n("Webseeds"));
+ tabWidget->insertTab(2, webseeds_tab, QIcon::fromTheme("network-server"), i18n("Webseeds"));
monitor = new Monitor(tc, 0, 0, file_view);
}
diff --git a/transfer-plugins/bittorrent/advanceddetails/fileview.cpp b/transfer-plugins/bittorrent/advanceddetails/fileview.cpp
index 07d7aed..41d9a74 100644
--- a/transfer-plugins/bittorrent/advanceddetails/fileview.cpp
+++ b/transfer-plugins/bittorrent/advanceddetails/fileview.cpp
@@ -63,7 +63,7 @@ namespace kt
setModel(proxy_model);
context_menu = new QMenu(this);
- open_action = context_menu->addAction(KIcon("document-open"),i18nc("Open file", "Open"),this,SLOT(open()));
+ open_action = context_menu->addAction(QIcon::fromTheme("document-open"),i18nc("Open file", "Open"),this,SLOT(open()));
context_menu->addSeparator();
download_first_action = context_menu->addAction(i18n("Download first"),this,SLOT(downloadFirst()));
download_normal_action = context_menu->addAction(i18n("Download normally"),this,SLOT(downloadNormal()));
diff --git a/transfer-plugins/bittorrent/advanceddetails/peerview.cpp b/transfer-plugins/bittorrent/advanceddetails/peerview.cpp
index 31457b7..be001a3 100644
--- a/transfer-plugins/bittorrent/advanceddetails/peerview.cpp
+++ b/transfer-plugins/bittorrent/advanceddetails/peerview.cpp
@@ -22,7 +22,7 @@
#include <QHeaderView>
#include <klocale.h>
-#include <kicon.h>
+#include <QIcon>
#include <QMenu>
#include <kstandarddirs.h>
#include <kconfiggroup.h>
@@ -49,8 +49,8 @@ namespace kt
setModel(model);
context_menu = new QMenu(this);
- context_menu->addAction(KIcon("list-remove-user"),i18n("Kick Peer"),this,SLOT(kickPeer()));
- context_menu->addAction(KIcon("view-filter"),i18n("Ban Peer"),this,SLOT(banPeer()));
+ context_menu->addAction(QIcon::fromTheme("list-remove-user"),i18n("Kick Peer"),this,SLOT(kickPeer()));
+ context_menu->addAction(QIcon::fromTheme("view-filter"),i18n("Ban Peer"),this,SLOT(banPeer()));
connect(this,SIGNAL(customContextMenuRequested(QPoint)),
this,SLOT(showContextMenu(QPoint)));
}
diff --git a/transfer-plugins/bittorrent/advanceddetails/peerviewmodel.cpp b/transfer-plugins/bittorrent/advanceddetails/peerviewmodel.cpp
index 6364b26..f5e11c7 100644
--- a/transfer-plugins/bittorrent/advanceddetails/peerviewmodel.cpp
+++ b/transfer-plugins/bittorrent/advanceddetails/peerviewmodel.cpp
@@ -20,7 +20,7 @@
***************************************************************************/
#include "peerviewmodel.h"
#include <klocale.h>
-#include <kicon.h>
+#include <QIcon>
#include <kstandarddirs.h>
#include <interfaces/torrentinterface.h>
#include <util/functions.h>
@@ -38,8 +38,8 @@ namespace kt
stats = peer->getStats();
if (!icons_loaded)
{
- yes = KIcon("dialog-ok");
- no = KIcon("dialog-cancel");
+ yes = QIcon::fromTheme("dialog-ok");
+ no = QIcon::fromTheme("dialog-cancel");
}
}
/*
@@ -196,11 +196,11 @@ namespace kt
{
case 0:
if (stats.encrypted)
- return KIcon("kt-encrypted");
+ return QIcon::fromTheme("kt-encrypted");
break;
case 1: return flag;
case 8: return stats.dht_support ? yes : no;
- case 10: return stats.has_upload_slot ? yes : KIcon();
+ case 10: return stats.has_upload_slot ? yes : QIcon::fromTheme();
}
return QVariant();
diff --git a/transfer-plugins/bittorrent/advanceddetails/peerviewmodel.h b/transfer-plugins/bittorrent/advanceddetails/peerviewmodel.h
index 442871d..763be1d 100644
--- a/transfer-plugins/bittorrent/advanceddetails/peerviewmodel.h
+++ b/transfer-plugins/bittorrent/advanceddetails/peerviewmodel.h
@@ -21,7 +21,7 @@
#ifndef KTPEERVIEWMODEL_H
#define KTPEERVIEWMODEL_H
-#include <kicon.h>
+#include <QIcon>
#include <QList>
#include <QAbstractTableModel>
#include <interfaces/peerinterface.h>
diff --git a/transfer-plugins/bittorrent/advanceddetails/torrentfilelistmodel.cpp b/transfer-plugins/bittorrent/advanceddetails/torrentfilelistmodel.cpp
index 7d817e5..368548a 100644
--- a/transfer-plugins/bittorrent/advanceddetails/torrentfilelistmodel.cpp
+++ b/transfer-plugins/bittorrent/advanceddetails/torrentfilelistmodel.cpp
@@ -21,7 +21,7 @@
#include "torrentfilelistmodel.h"
#include <klocale.h>
-#include <kicon.h>
+#include <QIcon>
#include <kmimetype.h>
#include <QTreeView>
#include <interfaces/torrentinterface.h>
@@ -124,9 +124,9 @@ namespace kt
{
// if this is an empty folder then we are in the single file case
if (multi)
- return KIcon(KMimeType::findByPath(tc->getTorrentFile(r).getPath())->iconName());
+ return QIcon::fromTheme(KMimeType::findByPath(tc->getTorrentFile(r).getPath())->iconName());
else
- return KIcon(KMimeType::findByPath(s.torrent_name)->iconName());
+ return QIcon::fromTheme(KMimeType::findByPath(s.torrent_name)->iconName());
}
else if (role == Qt::CheckStateRole && index.column() == 0)
{
diff --git a/transfer-plugins/bittorrent/advanceddetails/torrentfiletreemodel.cpp b/transfer-plugins/bittorrent/advanceddetails/torrentfiletreemodel.cpp
index 387c4fa..fe8ea5d 100644
--- a/transfer-plugins/bittorrent/advanceddetails/torrentfiletreemodel.cpp
+++ b/transfer-plugins/bittorrent/advanceddetails/torrentfiletreemodel.cpp
@@ -21,7 +21,7 @@
#include "torrentfiletreemodel.h"
#include <klocale.h>
-#include <kicon.h>
+#include <QIcon>
#include <kmimetype.h>
#include <QTreeView>
#include <QSortFilterProxyModel>
@@ -420,9 +420,9 @@ namespace kt
// if this is an empty folder then we are in the single file case
if (!n->file)
return n->children.count() > 0 ?
- KIcon("folder") : KIcon(KMimeType::findByPath(tc->getStats().torrent_name)->iconName());
+ QIcon::fromTheme("folder") : QIcon::fromTheme(KMimeType::findByPath(tc->getStats().torrent_name)->iconName());
else
- return KIcon(KMimeType::findByPath(n->file->getPath())->iconName());
+ return QIcon::fromTheme(KMimeType::findByPath(n->file->getPath())->iconName());
}
else if (role == Qt::CheckStateRole && index.column() == 0)
{
diff --git a/transfer-plugins/bittorrent/advanceddetails/trackerview.cpp b/transfer-plugins/bittorrent/advanceddetails/trackerview.cpp
index 3e794ea..73449df 100644
--- a/transfer-plugins/bittorrent/advanceddetails/trackerview.cpp
+++ b/transfer-plugins/bittorrent/advanceddetails/trackerview.cpp
@@ -62,10 +62,10 @@ namespace kt
this,SLOT(currentChanged(QModelIndex,QModelIndex)));
connect(m_scrape,SIGNAL(clicked()),this,SLOT(scrapeClicked()));
- m_add_tracker->setIcon(KIcon("list-add"));
- m_remove_tracker->setIcon(KIcon("list-remove"));
- m_restore_defaults->setIcon(KIcon("kt-restore-defaults"));
- m_change_tracker->setIcon(KIcon("kt-change-tracker"));
+ m_add_tracker->setIcon(QIcon::fromTheme("list-add"));
+ m_remove_tracker->setIcon(QIcon::fromTheme("list-remove"));
+ m_restore_defaults->setIcon(QIcon::fromTheme("kt-restore-defaults"));
+ m_change_tracker->setIcon(QIcon::fromTheme("kt-change-tracker"));
setEnabled(false);
torrentChanged(0);
diff --git a/transfer-plugins/bittorrent/advanceddetails/trackerview.ui b/transfer-plugins/bittorrent/advanceddetails/trackerview.ui
index 6b581f9..d144f67 100644
--- a/transfer-plugins/bittorrent/advanceddetails/trackerview.ui
+++ b/transfer-plugins/bittorrent/advanceddetails/trackerview.ui
@@ -16,21 +16,21 @@
<item>
<layout class="QVBoxLayout" >
<item>
- <widget class="KPushButton" name="m_add_tracker" >
+ <widget class="QPushButton" name="m_add_tracker" >
<property name="text" >
<string>Add Tracker</string>
</property>
</widget>
</item>
<item>
- <widget class="KPushButton" name="m_remove_tracker" >
+ <widget class="QPushButton" name="m_remove_tracker" >
<property name="text" >
<string>Remove Tracker</string>
</property>
</widget>
</item>
<item>
- <widget class="KPushButton" name="m_change_tracker" >
+ <widget class="QPushButton" name="m_change_tracker" >
<property name="text" >
<string>Change Tracker</string>
</property>
@@ -57,7 +57,7 @@
</spacer>
</item>
<item>
- <widget class="KPushButton" name="m_restore_defaults" >
+ <widget class="QPushButton" name="m_restore_defaults" >
<property name="text" >
<string>Restore Defaults</string>
</property>
@@ -68,11 +68,6 @@
</layout>
</widget>
<customwidgets>
- <customwidget>
- <class>KPushButton</class>
- <extends>QPushButton</extends>
- <header>kpushbutton.h</header>
- </customwidget>
</customwidgets>
<resources/>
<connections/>
diff --git a/transfer-plugins/bittorrent/advanceddetails/webseedstab.cpp b/transfer-plugins/bittorrent/advanceddetails/webseedstab.cpp
index fcee4c2..d87e07f 100644
--- a/transfer-plugins/bittorrent/advanceddetails/webseedstab.cpp
+++ b/transfer-plugins/bittorrent/advanceddetails/webseedstab.cpp
@@ -36,8 +36,8 @@ namespace kt
setupUi(this);
connect(m_add,SIGNAL(clicked()),this,SLOT(addWebSeed()));
connect(m_remove,SIGNAL(clicked()),this,SLOT(removeWebSeed()));
- m_add->setIcon(KIcon("list-add"));
- m_remove->setIcon(KIcon("list-remove"));
+ m_add->setIcon(QIcon::fromTheme("list-add"));
+ m_remove->setIcon(QIcon::fromTheme("list-remove"));
m_add->setEnabled(false);
m_remove->setEnabled(false);
m_webseed_list->setEnabled(false);
diff --git a/transfer-plugins/bittorrent/bttransferfactory.cpp b/transfer-plugins/bittorrent/bttransferfactory.cpp
index 3095c40..52b27ab 100644
--- a/transfer-plugins/bittorrent/bttransferfactory.cpp
+++ b/transfer-plugins/bittorrent/bttransferfactory.cpp
@@ -81,13 +81,13 @@ const QList<QAction *> BTTransferFactory::actions(TransferHandler *handler)
QList<QAction *> actions;
if (bttransfer && bttransfer->torrentControl())
{
- QAction *openAdvancedDetailsAction = new QAction(KIcon("document-open"), i18n("&Advanced Details"), this);
+ QAction *openAdvancedDetailsAction = new QAction(QIcon::fromTheme("document-open"), i18n("&Advanced Details"), this);
connect(openAdvancedDetailsAction, SIGNAL(triggered()), bttransfer, SLOT(createAdvancedDetails()));
actions.append(openAdvancedDetailsAction);
- QAction *openScanDlg = new QAction(KIcon("document-open"), i18n("&Scan Files"), this);
+ QAction *openScanDlg = new QAction(QIcon::fromTheme("document-open"), i18n("&Scan Files"), this);
connect(openScanDlg, SIGNAL(triggered()), bttransfer, SLOT(createScanDlg()));
diff --git a/transfer-plugins/bittorrent/scandlg.h b/transfer-plugins/bittorrent/scandlg.h
index bc3f0ac..3eac7f1 100644
--- a/transfer-plugins/bittorrent/scandlg.h
+++ b/transfer-plugins/bittorrent/scandlg.h
@@ -65,7 +65,7 @@ namespace kt
private:
bt::Job * m_job;
QProgressBar *m_progress;
- KPushButton *m_cancel;
+ QPushButton *m_cancel;
QLabel *m_torrent_label;
QLabel *m_chunks_failed;
QLabel *m_chunks_found;
@@ -121,7 +121,7 @@ namespace kt
int qm_priority;
bool scanning;
QProgressBar *m_progress;
- KPushButton *m_cancel;
+ QPushButton *m_cancel;
QLabel *m_torrent_label;
QLabel *m_chunks_failed;
QLabel *m_chunks_found;
diff --git a/transfer-plugins/bittorrent/scandlg.ui b/transfer-plugins/bittorrent/scandlg.ui
index 0205dc5..55c36b2 100644
--- a/transfer-plugins/bittorrent/scandlg.ui
+++ b/transfer-plugins/bittorrent/scandlg.ui
@@ -178,7 +178,7 @@
</spacer>
</item>
<item>
- <widget class="KPushButton" name="cancel" >
+ <widget class="QPushButton" name="cancel" >
<property name="text" >
<string>Cancel</string>
</property>
@@ -189,11 +189,6 @@
</layout>
</widget>
<customwidgets>
- <customwidget>
- <class>KPushButton</class>
- <extends>QPushButton</extends>
- <header>kpushbutton.h</header>
- </customwidget>
</customwidgets>
<resources/>
<connections/>
diff --git a/transfer-plugins/checksumsearch/checksumsearch.ui b/transfer-plugins/checksumsearch/checksumsearch.ui
index 5b8083b..ad8410f 100644
--- a/transfer-plugins/checksumsearch/checksumsearch.ui
+++ b/transfer-plugins/checksumsearch/checksumsearch.ui
@@ -31,10 +31,10 @@
</widget>
</item>
<item row="0" column="1">
- <widget class="KPushButton" name="add"/>
+ <widget class="QPushButton" name="add"/>
</item>
<item row="1" column="1">
- <widget class="KPushButton" name="remove"/>
+ <widget class="QPushButton" name="remove"/>
</item>
<item row="2" column="1">
<spacer name="verticalSpacer">
@@ -52,11 +52,6 @@
</layout>
</widget>
<customwidgets>
- <customwidget>
- <class>KPushButton</class>
- <extends>QPushButton</extends>
- <header>kpushbutton.h</header>
- </customwidget>
</customwidgets>
<resources/>
<connections/>
diff --git a/transfer-plugins/contentfetch/dlgcontentfetchsettingwidget.cpp b/transfer-plugins/contentfetch/dlgcontentfetchsettingwidget.cpp
index c588e4a..c2e63e2 100644
--- a/transfer-plugins/contentfetch/dlgcontentfetchsettingwidget.cpp
+++ b/transfer-plugins/contentfetch/dlgcontentfetchsettingwidget.cpp
@@ -25,8 +25,8 @@ DlgContentFetchSettingWidget::DlgContentFetchSettingWidget(QWidget * parent = 0,
m_p_action(0)
{
ui.setupUi(this);
- ui.newScriptButton->setIcon(KIcon("list-add"));
- ui.removeScriptButton->setIcon(KIcon("list-remove"));
+ ui.newScriptButton->setIcon(QIcon::fromTheme("list-add"));
+ ui.removeScriptButton->setIcon(QIcon::fromTheme("list-remove"));
loadContentFetchSetting();
diff --git a/ui/contextmenu.cpp b/ui/contextmenu.cpp
index 7b57b65..dc3a468 100644
--- a/ui/contextmenu.cpp
+++ b/ui/contextmenu.cpp
@@ -73,7 +73,7 @@ QMenu * ContextMenu::createTransferContextMenu(QList<TransferHandler*> transfers
}
QMenu *nepomukMenu = new QMenu(i18n("Semantic Desktop"), parent);
- nepomukMenu->setIcon(KIcon("nepomuk"));
+ nepomukMenu->setIcon(QIcon::fromTheme("nepomuk"));
QWidgetAction *nepomukWidgetAction = new QWidgetAction(parent);
Nepomuk2::FileMetaDataWidget *nepomukWidget = new Nepomuk2::FileMetaDataWidget(parent);
nepomukWidget->setItems(items);
diff --git a/ui/history/rangetreewidget.cpp b/ui/history/rangetreewidget.cpp
index 89a1cd9..18c1d28 100644
--- a/ui/history/rangetreewidget.cpp
+++ b/ui/history/rangetreewidget.cpp
@@ -11,7 +11,7 @@
#include "rangetreewidget.h"
#include "settings.h"
-#include <KIcon>
+#include <QIcon>
#include <KDebug>
#include <QApplication>
diff --git a/ui/history/transferhistory.cpp b/ui/history/transferhistory.cpp
index 59bde73..93c887b 100644
--- a/ui/history/transferhistory.cpp
+++ b/ui/history/transferhistory.cpp
@@ -36,8 +36,8 @@
#include <KRun>
#include <KGlobalSettings>
#include <kio/global.h>
-#include <KPushButton>
-#include <KIcon>
+#include <QPushButton>
+#include <QIcon>
#include <KLocale>
#include <QFontDatabase>
@@ -62,8 +62,8 @@ TransferHistory::TransferHistory(QWidget *parent)
m_iconView = widget.bt_iconview;
m_listView = widget.bt_listview;
- m_listView->setIcon(KIcon("view-list-details"));
- m_iconView->setIcon(KIcon("view-list-icons"));
+ m_listView->setIcon(QIcon::fromTheme("view-list-details"));
+ m_iconView->setIcon(QIcon::fromTheme("view-list-icons"));
connect(m_listView, SIGNAL(clicked()), SLOT(slotSetListMode()));
connect(m_iconView, SIGNAL(clicked()), SLOT(slotSetIconMode()));
@@ -76,12 +76,12 @@ TransferHistory::TransferHistory(QWidget *parent)
m_searchBar = widget.searchBar;
//m_searchBar->setTreeWidget(m_treeWidget);
m_clearButton = widget.clearButton;
- m_clearButton->setIcon(KIcon("edit-clear-history"));
+ m_clearButton->setIcon(QIcon::fromTheme("edit-clear-history"));
m_actionDelete_Selected = widget.actionDelete_Selected;
- m_actionDelete_Selected->setIcon(KIcon("edit-delete"));
+ m_actionDelete_Selected->setIcon(QIcon::fromTheme("edit-delete"));
m_actionDownload = widget.actionDownload;
- m_actionDownload->setIcon(KIcon("document-new"));
- m_openFile = new QAction(KIcon("document-open"), i18n("&Open File"), this);
+ m_actionDownload->setIcon(QIcon::fromTheme("document-new"));
+ m_openFile = new QAction(QIcon::fromTheme("document-open"), i18n("&Open File"), this);
setMainWidget(mainWidget);
m_verticalLayout->addWidget(m_view);
diff --git a/ui/history/transferhistory.h b/ui/history/transferhistory.h
index c1fade9..071303f 100644
--- a/ui/history/transferhistory.h
+++ b/ui/history/transferhistory.h
@@ -20,7 +20,7 @@ class QFileSystemWatcher;
class QModelIndex;
class QProgressBar;
class KLineEdit;
-class KPushButton;
+class QPushButton;
class TransferHistoryStore;
class TransferHistoryItem;
@@ -57,8 +57,8 @@ class TransferHistory : public KGetSaveSizeDialog, Ui::TransferHistory
QAction *m_actionDownload;
QAction *m_openFile;
QPushButton *m_clearButton;
- KPushButton *m_iconView;
- KPushButton *m_listView;
+ QPushButton *m_iconView;
+ QPushButton *m_listView;
bool m_iconModeEnabled;
TransferHistoryStore *m_store;
diff --git a/ui/history/transferhistory.ui b/ui/history/transferhistory.ui
index d64d1eb..329289a 100644
--- a/ui/history/transferhistory.ui
+++ b/ui/history/transferhistory.ui
@@ -49,7 +49,7 @@
</widget>
</item>
<item>
- <widget class="KPushButton" name="bt_iconview">
+ <widget class="QPushButton" name="bt_iconview">
<property name="checkable">
<bool>true</bool>
</property>
@@ -62,7 +62,7 @@
</widget>
</item>
<item>
- <widget class="KPushButton" name="bt_listview">
+ <widget class="QPushButton" name="bt_listview">
<property name="checkable">
<bool>true</bool>
</property>
@@ -137,11 +137,6 @@
<extends>QLineEdit</extends>
<header>klineedit.h</header>
</customwidget>
- <customwidget>
- <class>KPushButton</class>
- <extends>QPushButton</extends>
- <header>kpushbutton.h</header>
- </customwidget>
</customwidgets>
<resources/>
<connections/>
diff --git a/ui/history/transferhistoryitemdelegate.cpp b/ui/history/transferhistoryitemdelegate.cpp
index a48d5f8..f915880 100644
--- a/ui/history/transferhistoryitemdelegate.cpp
+++ b/ui/history/transferhistoryitemdelegate.cpp
@@ -27,7 +27,7 @@
#include <kio/netaccess.h>
#include <kio/global.h>
#include <KIconLoader>
-#include <KIcon>
+#include <QIcon>
#include <KLocale>
#include <KRun>
@@ -39,17 +39,17 @@ TransferHistoryItemDelegate::TransferHistoryItemDelegate(QWidget *parent) : QSty
// Actions
m_actionDownload = new QAction(this);
m_actionDownload->setText(i18n("Download again"));
- m_actionDownload->setIcon(KIcon("document-new"));
+ m_actionDownload->setIcon(QIcon::fromTheme("document-new"));
connect(m_actionDownload, &QAction::triggered, this, &TransferHistoryItemDelegate::slotDownload);
m_actionDelete_Selected = new QAction(this);
m_actionDelete_Selected->setText(i18nc("Delete selected history-item", "Delete selected"));
- m_actionDelete_Selected->setIcon(KIcon("edit-delete"));
+ m_actionDelete_Selected->setIcon(QIcon::fromTheme("edit-delete"));
connect(m_actionDelete_Selected, &QAction::triggered, this, &TransferHistoryItemDelegate::slotDeleteTransfer);
m_openFile = new QAction(this);
m_openFile->setText(i18n("Open file"));
- m_openFile->setIcon(KIcon("document-open"));
+ m_openFile->setIcon(QIcon::fromTheme("document-open"));
connect(m_openFile, &QAction::triggered, this, &TransferHistoryItemDelegate::slotOpenFile);
}
diff --git a/ui/linkview/importlinkdialog.ui b/ui/linkview/importlinkdialog.ui
index f59622a..438ed59 100644
--- a/ui/linkview/importlinkdialog.ui
+++ b/ui/linkview/importlinkdialog.ui
@@ -33,7 +33,7 @@
<widget class="KUrlRequester" name="urlRequester"/>
</item>
<item>
- <widget class="KPushButton" name="importLinks">
+ <widget class="QPushButton" name="importLinks">
<property name="enabled">
<bool>false</bool>
</property>
@@ -166,7 +166,7 @@
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
- <widget class="KPushButton" name="selectAll">
+ <widget class="QPushButton" name="selectAll">
<property name="enabled">
<bool>false</bool>
</property>
@@ -182,7 +182,7 @@
</widget>
</item>
<item>
- <widget class="KPushButton" name="deselectAll">
+ <widget class="QPushButton" name="deselectAll">
<property name="enabled">
<bool>false</bool>
</property>
@@ -198,7 +198,7 @@
</widget>
</item>
<item>
- <widget class="KPushButton" name="invertSelection">
+ <widget class="QPushButton" name="invertSelection">
<property name="enabled">
<bool>false</bool>
</property>
@@ -246,11 +246,6 @@
<header>kseparator.h</header>
</customwidget>
<customwidget>
- <class>KPushButton</class>
- <extends>QPushButton</extends>
- <header>kpushbutton.h</header>
- </customwidget>
- <customwidget>
<class>KUrlRequester</class>
<extends>QFrame</extends>
<header>kurlrequester.h</header>
diff --git a/ui/linkview/kget_linkview.cpp b/ui/linkview/kget_linkview.cpp
index 2de5fe1..e2b1fb0 100644
--- a/ui/linkview/kget_linkview.cpp
+++ b/ui/linkview/kget_linkview.cpp
@@ -24,7 +24,7 @@
#include <QAction>
#include <KActionCollection>
-#include <KIcon>
+#include <QIcon>
#include <KIconLoader>
#include <KLocale>
#include <KMessageBox>
@@ -63,12 +63,12 @@ KGetLinkView::KGetLinkView(QWidget *parent)
ui.filterMode->addItem(i18n("Does Not Contain"), KGetSortFilterProxyModel::DoesNotContain);
// set the Icons
- ui.importLinks->setIcon(KIcon("document-import"));
- ui.showCombo->addItem(KIcon("view-list-icons"), i18n("All"), KGetSortFilterProxyModel::NoFilter);
- ui.showCombo->addItem(KIcon("video-x-generic"), i18n("Videos"), KGetSortFilterProxyModel::VideoFiles);
- ui.showCombo->addItem(KIcon("image-x-generic"), i18n("Images"), KGetSortFilterProxyModel::ImageFiles);
- ui.showCombo->addItem(KIcon("audio-x-generic"), i18n("Audio"), KGetSortFilterProxyModel::AudioFiles);
- ui.showCombo->addItem(KIcon("package-x-generic"), i18n("Archives"), KGetSortFilterProxyModel::CompressedFiles );
+ ui.importLinks->setIcon(QIcon::fromTheme("document-import"));
+ ui.showCombo->addItem(QIcon::fromTheme("view-list-icons"), i18n("All"), KGetSortFilterProxyModel::NoFilter);
+ ui.showCombo->addItem(QIcon::fromTheme("video-x-generic"), i18n("Videos"), KGetSortFilterProxyModel::VideoFiles);
+ ui.showCombo->addItem(QIcon::fromTheme("image-x-generic"), i18n("Images"), KGetSortFilterProxyModel::ImageFiles);
+ ui.showCombo->addItem(QIcon::fromTheme("audio-x-generic"), i18n("Audio"), KGetSortFilterProxyModel::AudioFiles);
+ ui.showCombo->addItem(QIcon::fromTheme("package-x-generic"), i18n("Archives"), KGetSortFilterProxyModel::CompressedFiles );
ui.treeView->setModel(m_proxyModel);
ui.progressBar->hide();
@@ -122,7 +122,7 @@ KGetLinkView::KGetLinkView(QWidget *parent)
QDialogButtonBox::AcceptRole,
this,
SLOT(accept()));
- download->setIcon(KIcon("kget"));
+ download->setIcon(QIcon::fromTheme("kget"));
checkClipboard();
}
@@ -200,7 +200,7 @@ void KGetLinkView::showLinks(const QStringList &links, bool urlRequestVisible)
}
QStandardItem *item = new QStandardItem(file);
- item->setIcon(KIcon(mimeTypeIcon));
+ item->setIcon(QIcon::fromTheme(mimeTypeIcon));
item->setCheckable(true);
item->setCheckState(Qt::Checked);
item->setData(QVariant(url.fileName()), Qt::DisplayRole);
diff --git a/ui/metalinkcreator/filedlg.cpp b/ui/metalinkcreator/filedlg.cpp
index 24f8090..afc7867 100644
--- a/ui/metalinkcreator/filedlg.cpp
+++ b/ui/metalinkcreator/filedlg.cpp
@@ -27,6 +27,7 @@
#include "../../core/verificationdelegate.h"
#include <QSortFilterProxyModel>
+#include <KStandardGuiItem>
#include <KLocale>
@@ -92,8 +93,8 @@ FileDlg::FileDlg(KGetMetalink::File *file, const QStringList &currentFileNames,
for (it = m_file->verification.hashes.constBegin(); it != itEnd; ++it) {
m_verificationModel->addChecksum(it.key(), it.value());
}
- ui.add_hash->setGuiItem(KStandardGuiItem::add());
- ui.remove_hash->setGuiItem(KStandardGuiItem::remove());
+ KGuiItem::assign(ui.add_hash, KStandardGuiItem::add());
+ KGuiItem::assign(ui.remove_hash, KStandardGuiItem::remove());
m_verificationProxy = new QSortFilterProxyModel(this);
m_verificationProxy->setSourceModel(m_verificationModel);
ui.used_hashes->setSortingEnabled(true);
@@ -105,8 +106,8 @@ FileDlg::FileDlg(KGetMetalink::File *file, const QStringList &currentFileNames,
connect(m_verificationModel, &VerificationModel::dataChanged, this, &FileDlg::slotUpdateVerificationButtons);
connect(m_verificationModel, &VerificationModel::rowsRemoved, this, &FileDlg::slotUpdateVerificationButtons);
connect(ui.used_hashes, &QTreeView::clicked, this, &FileDlg::slotUpdateVerificationButtons);
- connect(ui.add_hash, &KPushButton::clicked, this, &FileDlg::slotAddHash);
- connect(ui.remove_hash, &KPushButton::clicked, this, &FileDlg::slotRemoveHash);
+ connect(ui.add_hash, &QPushButton::clicked, this, &FileDlg::slotAddHash);
+ connect(ui.remove_hash, &QPushButton::clicked, this, &FileDlg::slotRemoveHash);
connect(ui.name, &KLineEdit::textEdited, this, &FileDlg::slotUpdateOkButton);
connect(this, &FileDlg::okClicked, this, &FileDlg::slotOkClicked);
diff --git a/ui/metalinkcreator/filedlg.ui b/ui/metalinkcreator/filedlg.ui
index 9fb31c9..d171f2f 100644
--- a/ui/metalinkcreator/filedlg.ui
+++ b/ui/metalinkcreator/filedlg.ui
@@ -172,10 +172,10 @@
<item row="3" column="2">
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
- <widget class="KPushButton" name="add_hash"/>
+ <widget class="QPushButton" name="add_hash"/>
</item>
<item>
- <widget class="KPushButton" name="remove_hash"/>
+ <widget class="QPushButton" name="remove_hash"/>
</item>
<item>
<spacer name="verticalSpacer_2">
@@ -223,11 +223,6 @@
</widget>
<customwidgets>
<customwidget>
- <class>KPushButton</class>
- <extends>QPushButton</extends>
- <header>kpushbutton.h</header>
- </customwidget>
- <customwidget>
<class>KLineEdit</class>
<extends>QLineEdit</extends>
<header>klineedit.h</header>
diff --git a/ui/metalinkcreator/files.ui b/ui/metalinkcreator/files.ui
index 668cd71..fdcf2ac 100644
--- a/ui/metalinkcreator/files.ui
+++ b/ui/metalinkcreator/files.ui
@@ -21,7 +21,7 @@
<item row="2" column="1">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
- <widget class="KPushButton" name="add_local_file">
+ <widget class="QPushButton" name="add_local_file">
<property name="toolTip">
<string>Adds local files adding a lot information automatically.</string>
</property>
@@ -31,13 +31,13 @@
</widget>
</item>
<item>
- <widget class="KPushButton" name="add_file"/>
+ <widget class="QPushButton" name="add_file"/>
</item>
<item>
- <widget class="KPushButton" name="properties_file"/>
+ <widget class="QPushButton" name="properties_file"/>
</item>
<item>
- <widget class="KPushButton" name="remove_file"/>
+ <widget class="QPushButton" name="remove_file"/>
</item>
<item>
<spacer name="verticalSpacer">
@@ -84,11 +84,6 @@
</widget>
<customwidgets>
<customwidget>
- <class>KPushButton</class>
- <extends>QPushButton</extends>
- <header>kpushbutton.h</header>
- </customwidget>
- <customwidget>
<class>KMessageWidget</class>
<extends>QWidget</extends>
<header location="global">KMessageWidget</header>
diff --git a/ui/metalinkcreator/localemodels.cpp b/ui/metalinkcreator/localemodels.cpp
index 8e56cb3..54a9696 100644
--- a/ui/metalinkcreator/localemodels.cpp
+++ b/ui/metalinkcreator/localemodels.cpp
@@ -74,11 +74,11 @@ void CountryModel::setupModelData(const QStringList &countryCodes)
QString path = KStandardDirs::locate("locale", QString::fromLatin1("l10n/%1/flag.png").arg(countryCode));
if (path.isEmpty())
{
- m_countryIcons.append(KIcon());
+ m_countryIcons.append(QIcon());
}
else
{
- m_countryIcons.append(KIcon(path));
+ m_countryIcons.append(QIcon::fromTheme(path));
}
}
}
diff --git a/ui/metalinkcreator/localemodels.h b/ui/metalinkcreator/localemodels.h
index df8fbc3..d8fac0b 100644
--- a/ui/metalinkcreator/localemodels.h
+++ b/ui/metalinkcreator/localemodels.h
@@ -22,7 +22,7 @@
#include <QAbstractListModel>
-#include <KIcon>
+#include <QIcon>
/**
* The following models are there to store the localized names and the codes of languages and countries
diff --git a/ui/metalinkcreator/metalinkcreator.cpp b/ui/metalinkcreator/metalinkcreator.cpp
index 9743cf3..7fb5c7c 100644
--- a/ui/metalinkcreator/metalinkcreator.cpp
+++ b/ui/metalinkcreator/metalinkcreator.cpp
@@ -33,7 +33,7 @@
#include <KFileDialog>
#include <KLocale>
#include <KMessageBox>
-#include <KPushButton>
+#include <QPushButton>
#include <KStandardDirs>
//TODO for 4.4 look at the changes of the newest Draft --> what elements have to be added/removed
@@ -224,11 +224,11 @@ void MetalinkCreator::createFiles()
uiFiles.infoWidget->setCloseButtonVisible(false);
uiFiles.infoWidget->setMessageType(KMessageWidget::Information);
- uiFiles.add_local_file->setIcon(KIcon("list-add"));
- uiFiles.add_file->setGuiItem(KStandardGuiItem::add());
- uiFiles.properties_file->setGuiItem(KStandardGuiItem::properties());
+ uiFiles.add_local_file->setIcon(QIcon::fromTheme("list-add"));
+ KGuiItem::assign(uiFiles.add_file, KStandardGuiItem::add());
+ KGuiItem::assign(uiFiles.properties_file, KStandardGuiItem::properties());
uiFiles.properties_file->setEnabled(false);
- uiFiles.remove_file->setGuiItem(KStandardGuiItem::remove());
+ KGuiItem::assign(uiFiles.remove_file, KStandardGuiItem::remove());
uiFiles.remove_file->setEnabled(false);
uiFiles.dragDrop->hide();
@@ -250,7 +250,7 @@ void MetalinkCreator::loadFiles()
if (!file.resources.isValid())
{
++m_needUrlCount;
- item->setIcon(KIcon("edit-delete"));
+ item->setIcon(QIcon::fromTheme("edit-delete"));
}
m_filesModel->insertRow(m_filesModel->rowCount(), item);
}
@@ -291,7 +291,7 @@ void MetalinkCreator::slotAddFile(const KGetMetalink::File &file)
if (!file.resources.isValid())
{
++m_needUrlCount;
- item->setIcon(KIcon("edit-delete"));
+ item->setIcon(QIcon::fromTheme("edit-delete"));
}
m_filesModel->insertRow(m_filesModel->rowCount(), item);
metalink.files.files.append(file);
@@ -311,7 +311,7 @@ void MetalinkCreator::slotFileEdited(const QString &oldFileName, const QString &
if (!item->icon().isNull())
{
--m_needUrlCount;
- item->setIcon(KIcon());
+ item->setIcon(QIcon());
}
slotUpdateAssistantButtons(0, m_files);
diff --git a/ui/metalinkcreator/urlwidget.cpp b/ui/metalinkcreator/urlwidget.cpp
index 8d66573..d429567 100644
--- a/ui/metalinkcreator/urlwidget.cpp
+++ b/ui/metalinkcreator/urlwidget.cpp
@@ -21,7 +21,8 @@
#include "metalinker.h"
#include "../mirror/mirrormodel.h"
#include "../mirror/mirrorsettings.h"
-
+#include <KGuiItem>
+#include <KStandardGuiItem>
#include <QSortFilterProxyModel>
UrlWidget::UrlWidget(QObject *parent)
@@ -42,12 +43,12 @@ UrlWidget::UrlWidget(QObject *parent)
ui.used_mirrors->hideColumn(MirrorItem::Used);
ui.used_mirrors->hideColumn(MirrorItem::Connections);
- ui.add_mirror->setGuiItem(KStandardGuiItem::add());
- ui.remove_mirror->setGuiItem(KStandardGuiItem::remove());
+ KGuiItem::assign(ui.add_mirror, KStandardGuiItem::add());
+ KGuiItem::assign(ui.remove_mirror, KStandardGuiItem::remove());
ui.remove_mirror->setEnabled(false);
connect(ui.used_mirrors->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)), this, SLOT(slotUrlClicked()));
- connect(ui.add_mirror, &KPushButton::clicked, this, &UrlWidget::slotAddMirror);
- connect(ui.remove_mirror, &KPushButton::clicked, this, &UrlWidget::slotRemoveMirror);
+ connect(ui.add_mirror, &QPushButton::clicked, this, &UrlWidget::slotAddMirror);
+ connect(ui.remove_mirror, &QPushButton::clicked, this, &UrlWidget::slotRemoveMirror);
connect(m_mirrorModel, &MirrorModel::dataChanged, this, &UrlWidget::urlsChanged);
connect(m_mirrorModel, &MirrorModel::rowsInserted, this, &UrlWidget::urlsChanged);
connect(m_mirrorModel, &MirrorModel::rowsRemoved, this, &UrlWidget::urlsChanged);
diff --git a/ui/metalinkcreator/urlwidget.ui b/ui/metalinkcreator/urlwidget.ui
index d6d1e74..dac365d 100644
--- a/ui/metalinkcreator/urlwidget.ui
+++ b/ui/metalinkcreator/urlwidget.ui
@@ -34,10 +34,10 @@
</widget>
</item>
<item row="0" column="1">
- <widget class="KPushButton" name="add_mirror"/>
+ <widget class="QPushButton" name="add_mirror"/>
</item>
<item row="1" column="1">
- <widget class="KPushButton" name="remove_mirror"/>
+ <widget class="QPushButton" name="remove_mirror"/>
</item>
<item row="2" column="1">
<spacer name="verticalSpacer">
@@ -55,11 +55,6 @@
</layout>
</widget>
<customwidgets>
- <customwidget>
- <class>KPushButton</class>
- <extends>QPushButton</extends>
- <header>kpushbutton.h</header>
- </customwidget>
</customwidgets>
<resources/>
<connections/>
diff --git a/ui/mirror/mirrorsettings.cpp b/ui/mirror/mirrorsettings.cpp
index f3926b3..a897e07 100644
--- a/ui/mirror/mirrorsettings.cpp
+++ b/ui/mirror/mirrorsettings.cpp
@@ -24,6 +24,7 @@
#include <QSortFilterProxyModel>
#include <KLocale>
+#include <KStandardGuiItem>
MirrorAddDlg::MirrorAddDlg(MirrorModel *model, QWidget *parent, Qt::WFlags flags)
: KDialog(parent, flags),
@@ -132,8 +133,8 @@ MirrorSettings::MirrorSettings(QWidget *parent, TransferHandler *handler, const
QWidget *widget = new QWidget(this);
ui.setupUi(widget);
- ui.add->setGuiItem(KStandardGuiItem::add());
- ui.remove->setGuiItem(KStandardGuiItem::remove());
+ KGuiItem::assign(ui.add, KStandardGuiItem::add());
+ KGuiItem::assign(ui.remove, KStandardGuiItem::remove());
ui.treeView->setModel(m_proxy);
ui.treeView->header()->setResizeMode(QHeaderView::ResizeToContents);
ui.treeView->hideColumn(MirrorItem::Priority);
@@ -143,8 +144,8 @@ MirrorSettings::MirrorSettings(QWidget *parent, TransferHandler *handler, const
updateButton();
connect(ui.treeView->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)), this, SLOT(updateButton()));
- connect(ui.add, &KPushButton::clicked, this, &MirrorSettings::addClicked);
- connect(ui.remove, &KPushButton::clicked, this, &MirrorSettings::removeMirror);
+ connect(ui.add, &QPushButton::clicked, this, &MirrorSettings::addClicked);
+ connect(ui.remove, &QPushButton::clicked, this, &MirrorSettings::removeMirror);
connect(this, &MirrorSettings::finished, this, &MirrorSettings::save);
setMainWidget(widget);
diff --git a/ui/mirror/mirrorsettings.ui b/ui/mirror/mirrorsettings.ui
index 9481571..2187e0c 100644
--- a/ui/mirror/mirrorsettings.ui
+++ b/ui/mirror/mirrorsettings.ui
@@ -28,10 +28,10 @@
</widget>
</item>
<item row="0" column="1">
- <widget class="KPushButton" name="add"/>
+ <widget class="QPushButton" name="add"/>
</item>
<item row="1" column="1">
- <widget class="KPushButton" name="remove"/>
+ <widget class="QPushButton" name="remove"/>
</item>
<item row="2" column="1">
<spacer name="verticalSpacer">
@@ -49,11 +49,6 @@
</layout>
</widget>
<customwidgets>
- <customwidget>
- <class>KPushButton</class>
- <extends>QPushButton</extends>
- <header>kpushbutton.h</header>
- </customwidget>
</customwidgets>
<resources/>
<connections/>
diff --git a/ui/signaturedlg.cpp b/ui/signaturedlg.cpp
index df419a5..ae02024 100644
--- a/ui/signaturedlg.cpp
+++ b/ui/signaturedlg.cpp
@@ -197,7 +197,7 @@ void SignatureDlg::updateData()
ui.expirationIcon->clear();
if (key.isExpired()) {
information << i18n("The key is expired.");
- ui.expirationIcon->setPixmap(KIcon("dialog-warning").pixmap(iconSize));
+ ui.expirationIcon->setPixmap(QIcon::fromTheme("dialog-warning").pixmap(iconSize));
ui.expirationIcon->show();
problem = true;
} else {
@@ -212,25 +212,25 @@ void SignatureDlg::updateData()
switch (ownerTrust) {
case GpgME::Key::Never:
information.prepend(i18n("The key is not to be trusted."));
- ui.trustIcon->setPixmap(KIcon("dialog-error").pixmap(iconSize));
+ ui.trustIcon->setPixmap(QIcon::fromTheme("dialog-error").pixmap(iconSize));
error = true;
break;
case GpgME::Key::Marginal:
information.prepend(i18n("The key is to be trusted marginally."));
- ui.trustIcon->setPixmap(KIcon("dialog-warning").pixmap(iconSize));
+ ui.trustIcon->setPixmap(QIcon::fromTheme("dialog-warning").pixmap(iconSize));
problem = true;
break;
case GpgME::Key::Full:
- ui.trustIcon->setPixmap(KIcon("dialog-ok").pixmap(iconSize));
+ ui.trustIcon->setPixmap(QIcon::fromTheme("dialog-ok").pixmap(iconSize));
break;
case GpgME::Key::Ultimate:
- ui.trustIcon->setPixmap(KIcon("dialog-ok").pixmap(iconSize));
+ ui.trustIcon->setPixmap(QIcon::fromTheme("dialog-ok").pixmap(iconSize));
break;
case GpgME::Key::Unknown:
case GpgME::Key::Undefined:
default:
information.prepend(i18n("Trust level of the key is unclear."));
- ui.trustIcon->setPixmap(KIcon("dialog-warning").pixmap(iconSize));
+ ui.trustIcon->setPixmap(QIcon::fromTheme("dialog-warning").pixmap(iconSize));
problem = true;
break;
}
diff --git a/ui/signaturedlg.ui b/ui/signaturedlg.ui
index d7aced3..585157e 100644
--- a/ui/signaturedlg.ui
+++ b/ui/signaturedlg.ui
@@ -107,14 +107,14 @@
</spacer>
</item>
<item>
- <widget class="KPushButton" name="loadSignature">
+ <widget class="QPushButton" name="loadSignature">
<property name="text">
<string>Load Signature</string>
</property>
</widget>
</item>
<item>
- <widget class="KPushButton" name="verify">
+ <widget class="QPushButton" name="verify">
<property name="text">
<string>Verify</string>
</property>
@@ -314,11 +314,6 @@
</widget>
<customwidgets>
<customwidget>
- <class>KPushButton</class>
- <extends>QPushButton</extends>
- <header>kpushbutton.h</header>
- </customwidget>
- <customwidget>
<class>KTextEdit</class>
<extends>QTextEdit</extends>
<header>ktextedit.h</header>
diff --git a/ui/transfersettingsdialog.cpp b/ui/transfersettingsdialog.cpp
index cd6e8c9..89ea4c6 100644
--- a/ui/transfersettingsdialog.cpp
+++ b/ui/transfersettingsdialog.cpp
@@ -68,10 +68,10 @@ TransferSettingsDialog::TransferSettingsDialog(QWidget *parent, TransferHandler
connect(this, &TransferSettingsDialog::accepted, this, &TransferSettingsDialog::save);
connect(this, &TransferSettingsDialog::finished, this, &TransferSettingsDialog::slotFinished);
connect(ui.treeView->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)), this, SLOT(slotSelectionChanged()));
- connect(ui.rename, &KPushButton::clicked, this, &TransferSettingsDialog::slotRename);
- connect(ui.mirrors, &KPushButton::clicked, this, &TransferSettingsDialog::slotMirrors);
- connect(ui.verification, &KPushButton::clicked, this, &TransferSettingsDialog::slotVerification);
- connect(ui.signature, &KPushButton::clicked, this, &TransferSettingsDialog::slotSignature);
+ connect(ui.rename, &QPushButton::clicked, this, &TransferSettingsDialog::slotRename);
+ connect(ui.mirrors, &QPushButton::clicked, this, &TransferSettingsDialog::slotMirrors);
+ connect(ui.verification, &QPushButton::clicked, this, &TransferSettingsDialog::slotVerification);
+ connect(ui.signature, &QPushButton::clicked, this, &TransferSettingsDialog::slotSignature);
}
TransferSettingsDialog::~TransferSettingsDialog()
diff --git a/ui/transfersettingsdialog.ui b/ui/transfersettingsdialog.ui
index 89d402f..d3bcffd 100644
--- a/ui/transfersettingsdialog.ui
+++ b/ui/transfersettingsdialog.ui
@@ -135,7 +135,7 @@
<item>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
- <widget class="KPushButton" name="mirrors">
+ <widget class="QPushButton" name="mirrors">
<property name="enabled">
<bool>false</bool>
</property>
@@ -148,7 +148,7 @@
</widget>
</item>
<item>
- <widget class="KPushButton" name="rename">
+ <widget class="QPushButton" name="rename">
<property name="enabled">
<bool>false</bool>
</property>
@@ -158,7 +158,7 @@
</widget>
</item>
<item>
- <widget class="KPushButton" name="verification">
+ <widget class="QPushButton" name="verification">
<property name="enabled">
<bool>false</bool>
</property>
@@ -168,7 +168,7 @@
</widget>
</item>
<item>
- <widget class="KPushButton" name="signature">
+ <widget class="QPushButton" name="signature">
<property name="enabled">
<bool>false</bool>
</property>
@@ -198,11 +198,6 @@
</widget>
<customwidgets>
<customwidget>
- <class>KPushButton</class>
- <extends>QPushButton</extends>
- <header>kpushbutton.h</header>
- </customwidget>
- <customwidget>
<class>KTitleWidget</class>
<extends>QWidget</extends>
<header>ktitlewidget.h</header>
diff --git a/ui/transfersviewdelegate.cpp b/ui/transfersviewdelegate.cpp
index fa549e2..1b7146d 100644
--- a/ui/transfersviewdelegate.cpp
+++ b/ui/transfersviewdelegate.cpp
@@ -25,7 +25,7 @@
#include <kdebug.h>
#include <klocale.h>
#include <QMenu>
-#include <kicon.h>
+#include <QIcon>
#include <QApplication>
#include <QPainter>
@@ -221,7 +221,7 @@ GroupStatusEditor::GroupStatusEditor(const QModelIndex &index, QWidget *parent)
m_startBt = new GroupStatusButton(m_index, this);
m_startBt->setCheckable(true);
m_startBt->setAutoRaise(true);
- m_startBt->setIcon(KIcon("media-playback-start"));
+ m_startBt->setIcon(QIcon::fromTheme("media-playback-start"));
m_startBt->setFixedSize(36, 36);
m_startBt->setIconSize(QSize(22, 22));
m_layout->addWidget(m_startBt);
@@ -230,7 +230,7 @@ GroupStatusEditor::GroupStatusEditor(const QModelIndex &index, QWidget *parent)
m_stopBt = new GroupStatusButton(m_index, this);
m_stopBt->setCheckable(true);
m_stopBt->setAutoRaise(true);
- m_stopBt->setIcon(KIcon("media-playback-pause"));
+ m_stopBt->setIcon(QIcon::fromTheme("media-playback-pause"));
m_stopBt->setFixedSize(36, 36);
m_stopBt->setIconSize(QSize(22, 22));
m_layout->addWidget(m_stopBt);
diff --git a/ui/verificationdialog.cpp b/ui/verificationdialog.cpp
index 824407f..30e8292 100644
--- a/ui/verificationdialog.cpp
+++ b/ui/verificationdialog.cpp
@@ -98,8 +98,8 @@ VerificationDialog::VerificationDialog(QWidget *parent, TransferHandler *transfe
QWidget *widget = new QWidget(this);
ui.setupUi(widget);
setMainWidget(widget);
- ui.add->setGuiItem(KStandardGuiItem::add());
- ui.remove->setGuiItem(KStandardGuiItem::remove());
+ KGuiItem::assign(ui.add, KStandardGuiItem::add());
+ KGuiItem::assign(ui.remove, KStandardGuiItem::remove());
ui.verifying->hide();
if (m_model) {
@@ -124,9 +124,9 @@ VerificationDialog::VerificationDialog(QWidget *parent, TransferHandler *transfe
connect(m_model, &VerificationModel::dataChanged, this, &VerificationDialog::updateButtons);
connect(m_model, &VerificationModel::rowsRemoved, this, &VerificationDialog::updateButtons);
connect(ui.usedHashes, &QTreeView::clicked, this, &VerificationDialog::updateButtons);
- connect(ui.add, &KPushButton::clicked, this, &VerificationDialog::addClicked);
- connect(ui.remove, &KPushButton::clicked, this, &VerificationDialog::removeClicked);
- connect(ui.verify, &KPushButton::clicked, this, &VerificationDialog::verifyClicked);
+ connect(ui.add, &QPushButton::clicked, this, &VerificationDialog::addClicked);
+ connect(ui.remove, &QPushButton::clicked, this, &VerificationDialog::removeClicked);
+ connect(ui.verify, &QPushButton::clicked, this, &VerificationDialog::verifyClicked);
}
setButtons(KDialog::Close);
diff --git a/ui/verificationdialog.ui b/ui/verificationdialog.ui
index 44aeb81..d1d651e 100644
--- a/ui/verificationdialog.ui
+++ b/ui/verificationdialog.ui
@@ -31,13 +31,13 @@
</widget>
</item>
<item row="0" column="1">
- <widget class="KPushButton" name="add"/>
+ <widget class="QPushButton" name="add"/>
</item>
<item row="1" column="1">
- <widget class="KPushButton" name="remove"/>
+ <widget class="QPushButton" name="remove"/>
</item>
<item row="2" column="1">
- <widget class="KPushButton" name="verify">
+ <widget class="QPushButton" name="verify">
<property name="toolTip">
<string>Verify the finished download with the selected checksum.</string>
</property>
@@ -85,11 +85,6 @@
</layout>
</widget>
<customwidgets>
- <customwidget>
- <class>KPushButton</class>
- <extends>QPushButton</extends>
- <header>kpushbutton.h</header>
- </customwidget>
</customwidgets>
<tabstops>
<tabstop>usedHashes</tabstop>