Make kdevelop-app and kdev-plugins use Qt5 resources for splash, rc, knsrc
ClosedPublic

Authored by amccann on Nov 12 2015, 3:15 AM.

Details

Summary

If resources are not found in filesystem, they will be read from binary via resource path

Test Plan

Compile, remove file from 'regular' system locations, ensure related feature still functions

Diff Detail

Repository
R32 KDevelop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
amccann updated this revision to Diff 1235.Nov 12 2015, 3:15 AM
amccann retitled this revision from to Make kdevelop-app and kdev-plugins use Qt5 resources for splash, rc, knsrc.
amccann updated this object.
amccann edited the test plan for this revision. (Show Details)
amccann added reviewers: kfunk, mwolff.
Restricted Application added a subscriber: kdevelop-devel. · View Herald TranscriptNov 12 2015, 3:15 AM

Related To D528 for kdevplatform

kfunk added inline comments.Nov 12 2015, 10:36 AM
app/splash.cpp
41

Why the check? We can assert that splash.qml is in the QRC.

amccann added inline comments.Nov 12 2015, 11:14 AM
app/splash.cpp
41

The QStandardPaths::locate() call above doesn't search the QRC.

I was taking a strategy of 'smallest change' .. Which, in this case means that if the file is in the "legacy" path location, it would load that instead of the QRC, which.. For other files is sometimes desired (Then they can be modified, etc)

That said, you raise a good point. There's no reason to allow a custom splash.qml.

This entire block could be replaced with:

setSource(QUrl("qrc:/kdevelop/splash.qml"));

I will do that.

amccann updated this revision to Diff 1239.Nov 12 2015, 11:26 AM
  • exclusivly load splash from QRC
mwolff added a project: KDevelop.
mwolff accepted this revision.Nov 12 2015, 11:38 AM
mwolff edited edge metadata.

some small changes, then go for it

app/splash.cpp
41

make this QUrl(QStringLiteral(...))

projectmanagers/cmake/tests/manual/kde4app/CMakeLists.txt
18 ↗(On Diff #1239)

drop this, it's a test, not really getting build

projectmanagers/cmake/tests/manual/kde4app/kde4app.qrc
1 ↗(On Diff #1239)

drop this, it's a test, not really getting build

This revision is now accepted and ready to land.Nov 12 2015, 11:38 AM
kfunk accepted this revision.Nov 12 2015, 11:53 AM
kfunk edited edge metadata.

After fixing Milian's concerns: LGTM

Great work!

app/CMakeLists.txt
20

Nitpick: Here and in other parts: No spaces inside after/before '('/')'

amccann updated this revision to Diff 1244.Nov 12 2015, 12:41 PM
amccann edited edge metadata.
  • address reviewed concerns
amccann marked 4 inline comments as done.Nov 12 2015, 12:48 PM
amccann marked 2 inline comments as done.Nov 12 2015, 12:49 PM
This revision was automatically updated to reflect the committed changes.