[SailfishDevel] HowTo debug from inside the IDE an application?
I've just managed to port one of my BB10 games to SailfishOS, but now the problem is how to debug it on the emulator and later on the actual device. I am using *windows* and want to be able to debug (step by step) from *inside the IDE*. When the compilation finished I've noticed a message on the compile output window: === Welcome to scratchbox2 enabled gdb! Before starting target program you should run command 'sb2-prepare' that sets breakpoint which is used to stop target before its main() gets called. After the breakpoint is hit, you are able to set furtherbreakpoints and do normal debugging actions. If you are attaching to already running process or examining a core dump, this step is not necessary. === How do I call this sb2-prepare command from inside the *IDE?* ___ SailfishOS.org Devel mailing list
Re: [SailfishDevel] How to debug Julla
Hi Tony I initially had great problems upgrading my Jolla, installing stuff from the store, and even activating developer mode. After lots of hunting around, experimentation and measuring, I concluded that the problem was high latency in my home network, and the Jolla's poor tolerance for this. (Other similar devices could upgrade no problem). I stripped my home network down to the bare essentials, the latency issues vanished, and hey presto I could install developer mode, upgrade my Jolla etc. Maybe you have a similar issue? Chris Zitat von Tony tony.chend...@gmail.com: Hi, My Julla ?s system version is 1.0.0.5. I tried to upgrade the system , but system mentioned that is the newest version. Besides , I also tried to start using development mode. The system noticed that development package install failed. Do you know how to debug it ? tony.chend...@gmail.com ___ SailfishOS.org Devel mailing list
[SailfishDevel] QtContacts: phoneNumbers.length attribute gets lost when copied to ListModel
Hi All I have come across some strangeness using QtContacts 5.0 on Sailfish. For various reasons partially lost in the mists of time, I copy contacts (or rather a subset of contract roles) from the ContactModel to a a normal ListModel. One of the roles copied is phoneNumbers. This has a child property length indicating the number of phoneNumbers available for the contact. phoneNumbers.length is available (defined) direct from the ContactModel, but is undefined when I try to use it from the ListModel. So the console.log in the function appendContact() gives a valid result, but the console.log in populate() gives undefined. Other properties, including the phone numbers in phoneNumbers are defined when accessed from the ListModel. Equivalent code works in Haramtatan / Qt 4.7.4 Mobility 1.2 import QtContacts 5.0 ContactModel { id: phoneContactsModelInternal } ListModel { id: localContactModelInternal function populate() { clear(); for (var i = 0; i phoneContactsModelInternal.contacts.length; i ++) { appendContact(phoneContactsModelInternal.contacts[i]); console.log(checking number of phoneNumbers: + localContactModel.get(i).phoneNumbers.length); } } function appendContact(contact) { localContactModel.append({contactId: contact.contactId, displayLabel: contact.displayLabel.label, phoneNumbers: contact.phoneNumbers, phoneNumbersCount: contact.phoneNumbers.length}); console.log(appending: + contact.displayLabel.label + , numbers: + contact.phoneNumbers.length) } } Any ideas? Chris ___ SailfishOS.org Devel mailing list
Re: [SailfishDevel] QML C++ Integration not working in Sailfish
Hi sylvain, This is not the case a renamed the variable so the have exactly the same name. On the other hand, may be the problem is that I am calling it from .js file by the next code: .pragma library .import QtQuick 2.0 as QQ var appState; function getAppState() { return appState; } function newAppState(page) { appState = page; getAppState().k=1; getAppState().m=2; return appState; } // Funciones especificas function createBloomFilter() { console.log(Voy a llamar a generate filter) bloomfiltersdata.generateFilterInvokable2() console.log(Ya he llamado a generate filter) } And I call this from the qml by: import QtQuick 2.0 import Sailfish.Silica 1.0 import pages import pages/content import pages/content/logic.js as Logic import fi.helsinki.cs 1.0 ApplicationWindow { initialPage: Component { FirstPage { } } cover: Qt.resolvedUrl(cover/CoverPage.qml) id: appWin property var appState: Logic.newAppState(appWin); property ApplicationWindow appWin: appWin property Bloomfilters bloomfilters: bloomfilters property var k property var m property bool filterCharged: false } Someone seems something unusual in this code? Best Regards and Thanks, A. Cano El Miércoles 26 de febrero de 2014 13:24, Sylvain B. sth...@hotmail.com escribió: Yes, add a s You declared bloomfiltersdata and you are trying to use bloomfilterdata... Date: Wed, 26 Feb 2014 04:02:22 -0800 From: antonio.cano.go...@ovi.com To: devel@lists.sailfishos.org Subject: Re: [SailfishDevel] QML C++ Integration not working in Sailfish Hi Andrey, The output is: ReferenceError: bloomfilterdata is not defined I am calling it from a .js Some idea about how can I make that this is also defined there. Thanks! El Miércoles 26 de febrero de 2014 12:18, Andrey Kozhevnikov coderusin...@gmail.com escribió: start app in terminal and show output please On 26.02.2014 17:15, antonio.cano.go...@ovi.com wrote: Hi Thomas, I did both modification but the code does not work yet. Here is the new code: QGuiApplication *app = SailfishApp::application(argc, argv); QQuickView *view = SailfishApp::createView(); Bloomfilters * bloomfilters = new Bloomfilters(); view-rootContext()-setContextProperty(bloomfiltersdata, bloomfilters); view-setSource(SailfishApp::pathTo(qml/bloomfilter.qml)); view-showFullScreen(); return app-exec(); El Miércoles 26 de febrero de 2014 12:01, Thomas Perl th.p...@gmail.com escribió: On 2014-02-26 11:48, antonio.cano.go...@ovi.com wrote: I tried this: QGuiApplication *app = SailfishApp::application(argc, argv); QQuickView *view = SailfishApp::createView(); Bloomfilters * bloomfilters = new Bloomfilters(); view-setSource(SailfishApp::pathTo(qml/bloomfilter.qml)); view-showFullScreen(); view-rootContext()-setContextProperty(Bloomfilters, bloomfilters); return app-exec(); But it is not working yet. Two things: 1. Call setContextProperty() right before before setSource(), so it's already available when the QML content is loaded. 2. Use lowercase for context property names (bloomfilters instead of Bloomfilters). In some places, QML interprets IDs starting with an upper case letter as a type name, and that won't work then, therefore stick to lowercase. HTH :) Thomas ___ SailfishOS.org Devel mailing list ___ SailfishOS.org Devel mailing list ___ SailfishOS.org Devel mailing list ___ SailfishOS.org Devel mailing list
Re: [SailfishDevel] QML C++ Integration not working in Sailfish
Yes, if you read the documentation pragma library cannot access qml properties directly. So its a feature. http://qt-project.org/doc/qt-5.0/qtqml/qtqml-javascript-resources.html#shared-javascript-resources-libraries re, Jonni From: devel-boun...@lists.sailfishos.org [devel-boun...@lists.sailfishos.org] on behalf of antonio.cano.go...@ovi.com [antonio.cano.go...@ovi.com] Sent: Thursday, February 27, 2014 12:17 PM To: Sylvain B.; Sailfish OS Developers Subject: Re: [SailfishDevel] QML C++ Integration not working in Sailfish Hi sylvain, This is not the case a renamed the variable so the have exactly the same name. On the other hand, may be the problem is that I am calling it from .js file by the next code: .pragma library .import QtQuick 2.0 as QQ var appState; function getAppState() { return appState; } function newAppState(page) { appState = page; getAppState().k=1; getAppState().m=2; return appState; } // Funciones especificas function createBloomFilter() { console.log(Voy a llamar a generate filter) bloomfiltersdata.generateFilterInvokable2() console.log(Ya he llamado a generate filter) } And I call this from the qml by: import QtQuick 2.0 import Sailfish.Silica 1.0 import pages import pages/content import pages/content/logic.js as Logic import fi.helsinki.cs 1.0 ApplicationWindow { initialPage: Component { FirstPage { } } cover: Qt.resolvedUrl(cover/CoverPage.qml) id: appWin property var appState: Logic.newAppState(appWin); property ApplicationWindow appWin: appWin property Bloomfilters bloomfilters: bloomfilters property var k property var m property bool filterCharged: false } Someone seems something unusual in this code? Best Regards and Thanks, A. Cano El Miércoles 26 de febrero de 2014 13:24, Sylvain B. sth...@hotmail.com escribió: Yes, add a s You declared bloomfiltersdata and you are trying to use bloomfilterdata... Date: Wed, 26 Feb 2014 04:02:22 -0800 From: antonio.cano.go...@ovi.com To: devel@lists.sailfishos.org Subject: Re: [SailfishDevel] QML C++ Integration not working in Sailfish Hi Andrey, The output is: ReferenceError: bloomfilterdata is not defined I am calling it from a .js Some idea about how can I make that this is also defined there. Thanks! El Miércoles 26 de febrero de 2014 12:18, Andrey Kozhevnikov coderusin...@gmail.com escribió: start app in terminal and show output please On 26.02.2014 17:15, antonio.cano.go...@ovi.commailto:antonio.cano.go...@ovi.com wrote: Hi Thomas, I did both modification but the code does not work yet. Here is the new code: QGuiApplication *app = SailfishApp::application(argc, argv); QQuickView *view = SailfishApp::createView(); Bloomfilters * bloomfilters = new Bloomfilters(); view-rootContext()-setContextProperty(bloomfiltersdata, bloomfilters); view-setSource(SailfishApp::pathTo(qml/bloomfilter.qml)); view-showFullScreen(); return app-exec(); El Miércoles 26 de febrero de 2014 12:01, Thomas Perl th.p...@gmail.commailto:th.p...@gmail.com escribió: On 2014-02-26 11:48, antonio.cano.go...@ovi.commailto:antonio.cano.go...@ovi.com wrote: I tried this: QGuiApplication *app = SailfishApp::application(argc, argv); QQuickView *view = SailfishApp::createView(); Bloomfilters * bloomfilters = new Bloomfilters(); view-setSource(SailfishApp::pathTo(qml/bloomfilter.qml)); view-showFullScreen(); view-rootContext()-setContextProperty(Bloomfilters, bloomfilters); return app-exec(); But it is not working yet. Two things: 1. Call setContextProperty() right before before setSource(), so it's already available when the QML content is loaded. 2. Use lowercase for context property names (bloomfilters instead of Bloomfilters). In some places, QML interprets IDs starting with an upper case letter as a type name, and that won't work then, therefore stick to lowercase. HTH :) Thomas ___ SailfishOS.org Devel mailing list ___ SailfishOS.org Devel mailing list ___ SailfishOS.org Devel mailing list ___ SailfishOS.org Devel mailing list
Re: [SailfishDevel] HowTo debug from inside the IDE an application?
Hi, sorry but with the current SDK it is not possible to use gdb from IDE. That scratchbox2 message is not relevant, since gdb would be run from the host and not from inside the build machine. We're working hard to get a new SDK release out, but can't give a date yet. Best regards, Juha On 27.02.2014 10:52, Iosif Hamlatzis wrote: I've just managed to port one of my BB10 games to SailfishOS, but now the problem is how to debug it on the emulator and later on the actual device. I am using *windows* and want to be able to debug (step by step) from _*inside the IDE*_. When the compilation finished I've noticed a message on the compile output window: === Welcome to scratchbox2 enabled gdb! Before starting target program you should run command 'sb2-prepare' that sets breakpoint which is used to stop target before its main() gets called. After the breakpoint is hit, you are able to set furtherbreakpoints and do normal debugging actions. If you are attaching to already running process or examining a core dump, this step is not necessary. === How do I call this sb2-prepare command from inside the *IDE?* ___ SailfishOS.org Devel mailing list ___ SailfishOS.org Devel mailing list
Re: [SailfishDevel] QML C++ Integration not working in Sailfish
Hi, On 25.02.2014 15:06, antonio.cano.go...@ovi.com wrote: An I try to connect this with my sailfish application with the code: QGuiApplication *app = SailfishApp::application(argc, argv); QQuickView *view = SailfishApp::createView(); Bloomfilters * bloomfilters = new Bloomfilters(); view-rootContext()-setContextProperty(Bloomfilters, bloomfilters); view-setSource(SailfishApp::pathTo(qml/bloomfilter.qml)); view-showFullScreen(); return app-exec(); But this is not working. Someone have any idea about what am I doing wrong? You can use qmlRegisterType to pass the Info of the C++ class to QML like this in the cpp: #include bloomfilters.h int main(int argc, char *argv[]) { // Get App and QML-View objects QScopedPointerQGuiApplication app(SailfishApp::application(argc, argv)); QScopedPointerQQuickView view(SailfishApp::createView()); // Register Bloomfilter Class qmlRegisterTypeBloomfilter, 1(harbour.myapp.Bloomfilter, 1, 0, Bloomfilter); // Prepare the QML view-setSource(SailfishApp::pathTo(qml/bloomfilter.qml)); view-show(); // Run the app return app-exec(); } Afterwards you can create a Bloomfilter-Object in QML: Bloomfilter { id: bloom } and use the methods with bloom.insertElement(myelement) I hope this helps. Regards Stefan Brand ___ SailfishOS.org Devel mailing list
Re: [SailfishDevel] How to debug Julla
Hi Jonni In my case getting rid of the latency in my home network seemed to do the trick. Having got the latency down to normal levels, I was able to upgrade the phone, use the store, activate developer mode etc. without a hitch. Interestingly though, the phone is more than 1.5 mins behind real time. This raises the question, what is supposed to regulate time on a Jolla? Should not reasonably accurate time be available from the GSM signal? PkCon shows that ntpdate is available, but not ntpd (and given that the phone will not always have an active udp network, ntpd would probably not be much help anyway). grüsse Chris Zitat von Jonni Rainisto jonni.raini...@jolla.com: Few things to check: - date and clock is current. https connection will fail if clock is even a minute behind real time. - you haven't touched SSU button in developer mode, if you have then you need to switch your domain back to sales. If nothing else is helps then setting time and doing factory reset might do the trick as last resort. re, Jonni From: devel-boun...@lists.sailfishos.org [devel-boun...@lists.sailfishos.org] on behalf of christopher.l...@thurweb.ch [christopher.l...@thurweb.ch] Sent: Thursday, February 27, 2014 11:48 AM To: Sailfish OS Developers; Tony Cc: devel@lists.sailfishos.org Subject: Re: [SailfishDevel] How to debug Julla Hi Tony I initially had great problems upgrading my Jolla, installing stuff from the store, and even activating developer mode. After lots of hunting around, experimentation and measuring, I concluded that the problem was high latency in my home network, and the Jolla's poor tolerance for this. (Other similar devices could upgrade no problem). I stripped my home network down to the bare essentials, the latency issues vanished, and hey presto I could install developer mode, upgrade my Jolla etc. Maybe you have a similar issue? Chris Zitat von Tony tony.chend...@gmail.com: Hi, My Julla ?s system version is 1.0.0.5. I tried to upgrade the system , but system mentioned that is the newest version. Besides , I also tried to start using development mode. The system noticed that development package install failed. Do you know how to debug it ? tony.chend...@gmail.com ___ SailfishOS.org Devel mailing list ___ SailfishOS.org Devel mailing list ___ SailfishOS.org Devel mailing list
Re: [SailfishDevel] How to debug Julla
Yes, usually you get accurate time from your GSM network depending on your operator. Sometimes users do start the phone without SIM attached, and in that case people can forget 1970 or some other wrong year in the device. In future updates there are improvements to automaticly fetch time also from ntp servers (don't remember if that was already included in 1.0.3.8). re, Jonni From: christopher.l...@thurweb.ch [christopher.l...@thurweb.ch] Sent: Thursday, February 27, 2014 2:26 PM To: Sailfish OS Developers; Jonni Rainisto Subject: Re: [SailfishDevel] How to debug Julla Hi Jonni In my case getting rid of the latency in my home network seemed to do the trick. Having got the latency down to normal levels, I was able to upgrade the phone, use the store, activate developer mode etc. without a hitch. Interestingly though, the phone is more than 1.5 mins behind real time. This raises the question, what is supposed to regulate time on a Jolla? Should not reasonably accurate time be available from the GSM signal? PkCon shows that ntpdate is available, but not ntpd (and given that the phone will not always have an active udp network, ntpd would probably not be much help anyway). grüsse Chris Zitat von Jonni Rainisto jonni.raini...@jolla.com: Few things to check: - date and clock is current. https connection will fail if clock is even a minute behind real time. - you haven't touched SSU button in developer mode, if you have then you need to switch your domain back to sales. If nothing else is helps then setting time and doing factory reset might do the trick as last resort. re, Jonni From: devel-boun...@lists.sailfishos.org [devel-boun...@lists.sailfishos.org] on behalf of christopher.l...@thurweb.ch [christopher.l...@thurweb.ch] Sent: Thursday, February 27, 2014 11:48 AM To: Sailfish OS Developers; Tony Cc: devel@lists.sailfishos.org Subject: Re: [SailfishDevel] How to debug Julla Hi Tony I initially had great problems upgrading my Jolla, installing stuff from the store, and even activating developer mode. After lots of hunting around, experimentation and measuring, I concluded that the problem was high latency in my home network, and the Jolla's poor tolerance for this. (Other similar devices could upgrade no problem). I stripped my home network down to the bare essentials, the latency issues vanished, and hey presto I could install developer mode, upgrade my Jolla etc. Maybe you have a similar issue? Chris Zitat von Tony tony.chend...@gmail.com: Hi, My Julla ?s system version is 1.0.0.5. I tried to upgrade the system , but system mentioned that is the newest version. Besides , I also tried to start using development mode. The system noticed that development package install failed. Do you know how to debug it ? tony.chend...@gmail.com ___ SailfishOS.org Devel mailing list ___ SailfishOS.org Devel mailing list ___ SailfishOS.org Devel mailing list
Re: [SailfishDevel] QML C++ Integration not working in Sailfish
Yes, it helped thanks. My problem now is different. I have some private attributes in my C++ object. When I call the first tiem I can modify the attributes, but in the second call the attributes dessapear. Is there a way to solve this problem? (The attributes a new C++ Object not declared as QObject) El Jueves 27 de febrero de 2014 12:32, Stefan Brand stefan.br...@seiichiro0185.org escribió: Hi, On 25.02.2014 15:06, antonio.cano.go...@ovi.com wrote: An I try to connect this with my sailfish application with the code: QGuiApplication *app = SailfishApp::application(argc, argv); QQuickView *view = SailfishApp::createView(); Bloomfilters * bloomfilters = new Bloomfilters(); view-rootContext()-setContextProperty(Bloomfilters, bloomfilters); view-setSource(SailfishApp::pathTo(qml/bloomfilter.qml)); view-showFullScreen(); return app-exec(); But this is not working. Someone have any idea about what am I doing wrong? You can use qmlRegisterType to pass the Info of the C++ class to QML like this in the cpp: #include bloomfilters.h int main(int argc, char *argv[]) { // Get App and QML-View objects QScopedPointerQGuiApplication app(SailfishApp::application(argc, argv)); QScopedPointerQQuickView view(SailfishApp::createView()); // Register Bloomfilter Class qmlRegisterTypeBloomfilter, 1(harbour.myapp.Bloomfilter, 1, 0, Bloomfilter); // Prepare the QML view-setSource(SailfishApp::pathTo(qml/bloomfilter.qml)); view-show(); // Run the app return app-exec(); } Afterwards you can create a Bloomfilter-Object in QML: Bloomfilter { id: bloom } and use the methods with bloom.insertElement(myelement) I hope this helps. Regards Stefan Brand ___ SailfishOS.org Devel mailing list ___ SailfishOS.org Devel mailing list
Re: [SailfishDevel] How to debug Julla
Hi Jonni I have just found an option Automatic update under Settings/Time and Date. Selecting that has jumped the time to be within seconds of real time. Chris Zitat von Jonni Rainisto jonni.raini...@jolla.com: Yes, usually you get accurate time from your GSM network depending on your operator. Sometimes users do start the phone without SIM attached, and in that case people can forget 1970 or some other wrong year in the device. In future updates there are improvements to automaticly fetch time also from ntp servers (don't remember if that was already included in 1.0.3.8). re, Jonni From: christopher.l...@thurweb.ch [christopher.l...@thurweb.ch] Sent: Thursday, February 27, 2014 2:26 PM To: Sailfish OS Developers; Jonni Rainisto Subject: Re: [SailfishDevel] How to debug Julla Hi Jonni In my case getting rid of the latency in my home network seemed to do the trick. Having got the latency down to normal levels, I was able to upgrade the phone, use the store, activate developer mode etc. without a hitch. Interestingly though, the phone is more than 1.5 mins behind real time. This raises the question, what is supposed to regulate time on a Jolla? Should not reasonably accurate time be available from the GSM signal? PkCon shows that ntpdate is available, but not ntpd (and given that the phone will not always have an active udp network, ntpd would probably not be much help anyway). grüsse Chris Zitat von Jonni Rainisto jonni.raini...@jolla.com: Few things to check: - date and clock is current. https connection will fail if clock is even a minute behind real time. - you haven't touched SSU button in developer mode, if you have then you need to switch your domain back to sales. If nothing else is helps then setting time and doing factory reset might do the trick as last resort. re, Jonni From: devel-boun...@lists.sailfishos.org [devel-boun...@lists.sailfishos.org] on behalf of christopher.l...@thurweb.ch [christopher.l...@thurweb.ch] Sent: Thursday, February 27, 2014 11:48 AM To: Sailfish OS Developers; Tony Cc: devel@lists.sailfishos.org Subject: Re: [SailfishDevel] How to debug Julla Hi Tony I initially had great problems upgrading my Jolla, installing stuff from the store, and even activating developer mode. After lots of hunting around, experimentation and measuring, I concluded that the problem was high latency in my home network, and the Jolla's poor tolerance for this. (Other similar devices could upgrade no problem). I stripped my home network down to the bare essentials, the latency issues vanished, and hey presto I could install developer mode, upgrade my Jolla etc. Maybe you have a similar issue? Chris Zitat von Tony tony.chend...@gmail.com: Hi, My Julla ?s system version is 1.0.0.5. I tried to upgrade the system , but system mentioned that is the newest version. Besides , I also tried to start using development mode. The system noticed that development package install failed. Do you know how to debug it ? tony.chend...@gmail.com ___ SailfishOS.org Devel mailing list ___ SailfishOS.org Devel mailing list ___ SailfishOS.org Devel mailing list
Re: [SailfishDevel] QML C++ Integration not working in Sailfish
Antonio Can you provide a code example, and the exact error(s) that you get. Chris Zitat von antonio.cano.go...@ovi.com: Yes, it helped thanks. My problem now is different. I have some private attributes in my C++ object. When I call the first tiem I can modify the attributes, but in the second call the attributes dessapear. Is there a way to solve this problem? (The attributes a new C++ Object not declared as QObject) El Jueves 27 de febrero de 2014 12:32, Stefan Brand stefan.br...@seiichiro0185.org escribió: Hi, On 25.02.2014 15:06, antonio.cano.go...@ovi.com wrote: An I try to connect this with my sailfish application with the code: QGuiApplication *app = SailfishApp::application(argc, argv); QQuickView *view = SailfishApp::createView(); Bloomfilters * bloomfilters = new Bloomfilters(); view-rootContext()-setContextProperty(Bloomfilters, bloomfilters); view-setSource(SailfishApp::pathTo(qml/bloomfilter.qml)); view-showFullScreen(); return app-exec(); But this is not working. Someone have any idea about what am I doing wrong? You can use qmlRegisterType to pass the Info of the C++ class to QML like this in the cpp: #include bloomfilters.h int main(int argc, char *argv[]) { // Get App and QML-View objects QScopedPointerQGuiApplication app(SailfishApp::application(argc, argv)); QScopedPointerQQuickView view(SailfishApp::createView()); // Register Bloomfilter Class qmlRegisterTypeBloomfilter, 1(harbour.myapp.Bloomfilter, 1, 0, Bloomfilter); // Prepare the QML view-setSource(SailfishApp::pathTo(qml/bloomfilter.qml)); view-show(); // Run the app return app-exec(); } Afterwards you can create a Bloomfilter-Object in QML: Bloomfilter { id: bloom } and use the methods with bloom.insertElement(myelement) I hope this helps. Regards Stefan Brand ___ SailfishOS.org Devel mailing list ___ SailfishOS.org Devel mailing list
[SailfishDevel] How to monitor inputs from a earphone remote control
Hi, I have earphones plugged in, with a three buttons remote control. How can I monitor how the remote control translate on the linux (wayland ??) level ? How can I get these commands in my QML application ? Thanks, Franck ___ SailfishOS.org Devel mailing list
[SailfishDevel] 回复: How to debug Julla
Hi chendong, From your name (chendong),I think you're from China. If I guess right , I regret to tell you that ,for China's current network environment, the jolla is unavailable I don't know the reason,But if you use a proxy of other countries,the phone's network will work well and the system can be upgrade normally . ma xinjun 发件人: Tony 发送时间: 2014-02-27 14:41 收件人: devel 主题: [SailfishDevel] How to debug Julla Hi, My Julla ’s system version is 1.0.0.5. I tried to upgrade the system , but system mentioned that is the newest version. Besides , I also tried to start using development mode. The system noticed that development package install failed. Do you know how to debug it ? tony.chend...@gmail.com___ SailfishOS.org Devel mailing list
Re: [SailfishDevel] How to monitor inputs from a earphone remote control
Currently you cannot as there is no support for earphone buttons done yet. From: devel-boun...@lists.sailfishos.org [devel-boun...@lists.sailfishos.org] on behalf of Franck Routier (perso) [a...@mecadu.org] Sent: Thursday, February 27, 2014 3:58 PM To: devel@lists.sailfishos.org Subject: [SailfishDevel] How to monitor inputs from a earphone remote control Hi, I have earphones plugged in, with a three buttons remote control. How can I monitor how the remote control translate on the linux (wayland ??) level ? How can I get these commands in my QML application ? Thanks, Franck ___ SailfishOS.org Devel mailing list ___ SailfishOS.org Devel mailing list
[SailfishDevel] Show application content in cover on certain page
Hello sailors, if the cover is set to undefined it shows the current application content (like the Sailfish browser). But how to change between cover page and undefined? For example, the app should show CoverBackground element on certain pages, but when it shows a WebView, it should show the content of the WebView. If setting cover to undefined after it was initially set to a CoverPage only shows a basic cover, but not the WebView content. Is there any way to achieve this? Beste greetings Buschmann -- Das Gesetz hat zum Schneckengang verdorben, was Adlerflug geworden wäre. (Friedrich Schiller - Die Räuber) Und der Buschfunk spielt gerade Wenn Du jetzt denkst... von Broilers. www.buschmann23.de GPG-Key: 0x720AADE0 signature.asc Description: This is a digitally signed message part. ___ SailfishOS.org Devel mailing list
[SailfishDevel] HowTo package my resources (images/sounds/etc)
I cannot find a way to include my resources for my game. I have a hierarchy of folders for my fonts, images, sounds and settings files, how can I package them so they keep the hierarchy? ___ SailfishOS.org Devel mailing list
Re: [SailfishDevel] HowTo package my resources (images/sounds/etc)
This is what Qt offers ;) http://qt-project.org/doc/qt-5/resources.html 2014-02-27 19:35 GMT+01:00 Iosif Hamlatzis i.hamlat...@gmail.com: I cannot find a way to include my resources for my game. I have a hierarchy of folders for my fonts, images, sounds and settings files, how can I package them so they keep the hierarchy? ___ SailfishOS.org Devel mailing list ___ SailfishOS.org Devel mailing list
Re: [SailfishDevel] HowTo package my resources (images/sounds/etc)
given your case (a game) you probably don't want to compile the biggest files inside the binary... so you just bundle those files in your application rpm by modifying the INSTALLS var in your .pro project file More info: https://sailfishos.org/develop-packaging-apps.html 2014-02-27 20:05 GMT+01:00 Andrea Bernabei and.berna...@gmail.com: This is what Qt offers ;) http://qt-project.org/doc/qt-5/resources.html 2014-02-27 19:35 GMT+01:00 Iosif Hamlatzis i.hamlat...@gmail.com: I cannot find a way to include my resources for my game. I have a hierarchy of folders for my fonts, images, sounds and settings files, how can I package them so they keep the hierarchy? ___ SailfishOS.org Devel mailing list ___ SailfishOS.org Devel mailing list
Re: [SailfishDevel] HowTo package my resources (images/sounds/etc)
ok thanks and if I am not making a Qt application but just a plain c/c++ application? Is there a way to define just the root of my assets folder? Let's say my tree is: c:\workspace\mygame\Home c:\workspace\mygame\Home\media c:\workspace\mygame\Home\media\bmps c:\workspace\mygame\Home\media\bmps\. c:\workspace\mygame\Home\media\bmps\.\. c:\workspace\mygame\Home\media\sounds c:\workspace\mygame\Home\other\ etc is it possible to say I want everything under the c:\workspace\mygame\Home folder? If I have lots and lots of sounds, images, fonts etc it's getting . (I cannot find a polite word to use) to manually add each and every file, something is going to get lost ___ SailfishOS.org Devel mailing list
Re: [SailfishDevel] HowTo package my resources (images/sounds/etc)
if you just want to bundle all the files in one dir, you just add example_name.files = dir example_name.path = output_dir INSTALLS += example_name (this is for the just bundle inside the rpm package case) Read the sailfishos.org page I linked :) 2014-02-27 20:14 GMT+01:00 Iosif Hamlatzis i.hamlat...@gmail.com: ok thanks and if I am not making a Qt application but just a plain c/c++ application? Is there a way to define just the root of my assets folder? Let's say my tree is: c:\workspace\mygame\Home c:\workspace\mygame\Home\media c:\workspace\mygame\Home\media\bmps c:\workspace\mygame\Home\media\bmps\. c:\workspace\mygame\Home\media\bmps\.\. c:\workspace\mygame\Home\media\sounds c:\workspace\mygame\Home\other\ etc is it possible to say I want everything under the c:\workspace\mygame\Home folder? If I have lots and lots of sounds, images, fonts etc it's getting . (I cannot find a polite word to use) to manually add each and every file, something is going to get lost ___ SailfishOS.org Devel mailing list ___ SailfishOS.org Devel mailing list
Re: [SailfishDevel] HowTo package my resources (images/sounds/etc)
res.files = Home/* res.path = /usr/share/mygame/resourcces INSTALLS += res On 28.02.2014 01:14, Iosif Hamlatzis wrote: ok thanks and if I am not making a Qt application but just a plain c/c++ application? Is there a way to define just the root of my assets folder? Let's say my tree is: c:\workspace\mygame\Home c:\workspace\mygame\Home\media c:\workspace\mygame\Home\media\bmps c:\workspace\mygame\Home\media\bmps\. c:\workspace\mygame\Home\media\bmps\.\. c:\workspace\mygame\Home\media\sounds c:\workspace\mygame\Home\other\ etc is it possible to say I want everything under the c:\workspace\mygame\Home folder? If I have lots and lots of sounds, images, fonts etc it's getting . (I cannot find a polite word to use) to manually add each and every file, something is going to get lost ___ SailfishOS.org Devel mailing list ___ SailfishOS.org Devel mailing list
Re: [SailfishDevel] HowTo package my resources (images/sounds/etc)
Is there no debian/install counterpart in rpm, not to have use qmake INSTALLS? -- Marcin 2014-02-27 20:25 GMT+01:00 Andrey Kozhevnikov coderusin...@gmail.com: res.files = Home/* res.path = /usr/share/mygame/resourcces INSTALLS += res On 28.02.2014 01:14, Iosif Hamlatzis wrote: ok thanks and if I am not making a Qt application but just a plain c/c++ application? Is there a way to define just the root of my assets folder? Let's say my tree is: c:\workspace\mygame\Home c:\workspace\mygame\Home\media c:\workspace\mygame\Home\media\bmps c:\workspace\mygame\Home\media\bmps\. c:\workspace\mygame\Home\media\bmps\.\. c:\workspace\mygame\Home\media\sounds c:\workspace\mygame\Home\other\ etc is it possible to say I want everything under the c:\workspace\mygame\Home folder? If I have lots and lots of sounds, images, fonts etc it's getting . (I cannot find a polite word to use) to manually add each and every file, something is going to get lost ___ SailfishOS.org Devel mailing list ___ SailfishOS.org Devel mailing list ___ SailfishOS.org Devel mailing list
Re: [SailfishDevel] HowTo package my resources (images/sounds/etc)
thanks a lot, it worked like a charm. ___ SailfishOS.org Devel mailing list
[SailfishDevel] Fwd: FireFloo Communicator 1.0 beta: QXMPP Encryption
Hello, can someone compile it for sailfish? Regards -- Forwarded message -- From: tommuelle...@gmx.net Subject: FireFloo Communicator 1.0 beta: QXMPP Encryption To: ju...@jabber.org Hello, A new whatsapp alternative for encrypted chat based on QXMPP and encrypting protocol libraries seems to be this client here: FireFloo - currently build for win desktop: http://firefloo.sourceforge.net/ Anyone interested in exchanging the encryption key? Tom ___ SailfishOS.org Devel mailing list
[SailfishDevel] Harbour rules: request loading libraries from own folders, do not impose rules on the *source code*
Hi all As you know harbour rules regarding custom libraries and QML modules require two things: 1. Load everything from your app folder 2. In your QML import stuff as import harbour.mycoolapp.desiredmodule Rule 1 makes sense for limiting dependency on the system, but rule 2.. Following it needs that at the very least you need modify the plugin's qmldir, often you also have to change the source code of the plugin you use (e.g. some nemomobile plugins have ASSERTs for the folder). That is not nice and doesn't serve any purpose except for warning you. Also it is easily gameable by just packaging all QMLs into a QRC resource that harbour check script won't parse. That will kill the useful warnings too though.. **Proposal** - So lets mandate only what is actually needed: reading libraries from own folder only. Traceable e.g. by strace - Let's not mandate the source code to use particular import form - You can still keep the warning as information for the developer and alert for the Harbour tester to check that this or that plugin is loaded exactly from app folders, but it shouldn't fail the validation. What do you think? Best regards, Artem. -- Artem Marchenko http://agilesoftwaredevelopment.com http://twitter.com/AgileArtem ___ SailfishOS.org Devel mailing list
[SailfishDevel] Starting point for building packages
Hi, I'm new to the SailfishOS SDK. I'd like to build the ownCloud client for SailfishOS and create a RPM package for easy installation at the Jolla. The documentation on how to build the ownCloud sync client is here: http://doc.owncloud.org/desktop/1.5/building.html But now I'm looking for a hint on how to build software for SailfisOS. The SDK is up and running, and now? The howto's are all about how to create a new software, but not about how to build and package an existing one. I know how to build software on linux: ./configure; make; make install. (And resolve needed dependencies). How can this three commands be mapped to the SailfishOS world? Thanks for any hints on getting started. Cheers, Tobias ___ SailfishOS.org Devel mailing list
Re: [SailfishDevel] Harbour rules: request loading libraries from own folders, do not impose rules on the *source code*
On Thursday 27 February 2014 22:21 Martin Kolman wrote: 27.2.2014 22:10, Artem Marchenko: - Let's not mandate the source code to use particular import form - You can still keep the warning as information for the developer and alert for the Harbour tester to check that this or that plugin is loaded exactly from app folders, but it shouldn't fail the validation. +1 from me on this! BTW, I'll just add another usecase - QML only modules. You might not want to use absolute paths in every QML file using a set of components (import ../my-shiny-module), so you make it to a proper module with qmldir and everything and add the folder it is in to QML import path. Voila, you can just use import shiny 1.0 I am *very* much for this proposal. That way I don't have to maintain several copies of the same qml module, but can use a git submodule and just update it when needed. -- Med venlig hilsen / Best Regards Thomas Tanghus ___ SailfishOS.org Devel mailing list
Re: [SailfishDevel] Starting point for building packages
Sali Tobias The Sailfish SDK / Qt Creator does much of the hard work for you. Dependencies on other libraries are specified in the .yaml file. In the archives of this forum you will find many posts on this issue. I suggest you start with a default Sailfish project, then gradually move in code from you ownCloud app. mfg Chris Zitat von Tobias Brunner tob...@tobru.ch: Hi, I'm new to the SailfishOS SDK. I'd like to build the ownCloud client for SailfishOS and create a RPM package for easy installation at the Jolla. The documentation on how to build the ownCloud sync client is here: http://doc.owncloud.org/desktop/1.5/building.html But now I'm looking for a hint on how to build software for SailfisOS. The SDK is up and running, and now? The howto's are all about how to create a new software, but not about how to build and package an existing one. I know how to build software on linux: ./configure; make; make install. (And resolve needed dependencies). How can this three commands be mapped to the SailfishOS world? Thanks for any hints on getting started. Cheers, Tobias ___ SailfishOS.org Devel mailing list ___ SailfishOS.org Devel mailing list
Re: [SailfishDevel] Starting point for building packages
Hi Tobias Have a look at https://github.com/amarchen/helloworld-pro-sailfish started by yours truly, but has many contributions by now. Its readme contains instructions for both Qt Creator and command line build. And here you can find a bit of theory and diagrams on what's build how when making packages - http://www.codingsubmarine.com/getting-started-with-sailfish-os-helloworld-pro/ Best regards, Artem. On Thu, Feb 27, 2014 at 11:43 PM, christopher.l...@thurweb.ch wrote: Sali Tobias The Sailfish SDK / Qt Creator does much of the hard work for you. Dependencies on other libraries are specified in the .yaml file. In the archives of this forum you will find many posts on this issue. I suggest you start with a default Sailfish project, then gradually move in code from you ownCloud app. mfg Chris Zitat von Tobias Brunner tob...@tobru.ch: Hi, I'm new to the SailfishOS SDK. I'd like to build the ownCloud client for SailfishOS and create a RPM package for easy installation at the Jolla. The documentation on how to build the ownCloud sync client is here: http://doc.owncloud.org/desktop/1.5/building.html But now I'm looking for a hint on how to build software for SailfisOS. The SDK is up and running, and now? The howto's are all about how to create a new software, but not about how to build and package an existing one. I know how to build software on linux: ./configure; make; make install. (And resolve needed dependencies). How can this three commands be mapped to the SailfishOS world? Thanks for any hints on getting started. Cheers, Tobias ___ SailfishOS.org Devel mailing list ___ SailfishOS.org Devel mailing list -- Artem Marchenko http://agilesoftwaredevelopment.com http://twitter.com/AgileArtem ___ SailfishOS.org Devel mailing list
Re: [SailfishDevel] QtContacts: phoneNumbers.length attribute gets lost when copied to ListModel
Hi Chris. This sounds like a regression in the (unfinished) qtpim module of Qt 5, which reimplements the functions provided by QtContacts in QtMobility. You can report bugs against this module here: https://bugreports.qt-project.org/browse/QTBUG/component/19726 Thanks, Matt From: devel-boun...@lists.sailfishos.org [devel-boun...@lists.sailfishos.org] on behalf of christopher.l...@thurweb.ch [christopher.l...@thurweb.ch] Sent: Thursday, February 27, 2014 8:09 PM To: Sailfish OS Developers Subject: [SailfishDevel] QtContacts: phoneNumbers.length attribute gets lost when copied to ListModel Hi All I have come across some strangeness using QtContacts 5.0 on Sailfish. For various reasons partially lost in the mists of time, I copy contacts (or rather a subset of contract roles) from the ContactModel to a a normal ListModel. One of the roles copied is phoneNumbers. This has a child property length indicating the number of phoneNumbers available for the contact. phoneNumbers.length is available (defined) direct from the ContactModel, but is undefined when I try to use it from the ListModel. So the console.log in the function appendContact() gives a valid result, but the console.log in populate() gives undefined. Other properties, including the phone numbers in phoneNumbers are defined when accessed from the ListModel. Equivalent code works in Haramtatan / Qt 4.7.4 Mobility 1.2 import QtContacts 5.0 ContactModel { id: phoneContactsModelInternal } ListModel { id: localContactModelInternal function populate() { clear(); for (var i = 0; i phoneContactsModelInternal.contacts.length; i ++) { appendContact(phoneContactsModelInternal.contacts[i]); console.log(checking number of phoneNumbers: + localContactModel.get(i).phoneNumbers.length); } } function appendContact(contact) { localContactModel.append({contactId: contact.contactId, displayLabel: contact.displayLabel.label, phoneNumbers: contact.phoneNumbers, phoneNumbersCount: contact.phoneNumbers.length}); console.log(appending: + contact.displayLabel.label + , numbers: + contact.phoneNumbers.length) } } Any ideas? Chris ___ SailfishOS.org Devel mailing list ___ SailfishOS.org Devel mailing list
Re: [SailfishDevel] Starting point for building packages
On Friday 28 February 2014 00:20 Artem Marchenko wrote: Also sailfish has quite strict rules on what can be used from where and what can be deployed where Jolla Harbour has very strict rules would be more correct ;) -- Med venlig hilsen / Best Regards Thomas Tanghus ___ SailfishOS.org Devel mailing list
Re: [SailfishDevel] QtContacts: phoneNumbers.length attribute gets lost when copied to ListModel
Hoi Matthew Thanks. I have now raised this bug report: https://bugreports.qt-project.org/browse/QTBUG-37139 Funnily, at least one of reasons lost in the mists of time is a previous bug report I raised at the start of the year: https://bugreports.qt-project.org/browse/QTBUG-35276 Grüsse Chris Zitat von Matthew Vogt matthew.v...@jolla.com: Hi Chris. This sounds like a regression in the (unfinished) qtpim module of Qt 5, which reimplements the functions provided by QtContacts in QtMobility. You can report bugs against this module here: https://bugreports.qt-project.org/browse/QTBUG/component/19726 Thanks, Matt From: devel-boun...@lists.sailfishos.org [devel-boun...@lists.sailfishos.org] on behalf of christopher.l...@thurweb.ch [christopher.l...@thurweb.ch] Sent: Thursday, February 27, 2014 8:09 PM To: Sailfish OS Developers Subject: [SailfishDevel] QtContacts: phoneNumbers.length attribute gets lostwhen copied to ListModel Hi All I have come across some strangeness using QtContacts 5.0 on Sailfish. For various reasons partially lost in the mists of time, I copy contacts (or rather a subset of contract roles) from the ContactModel to a a normal ListModel. One of the roles copied is phoneNumbers. This has a child property length indicating the number of phoneNumbers available for the contact. phoneNumbers.length is available (defined) direct from the ContactModel, but is undefined when I try to use it from the ListModel. So the console.log in the function appendContact() gives a valid result, but the console.log in populate() gives undefined. Other properties, including the phone numbers in phoneNumbers are defined when accessed from the ListModel. Equivalent code works in Haramtatan / Qt 4.7.4 Mobility 1.2 import QtContacts 5.0 ContactModel { id: phoneContactsModelInternal } ListModel { id: localContactModelInternal function populate() { clear(); for (var i = 0; i phoneContactsModelInternal.contacts.length; i ++) { appendContact(phoneContactsModelInternal.contacts[i]); console.log(checking number of phoneNumbers: + localContactModel.get(i).phoneNumbers.length); } } function appendContact(contact) { localContactModel.append({contactId: contact.contactId, displayLabel: contact.displayLabel.label, phoneNumbers: contact.phoneNumbers, phoneNumbersCount: contact.phoneNumbers.length}); console.log(appending: + contact.displayLabel.label + , numbers: + contact.phoneNumbers.length) } } Any ideas? Chris ___ SailfishOS.org Devel mailing list ___ SailfishOS.org Devel mailing list ___ SailfishOS.org Devel mailing list
Re: [SailfishDevel] Starting point for building packages
Jolla Harbour currently has very strict rules would be even more correct ;) Zitat von Thomas Tanghus tho...@tanghus.net: On Friday 28 February 2014 00:20 Artem Marchenko wrote: Also sailfish has quite strict rules on what can be used from where and what can be deployed where Jolla Harbour has very strict rules would be more correct ;) -- Med venlig hilsen / Best Regards Thomas Tanghus ___ SailfishOS.org Devel mailing list ___ SailfishOS.org Devel mailing list