diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2015-06-30 22:11:15 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2015-07-06 12:46:26 +0000 |
commit | 82f48c7d326fb599e82c9a92d856fab531012591 (patch) | |
tree | 59ebc6e3416488d0c1d332868c291c429a2f6fd2 /src/testlib/qtest_gui.h | |
parent | 283f19924d427dc4a3841199c06aefde8b41ad2d (diff) |
QtTestLib: Use Q_NULLPTR instead of 0 in all public headers
This is in preparation of adding -Wzero-as-null-pointer-constant (or similar)
to the headers check.
Since QtTestLib has a lot of templates and macros, not all uses of 0 as nullptr
might have been detected by the headersclean check.
Task-number: QTBUG-45291
Change-Id: I21e9d8822e3a708010938e8d5ef2fd42ae6c8c68
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/testlib/qtest_gui.h')
-rw-r--r-- | src/testlib/qtest_gui.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/testlib/qtest_gui.h b/src/testlib/qtest_gui.h index a474758de6..beae9ec065 100644 --- a/src/testlib/qtest_gui.h +++ b/src/testlib/qtest_gui.h @@ -86,24 +86,24 @@ inline bool qCompare(QImage const &t1, QImage const &t2, qsnprintf(msg, 1024, "Compared QImages differ.\n" " Actual (%s).isNull(): %d\n" " Expected (%s).isNull(): %d", actual, t1Null, expected, t2Null); - return compare_helper(false, msg, 0, 0, actual, expected, file, line); + return compare_helper(false, msg, Q_NULLPTR, Q_NULLPTR, actual, expected, file, line); } if (t1Null && t2Null) - return compare_helper(true, 0, 0, 0, actual, expected, file, line); + return compare_helper(true, Q_NULLPTR, Q_NULLPTR, Q_NULLPTR, actual, expected, file, line); if (t1.width() != t2.width() || t1.height() != t2.height()) { qsnprintf(msg, 1024, "Compared QImages differ in size.\n" " Actual (%s): %dx%d\n" " Expected (%s): %dx%d", actual, t1.width(), t1.height(), expected, t2.width(), t2.height()); - return compare_helper(false, msg, 0, 0, actual, expected, file, line); + return compare_helper(false, msg, Q_NULLPTR, Q_NULLPTR, actual, expected, file, line); } if (t1.format() != t2.format()) { qsnprintf(msg, 1024, "Compared QImages differ in format.\n" " Actual (%s): %d\n" " Expected (%s): %d", actual, t1.format(), expected, t2.format()); - return compare_helper(false, msg, 0, 0, actual, expected, file, line); + return compare_helper(false, msg, Q_NULLPTR, Q_NULLPTR, actual, expected, file, line); } return compare_helper(t1 == t2, "Compared values are not the same", toString(t1), toString(t2), actual, expected, file, line); @@ -120,17 +120,17 @@ inline bool qCompare(QPixmap const &t1, QPixmap const &t2, const char *actual, c qsnprintf(msg, 1024, "Compared QPixmaps differ.\n" " Actual (%s).isNull(): %d\n" " Expected (%s).isNull(): %d", actual, t1Null, expected, t2Null); - return compare_helper(false, msg, 0, 0, actual, expected, file, line); + return compare_helper(false, msg, Q_NULLPTR, Q_NULLPTR, actual, expected, file, line); } if (t1Null && t2Null) - return compare_helper(true, 0, 0, 0, actual, expected, file, line); + return compare_helper(true, Q_NULLPTR, Q_NULLPTR, Q_NULLPTR, actual, expected, file, line); if (t1.width() != t2.width() || t1.height() != t2.height()) { qsnprintf(msg, 1024, "Compared QPixmaps differ in size.\n" " Actual (%s): %dx%d\n" " Expected (%s): %dx%d", actual, t1.width(), t1.height(), expected, t2.width(), t2.height()); - return compare_helper(false, msg, 0, 0, actual, expected, file, line); + return compare_helper(false, msg, Q_NULLPTR, Q_NULLPTR, actual, expected, file, line); } return qCompare(t1.toImage(), t2.toImage(), actual, expected, file, line); } |