Port to kf5
ClosedPublic

Authored by mlaurent on Dec 28 2015, 7:47 PM.

Details

Summary

It's a first step to port to kf5

Test Plan

application works :)
Not all code is still ported.
In progress.

But zanshin works fine.

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped
There are a very large number of changes, so older changes are hidden. Show Older Changes
ervin requested changes to this revision.Dec 29 2015, 8:06 PM
ervin edited edge metadata.

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. ;-)

This revision now requires changes to proceed.Dec 29 2015, 8:06 PM
mlaurent added inline comments.Dec 31 2015, 1:51 PM
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()’:
/compile/kde5/zanshin/3rdparty/cucumber-cpp/src/drivers/BoostDriver.cpp:83:10: error: ‘is_initialized’ is not a member of ‘boost::unit_test::framework’

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’:
class CukeBoostLogInterceptor : public ::boost::unit_test::unit_test_log_formatter {

^

In file included from /compile/kde5/zanshin/3rdparty/cucumber-cpp/src/drivers/BoostDriver.cpp:8:0:
/usr/include/boost/test/unit_test_log_formatter.hpp:164:25: note: virtual void boost::unit_test::unit_test_log_formatter::log_exception_start(std::ostream&, const boost::unit_test::log_checkpoint_data&, const boost::execution_exception&)

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()’:
/compile/kde5/zanshin/3rdparty/cucumber-cpp/src/drivers/BoostDriver.cpp:83:10: error: ‘is_initialized’ is not a member of ‘boost::unit_test::framework’

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’:
class CukeBoostLogInterceptor : public ::boost::unit_test::unit_test_log_formatter {

^

In file included from /compile/kde5/zanshin/3rdparty/cucumber-cpp/src/drivers/BoostDriver.cpp:8:0:
/usr/include/boost/test/unit_test_log_formatter.hpp:164:25: note: virtual void boost::unit_test::unit_test_log_formatter::log_exception_start(std::ostream&, const boost::unit_test::log_checkpoint_data&, const boost::execution_exception&)

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
make[2]: * [3rdparty/cucumber-cpp/src/CMakeFiles/cucumber-cpp.dir/drivers/BoostDriver.cpp.o] Erreur 1
CMakeFiles/Makefile2:163 : la recette pour la cible « 3rdparty/cucumber-cpp/src/CMakeFiles/cucumber-cpp.dir/all » a échouée
make[1]:
* [3rdparty/cucumber-cpp/src/CMakeFiles/cucumber-cpp.dir/all] Erreur 2
make[1]: * Attente des tâches non terminées....
3rdparty/cucumber-cpp/src/CMakeFiles/cucumber-cpp-nomain.dir/build.make:374 : la recette pour la cible « 3rdparty/cucumber-cpp/src/CMakeFiles/cucumber-cpp-nomain.dir/drivers/BoostDriver.cpp.o » a échouée
make[2]:
* [3rdparty/cucumber-cpp/src/CMakeFiles/cucumber-cpp-nomain.dir/drivers/BoostDriver.cpp.o] Erreur 1
CMakeFiles/Makefile2:200 : la recette pour la cible « 3rdparty/cucumber-cpp/src/CMakeFiles/cucumber-cpp-nomain.dir/all » a échouée
make[1]: * [3rdparty/cucumber-cpp/src/CMakeFiles/cucumber-cpp-nomain.dir/all] Erreur 2
Makefile:138 : la recette pour la cible « all » a échouée
make:
* [all] Erreur 2
l

ervin added a comment.Jan 2 2016, 12:21 AM

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.

mlaurent updated this revision to Diff 1706.Jan 3 2016, 1:00 PM
mlaurent edited edge metadata.
mlaurent removed R4 Zanshin as the repository for this revision.

I fixed compile of unitest (with kevin fix about boost)
I readded some libkdepim tests
I reactivated some codes

ervin edited edge metadata.Jan 3 2016, 6:35 PM
ervin set the repository for this revision to R4 Zanshin.
ervin requested changes to this revision.Jan 3 2016, 7:08 PM
ervin edited edge metadata.

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
169–172

Should be just m_tags.values().

tests/testlib/akonadifakedataxmlloader.cpp
94

Should still be QVector<Akonadi::Tag>().

This revision now requires changes to proceed.Jan 3 2016, 7:08 PM
ervin added a comment.Jan 3 2016, 7:24 PM

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.

mlaurent added inline comments.Jan 3 2016, 8:16 PM
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
169–172

But in 5.1 we ported all to QVector not QList.
So indeed we can't build against 5.1 and 5.0
So we need a check against akonadi version

tests/testlib/akonadifakedataxmlloader.cpp
94

kdepimlibs 5.1 we use QVector not QList

ervin added inline comments.Jan 3 2016, 9:46 PM
tests/testlib/akonadifakedata.cpp
169–172

Apparently moving to QVector was forgotten for tags in 15.08... because of that there will be some ifdef'ing at play unfortunately.

mlaurent updated this revision to Diff 1724.Jan 4 2016, 12:59 PM
mlaurent edited edge metadata.
mlaurent removed R4 Zanshin as the repository for this revision.

I reenabled all commented directory (I hope)
I fixed build against 5.0
I renamed desktop file as org.kde.*

mlaurent updated this revision to Diff 1740.Jan 5 2016, 8:04 AM
mlaurent edited edge metadata.

I autogenerate export symbol file (even if it's a static lib we have this header so use generated file)

ervin set the repository for this revision to R4 Zanshin.Jan 5 2016, 8:13 PM
ervin requested changes to this revision.Jan 5 2016, 8:31 PM
ervin edited edge metadata.

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–11

This change needs to be removed.

This revision now requires changes to proceed.Jan 5 2016, 8:31 PM
mlaurent updated this revision to Diff 1757.Jan 6 2016, 12:34 PM
mlaurent edited edge metadata.
mlaurent removed R4 Zanshin as the repository for this revision.

Reactivate and port commented test.
Fix akonadi version.

ervin edited edge metadata.Jan 9 2016, 12:38 PM
ervin set the repository for this revision to R4 Zanshin.
ervin requested changes to this revision.Jan 9 2016, 12:54 PM
ervin edited edge metadata.

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
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.

This revision now requires changes to proceed.Jan 9 2016, 12:54 PM
mlaurent marked 3 inline comments as done.Jan 10 2016, 9:47 AM
mlaurent updated this revision to Diff 1833.Jan 10 2016, 9:48 AM
mlaurent edited edge metadata.
mlaurent removed R4 Zanshin as the repository for this revision.

Port runner. Port K4AboutData to KAboutData. Fix error reported by Kevin

ervin edited edge metadata.Jan 11 2016, 8:19 AM
ervin set the repository for this revision to R4 Zanshin.
mlaurent updated this revision to Diff 1865.Jan 11 2016, 12:59 PM

Rebase against master

ervin requested changes to this revision.Jan 12 2016, 6:45 PM
ervin edited edge metadata.

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:

  • ${_location}.bat to ${_location}.exe
  • ${_location}.shell to ${_location}
tests/testlib/akonadifakedata.cpp
168

Remove the #ifdef.

171

Keep only that line.

tests/testlib/akonadifakedataxmlloader.cpp
93

Remove the #ifdef.

96

Keep only that line... Could be Akonadi::Tag::List I guess? Would avoid the potential underlying type change breaks.

This revision now requires changes to proceed.Jan 12 2016, 6:45 PM
mlaurent updated this revision to Diff 1912.Jan 13 2016, 5:45 AM
mlaurent edited edge metadata.
mlaurent marked an inline comment as done.

Last fix :)

ervin requested changes to this revision.Jan 13 2016, 6:20 AM
ervin edited edge metadata.

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 ... :-/

This revision now requires changes to proceed.Jan 13 2016, 6:20 AM
mlaurent updated this revision to Diff 1913.Jan 13 2016, 6:26 AM
mlaurent edited edge metadata.

Fix cmake requires in good file

ervin accepted this revision.Jan 13 2016, 6:29 AM
ervin edited edge metadata.

Let's make it happen!

This revision is now accepted and ready to land.Jan 13 2016, 6:29 AM
mlaurent closed this revision.Jan 13 2016, 6:48 AM

kf5 done :)