Bug 409951 - Missing component KDev::Tests required for Umbrello
Summary: Missing component KDev::Tests required for Umbrello
Status: RESOLVED WORKSFORME
Alias: None
Product: kdevplatform
Classification: Developer tools
Component: general (show other bugs)
Version: 5.3.2
Platform: Other All
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-18 12:40 UTC by Ralf Habacker
Modified: 2020-02-03 04:33 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
build log (959.96 KB, application/gzip)
2020-01-03 12:33 UTC, Ralf Habacker
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Habacker 2019-07-18 12:40:01 UTC
kdevplatform does not export the mentioned component, which is required by umbrello KF5 builds to support php code import.

STEPS TO REPRODUCE
1. See https://cgit.kde.org/umbrello.git/tree/CMakeLists.txt#n101

OBSERVED RESULT
The cmake find_package related files provided by kdevplatform does not export the target KDev::Tests

EXPECTED RESULT
The cmake find_package related files provided by kdevplatform should export KDev::Tests target
Comment 1 Ralf Habacker 2019-12-31 17:53:02 UTC
This is still an issue and need to be fixed.
Comment 2 Kevin Funk 2020-01-02 07:09:23 UTC
This needs more information.

How to reproduce (how to build Umbrello?), exact error output, etc. pp..

The Tests target is exported (checked with KDevelop from master branch), cf.

/home/kfunk/devel/install/kf5/lib/x86_64-linux-gnu/cmake/KDevPlatform/KDevPlatformTargets.cmake

19:foreach(_expectedTarget KDev::Sublime KDev::Interfaces KDev::Project KDev::Language KDev::Shell KDev::Util KDev::OutputView KDev::Vcs KDev::Debugger KDev::Documentation KDev::Serialization KDev::Tests KDev::IExecute)
142:# Create imported target KDev::Tests
143:add_library(KDev::Tests SHARED IMPORTED)
145:set_target_properties(KDev::Tests PROPERTIES
Comment 3 Ralf Habacker 2020-01-03 12:33:26 UTC
Created attachment 124867 [details]
build log

This happens with building umbrello for opensuse (https://build.opensuse.org/package/show/KDE:Applications/umbrello) with kdevplatform 5.4.5 

From the appended log you can see that the imported target KDev::Tests is not present:

[  184s] -- Found KDevelop-PG-Qt
[  184s] --   Using kdevelop-pg-qt include dir: /usr/include/kdevelop-pg-qt
[  184s] --   Using kdevelop-pg-qt executable: /usr/bin/kdev-pg-qt
[  184s] -- Found KDevPlatform: /usr/lib64/cmake/KDevPlatform/KDevPlatformConfig.cmake (Required is at least version "5.1.2") 
[  184s] -- Could not find required KDevPlatform component KDev::Tests - disabling php import support

kdevplatform-devel is used from https://build.opensuse.org/package/show/KDE:Extra/kdevelop5.

> The Tests target is exported (checked with KDevelop from master branch)

I guess that the git branch, from which kdevplatform version 5.4.5 is build, does not install KDev::Test target.

> (how to build Umbrello?)
1. Register at build.opensuse.org if not already done.

2. Install osc (example if for opensuse)
   sudo zypper install osc

3. checkout sources and build script
    osc co KDE:Applications/umbrello
    cd KDE:Applications/umbrello

4. build
    osc build KDE_Frameworks5_openSUSE_Tumbleweed

5. ion case of errors enter chroot
    osc chroot KDE_Frameworks5_openSUSE_Tumbleweed
    cd rpmbuild/BUILD/...
Comment 4 Kevin Funk 2020-01-03 14:55:39 UTC
I just realized what might be wrong:

The KDev::Tests target is only built when BUILD_TESTING=ON in CMake. You'll need to adapt in Umbrello and do the same: Only /use/ KDev::Tests when BUILD_TESTING=ON.

Side note: If Umbrello wouldn't (still) have the WebKit dependency I could play around more easily with it and thus help. Also wondering why you are trying so hard keeping Qt4 compatibility in such a project, it makes reading the CMake code much more tedious.
Comment 5 Ralf Habacker 2020-01-03 15:07:15 UTC
(In reply to Kevin Funk from comment #4)
> I just realized what might be wrong:
> 
> The KDev::Tests target is only built when BUILD_TESTING=ON in CMake. You'll
> need to adapt in Umbrello and do the same: Only /use/ KDev::Tests when
> BUILD_TESTING=ON.
This will not work with recent code. The php code importer depends on classes provided by KDev::Tests, see https://cgit.kde.org/umbrello.git/tree/umbrello/codeimport/phpimport.cpp
Comment 6 Ralf Habacker 2020-01-03 15:41:42 UTC
(In reply to Kevin Funk from comment #4)
> Side note: If Umbrello wouldn't (still) have the WebKit dependency
Does QWebEngine now supports printing headers and footers ?
Comment 7 Kevin Funk 2020-01-03 15:44:44 UTC
CC'ing Friedrich who's also worked on the BUILD_TESTING related changes.

These classes shouldn't be used outside of unit tests IMO (they could assert or have any ill-formed behavior). You would not want this in production code.

A solution approach: I'd just create and shut down the core manually in your code. And provide a custom ShellExtension subclass. Shouldn't be difficult, and it could result in even less code than in the implementation(s) provided in KDev::Tests.
Comment 8 Ralf Habacker 2020-01-03 16:04:56 UTC
> (In reply to Kevin Funk from comment #4)
> > Side note: If Umbrello wouldn't (still) have the WebKit dependency
And can you tell me how to emulate QWebPage::setLinkDelegationPolicy behavior ?

I tried the hint at https://doc.qt.io/qt-5/qtwebenginewidgets-qtwebkitportingguide.html, which does not work. 

Instead of receiving the clicked url by a signal and not changing the displayed page, it is instead called once when the page is loaded acceptNavigationRequest(). When clicking on a link of the welcome page, an empty page is displayed and the clicked URL is not signaled.
Comment 9 Ralf Habacker 2020-01-04 01:06:37 UTC
(In reply to Kevin Funk from comment #7)
> A solution approach: I'd just create and shut down the core manually in your
> code. And provide a custom ShellExtension subclass. Shouldn't be difficult,
> and it could result in even less code than in the implementation(s) provided
> in KDev::Tests.

Even if this would be newly implemented in Umbrello, there are still references to KDev::Tests within the kdevplatform helper class DebugLanguageParserHelper, which seems to be intended for use in a generated php parser. 

From https://github.com/KDE/kdevelop/blob/master/kdevplatform/language/util/debuglanguageparserhelper.h#L56

 * It should work fine for any KDevelop-PG-Qt based parser.
Comment 10 Ralf Habacker 2020-01-04 11:11:28 UTC
(In reply to Ralf Habacker from comment #9)
> (In reply to Kevin Funk from comment #7)
> > A solution approach: I'd just create and shut down the core manually in your
> > code. And provide a custom ShellExtension subclass. Shouldn't be difficult,
> > and it could result in even less code than in the implementation(s) provided
> > in KDev::Tests.
> 
> Even if this would be newly implemented in Umbrello, there are still
> references to KDev::Tests within the kdevplatform helper class
> DebugLanguageParserHelper, which seems to be intended for use in a generated
> php parser. 
> 
> From
> https://github.com/KDE/kdevelop/blob/master/kdevplatform/language/util/
> debuglanguageparserhelper.h#L56
> 
>  * It should work fine for any KDevelop-PG-Qt based parser.

kdev5-php also depends on this class.
Comment 11 Bug Janitor Service 2020-01-19 04:33:12 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 12 Bug Janitor Service 2020-02-03 04:33:17 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!