Cleanup file resolving
Needs RevisionPublic

Authored by nicolasfella on Mon, Mar 16, 10:08 AM.

Details

Reviewers
mart
keithzg
vkrause
Group Reviewers
Kirigami
Summary

The current code is ... a mess. resolveFileUrl and resolveFilePath do very similar things, except that one returns a path instead of a URL. resolveFileUrl also didn't include a qrc path for static builds, instead there was a similar ifdef before the call to it.

Test Plan

Tested on desktop system with regular shared Kirigami.

Needs testing on Android with shared/static Kirigami

Diff Detail

Repository
R169 Kirigami
Branch
resolve
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 23747
Build 23765: arc lint + arc unit
nicolasfella created this revision.Mon, Mar 16, 10:08 AM
Restricted Application added a project: Kirigami. · View Herald TranscriptMon, Mar 16, 10:08 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
nicolasfella requested review of this revision.Mon, Mar 16, 10:08 AM
nicolasfella edited the summary of this revision. (Show Details)Mon, Mar 16, 10:11 AM
nicolasfella edited the test plan for this revision. (Show Details)
nicolasfella added reviewers: Kirigami, mart, keithzg.
nicolasfella added a reviewer: vkrause.
broulik added inline comments.
src/kirigamiplugin.h
51

Doesn't that have to be qrc to be a valid URL?

58

You sure a qrc URL turns into a local path (or rather Qt's internal :/ magic path) like this?

mart added inline comments.Mon, Mar 16, 11:14 AM
src/kirigamiplugin.h
58

i think only :/ works?

keithzg requested changes to this revision.Tue, Mar 17, 5:59 AM

Compiles when included in an Android Debug build but when attempting to run an application I hit an immediate crash on startup with:

Android logcat
QQmlApplicationEngine failed to load component
qrc:/qml/main.qml:8:1: Type Kirigami.ApplicationWindow unavailable
qrc:/android_rcc_bundle/qml/org/kde/kirigami.2/ApplicationWindow.qml: No such file or directory

Trying an Android Release compile still fails on the pre-exisiting error of being unable to include <qrc_kirigami.cpp> in

kirigamiplugin.cpp
#ifdef KIRIGAMI_BUILD_TYPE_STATIC
#include <qrc_kirigami.cpp>
#endif

So unfortunately nothing is better and one side of things is worse, from the perspective of Android + QMake :(

This revision now requires changes to proceed.Tue, Mar 17, 5:59 AM