diff options
author | Jason McDonald <jason.mcdonald@nokia.com> | 2011-12-30 15:51:05 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-01-03 02:57:12 +0100 |
commit | fda36df6babf20bcfd04a54a1336a9c26e72a8ef (patch) | |
tree | 0c09018e6db15ea40e156b38854e224e62e9130f /tests/auto/gui/painting/qpainter | |
parent | 39f3ee8a5dd499cf86f95e7fc9200eb3226b16be (diff) |
Use true and false in preference to TRUE and FALSE in tests.
Use the C++ boolean constants true and false instead of the C macros
TRUE and FALSE (which are actually integers), and use QVERIFY instead of
QCOMPARE for verifying simple boolean expressions.
Change-Id: Ie76dfcab6722df6b93b3fa62b0f3437901482932
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Diffstat (limited to 'tests/auto/gui/painting/qpainter')
-rw-r--r-- | tests/auto/gui/painting/qpainter/tst_qpainter.cpp | 2 | ||||
-rw-r--r-- | tests/auto/gui/painting/qpainter/utils/createImages/main.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp index c868e9fa39..4faecad104 100644 --- a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp +++ b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp @@ -347,7 +347,7 @@ Q_DECLARE_METATYPE(QRegion) tst_QPainter::tst_QPainter() { // QtTestCase sets this to false, but this turns off alpha pixmaps on Unix. - QApplication::setDesktopSettingsAware(TRUE); + QApplication::setDesktopSettingsAware(true); } tst_QPainter::~tst_QPainter() diff --git a/tests/auto/gui/painting/qpainter/utils/createImages/main.cpp b/tests/auto/gui/painting/qpainter/utils/createImages/main.cpp index 418c385717..a5a948a8e1 100644 --- a/tests/auto/gui/painting/qpainter/utils/createImages/main.cpp +++ b/tests/auto/gui/painting/qpainter/utils/createImages/main.cpp @@ -127,7 +127,7 @@ static QBitmap createSrcBitmap( int size, int border ) painter.drawRect( border, border, size, size2 ); painter.end(); if ( border > 0 ) { - QBitmap mask( totalSize, totalSize, TRUE ); + QBitmap mask( totalSize, totalSize, true ); QPainter painter; painter.begin( &mask ); painter.setPen( QPen( Qt::color1, 1 ) ); @@ -171,7 +171,7 @@ int main( int argc, char **argv ) QBitmap src_tmp = createSrcBitmap( 32, 0 ).xForm( QWMatrix( 1, 0, 0, -1, 0, 0 ) ); src_tmp.resize( 32, 48 ); QBitmap src2 = src_tmp.xForm( QWMatrix( 1, 0, 0, -1, 0, 0 ) ); - QBitmap mask( 32, 48, TRUE ); + QBitmap mask( 32, 48, true ); { QPainter painter; painter.begin( &mask ); |