black squares instead of icons

Lubomir I. Ivanov neolit123 at gmail.com
Thu Dec 24 14:49:32 PST 2015


On 25 December 2015 at 00:11, Dirk Hohndel <dirk at hohndel.org> wrote:
> So I have spent way too much time trying to track this down. I still don't
> fully understand it - and the complexity of the way the mobilecomponents
> work doesn't really help, nor does my inability to easily get debug output
> from QML code... every programing language I've ever worked with had a
> very easy way to just print something to the console to help you figure
> out what's going on. No idea how I'd do that from QML.
>
> Anyway, on some devices - not sure why and when and how - the mobile app
> doesn't find the bundled resources. The odd thing is that it finds the
> dive.jpg - but not the subsurface-mobile-icon.png, nor the various .svg
> for the buttons, arrows, etc. My initial suspicion was that this had
> something to do with resolution but since many of these files are .svg
> files that doesn't seem reasonable. And since the resources are included
> in the application I don't think it's a file system permission error,
> either.
>
> If I were able to create debug output from within the .qml files I could
> try to figure out what the complete path is that is assembled in
> mobilecomponents/Icon.qml - my only working hypothesis is that under some
> circumstance that ends up not creating the correct relative path - but
> that's extremely weak.
>
> At this point I consider this the main blocker to take this app out as an
> alpha release. I've spent two days on this and have no further ideas what
> to investigate.
>
> Help
>

print() or console.log() from QML simply call QDebug [1].

QDebug on Android probably works with the NDK to redirected a stream
to the log (adb logcat).
it doubt it uses QAndroidJniObject [2] with Log [3], but who knows.

so if QDebug works on the C++ side of the Android application, the
calls from the QML side should work as well.

i haven't looked at mobilecomponents, but it seems like a problematic
dependency.

lubomir
--

[1] http://doc.qt.io/qt-5/qtquick-debugging.html
[2] http://doc.qt.io/qt-5/qandroidjniobject.html
[3] http://developer.android.com/reference/android/util/Log.html


More information about the subsurface mailing list