https://bugs.kde.org/show_bug.cgi?id=428767
Bug ID: 428767 Summary: Compilation error in unit tests due to QCOMPARE parameter type mismatch -- FIX INCLUDED! Product: krita Version: 4.3.0 Platform: Kubuntu Packages OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: Unittests Assignee: krita-bugs-n...@kde.org Reporter: kde.bugtrack...@manderhanyu.plus.com Target Milestone: --- SUMMARY Compilation error in unit tests due to QCOMPARE parameter type mismatch. STEPS TO REPRODUCE mkdir kritadev cd kritadev/ mkdir build mkdir install git clone https://invent.kde.org/graphics/krita.git cd build/ cmake ../krita/ \ -DCMAKE_INSTALL_PREFIX=$HOME/kritadev/install \ -DCMAKE_BUILD_TYPE=Debug \ -DKRITA_DEVS=ON make -j24 OBSERVED RESULT CMakeFiles/kis_algebra_2d_test.dir/kis_algebra_2d_test.cpp.o: In function `KisAlgebra2DTest::testNullRectProcessing()': /home/phm/kritadev/krita/libs/image/tests/kis_algebra_2d_test.cpp:295: undefined reference to `bool QTest::qCompare<QRectF, QRect>(QRectF const&, QRect const&, char const*, char const*, char const*, int)' /home/phm/kritadev/krita/libs/image/tests/kis_algebra_2d_test.cpp:298: undefined reference to `bool QTest::qCompare<QRectF, QRect>(QRectF const&, QRect const&, char const*, char const*, char const*, int)' /home/phm/kritadev/krita/libs/image/tests/kis_algebra_2d_test.cpp:303: undefined reference to `bool QTest::qCompare<QRectF, QRect>(QRectF const&, QRect const&, char const*, char const*, char const*, int)' /home/phm/kritadev/krita/libs/image/tests/kis_algebra_2d_test.cpp:308: undefined reference to `bool QTest::qCompare<QRectF, QRect>(QRectF const&, QRect const&, char const*, char const*, char const*, int)' /home/phm/kritadev/krita/libs/image/tests/kis_algebra_2d_test.cpp:313: undefined reference to `bool QTest::qCompare<QRectF, QRect>(QRectF const&, QRect const&, char const*, char const*, char const*, int)' collect2: error: ld returned 1 exit status make[2]: *** [libs/image/tests/CMakeFiles/kis_algebra_2d_test.dir/build.make:132: libs/image/tests/kis_algebra_2d_test] Error 1 make[1]: *** [CMakeFiles/Makefile2:11773: libs/image/tests/CMakeFiles/kis_algebra_2d_test.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... EXPECTED RESULT: Successful compilation. SOFTWARE/OS VERSIONS Kubuntu 18.04 KDE Plasma Version: 5.12.9 KDE Frameworks Version: 5.440 Qt Version: 5.9.5 ADDITIONAL INFORMATION Compilation error is fixed, and Krita compiles and runs successfully, by providing matching types to the QCOMPARE macro parameters: diff --git a/libs/image/tests/kis_algebra_2d_test.cpp b/libs/image/tests/kis_algebra_2d_test.cpp index c13f64f446..c2dafe4478 100644 --- a/libs/image/tests/kis_algebra_2d_test.cpp +++ b/libs/image/tests/kis_algebra_2d_test.cpp @@ -292,25 +292,25 @@ void KisAlgebra2DTest::testNullRectProcessing() /// test transformations // translate - QCOMPARE(QTransform::fromTranslate(10, 20).mapRect(lineRect), QRect(20, 30, 100, 0)); + QCOMPARE(QTransform::fromTranslate(10, 20).mapRect(lineRect), QRectF(20, 30, 100, 0)); // scale - QCOMPARE(QTransform::fromScale(2.0, 2.0).mapRect(lineRect), QRect(20, 20, 200, 0)); + QCOMPARE(QTransform::fromScale(2.0, 2.0).mapRect(lineRect), QRectF(20, 20, 200, 0)); // rotate QTransform rot; rot.rotate(90); - QCOMPARE(rot.mapRect(lineRect), QRect(-10, 10, 0, 100)); + QCOMPARE(rot.mapRect(lineRect), QRectF(-10, 10, 0, 100)); // shear-x QTransform shearX; shearX.shear(2.0, 0.0); - QCOMPARE(shearX.mapRect(lineRect), QRect(30, 10, 100, 0)); + QCOMPARE(shearX.mapRect(lineRect), QRectF(30, 10, 100, 0)); // shear-y QTransform shearY; shearY.shear(0.0, 2.0); - QCOMPARE(shearY.mapRect(lineRect), QRect(10, 30, 100, 200)); + QCOMPARE(shearY.mapRect(lineRect), QRectF(10, 30, 100, 200)); /// binary operations > git log -1 libs/image/tests/kis_algebra_2d_test.cpp commit f2878133693c1601912a92cc9ae2bffe08e8ab42 Author: Boudewijn Rempt <b...@valdyas.org> Date: Tue Apr 14 22:28:25 2020 +0200 Fix build with Qt 5.15 Hey, The Qt Company, how about stopping breaking builds? (cherry picked from commit d1484812b588e30f5bf5e8d6bd023e483d94186a) > git log -1 commit 3b71809518785cd7dc9021f0b79d0f0d388e6fbe (HEAD, tag: v4.3.0) Author: Sharaf Zaman <sharafzaz...@gmail.com> Date: Sat May 2 20:07:18 2020 +0530 Use Google Play Inapp-billing for donations on Android&ChromeOS # Conflicts: # libs/ui/KisWelcomePageWidget.cpp # libs/ui/KisWelcomePageWidget.h (cherry picked from commit 32d7b773a76fe52d160cc1e0c2714130dde13b69) -- You are receiving this mail because: You are watching all bug changes.