summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qplatformcursor.cpp2
-rw-r--r--src/gui/kernel/qplatformdialoghelper.cpp6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/kernel/qplatformcursor.cpp b/src/gui/kernel/qplatformcursor.cpp
index df78e7d896..bab26f6028 100644
--- a/src/gui/kernel/qplatformcursor.cpp
+++ b/src/gui/kernel/qplatformcursor.cpp
@@ -549,7 +549,7 @@ void QPlatformCursorImage::createSystemCursor(int id)
void QPlatformCursorImage::set(Qt::CursorShape id)
{
QPlatformCursorImage *cursor = 0;
- if (id >= 0 && id <= Qt::LastCursor) {
+ if (unsigned(id) <= unsigned(Qt::LastCursor)) {
if (!systemCursorTable[id])
createSystemCursor(id);
cursor = systemCursorTable[id];
diff --git a/src/gui/kernel/qplatformdialoghelper.cpp b/src/gui/kernel/qplatformdialoghelper.cpp
index fbadb48f70..b456c1ca31 100644
--- a/src/gui/kernel/qplatformdialoghelper.cpp
+++ b/src/gui/kernel/qplatformdialoghelper.cpp
@@ -664,18 +664,18 @@ QStringList QFileDialogOptions::history() const
void QFileDialogOptions::setLabelText(QFileDialogOptions::DialogLabel label, const QString &text)
{
- if (label >= 0 && label < DialogLabelCount)
+ if (unsigned(label) < unsigned(DialogLabelCount))
d->labels[label] = text;
}
QString QFileDialogOptions::labelText(QFileDialogOptions::DialogLabel label) const
{
- return (label >= 0 && label < DialogLabelCount) ? d->labels[label] : QString();
+ return (unsigned(label) < unsigned(DialogLabelCount)) ? d->labels[label] : QString();
}
bool QFileDialogOptions::isLabelExplicitlySet(DialogLabel label)
{
- return label >= 0 && label < DialogLabelCount && !d->labels[label].isEmpty();
+ return unsigned(label) < unsigned(DialogLabelCount) && !d->labels[label].isEmpty();
}
QUrl QFileDialogOptions::initialDirectory() const