Move example from techbase to own repo
ClosedPublic

Authored by ochurlaud on Aug 20 2018, 5:54 PM.

Details

Summary

Add example based on https://techbase.kde.org/Development/Tutorials/KWallet so that it can be kept up-to-date. The techbase tutoriel can be archived and not maintained anymore.

Test Plan

It compiles

Diff Detail

Repository
R311 KWallet
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 2030
Build 2048: arc lint + arc unit
ochurlaud created this revision.Aug 20 2018, 5:54 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptAug 20 2018, 5:54 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
ochurlaud requested review of this revision.Aug 20 2018, 5:54 PM

+1

Do we need a license for the example source files?

aacid added a subscriber: aacid.Aug 20 2018, 8:34 PM

-1

The example is not getting compiled it will rot

ochurlaud added a comment.EditedAug 20 2018, 8:41 PM

-1

The example is not getting compiled it will rot

I'm not sure to understand: it *can* be compiled, whereas on the current status (in the wiki) it will never be ! Maybe the next step would be to add a trigger from the make test command?

aacid added a comment.Aug 20 2018, 8:47 PM

-1

The example is not getting compiled it will rot

I'm not sure to understand: it *can* be compiled, whereas on the current status (in the wiki) it will never be ! Maybe the next step would be to add a trigger from the make test command?

It can be compiled, but it is not.

So it will rot, we've had lots of cases of this, if the code is not compiled every single time on the CI, it will eventually not compile.

dfaure added a subscriber: dfaure.Aug 20 2018, 8:55 PM

Yes this needs to be compiled so it doesn't rot.
The solution is obviously not add_subdirectory since that wouldn't catch missing find_packages etc.

One way is to have cmake run cmake, like ki18n/autotests/CMakeLists.txt does to run cmake on the ki18n_install subdir.

dfaure requested changes to this revision.Aug 20 2018, 8:58 PM

And yes this needs a license, obviously. If the original author(s) can't be reached anymore, that means rewriting the example :(

examples/asynchronous_app/CMakeLists.txt
3

CONFIG looks less negative than the old "NO_MODULE"

examples/asynchronous_app/dialog.cpp
33

Urgh, better have a QVBoxLayout* local variable.

41

new-style connect would be better

examples/asynchronous_app/dialog.h
16

nullptr

This revision now requires changes to proceed.Aug 20 2018, 8:58 PM

(or maybe the wiki was explicit about what the license was?)

ochurlaud updated this revision to Diff 40090.Aug 20 2018, 9:31 PM

Added Licence, made it compile within the whole project and fix issues raised by dfaure.

I think we shouldn't care about making the example self-standing. It's aimed at tutoring people to use the lib, not ECM nor CMake

ochurlaud marked 4 inline comments as done.Aug 20 2018, 9:32 PM

+1, OK, this works for me. Simpler indeed.

dfaure accepted this revision.Aug 20 2018, 9:36 PM
This revision is now accepted and ready to land.Aug 20 2018, 9:36 PM
This revision was automatically updated to reflect the committed changes.