From 2f22f0a935b69f2f2a866050be5b905f9df4e4b6 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Mon, 20 Mar 2017 16:59:25 +0100 Subject: fix compilation with old gcc Summary: gcc 4.8.5 (opensuse leap) fails building modeltest with CMakeFiles/testHistoryModel.dir/modeltest.cpp.o: In function `ModelTest::data()': modeltest.cpp:(.text+0x5a57): undefined reference to `bool QTest::qCompare(int const&, unsigned int const&, char const*, char const*, char const*, int)' Test Plan: builds fine now same thing should be done to modeltest usage in kwin Reviewers: #plasma, davidedmundson Reviewed By: #plasma, davidedmundson Subscribers: davidedmundson, plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D5083 --- klipper/autotests/modeltest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/klipper/autotests/modeltest.cpp b/klipper/autotests/modeltest.cpp index d42d95f..d9b70f9 100644 --- a/klipper/autotests/modeltest.cpp +++ b/klipper/autotests/modeltest.cpp @@ -453,7 +453,7 @@ void ModelTest::data() // Check that the alignment is one we know about QVariant textAlignmentVariant = model->data ( model->index ( 0, 0 ), Qt::TextAlignmentRole ); if ( textAlignmentVariant.isValid() ) { - int alignment = textAlignmentVariant.toInt(); + unsigned int alignment = textAlignmentVariant.toUInt(); QCOMPARE( alignment, ( alignment & ( Qt::AlignHorizontal_Mask | Qt::AlignVertical_Mask ) ) ); } -- cgit v0.11.2