From 36440deabac568c05b7989987d6c2aca13bf82d1 Mon Sep 17 00:00:00 2001 From: Nathan Collins Date: Wed, 28 Feb 2018 17:29:47 +0000 Subject: [PATCH] Fix comparison of integers of different signs --- src/declarativecolordialog.cpp | 4 ++-- src/declarativecolordialog_p.h | 6 +++--- src/declarativefontdialog.cpp | 4 ++-- src/declarativefontdialog_p.h | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/declarativecolordialog.cpp b/src/declarativecolordialog.cpp index 84214ef..136ef80 100644 --- a/src/declarativecolordialog.cpp +++ b/src/declarativecolordialog.cpp @@ -62,7 +62,7 @@ QString DeclarativeColorDialogAttached::title() const return d->title; } -void DeclarativeColorDialogAttached::setOptions(int options) +void DeclarativeColorDialogAttached::setOptions(unsigned int options) { if (d->options == options) return; @@ -71,7 +71,7 @@ void DeclarativeColorDialogAttached::setOptions(int options) emit optionsChanged(options); } -int DeclarativeColorDialogAttached::options() const +unsigned int DeclarativeColorDialogAttached::options() const { return d->options; } diff --git a/src/declarativecolordialog_p.h b/src/declarativecolordialog_p.h index c73365f..bac052f 100644 --- a/src/declarativecolordialog_p.h +++ b/src/declarativecolordialog_p.h @@ -39,7 +39,7 @@ class DeclarativeColorDialogAttached : public StaticDialogMethodAttached { Q_OBJECT Q_PROPERTY(QString title READ title WRITE setTitle NOTIFY titleChanged) - Q_PROPERTY(int options READ options WRITE setOptions NOTIFY optionsChanged) + Q_PROPERTY(unsigned int options READ options WRITE setOptions NOTIFY optionsChanged) public: explicit DeclarativeColorDialogAttached(QObject *parent = 0); @@ -48,8 +48,8 @@ class DeclarativeColorDialogAttached : public StaticDialogMethodAttached void setTitle(const QString &title); QString title() const; - void setOptions(int options); - int options() const; + void setOptions(unsigned int options); + unsigned int options() const; Q_INVOKABLE QColor getColor(); Q_INVOKABLE QColor getColor(const QColor &initialColor); diff --git a/src/declarativefontdialog.cpp b/src/declarativefontdialog.cpp index 62e54ec..f9ca2f4 100644 --- a/src/declarativefontdialog.cpp +++ b/src/declarativefontdialog.cpp @@ -70,7 +70,7 @@ bool DeclarativeFontDialogAttached::dialogAccepted() const return d->dialogAccepted; } -void DeclarativeFontDialogAttached::setOptions(int options) +void DeclarativeFontDialogAttached::setOptions(unsigned int options) { if (options == d->options) return; @@ -79,7 +79,7 @@ void DeclarativeFontDialogAttached::setOptions(int options) emit optionsChanged(options); } -int DeclarativeFontDialogAttached::options() const +unsigned int DeclarativeFontDialogAttached::options() const { return d->options; } diff --git a/src/declarativefontdialog_p.h b/src/declarativefontdialog_p.h index 5cbd034..1bb9b69 100644 --- a/src/declarativefontdialog_p.h +++ b/src/declarativefontdialog_p.h @@ -40,7 +40,7 @@ class DeclarativeFontDialogAttached : public StaticDialogMethodAttached Q_OBJECT Q_PROPERTY(QString title READ title WRITE setTitle NOTIFY titleChanged) Q_PROPERTY(bool ok READ dialogAccepted NOTIFY dialogAcceptedChanged) - Q_PROPERTY(int options READ options WRITE setOptions NOTIFY optionsChanged) + Q_PROPERTY(unsigned int options READ options WRITE setOptions NOTIFY optionsChanged) public: explicit DeclarativeFontDialogAttached(QObject *parent = 0); @@ -51,8 +51,8 @@ class DeclarativeFontDialogAttached : public StaticDialogMethodAttached bool dialogAccepted() const; - void setOptions(int options); - int options() const; + void setOptions(unsigned int options); + unsigned int options() const; Q_INVOKABLE QFont getFont(); Q_INVOKABLE QFont getFont(const QString &fontFamily);