Commit b9bd918e authored by Michael Pyne's avatar Michael Pyne

Port away from deprecated KPushButton.

parent a2815d69
...@@ -15,7 +15,9 @@ include(ECMInstallIcons) ...@@ -15,7 +15,9 @@ include(ECMInstallIcons)
include(ECMAddAppIcon) include(ECMAddAppIcon)
find_package(Qt5 5.2 REQUIRED COMPONENTS Gui Svg Network Test Widgets) find_package(Qt5 5.2 REQUIRED COMPONENTS Gui Svg Network Test Widgets)
find_package(KF5 REQUIRED COMPONENTS CoreAddons Completion GlobalAccel I18n IconThemes DocTools TextWidgets XmlGui Wallet WindowSystem KDELibs4Support) find_package(KF5 REQUIRED COMPONENTS CoreAddons Completion GlobalAccel
I18n IconThemes DocTools TextWidgets XmlGui Wallet
WidgetsAddons WindowSystem KDELibs4Support)
find_package(Phonon4Qt5 4.6.60 REQUIRED NO_MODULE) find_package(Phonon4Qt5 4.6.60 REQUIRED NO_MODULE)
find_package(Taglib 1.6 REQUIRED) find_package(Taglib 1.6 REQUIRED)
...@@ -159,7 +161,7 @@ endif() ...@@ -159,7 +161,7 @@ endif()
target_link_libraries(juk ${LIBMATH} Qt5::Gui Qt5::Svg Qt5::Widgets target_link_libraries(juk ${LIBMATH} Qt5::Gui Qt5::Svg Qt5::Widgets
Qt5::Network KF5::CoreAddons KF5::Completion KF5::GlobalAccel Qt5::Network KF5::CoreAddons KF5::Completion KF5::GlobalAccel
KF5::I18n KF5::IconThemes KF5::TextWidgets KF5::XmlGui KF5::WindowSystem KF5::I18n KF5::IconThemes KF5::TextWidgets KF5::XmlGui KF5::WindowSystem
KF5::Wallet KF5::KDELibs4Support ${PHONON_LIBRARY} ${TAGLIB_LIBRARIES}) KF5::WidgetsAddons KF5::Wallet KF5::KDELibs4Support ${PHONON_LIBRARY} ${TAGLIB_LIBRARIES})
if(TUNEPIMP_FOUND) if(TUNEPIMP_FOUND)
target_link_libraries(juk ${TUNEPIMP_LIBRARIES}) target_link_libraries(juk ${TUNEPIMP_LIBRARIES})
endif(TUNEPIMP_FOUND) endif(TUNEPIMP_FOUND)
......
...@@ -18,15 +18,16 @@ ...@@ -18,15 +18,16 @@
#include <kcombobox.h> #include <kcombobox.h>
#include <klineedit.h> #include <klineedit.h>
#include <kpushbutton.h>
#include <klocale.h> #include <klocale.h>
#include <kvbox.h> #include <kvbox.h>
#include <KStandardGuiItem>
#include <QRadioButton> #include <QRadioButton>
#include <QLabel> #include <QLabel>
#include <QHBoxLayout> #include <QHBoxLayout>
#include <QVBoxLayout> #include <QVBoxLayout>
#include <QGroupBox> #include <QGroupBox>
#include <QPushButton>
#include "collectionlist.h" #include "collectionlist.h"
#include "searchwidget.h" #include "searchwidget.h"
...@@ -105,17 +106,18 @@ AdvancedSearchDialog::AdvancedSearchDialog(const QString &defaultName, ...@@ -105,17 +106,18 @@ AdvancedSearchDialog::AdvancedSearchDialog(const QString &defaultName,
l->setSpacing(5); l->setSpacing(5);
l->setMargin(0); l->setMargin(0);
KPushButton *clearButton = new KPushButton(KStandardGuiItem::clear(), buttons); const auto &clearGuiItem = KStandardGuiItem::clear();
QPushButton *clearButton = new QPushButton(clearGuiItem.icon(), clearGuiItem.text(), buttons);
connect(clearButton, SIGNAL(clicked()), SLOT(clear())); connect(clearButton, SIGNAL(clicked()), SLOT(clear()));
l->addWidget(clearButton); l->addWidget(clearButton);
l->addStretch(1); l->addStretch(1);
m_moreButton = new KPushButton(i18nc("additional search options", "More"), buttons); m_moreButton = new QPushButton(i18nc("additional search options", "More"), buttons);
connect(m_moreButton, SIGNAL(clicked()), SLOT(more())); connect(m_moreButton, SIGNAL(clicked()), SLOT(more()));
l->addWidget(m_moreButton); l->addWidget(m_moreButton);
m_fewerButton = new KPushButton(i18n("Fewer"), buttons); m_fewerButton = new QPushButton(i18n("Fewer"), buttons);
connect(m_fewerButton, SIGNAL(clicked()), SLOT(fewer())); connect(m_fewerButton, SIGNAL(clicked()), SLOT(fewer()));
l->addWidget(m_fewerButton); l->addWidget(m_fewerButton);
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#include "playlistsearch.h" #include "playlistsearch.h"
class KLineEdit; class KLineEdit;
class KPushButton; class QPushButton;
class QRadioButton; class QRadioButton;
class SearchLine; class SearchLine;
class QBoxLayout; class QBoxLayout;
...@@ -68,8 +68,8 @@ private: ...@@ -68,8 +68,8 @@ private:
KLineEdit *m_playlistNameLineEdit; KLineEdit *m_playlistNameLineEdit;
QRadioButton *m_matchAnyButton; QRadioButton *m_matchAnyButton;
QRadioButton *m_matchAllButton; QRadioButton *m_matchAllButton;
KPushButton *m_moreButton; QPushButton *m_moreButton;
KPushButton *m_fewerButton; QPushButton *m_fewerButton;
}; };
#endif #endif
......
...@@ -20,10 +20,10 @@ ...@@ -20,10 +20,10 @@
#include <QCheckBox> #include <QCheckBox>
#include <QStringListModel> #include <QStringListModel>
#include <QtCore/QVariant> #include <QtCore/QVariant>
#include <QPushButton>
#include <kfiledialog.h> #include <kfiledialog.h>
#include <klocale.h> #include <klocale.h>
#include <kpushbutton.h>
#include <kdebug.h> #include <kdebug.h>
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
......
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
#include <kglobal.h> #include <kglobal.h>
#include <klineedit.h> #include <klineedit.h>
#include <klocale.h> #include <klocale.h>
#include <kpushbutton.h>
#include <kapplication.h> #include <kapplication.h>
#include <kmessagebox.h> #include <kmessagebox.h>
#include <kvbox.h> #include <kvbox.h>
...@@ -48,6 +47,7 @@ ...@@ -48,6 +47,7 @@
#include <QFrame> #include <QFrame>
#include <QTreeWidget> #include <QTreeWidget>
#include <QScrollBar> #include <QScrollBar>
#include <QPushButton>
#include "tag.h" #include "tag.h"
#include "filerenameroptions.h" #include "filerenameroptions.h"
...@@ -361,8 +361,8 @@ int FileRenamerWidget::addRowCategory(TagType category) ...@@ -361,8 +361,8 @@ int FileRenamerWidget::addRowCategory(TagType category)
buttons->setFrameStyle(QFrame::Plain | QFrame::Box); buttons->setFrameStyle(QFrame::Plain | QFrame::Box);
buttons->setLineWidth(1); buttons->setLineWidth(1);
row.upButton = new KPushButton(buttons); row.upButton = new QPushButton(buttons);
row.downButton = new KPushButton(buttons); row.downButton = new QPushButton(buttons);
row.upButton->setIcon(up); row.upButton->setIcon(up);
row.downButton->setIcon(down); row.downButton->setIcon(down);
...@@ -385,12 +385,12 @@ int FileRenamerWidget::addRowCategory(TagType category) ...@@ -385,12 +385,12 @@ int FileRenamerWidget::addRowCategory(TagType category)
QVBoxLayout *optionLayout = new QVBoxLayout; QVBoxLayout *optionLayout = new QVBoxLayout;
frameLayout->addLayout(optionLayout); frameLayout->addLayout(optionLayout);
row.enableButton = new KPushButton(i18nc("remove music genre from file renamer", "Remove"), frame); row.enableButton = new QPushButton(i18nc("remove music genre from file renamer", "Remove"), frame);
optionLayout->addWidget(row.enableButton); optionLayout->addWidget(row.enableButton);
toggleMapper->connect(row.enableButton, SIGNAL(clicked()), SLOT(map())); toggleMapper->connect(row.enableButton, SIGNAL(clicked()), SLOT(map()));
toggleMapper->setMapping(row.enableButton, id); toggleMapper->setMapping(row.enableButton, id);
row.optionsButton = new KPushButton(i18nc("file renamer genre options", "Options"), frame); row.optionsButton = new QPushButton(i18nc("file renamer genre options", "Options"), frame);
optionLayout->addWidget(row.optionsButton); optionLayout->addWidget(row.optionsButton);
mapper->connect(row.optionsButton, SIGNAL(clicked()), SLOT(map())); mapper->connect(row.optionsButton, SIGNAL(clicked()), SLOT(map()));
mapper->setMapping(row.optionsButton, id); mapper->setMapping(row.optionsButton, id);
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#include <KDebug> #include <KDebug>
#include <KLineEdit> #include <KLineEdit>
#include <KPushButton> #include <QPushButton>
#include <KLocalizedString> #include <KLocalizedString>
#include <KMessageBox> #include <KMessageBox>
#include <kglobal.h> #include <kglobal.h>
...@@ -42,7 +42,7 @@ ScrobbleConfigDlg::ScrobbleConfigDlg(QWidget* parent, Qt::WindowFlags f) ...@@ -42,7 +42,7 @@ ScrobbleConfigDlg::ScrobbleConfigDlg(QWidget* parent, Qt::WindowFlags f)
m_passwordEdit = new KLineEdit(this); m_passwordEdit = new KLineEdit(this);
m_passwordEdit->setPasswordMode(true); m_passwordEdit->setPasswordMode(true);
m_usernameEdit = new KLineEdit(this); m_usernameEdit = new KLineEdit(this);
m_testButton = new KPushButton(i18n("Test login..."), this); m_testButton = new QPushButton(i18n("Test login..."), this);
m_testFeedbackLabel = new QLabel(""); m_testFeedbackLabel = new QLabel("");
QWidget *mainWidget = new QWidget(); QWidget *mainWidget = new QWidget();
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#include <KWallet/Wallet> #include <KWallet/Wallet>
class KLineEdit; class KLineEdit;
class KPushButton; class QPushButton;
class QLabel; class QLabel;
class ScrobbleConfigDlg : public KDialog class ScrobbleConfigDlg : public KDialog
...@@ -42,7 +42,7 @@ private slots: ...@@ -42,7 +42,7 @@ private slots:
private: private:
KLineEdit *m_usernameEdit; KLineEdit *m_usernameEdit;
KLineEdit *m_passwordEdit; KLineEdit *m_passwordEdit;
KPushButton *m_testButton; QPushButton *m_testButton;
QLabel *m_testFeedbackLabel; QLabel *m_testFeedbackLabel;
KWallet::Wallet *m_wallet; KWallet::Wallet *m_wallet;
......
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
#include "statuslabel.h" #include "statuslabel.h"
#include <kaction.h> #include <kaction.h>
#include <kpushbutton.h>
#include <kiconloader.h> #include <kiconloader.h>
#include <ksqueezedtextlabel.h> #include <ksqueezedtextlabel.h>
#include <klocale.h> #include <klocale.h>
...@@ -28,6 +27,7 @@ ...@@ -28,6 +27,7 @@
#include <QFrame> #include <QFrame>
#include <QHBoxLayout> #include <QHBoxLayout>
#include <QEvent> #include <QEvent>
#include <QPushButton>
#include "filehandle.h" #include "filehandle.h"
#include "playlistinterface.h" #include "playlistinterface.h"
......
...@@ -19,12 +19,12 @@ ...@@ -19,12 +19,12 @@
#include <kicon.h> #include <kicon.h>
#include <klocale.h> #include <klocale.h>
#include <kpushbutton.h>
#include <klineedit.h> #include <klineedit.h>
#include <kapplication.h> #include <kapplication.h>
#include <QKeyEvent> #include <QKeyEvent>
#include <QStringListModel> #include <QStringListModel>
#include <QPushButton>
TagGuesserConfigDlg::TagGuesserConfigDlg(QWidget *parent, const char *name) TagGuesserConfigDlg::TagGuesserConfigDlg(QWidget *parent, const char *name)
: KDialog(parent) : KDialog(parent)
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#include <KUrl> #include <KUrl>
#include <KDebug> #include <KDebug>
#include <KIO/Job> #include <KIO/Job>
#include <KPushButton> #include <QPushButton>
#include <KDialog> #include <KDialog>
#include "covermanager.h" #include "covermanager.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment