Commit 07aedf7e authored by Laurent Montel's avatar Laurent Montel 😁

Warning--

parent a2083bb2
...@@ -72,7 +72,7 @@ int main(int argc, char **argv) ...@@ -72,7 +72,7 @@ int main(int argc, char **argv)
KAuth::ExecuteJob *job = action.execute(); KAuth::ExecuteJob *job = action.execute();
bool rc = job->exec(); bool rc = job->exec();
if (!rc) { if (!rc) {
KMessageBox::sorry(0, i18n("Unable to install theme"), job->errorString()); KMessageBox::sorry(nullptr, i18n("Unable to install theme"), job->errorString());
qWarning() << job->error() << job->errorString(); qWarning() << job->error() << job->errorString();
return -1; return -1;
} }
...@@ -83,7 +83,7 @@ int main(int argc, char **argv) ...@@ -83,7 +83,7 @@ int main(int argc, char **argv)
} }
if (parser.isSet(QLatin1String("uninstall"))) { if (parser.isSet(QLatin1String("uninstall"))) {
KConfigGroup cg(KSharedConfig::openConfig(QStringLiteral("sddmthemeinstallerrc"), KConfig::SimpleConfig), "DownloadedThemes"); KConfigGroup cg(KSharedConfig::openConfig(QStringLiteral("sddmthemeinstallerrc"), KConfig::SimpleConfig), "DownloadedThemes");
QStringList installed = cg.readEntry(args.first(), QStringList()); const QStringList installed = cg.readEntry(args.first(), QStringList());
for (const QString &installedTheme: installed) { for (const QString &installedTheme: installed) {
KAuth::Action action(QStringLiteral("org.kde.kcontrol.kcmsddm.uninstalltheme")); KAuth::Action action(QStringLiteral("org.kde.kcontrol.kcmsddm.uninstalltheme"));
action.setHelperId("org.kde.kcontrol.kcmsddm"); action.setHelperId("org.kde.kcontrol.kcmsddm");
......
...@@ -34,7 +34,7 @@ class AdvanceConfig : public QWidget ...@@ -34,7 +34,7 @@ class AdvanceConfig : public QWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
explicit AdvanceConfig(const KSharedConfigPtr &config, QWidget *parent = 0); explicit AdvanceConfig(const KSharedConfigPtr &config, QWidget *parent = nullptr);
~AdvanceConfig(); ~AdvanceConfig();
QVariantMap save(); QVariantMap save();
......
...@@ -73,7 +73,7 @@ QString SelectImageButton::imagePath() const { ...@@ -73,7 +73,7 @@ QString SelectImageButton::imagePath() const {
void SelectImageButton::onLoadImageFromFile() void SelectImageButton::onLoadImageFromFile()
{ {
QUrl fileUrl = QFileDialog::getOpenFileUrl(this, i18nc("@title:window", "Select Image"), QUrl(), "image/*", 0, 0, QStringList() << "file"); QUrl fileUrl = QFileDialog::getOpenFileUrl(this, i18nc("@title:window", "Select Image"), QUrl(), "image/*", nullptr, 0, QStringList() << "file");
if (!fileUrl.isEmpty()) { if (!fileUrl.isEmpty()) {
setImagePath(fileUrl.path()); setImagePath(fileUrl.path());
......
...@@ -148,6 +148,9 @@ void CursorTheme::setCursorName(qulonglong cursor, const QString &name) const ...@@ -148,6 +148,9 @@ void CursorTheme::setCursorName(qulonglong cursor, const QString &name) const
XFixesSetCursorName(QX11Info::display(), cursor, XFixesSetCursorName(QX11Info::display(), cursor,
QFile::encodeName(name)); QFile::encodeName(name));
} }
#else
Q_UNUSED(name);
Q_UNUSED(cursor);
#endif #endif
} }
......
...@@ -23,7 +23,7 @@ class DummyTheme : public CursorTheme ...@@ -23,7 +23,7 @@ class DummyTheme : public CursorTheme
{ {
public: public:
DummyTheme(); DummyTheme();
virtual ~DummyTheme(); ~DummyTheme() Q_DECL_OVERRIDE;
QImage loadImage(const QString &name, int size = 0) const Q_DECL_OVERRIDE; QImage loadImage(const QString &name, int size = 0) const Q_DECL_OVERRIDE;
qulonglong loadCursor(const QString &name, int size = 0) const Q_DECL_OVERRIDE; qulonglong loadCursor(const QString &name, int size = 0) const Q_DECL_OVERRIDE;
......
...@@ -35,8 +35,8 @@ ...@@ -35,8 +35,8 @@
class SortProxyModel : public QSortFilterProxyModel class SortProxyModel : public QSortFilterProxyModel
{ {
public: public:
SortProxyModel(QObject *parent = 0) : QSortFilterProxyModel(parent) {} explicit SortProxyModel(QObject *parent = nullptr) : QSortFilterProxyModel(parent) {}
~SortProxyModel() {} ~SortProxyModel() Q_DECL_OVERRIDE {}
inline const CursorTheme *theme(const QModelIndex &index) const; inline const CursorTheme *theme(const QModelIndex &index) const;
inline QModelIndex findIndex(const QString &name) const; inline QModelIndex findIndex(const QString &name) const;
inline QModelIndex defaultIndex() const; inline QModelIndex defaultIndex() const;
......
...@@ -133,10 +133,10 @@ void CursorThemeModel::sort(int column, Qt::SortOrder order) ...@@ -133,10 +133,10 @@ void CursorThemeModel::sort(int column, Qt::SortOrder order)
const CursorTheme *CursorThemeModel::theme(const QModelIndex &index) const CursorTheme *CursorThemeModel::theme(const QModelIndex &index)
{ {
if (!index.isValid()) if (!index.isValid())
return NULL; return nullptr;
if (index.row() < 0 || index.row() >= list.count()) if (index.row() < 0 || index.row() >= list.count())
return NULL; return nullptr;
return list.at(index.row()); return list.at(index.row());
} }
......
...@@ -60,8 +60,8 @@ class CursorThemeModel : public QAbstractTableModel ...@@ -60,8 +60,8 @@ class CursorThemeModel : public QAbstractTableModel
Q_OBJECT Q_OBJECT
public: public:
CursorThemeModel(QObject *parent = 0); explicit CursorThemeModel(QObject *parent = nullptr);
~CursorThemeModel(); ~CursorThemeModel() Q_DECL_OVERRIDE;
inline int columnCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE; inline int columnCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
inline int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE; inline int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
QVariant headerData(int section, Qt::Orientation orientation, int role) const Q_DECL_OVERRIDE; QVariant headerData(int section, Qt::Orientation orientation, int role) const Q_DECL_OVERRIDE;
......
...@@ -43,7 +43,7 @@ class XCursorTheme : public CursorTheme ...@@ -43,7 +43,7 @@ class XCursorTheme : public CursorTheme
* index.theme file if the dir has one. * index.theme file if the dir has one.
*/ */
XCursorTheme(const QDir &dir); XCursorTheme(const QDir &dir);
virtual ~XCursorTheme() {} ~XCursorTheme() Q_DECL_OVERRIDE {}
const QStringList inherits() const { return m_inherits; } const QStringList inherits() const { return m_inherits; }
QImage loadImage(const QString &name, int size = 0) const Q_DECL_OVERRIDE; QImage loadImage(const QString &name, int size = 0) const Q_DECL_OVERRIDE;
......
...@@ -28,7 +28,7 @@ class SddmKcm : public KCModule ...@@ -28,7 +28,7 @@ class SddmKcm : public KCModule
Q_OBJECT Q_OBJECT
public: public:
explicit SddmKcm(QWidget *parent, const QVariantList &args); explicit SddmKcm(QWidget *parent, const QVariantList &args);
~SddmKcm(); ~SddmKcm() Q_DECL_OVERRIDE;
public slots: public slots:
void save() Q_DECL_OVERRIDE; void save() Q_DECL_OVERRIDE;
......
...@@ -117,6 +117,7 @@ QHash<int, QByteArray> SessionModel::roleNames() const { ...@@ -117,6 +117,7 @@ QHash<int, QByteArray> SessionModel::roleNames() const {
} }
int SessionModel::rowCount(const QModelIndex &parent) const { int SessionModel::rowCount(const QModelIndex &parent) const {
Q_UNUSED(parent);
return d->sessions.length(); return d->sessions.length();
} }
......
...@@ -43,8 +43,8 @@ public: ...@@ -43,8 +43,8 @@ public:
CommentRole CommentRole
}; };
SessionModel(QObject *parent = 0); explicit SessionModel(QObject *parent = nullptr);
~SessionModel(); ~SessionModel() Q_DECL_OVERRIDE;
void loadDir(const QString &path, SessionType type); void loadDir(const QString &path, SessionType type);
......
...@@ -31,7 +31,7 @@ class ThemeConfig : public QWidget ...@@ -31,7 +31,7 @@ class ThemeConfig : public QWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
explicit ThemeConfig(const KSharedConfigPtr &config, QWidget *parent = 0); explicit ThemeConfig(const KSharedConfigPtr &config, QWidget *parent = nullptr);
~ThemeConfig(); ~ThemeConfig();
QVariantMap save(); QVariantMap save();
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
class ThemesDelegate : public QAbstractItemDelegate class ThemesDelegate : public QAbstractItemDelegate
{ {
public: public:
explicit ThemesDelegate(QObject *parent = 0); explicit ThemesDelegate(QObject *parent = nullptr);
void paint(QPainter *painter, void paint(QPainter *painter,
const QStyleOptionViewItem &option, const QStyleOptionViewItem &option,
......
...@@ -41,8 +41,8 @@ public: ...@@ -41,8 +41,8 @@ public:
ConfigFileRole ConfigFileRole
}; };
explicit ThemesModel(QObject *parent=0); explicit ThemesModel(QObject *parent=nullptr);
virtual ~ThemesModel(); ~ThemesModel() Q_DECL_OVERRIDE;
int rowCount(const QModelIndex &parent) const Q_DECL_OVERRIDE; int rowCount(const QModelIndex &parent) const Q_DECL_OVERRIDE;
QVariant data(const QModelIndex &index, int role) const Q_DECL_OVERRIDE; QVariant data(const QModelIndex &index, int role) const Q_DECL_OVERRIDE;
......
...@@ -32,8 +32,8 @@ public: ...@@ -32,8 +32,8 @@ public:
IconRole IconRole
}; };
explicit UsersModel(QObject *parent=0); explicit UsersModel(QObject *parent=nullptr);
virtual ~UsersModel(); ~UsersModel() Q_DECL_OVERRIDE;
int rowCount(const QModelIndex &parent) const Q_DECL_OVERRIDE; int rowCount(const QModelIndex &parent) const Q_DECL_OVERRIDE;
QVariant data(const QModelIndex &index, int role) const Q_DECL_OVERRIDE; QVariant data(const QModelIndex &index, int role) const Q_DECL_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