Commit ea891f07 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Port deprecated method

parent 7ed5a493
......@@ -36,7 +36,7 @@ class KGET_EXPORT KGetSaveSizeDialog : public QDialog
/**
* Restores the dialog to the size saved for name
*/
explicit KGetSaveSizeDialog(const QByteArray &name, QWidget *parent = nullptr, Qt::WFlags flags = 0);
explicit KGetSaveSizeDialog(const QByteArray &name, QWidget *parent = nullptr, Qt::WFlags flags = {});
virtual ~KGetSaveSizeDialog();
private:
......
......@@ -41,7 +41,6 @@
#define QL1S(x) QLatin1String(x)
K_PLUGIN_FACTORY(KGetPluginFactory, registerPlugin<KGetPlugin>();)
K_EXPORT_PLUGIN(KGetPluginFactory("kgetplugin"))
static QWidget* partWidget(QObject* obj)
{
......
......@@ -39,7 +39,7 @@ class ChecksumSearchAddDlg : public QDialog
Q_OBJECT
public:
ChecksumSearchAddDlg(QStringListModel *modesModel, QStringListModel *typesModel, QWidget *parent = nullptr, Qt::WFlags flags = 0);
ChecksumSearchAddDlg(QStringListModel *modesModel, QStringListModel *typesModel, QWidget *parent = nullptr, Qt::WFlags flags = {});
signals:
/**
......
......@@ -16,6 +16,7 @@
#include <KLocalizedString>
#include <KConfigGroup>
#include <kconfigwidgets_version.h>
#include <QDebug>
#include <QDialogButtonBox>
......@@ -89,7 +90,11 @@ void DlgSettingsWidget::slotNewEngine()
DlgEngineEditing dialog;
if(dialog.exec()) {
addSearchEngineItem(dialog.engineName(), dialog.engineUrl());
changed();
#if KCONFIGWIDGETS_VERSION < QT_VERSION_CHECK(5, 64, 0)
emit changed();
#else
emit markAsChanged();
#endif
}
}
......@@ -99,8 +104,11 @@ void DlgSettingsWidget::slotRemoveEngine()
foreach(QTreeWidgetItem * selectedItem, selectedItems)
delete(selectedItem);
changed();
#if KCONFIGWIDGETS_VERSION < QT_VERSION_CHECK(5, 64, 0)
emit changed();
#else
emit markAsChanged();
#endif
}
void DlgSettingsWidget::load()
......@@ -111,7 +119,11 @@ void DlgSettingsWidget::load()
void DlgSettingsWidget::addSearchEngineItem(const QString &name, const QString &url)
{
ui.enginesTreeWidget->addTopLevelItem(new QTreeWidgetItem(QStringList() << name << url));
changed();
#if KCONFIGWIDGETS_VERSION < QT_VERSION_CHECK(5, 64, 0)
emit changed();
#else
emit markAsChanged();
#endif
}
void DlgSettingsWidget::loadSearchEnginesSettings()
......
......@@ -30,8 +30,8 @@ class DlgMmsSettings : public KCModule
explicit DlgMmsSettings(QWidget * parent = nullptr, const QVariantList &args = QVariantList());
public slots:
virtual void save();
virtual void load();
void save() override;
void load() override;
private:
Ui::DlgMms ui;
......
......@@ -35,8 +35,8 @@ class MirrorAddDlg : public QDialog
Q_OBJECT
public:
explicit MirrorAddDlg(MirrorModel *model, QWidget *parent = nullptr, Qt::WFlags flags = 0);
explicit MirrorAddDlg(MirrorModel *model, QSortFilterProxyModel *countryModel, QWidget *parent = nullptr, Qt::WFlags flags = 0);
explicit MirrorAddDlg(MirrorModel *model, QWidget *parent = nullptr, Qt::WFlags flags = {});
explicit MirrorAddDlg(MirrorModel *model, QSortFilterProxyModel *countryModel, QWidget *parent = nullptr, Qt::WFlags flags = {});
virtual QSize sizeHint() const override;
......
......@@ -33,7 +33,7 @@ class RenameFile : public QDialog
Q_OBJECT
public:
RenameFile(FileModel *model, const QModelIndex &index, QWidget *parent = nullptr, Qt::WFlags flags = 0);
RenameFile(FileModel *model, const QModelIndex &index, QWidget *parent = nullptr, Qt::WFlags flags = {});
void setOriginalName(const QString &originalName);
......
......@@ -33,7 +33,7 @@ class SignatureDlg : public KGetSaveSizeDialog
Q_OBJECT
public:
SignatureDlg(TransferHandler *transfer, const QUrl &dest, QWidget *parent = nullptr, Qt::WFlags flags = 0);
SignatureDlg(TransferHandler *transfer, const QUrl &dest, QWidget *parent = nullptr, Qt::WFlags flags = {});
private slots:
void fileFinished(const QUrl &file);
......
......@@ -37,7 +37,7 @@ class VerificationAddDlg : public QDialog
Q_OBJECT
public:
explicit VerificationAddDlg(VerificationModel *model, QWidget *parent = nullptr, Qt::WFlags flags = 0);
explicit VerificationAddDlg(VerificationModel *model, QWidget *parent = nullptr, Qt::WFlags flags = {});
virtual QSize sizeHint() const override;
......
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