diff options
author | Liang Qi <liang.qi@qt.io> | 2018-06-05 13:13:12 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2018-06-06 11:36:33 +0000 |
commit | 62abbe34b84a1c224d27f3eb2f735749f5f24b4f (patch) | |
tree | ec1eee6ce05a917084d6feb656d54c6849ab9215 /src/gui | |
parent | 8c33b798237b95d37fe4d60ae36f0d8067504429 (diff) |
Fix build for Android with android-clang in r17
Task-number: QTBUG-67464
Change-Id: Ib971a5da82b31bce9ac1c9ac623ad7d5302cfaec
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/kernel/qplatformcursor.cpp | 2 | ||||
-rw-r--r-- | src/gui/kernel/qplatformdialoghelper.cpp | 6 | ||||
-rw-r--r-- | src/gui/painting/qpagesize.cpp | 6 |
3 files changed, 7 insertions, 7 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 diff --git a/src/gui/painting/qpagesize.cpp b/src/gui/painting/qpagesize.cpp index 8831d60d48..9cbe6ef911 100644 --- a/src/gui/painting/qpagesize.cpp +++ b/src/gui/painting/qpagesize.cpp @@ -762,7 +762,7 @@ QPageSizePrivate::QPageSizePrivate(QPageSize::PageSizeId pageSizeId) m_windowsId(0), m_units(QPageSize::Point) { - if (pageSizeId >= QPageSize::PageSizeId(0) && pageSizeId <= QPageSize::LastPageSize) + if (unsigned(pageSizeId) <= unsigned(QPageSize::LastPageSize)) init(pageSizeId, QString()); } @@ -1478,7 +1478,7 @@ QRect QPageSize::rectPixels(int resolution) const QString QPageSize::key(PageSizeId pageSizeId) { - if (pageSizeId < PageSizeId(0) || pageSizeId > LastPageSize) + if (unsigned(pageSizeId) > unsigned(LastPageSize)) return QString(); return QString::fromUtf8(qt_pageSizes[pageSizeId].mediaOption); } @@ -1497,7 +1497,7 @@ static QString msgImperialPageSizeInch(int width, int height) QString QPageSize::name(PageSizeId pageSizeId) { - if (pageSizeId < PageSizeId(0) || pageSizeId > LastPageSize) + if (unsigned(pageSizeId) > unsigned(LastPageSize)) return QString(); switch (pageSizeId) { |