D28068: Cleanup file resolving

2020-03-17 Thread Keith Zubot-Gephart
keithzg requested changes to this revision.
keithzg added a comment.
This revision now requires changes to proceed.


  Compiles when included in an Android Debug build but when attempting to run 
an application I hit an immediate crash on startup with:
  
  name=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 `` in
  
  name=kirigamiplugin.cpp
#ifdef KIRIGAMI_BUILD_TYPE_STATIC
#include 
#endif
  
  So unfortunately nothing is better and one side of things is worse, from the 
perspective of Android + QMake :(

REPOSITORY
  R169 Kirigami

REVISION DETAIL
  https://phabricator.kde.org/D28068

To: nicolasfella, #kirigami, mart, keithzg, vkrause
Cc: broulik, plasma-devel, fbampaloukas, GB_2, domson, dkardarakos, ngraham, 
apol, ahiemstra, davidedmundson, mart


D28068: Cleanup file resolving

2020-03-16 Thread Marco Martin
mart added inline comments.

INLINE COMMENTS

> broulik wrote in kirigamiplugin.h:58
> You sure a `qrc` URL turns into a local path (or rather Qt's internal `:/` 
> magic path) like this?

i think only :/ works?

REPOSITORY
  R169 Kirigami

REVISION DETAIL
  https://phabricator.kde.org/D28068

To: nicolasfella, #kirigami, mart, keithzg, vkrause
Cc: broulik, plasma-devel, fbampaloukas, GB_2, domson, dkardarakos, ngraham, 
apol, ahiemstra, davidedmundson, mart


D28068: Cleanup file resolving

2020-03-16 Thread Kai Uwe Broulik
broulik added inline comments.

INLINE COMMENTS

> kirigamiplugin.h:51
>  #elif defined(KIRIGAMI_BUILD_TYPE_STATIC)
> -return filePath;
> +return QStringLiteral(":/org/kde/kirigami/") + path;
>  #else

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

> kirigamiplugin.h:58
> +{
> +return QUrl(resolveFileUrl(path)).toLocalFile();
> +}

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

REPOSITORY
  R169 Kirigami

REVISION DETAIL
  https://phabricator.kde.org/D28068

To: nicolasfella, #kirigami, mart, keithzg, vkrause
Cc: broulik, plasma-devel, fbampaloukas, GB_2, domson, dkardarakos, ngraham, 
apol, ahiemstra, davidedmundson, mart


D28068: Cleanup file resolving

2020-03-16 Thread Nicolas Fella
nicolasfella created this revision.
Herald added a project: Kirigami.
Herald added a subscriber: plasma-devel.
nicolasfella requested review of this revision.

REVISION SUMMARY
  The current code is ... a mess. resolveFileUrl and resolveFilePath do very 
similar things, except that one returns a path instead of a URL.

REPOSITORY
  R169 Kirigami

BRANCH
  resolve

REVISION DETAIL
  https://phabricator.kde.org/D28068

AFFECTED FILES
  src/kirigamiplugin.cpp
  src/kirigamiplugin.h

To: nicolasfella
Cc: plasma-devel, fbampaloukas, GB_2, domson, dkardarakos, ngraham, apol, 
ahiemstra, davidedmundson, mart