It's a first step to port to kf5
Details
- Reviewers
bensi ervin dfaure franckarrecot
application works :)
Not all code is still ported.
In progress.
But zanshin works fine.
Diff Detail
- Repository
- R4 Zanshin
- Lint
Lint Skipped - Unit
Unit Tests Skipped
More work needed obviously, but that's to be expected. ;-)
I didn't point it out earlier, but this patch also shows deleted files in 3rdparty/kdepim/libkdepim/tests. Looks like a mistake since the CMakeLists.txt files around there got adjusted.
Marking as Request Changes mainly to not have it stay in my review list. ;-)
3rdparty/CMakeLists.txt | ||
---|---|---|
8–10 | Do you have an idea ? /compile/kde5/zanshin/3rdparty/cucumber-cpp/src/drivers/BoostDriver.cpp: In member function ‘void cucumber::internal::BoostStep::initBoostTest()’: if (!framework::is_initialized()) { ^ /compile/kde5/zanshin/3rdparty/cucumber-cpp/src/drivers/BoostDriver.cpp:87:30: error: invalid new-expression of abstract class type ‘cucumber::internal::CukeBoostLogInterceptor’ logInterceptor = new CukeBoostLogInterceptor; ^ /compile/kde5/zanshin/3rdparty/cucumber-cpp/src/drivers/BoostDriver.cpp:28:7: note: because the following virtual functions are pure within ‘cucumber::internal::CukeBoostLogInterceptor’: ^ In file included from /compile/kde5/zanshin/3rdparty/cucumber-cpp/src/drivers/BoostDriver.cpp:8:0: virtual void log_exception_start( std::ostream& os, log_checkpoint_data const& lcd, execution_exception const& ex ) = 0; ^ /usr/include/boost/test/unit_test_log_formatter.hpp:171:25: note: virtual void boost::unit_test::unit_test_log_formatter::log_exception_finish(std::ostream&) virtual void log_exception_finish( std::ostream& os ) = 0; ^ /usr/include/boost/test/unit_test_log_formatter.hpp:222:25: note: virtual void boost::unit_test::unit_test_log_formatter::entry_context_start(std::ostream&, boost::unit_test::log_level) virtual void entry_context_start( std::ostream& os, log_level l ) = 0; ^ /usr/include/boost/test/unit_test_log_formatter.hpp:230:25: note: virtual void boost::unit_test::unit_test_log_formatter::log_entry_context(std::ostream&, boost::unit_test::const_string) virtual void log_entry_context( std::ostream& os, const_string value ) = 0; ^ /usr/include/boost/test/unit_test_log_formatter.hpp:236:25: note: virtual void boost::unit_test::unit_test_log_formatter::entry_context_finish(std::ostream&) virtual void entry_context_finish( std::ostream& os ) = 0; ^ /compile/kde5/zanshin/3rdparty/cucumber-cpp/src/drivers/BoostDriver.cpp: In member function ‘void cucumber::internal::BoostStep::initBoostTest()’: if (!framework::is_initialized()) { ^ /compile/kde5/zanshin/3rdparty/cucumber-cpp/src/drivers/BoostDriver.cpp:87:30: error: invalid new-expression of abstract class type ‘cucumber::internal::CukeBoostLogInterceptor’ logInterceptor = new CukeBoostLogInterceptor; ^ /compile/kde5/zanshin/3rdparty/cucumber-cpp/src/drivers/BoostDriver.cpp:28:7: note: because the following virtual functions are pure within ‘cucumber::internal::CukeBoostLogInterceptor’: ^ In file included from /compile/kde5/zanshin/3rdparty/cucumber-cpp/src/drivers/BoostDriver.cpp:8:0: virtual void log_exception_start( std::ostream& os, log_checkpoint_data const& lcd, execution_exception const& ex ) = 0; ^ /usr/include/boost/test/unit_test_log_formatter.hpp:171:25: note: virtual void boost::unit_test::unit_test_log_formatter::log_exception_finish(std::ostream&) virtual void log_exception_finish( std::ostream& os ) = 0; ^ /usr/include/boost/test/unit_test_log_formatter.hpp:222:25: note: virtual void boost::unit_test::unit_test_log_formatter::entry_context_start(std::ostream&, boost::unit_test::log_level) virtual void entry_context_start( std::ostream& os, log_level l ) = 0; ^ /usr/include/boost/test/unit_test_log_formatter.hpp:230:25: note: virtual void boost::unit_test::unit_test_log_formatter::log_entry_context(std::ostream&, boost::unit_test::const_string) virtual void log_entry_context( std::ostream& os, const_string value ) = 0; ^ /usr/include/boost/test/unit_test_log_formatter.hpp:236:25: note: virtual void boost::unit_test::unit_test_log_formatter::entry_context_finish(std::ostream&) virtual void entry_context_finish( std::ostream& os ) = 0; ^ 3rdparty/cucumber-cpp/src/CMakeFiles/cucumber-cpp.dir/build.make:374 : la recette pour la cible « 3rdparty/cucumber-cpp/src/CMakeFiles/cucumber-cpp.dir/drivers/BoostDriver.cpp.o » a échouée |
See D730 for a possible fix to your cucumber-cpp failure. It's not due to the KF5 port but to the fact that you got boost 1.59 and they changed the testing API there.
I fixed compile of unitest (with kevin fix about boost)
I readded some libkdepim tests
I reactivated some codes
I pointed out the changes I had to make to have it build for me (on top of 15.08). You likely also want to replace KDE4_BUILD_TESTS with BUILD_TESTING in the CMakeLists.txt (I did that locally).
3rdparty/kdepim/libkdepim/addressline/addresseelineedit.cpp | ||
---|---|---|
47 | Should be "recentaddress/recentaddresses.h" | |
3rdparty/kdepim/libkdepim/addressline/addresseelineedit_p.h | ||
27 | Should be "ldap/ldapclient.h", I guess it works for you because it picks up your 15.12 install. | |
3rdparty/kdepim/libkdepim/addressline/addresseelineeditstatic.cpp | ||
22 | Should be "ldap/ldapclient.h" | |
3rdparty/kdepim/libkdepim/completionorder/completionordereditor.cpp | ||
36 | Should be "ldap/ldapclient.h" | |
3rdparty/kdepim/libkdepim/completionorder/completionorderwidget.cpp | ||
25 | Should be "ldap/ldapclient.h" | |
tests/testlib/akonadifakedata.cpp | ||
168 | Should be just m_tags.values(). | |
tests/testlib/akonadifakedataxmlloader.cpp | ||
94 | Should still be QVector<Akonadi::Tag>(). |
More changes I found while looking for the acceptance tests (they still crash at runtime though).
tests/features/renku/features/CMakeLists.txt | ||
---|---|---|
1–2 ↗ | (On Diff #1706) | Those changes should go away. |
tests/features/renku/features/step_definitions/CMakeLists.txt | ||
20 | Also needs KF5::AkonadiWidgets and KF5::AkonadiXml. | |
tests/features/zanshin/features/CMakeLists.txt | ||
1–2 ↗ | (On Diff #1706) | Those changes should go away |
tests/features/zanshin/features/step_definitions/CMakeLists.txt | ||
20 | Also needs KF5::AkonadiWidgets and KF5::AkonadiXml. |
tests/features/renku/features/CMakeLists.txt | ||
---|---|---|
1–2 ↗ | (On Diff #1706) | Oh I didn't see that I commented this code. |
tests/testlib/akonadifakedata.cpp | ||
168 | But in 5.1 we ported all to QVector not QList. | |
tests/testlib/akonadifakedataxmlloader.cpp | ||
94 | kdepimlibs 5.1 we use QVector not QList |
tests/testlib/akonadifakedata.cpp | ||
---|---|---|
168 | Apparently moving to QVector was forgotten for tags in 15.08... because of that there will be some ifdef'ing at play unfortunately. |
I reenabled all commented directory (I hope)
I fixed build against 5.0
I renamed desktop file as org.kde.*
I autogenerate export symbol file (even if it's a static lib we have this header so use generated file)
Couple more adjustments needed to have it all build on top of 15.08.
It builds all the tests and everything with the adjustments I propose... but I got 9 test suites out of 76 failing.
CMakeLists.txt | ||
---|---|---|
90 | There's apparently a problem somewhere regarding the KF5AkonadiConfig.cmake file. Here with 15.08, it doesn't claim 5.0 as a version but lower. I'd say let's make that 4.80 instead of 5.0. With that adjustment your patch builds for me. | |
tests/units/akonadi/CMakeLists.txt | ||
9–10 | This change needs to be removed. |
Still a few bits of commented out code and forgotten older comments to address.
src/widgets/availablesourcesview.cpp | ||
---|---|---|
37 | Please remove that include and corresponding KDELibs4Support. | |
src/zanshin/CMakeLists.txt | ||
3–4 | Still problems porting that one? | |
tests/units/testlib/akonadifakedatatest.cpp | ||
37–44 | Did you try to get rid of the ternary? Both compare_helper calls are awefuly similar now. |
OK, last round of changes I guess. Almost there!
3rdparty/cucumber-cpp/src/CMakeLists.txt | ||
---|---|---|
37 | In this file at the top, please set the minimum required cmake version to 3.3 | |
CMakeLists.txt | ||
1 | Please set it to 3.3. | |
88–92 | OK, turns out I won't be able to test properly on 15.08 anyway so I won't be able to guarantee it'll keep building. Please remove that and make it simply require KF5Akonadi 5.1. Also kill all uses of AKONADI_OLD_API. | |
tests/testlib/MacroAkonadiAutoTests.cmake | ||
10 | Below in this file, please change:
| |
tests/testlib/akonadifakedata.cpp | ||
168 | Remove the #ifdef. | |
170 | Keep only that line. | |
tests/testlib/akonadifakedataxmlloader.cpp | ||
92–93 | Remove the #ifdef. | |
95 | Keep only that line... Could be Akonadi::Tag::List I guess? Would avoid the potential underlying type change breaks. |
OK, a tiny adjustment still needed. Totally my fault I pointed at the wrong file earlier.
3rdparty/cucumber-cpp/src/CMakeLists.txt | ||
---|---|---|
1 | Dammit! Sorry... I meant in 3rdparty/cucumber-cpp/CMakeLists.txt and not 3rdparty/cucumber-cpp/src/CMakeLists.txt ... :-/ |