Re: Kirigami patches
On Tuesday 16 August 2016, Dirk Hohndel wrote: > > ah, if what you have now works, then that's fine :) > > was something to try if it wasn't working yet :) > > So here are the kirigami patches that I now use. The last one I don't thanks, I'll take a look at all of them > think you want to take. But I'd love to see a property that a program > using Kirigami can use to overwrite the fairly narrow defauly of 20 grid > units. sure, you can do: ApplicationWindow { ... pageStack.defaultColumnWidth: Units.gridUnit * 30 ... } you can set/access all the properties of pagerow in the above way -- Marco Martin ___ subsurface mailing list subsurface@subsurface-divelog.org http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
Re: Kirigami patches
On Tue, Aug 16, 2016 at 03:48:49PM +0200, Marco Martin wrote: > On Tuesday 16 August 2016, Dirk Hohndel wrote: > > Just to make sure I understand this correctly... You are suggesting that I > > shouldn't build Kirigami as a separate library, but that I should include > > the kirigami.pri file from the Subsurface-mobile.pro file? And I assume > > that i then don't need much of what I spent all weekend trying to make > > work? > > ah, if what you have now works, then that's fine :) > was something to try if it wasn't working yet :) So here are the kirigami patches that I now use. The last one I don't think you want to take. But I'd love to see a property that a program using Kirigami can use to overwrite the fairly narrow defauly of 20 grid units. /D >From 12d43e899ee28493098bb8d78f17413bddd10fd2 Mon Sep 17 00:00:00 2001 From: Dirk HohndelDate: Mon, 15 Aug 2016 16:39:21 -0700 Subject: [PATCH 1/4] More qmake fixes The .pro file didn't include the resource file, which made things not work when built with qmake. Also, the .pri file was missing the enums .cpp/.h files. Signed-off-by: Dirk Hohndel --- kirigami.pri | 4 ++-- kirigami.pro | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/kirigami.pri b/kirigami.pri index fc88c4c..8bf35a3 100644 --- a/kirigami.pri +++ b/kirigami.pri @@ -1,7 +1,7 @@ QT += qml quick gui svg -HEADERS += $$PWD/src/kirigamiplugin.h -SOURCES += $$PWD/src/kirigamiplugin.cpp +HEADERS += $$PWD/src/kirigamiplugin.h $$PWD/src/enums.h +SOURCES += $$PWD/src/kirigamiplugin.cpp $$PWD/src/enums.cpp INCLUDEPATH += $$PWD/src DEFINES += KIRIGAMI_BUILD_TYPE_STATIC diff --git a/kirigami.pro b/kirigami.pro index f7d6fe6..87af61f 100644 --- a/kirigami.pro +++ b/kirigami.pro @@ -4,6 +4,7 @@ CONFIG += plugin QT += qml quick gui svg HEADERS += $$PWD/src/kirigamiplugin.h $$PWD/src/enums.h SOURCES += $$PWD/src/kirigamiplugin.cpp $$PWD/src/enums.cpp +RESOURCES += $$PWD/kirigami.qrc API_VER=1.0 -- 2.7.4 (Apple Git-66) >From a7db5877074d1ee6edc258827b54337eb67ca8f1 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Mon, 15 Aug 2016 16:42:08 -0700 Subject: [PATCH 2/4] Q_RESOURCE_INIT macro has to be called by user Calling this from within the library doesn't seem to be the right thing to do, according to the documentation at http://doc.qt.io/qt-5/resources.html Signed-off-by: Dirk Hohndel --- src/kirigamiplugin.cpp | 4 1 file changed, 4 deletions(-) diff --git a/src/kirigamiplugin.cpp b/src/kirigamiplugin.cpp index fc530b3..83b4dc2 100644 --- a/src/kirigamiplugin.cpp +++ b/src/kirigamiplugin.cpp @@ -43,10 +43,6 @@ QString KirigamiPlugin::componentPath(const QString ) const void KirigamiPlugin::registerTypes(const char *uri) { -#ifdef KIRIGAMI_BUILD_TYPE_STATIC -Q_INIT_RESOURCE(kirigami); -#endif - Q_ASSERT(uri == QLatin1String("org.kde.kirigami")); const QString style = QString::fromLatin1(qgetenv("QT_QUICK_CONTROLS_STYLE")); -- 2.7.4 (Apple Git-66) >From 6fcefdfd9cc8c44dda9334a84a5f35da23d62adf Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Mon, 15 Aug 2016 19:15:36 -0700 Subject: [PATCH 3/4] Don't exit the app on iOS. iOS users perceive that as "the app has crashed" Signed-off-by: Dirk Hohndel --- src/controls/ApplicationWindow.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controls/ApplicationWindow.qml b/src/controls/ApplicationWindow.qml index 5060214..2526453 100644 --- a/src/controls/ApplicationWindow.qml +++ b/src/controls/ApplicationWindow.qml @@ -145,7 +145,7 @@ AbstractApplicationWindow { } } -if (Settings.isMobile && !backEvent.accepted) { +if (Settings.isMobile && !backEvent.accepted && Qt.platform.os !== "ios") { Qt.quit(); } } -- 2.7.4 (Apple Git-66) >From 555b0062b777e9120fb749ecde5a81c85156be6b Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Mon, 15 Aug 2016 19:58:12 -0700 Subject: [PATCH 4/4] 20 gridUnits is too narrow Signed-off-by: Dirk Hohndel --- src/controls/templates/private/PageRow.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controls/templates/private/PageRow.qml b/src/controls/templates/private/PageRow.qml index 00e25d6..2b154e7 100644 --- a/src/controls/templates/private/PageRow.qml +++ b/src/controls/templates/private/PageRow.qml @@ -61,7 +61,7 @@ Item { * Pages can override it with their Layout.fillWidth, * implicitWidth Layout.minimumWidth etc. */ -property int defaultColumnWidth: Units.gridUnit * 20 +property int defaultColumnWidth: Units.gridUnit * 30 /** * interactive: bool -- 2.7.4 (Apple Git-66) ___ subsurface mailing list
Re: Kirigami patches
> On Aug 16, 2016, at 6:48 AM, Marco Martinwrote: > > On Tuesday 16 August 2016, Dirk Hohndel wrote: >> Just to make sure I understand this correctly... You are suggesting that I >> shouldn't build Kirigami as a separate library, but that I should include >> the kirigami.pri file from the Subsurface-mobile.pro file? And I assume >> that i then don't need much of what I spent all weekend trying to make >> work? > > ah, if what you have now works, then that's fine :) > was something to try if it wasn't working yet :) Well, the .pri approach means fewer changes to Subsurface (and Kirigami), so in that sense I think it's preferable. I just need to test if it actually works (it's still early morning here, haven't had time to try it) /D ___ subsurface mailing list subsurface@subsurface-divelog.org http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
Re: Kirigami patches
On Tuesday 16 August 2016, Dirk Hohndel wrote: > Just to make sure I understand this correctly... You are suggesting that I > shouldn't build Kirigami as a separate library, but that I should include > the kirigami.pri file from the Subsurface-mobile.pro file? And I assume > that i then don't need much of what I spent all weekend trying to make > work? ah, if what you have now works, then that's fine :) was something to try if it wasn't working yet :) -- Marco Martin ___ subsurface mailing list subsurface@subsurface-divelog.org http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
Re: Kirigami patches
-- Sent from my phone On August 16, 2016 5:59:06 AM PDT, Marco Martinwrote: >On Tuesday 16 August 2016, Tomaz Canabrava wrote: >> > > - use the .pri file when directly linking in kirigami into the >(parent) >> > > project (include directive in PROJECT.pro), then the >Q_INIT_RESOURCE is >> > > not necessary. using qmake this seems to be the easiest way and >at >> > > least seems to compile for different platforms. >> > >> > subsurface is cmake based, so the pri file can't be used >> >> Subsurface is cmake based only on all platforms besides ios, I didn't >> managed to make the ios build work on cmake. > >ah. >if it's qmake tThis is where I admit that I don't understand the subtleties.. Just to make sure I understand this correctly... You are suggesting that I shouldn't build Kirigami as a separate library, but that I should include the kirigami.pri file from the Subsurface-mobile.pro file? And I assume that i then don't need much of what I spent all weekend trying to make work? /D ___ subsurface mailing list subsurface@subsurface-divelog.org http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
Re: Kirigami patches
On Tuesday 16 August 2016, Tomaz Canabrava wrote: > > > - use the .pri file when directly linking in kirigami into the (parent) > > > project (include directive in PROJECT.pro), then the Q_INIT_RESOURCE is > > > not necessary. using qmake this seems to be the easiest way and at > > > least seems to compile for different platforms. > > > > subsurface is cmake based, so the pri file can't be used > > Subsurface is cmake based only on all platforms besides ios, I didn't > managed to make the ios build work on cmake. ah. if it's qmake there then, can you try with just including the .pri instead? -- Marco Martin ___ subsurface mailing list subsurface@subsurface-divelog.org http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
Re: Kirigami patches
Subsue Em 16 de ago de 2016 04:43, "Marco Martin"escreveu: > > On Tuesday 16 August 2016, Martin Gysel wrote: > > Am 16.08.2016 um 01:55 schrieb Dirk Hohndel: > > > It's pretty clear that no one ever tested the kirigami.pro qmake file. > > > The second patch I'm not 100% sure about, but it seems to match what the > > > documentation tells us SHOULD be done. > > > > maybe my understanding of the qt build system, tools and libraries is > > wrong, but wouldn't it be better to > > > > - use the .pri file when directly linking in kirigami into the (parent) > > project (include directive in PROJECT.pro), then the Q_INIT_RESOURCE is > > not necessary. using qmake this seems to be the easiest way and at least > > seems to compile for different platforms. > > subsurface is cmake based, so the pri file can't be used Subsurface is cmake based only on all platforms besides ios, I didn't managed to make the ios build work on cmake. > > - use the .pro file when using kirigami as library/plugin (static or > > dynamic, from a parent 'subdirs' pro file). then the static variant > > needs the Q_INIT_RESOURCE. using this approach leads at least on iOS to > > various problems linking the app and not finding the resources at > > runtime (so it did so while I tested this) > > > > this also means we probably need another define like > > KIRIGAMI_BUILD_TYPE_STATIC_PLUGIN and/or KIRIGAMI_BUILD_TYPE_DYNAMIC_PLUGIN > > why the one define used right now wouldn't be enough? > > -- > Marco Martin ___ subsurface mailing list subsurface@subsurface-divelog.org http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
Re: Kirigami patches
On Tuesday 16 August 2016, Dirk Hohndel wrote: > It's pretty clear that no one ever tested the kirigami.pro qmake file. The > second patch I'm not 100% sure about, but it seems to match what the > documentation tells us SHOULD be done. because with the pro it was supposed to build the dynamic plugin. however, since seems to be easier to build it in static mode, I'm fine with the change. -- Marco Martin ___ subsurface mailing list subsurface@subsurface-divelog.org http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
Re: Subsurface-mobile status update
On 16 August 2016 at 06:20, Dirk Hohndelwrote: > Once I fixed the build issues and added back a couple of our private > patches I was able to build a working Subsurface-mobile for iOS based on > Kirigami 1.0 (plus patches). > > Nice. Took me a LOT longer than I wanted, but hey... it's all good. > > 4.5.2.1525 should be available for testing on TestFlight, soon. > > Next I'll have to get this to work for Android :-) > The attached patch was all that was needed to get a working Android build for me. Built against Kirigami master and QT 5.6.1 > /D > ___ > subsurface mailing list > subsurface@subsurface-divelog.org > http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface > -- Jocke From 1b43c8ca5006bbb9163119461a70032e448bf18b Mon Sep 17 00:00:00 2001 From: Joakim Bygdell Date: Tue, 16 Aug 2016 09:08:34 +0200 Subject: [PATCH] Android build: compile kirigami Build kirkigami plugin out of source and make sure that we use the same QT version for the plugin and the app. Signed-off-by: Joakim Bygdell --- packaging/android/build.sh | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/packaging/android/build.sh b/packaging/android/build.sh index 5319c4d..d844e8d 100644 --- a/packaging/android/build.sh +++ b/packaging/android/build.sh @@ -316,13 +316,12 @@ if [ "$SUBSURFACE_MOBILE" = "ON" ] ; then pushd $SUBSURFACE_SOURCE bash ./scripts/mobilecomponents.sh popd - - cd $SUBSURFACE_SOURCE/mobile-widgets/qml/kirigami/ - mkdir -p build - cd build - cmake .. -DSTATIC_LIBRARY=ON + rm -rf kirigami-build + mkdir -p kirigami-build + pushd kirigami-build + cmake $SUBSURFACE_SOURCE/mobile-widgets/qml/kirigami/ -DSTATIC_LIBRARY=ON -DCMAKE_PREFIX_PATH:UNINITIALIZED=${QT5_ANDROID}/android_${QT_ARCH}/lib/cmake make -j4 - make install + popd fi if [ ! -z "$SUBSURFACE_MOBILE" ] ; then -- 2.7.4 ___ subsurface mailing list subsurface@subsurface-divelog.org http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
Re: Kirigami patches
Am 16.08.2016 um 01:55 schrieb Dirk Hohndel: > It's pretty clear that no one ever tested the kirigami.pro qmake file. The > second patch I'm not 100% sure about, but it seems to match what the > documentation tells us SHOULD be done. maybe my understanding of the qt build system, tools and libraries is wrong, but wouldn't it be better to - use the .pri file when directly linking in kirigami into the (parent) project (include directive in PROJECT.pro), then the Q_INIT_RESOURCE is not necessary. using qmake this seems to be the easiest way and at least seems to compile for different platforms. - use the .pro file when using kirigami as library/plugin (static or dynamic, from a parent 'subdirs' pro file). then the static variant needs the Q_INIT_RESOURCE. using this approach leads at least on iOS to various problems linking the app and not finding the resources at runtime (so it did so while I tested this) this also means we probably need another define like KIRIGAMI_BUILD_TYPE_STATIC_PLUGIN and/or KIRIGAMI_BUILD_TYPE_DYNAMIC_PLUGIN /martin ___ subsurface mailing list subsurface@subsurface-divelog.org http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface