[SailfishDevel] osx installer problem with old VirtualBox

2013-05-04 Thread Erlend Boe
Hi all,

Just a short mail to alert osx users to an issue that I had.
When installing the SDK on my mac, I got the error message:

"Error during installation process (org.merproject.mersdk):
Execution failed(Unexpected exit code: 126): "/usr/bin/VBoxManage createvm 
--name MerSDK --register --basefolder /Users/evb/SailfishOS/mersdk"

--> This issue was caused by my old installation of Virtualbox (from 2010)

installing the latest version (4.2.12) fixed the issue.

Regards,
Erlend

___
SailfishOS.org Devel mailing list


[SailfishDevel] Virtual Size of sailfishos.vdi

2013-05-29 Thread Erlend Boe
Hi all,

is there a reason why sailfishos.vdi has a virtual size of  only 1.95 GB?

My application fails to install, as I have a mysql DB that is 1.7 GB.

Is there a way that I can extend the virtual size?
I'm on mac osx 10.8.

PS: I am working around the issue by sharing a directory with virtual box, so 
the issue not blocking me.

Regards,
Erlend

___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] Persistent storage

2013-05-31 Thread Erlend Boe
Hoi Chris,

The difference is that I am accessing SQLite from C++.
sorry - I should have made that more clear.

Erlend

On 31.05.2013, at 22:31, christopher.l...@thurweb.ch wrote:

> Hi Erlend
> 
> I am slightly confused: Is there any difference between the QtQuick Offline 
> Storage API / Database API, and SQLite?
> 
> My Harmattan app makes use of an SQLite database to store settings. I am 
> fairly sure that I did not have to install anything on to Harmattan 
> Simulator, Emulator or physical device (N9). Nor did I have to add anything 
> to the .pro file.
> 
> When I started porting this app to Sailfish, the app would start, but the 
> database access did not work.
> 
> Then I installed sqlite-devel to the SDK via the SDK Control Center, and 
> sqlite-devel to the Emulator by means of zypper in.
> 
> After this the DB access magically worked. I made no change to my Sailfish 
> .pro file.
> 
> So what is the difference between the technique you suggest, and the one I 
> found?
> 
> Grüsse
> 
> Chris
> 
> 
> 
> 
> 
> Zitat von "Erlend Böe" :
> 
>> Hei Markus,
>> 
>> It is already included in the simulator.
>> All I had to do was to add
>> QT+=sql to the qmake project file.
>> Erlend
>> 
>> Sent from my Jolla ;-)
>> 
>> On 29.05.2013, at 22:23, Joseph Crowell  wrote:
>> 
>>> SQLite is in use on a wide range of applications. I would assume it would 
>>> be bundled on the device along with the other core Qt plugins.
>>> 
>>> On 5/30/2013 6:18 AM, Markus Svensson wrote:
 Hi Chris,
 
 Thank you for your reply.
 
 I believe QT Quick uses SQLite under the hood as well, but I have not had 
 to add any extra packages so far. But then I haven't gotten very far with 
 my app yet...
 
 Is it known if SQLite will be available on production devices, or will 
 each app have to bundle it separately?
 
 Thanks!
 
 Skickat från min iPhone
 
 29 maj 2013 kl. 21:31 skrev christopher.l...@thurweb.ch:
 
> Hi Markus
> 
> SQLite works for me, but you need to install the packages to the SDK and 
> Emulator first.
> 
> Grüsse
> 
> Chris
> 
> Zitat von "Markus Svensson" :
> 
>> Hi,
>> 
>> What is the preferred way of doing persistent database type storage in a 
>> Sailfish OS application? I'm thinking of using QT Quick's Offline 
>> Storage API - will this work, or is there a better way?
>> 
>> Thanks!
>> 
>> Regards,
>> Markus
>> ___
>> SailfishOS.org Devel mailing list
 ___
 SailfishOS.org Devel mailing list
>>> 
>>> ___
>>> SailfishOS.org Devel mailing list
>> ___
>> SailfishOS.org Devel mailing list
> 
> 
> 

___
SailfishOS.org Devel mailing list


[SailfishDevel] GStreamer does not support HTTP streaming -- Workaround?

2013-07-11 Thread Erlend Boe
Hi all,

I tried to play an .ogg audio file using a http url in my application (from 
qml), but it is not working.
The error message that I get is:
GStreamer; Unable to play - 
"http://upload.wikimedia.org/wikipedia/commons/4/4b/En-us-surname.ogg"; 
Error: "No URI handler implemented for "http".

I then saw that also MeeGo once had this problem, bug 1584.
(performing a similar test in the simulator gives the same error as in bug 1584)

What is the best workaround for this issue? Do I need to download the .ogg file 
to a temporary file in C++, and then use this local file?

Regards,
Erlend

test in simulator:
--
[root@SailfishEmul HelloWorld]# gst-launch-0.10 playbin2 
uri=http://download.banshee-project.org/misc/http-test.ogg
Setting pipeline to PAUSED ...
ERROR: Pipeline doesn't want to pause.
Missing element: HTTP protocol source
ERROR: from element /GstURIDecodeBin:uridecodebin0: No URI handler implemented 
for "http".
Additional debug info:
gsturidecodebin.c(1285): gen_source_element (): 
/GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0
Setting pipeline to NULL ...
Freeing pipeline ...

___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] GStreamer does not support HTTP streaming -- Workaround?

2013-07-11 Thread Erlend Boe
Hi Thomas,

Thanks for your help.
I have filed bug #689.

@all: go and vote for it at https://bugs.nemomobile.org

Regards,
Erlend

On 11.07.2013, at 15:21, "Thomas B. Rücker"  wrote:

> Hi,
> 
> On 07/11/2013 12:40 PM, Erlend Boe wrote:
>> I tried to play an .ogg audio file using a http url in my application (from 
>> qml), but it is not working.
>> The error message that I get is:
>> GStreamer; Unable to play - 
>> "http://upload.wikimedia.org/wikipedia/commons/4/4b/En-us-surname.ogg"; 
>> Error: "No URI handler implemented for "http".
>> 
>> I then saw that also MeeGo once had this problem, bug 1584.
>> (performing a similar test in the simulator gives the same error as in bug 
>> 1584)
> 
> Umm, that's bad and should be fixed. I suppose Mer inherited the build
> config from MeeGo.
> GStreamer is part of Nemo middleware nowadays and bugs can be filed here:
> https://bugs.nemomobile.org/
> Once it's fixed there it should automagically also appear in Sailfish as
> that uses Nemo MW.
> 
>> What is the best workaround for this issue? Do I need to download the .ogg 
>> file to a temporary file in C++, and then use this local file?
> 
> You can't easily do that with e.g. a large file or a live stream like
> those listed on http://dir.xiph.org. You'd essentially need to implement
> your own HTTP client. So building it with HTTP support enabled is in
> order and removes the incentive to reinvent the wheel, badly.
> 
> Cheers
> 
> Thomas
> ___
> SailfishOS.org Devel mailing list

___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] GStreamer does not support HTTP streaming -- Workaround?

2013-07-11 Thread Erlend Boe
Hi Mohammed,

after doing "zypper install gst-plugins-good", it now works.
Thanks!

can you confirm that the gst-plugins-good will be part of the next Sailfish 
release, and will be installed in the shipping product?

Regards,
Erlend

On 11.07.2013, at 17:17, Mohammed Hassan  
wrote:

> On Thu, Jul 11, 2013 at 01:21:44PM +, "Thomas B. Rücker" wrote:
>> Hi,
>> 
>> On 07/11/2013 12:40 PM, Erlend Boe wrote:
>>> I tried to play an .ogg audio file using a http url in my application (from 
>>> qml), but it is not working.
>>> The error message that I get is:
>>> GStreamer; Unable to play - 
>>> "http://upload.wikimedia.org/wikipedia/commons/4/4b/En-us-surname.ogg"; 
>>> Error: "No URI handler implemented for "http".
>>> 
>>> I then saw that also MeeGo once had this problem, bug 1584.
>>> (performing a similar test in the simulator gives the same error as in bug 
>>> 1584)
>> 
>> Umm, that's bad and should be fixed. I suppose Mer inherited the build
>> config from MeeGo.
>> GStreamer is part of Nemo middleware nowadays and bugs can be filed here:
>> https://bugs.nemomobile.org/
>> Once it's fixed there it should automagically also appear in Sailfish as
>> that uses Nemo MW.
> 
> It's actually available. You only need to install gst-plugins-good in the
> emulator to get http streaming to work.
> 
> It seems that nothing is depending on gst-plugins-good thus it never gets
> pulled in by default.
> 
> Cheers,
> ___
> SailfishOS.org Devel mailing list

___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] Fwd: Alpha 2: passing simple properties from main.cpp to qml: A solution

2013-08-04 Thread Erlend Boe
Hoi Chris

after using the patch, it is also working for me.

However, I have some other problems:
* opening my sqlite DB (1.7 GB) fails with  QSqlError(-1, "Error opening 
database", "out of memory")
* debugging fails with "connection to remote server failed: 
tcp:localhost:1: Bad file descriptor. (although the application Output 
shows  "Listening on port 1")

opening the db worked fine in the previous release.
Does anybody know what would cause this problem, or how I can debug it?


I'm using a mac with osx 10.8.4, and virtualbox 4.2.16. 
I can log on to the simulator with: ssh -i 
~/SailfishOS/vmshare/ssh/private_keys/1/root root@localhost -p 2223

Regards
Erlend



On 04.08.2013, at 18:56, christopher.l...@thurweb.ch wrote:

> Hi All
> 
> Just a quick note to say that
> 
> Q_DECL_EXPORT int main(int argc, char *argv[])
> {
>QScopedPointer app(Sailfish::createApplication(argc, 
> argv));
>QScopedPointer view(Sailfish::createView());
>view->rootContext()->setContextProperty("cppproperty",  "Hello world");
>Sailfish::setView(view.data(), "main.qml");
>Sailfish::showView(view.data());
>return app->exec();
> }
> 
> works (so far) without error if Lucien's patch to sailfishapplication.cpp is 
> applied. This can be found here: 
> https://lists.sailfishos.org/pipermail/devel/attachments/20130802/2367c686/attachment.cpp
> 
> Chris
> 
> - Weitergeleitete Nachricht von christopher.l...@thurweb.ch -
> Datum: Sun, 04 Aug 2013 18:36:06 +0200
>   Von: christopher.l...@thurweb.ch
>   Betreff: Re: [SailfishDevel] Alpha 2: passing simple properties from
> main.cpp to qml: A bug?
>An: "Lucien XU" 
>Cc: devel@lists.sailfishos.org
> 
> Salut Lucien
> 
> Maybe it is clearer with Code examples
> 
> I was doing this, which gives me an error, but seems to work!
> 
> Q_DECL_EXPORT int main(int argc, char *argv[])
> {
>QScopedPointer app(Sailfish::createApplication(argc, 
> argv));
>QScopedPointer view(Sailfish::createView("main.qml"));
>view->rootContext()->setContextProperty("cppproperty",  "Hello world");
>Sailfish::showView(view.data());
>return app->exec();
> }
> 
> You suggest I could this:
> 
> Q_DECL_EXPORT int main(int argc, char *argv[])
> {
>QScopedPointer app(Sailfish::createApplication(argc, 
> argv));
>QScopedPointer view(Sailfish::createView());
>view->rootContext()->setContextProperty("cppproperty",  "Hello world");
>Sailfish::setView(view.data(), "main.qml");
>Sailfish::showView(view.data());
>return app->exec();
> }
> 
> ..but will then run into your template error:
> file:///usr/share/setContextPropertyDemo/main.qml: File not found
> 
> Maybe the qmlRegister**Type is the best approach after all. The downside is 
> (unless I have missed something) that I will then have to create a class for 
> my property, whereas with the setContextProperty I can use a string literal 
> or a primitive type like int.
> 
> Merci
> 
> Chris
> 
> 
> Zitat von "Lucien XU" :
> 
>> Hello guys !
>> 
>> It might be useful to use qmlRegister**Type (uncreatable, singleton etc.) to
>> expose C++ components to QML. But if you really want to use rootContext()-
>>> setContextProperty, you have to be cautious.
>> 
>> Actually, if you pass the qml file to the view before registering C++
>> components, the QML components won't be able to see the C++ ones, so you have
>> to call setContextProperty before calling setSource (or calling the
>> createView("main.qml") method).
>> 
>> You have to call the parameter-less method createView(), and then, call
>> setView(QQuickView *, QString) to pass the source QML file.
>> 
>> But beware, there is a bug in the template. See
>> https://lists.sailfishos.org/pipermail/devel/2013-August/000529.html.
>> 
>> Hopes it helps (because I'm not very clear in this mail)
>> Cheers,
>> Lucien
>> 
>> Le dimanche 4 août 2013 17:05:01 christopher.l...@thurweb.ch a écrit :
>>> Hi Martin
>>> 
>>> Curiouser and Curiouser!
>>> 
>>> Just to be sure, I went back and tested your suggestion in a demo
>>> project based on the default "Hello Sailors" new project template.
>>> 
>>> Here I pass the c++ property cppproperty with the value "Hello World".
>>> In the QML FirstPage this is concatenated to the "Hello Sailors" label
>>> text.
>>> 
>>> I still get this error:
>>> file:///opt/sdk/setContextPropertyDemo/usr/share/setContextPropertyDemo/page
>>> s/FirstPage.qml:34: ReferenceError: cppproperty is not defined
>>> 
>>> Yet the app displays "Hello Sailors: Hello world".
>>> 
>>> So a property can be passed as you suggested, it can be used. The
>>> error must be wrong!
>>> 
>>> Chris
>>> 
>>> P.s you test the same by creating a default new Sailfish project, and
>>> replacing the main.cpp and FirstPage.qml with the code below.
>>> 
>>> 
>>> //start main.cpp
>>> #include 
>>> #include 
>>> #include 
>>> 
>>> #include "sailfishapplication.h"
>>> 
>>> Q_DECL_EXPORT int main(int argc, char *argv[])
>>> {
>>>QScopedPo