[SailfishDevel] Fwd: Sharing a common OfflineStorage DB between multiple Sailfish apps.

2014-01-16 Thread christopher . lamb

Hi all

This morning on the train on the way to work I tried the following to  
change the location of the offlineStorage DB:


The c++ main function of the demo app CreateDBQt5 now looks like this:

int main(int argc, char *argv[])
{
QScopedPointerQGuiApplication app(SailfishApp::application(argc, argv));
QScopedPointerQQuickView view(SailfishApp::createView());
qDebug()  offlineStoragPath orig:
view-engine()-offlineStoragePath();
 
view-engine()-setOfflineStoragePath(QString(/home/nemo/.local/share/landed25_QT5/QML/OfflineStorage  
));
qDebug()  offlineStoragPath new:
view-engine()-offlineStoragePath();

view-setSource(SailfishApp::pathTo(qml/CreateDBQt5.qml));
view-show();
view-showFullScreen();
return app-exec();
}

This gives the following Application Output:
[D] main:42 - offlineStoragPath orig:   
/home/nemo/.local/share/CreateDBQt5/QML/OfflineStorage
[D] main:44 - offlineStoragPath new:   
/home/nemo/.local/share/landed25_QT5/QML/OfflineStorage


The database is indeed created in  
/home/nemo/.local/share/landed25_QT5/QML/OfflineStorage, and is  
accessible to the app landed25_QT5


Note the order of the view-engine()-setOfflineStoragePath... and  
view-setSource... calls is crucial. If the setSource comes first,  
then the QML is initiated before the storagePath is changed!


In my next experiment I will try to change the storageLocation to  
something like QStandardPaths::GenericDataLocation.


The question on harbour acceptability remains ...

Chris



- Weitergeleitete Nachricht von christopher.l...@thurweb.ch -
 Datum: Wed, 15 Jan 2014 22:34:40 +0100
   Von: christopher.l...@thurweb.ch
Antwort an: Sailfish OS Developers devel@lists.sailfishos.org
   Betreff: [SailfishDevel] Sharing a common OfflineStorage DB  
between multiple Sailfish apps.

An: Sailfish OS Developers devel@lists.sailfishos.org

Hi all

Is it possible to steer where a QML application stores its  
OfflineStorage Database?


I have a family of applications that share a common OfflineStorage  
Database. This works well on Harmattan, and on the early Sailfish  
Alphas without me having had to do anything special at all.


In the early Sailfish Alphas OfflineStorage DBs were stored in a  
common location, and thus could be easily shared.

/home/nemo/.local/share/data/QML/OfflineStorage/Databases

Now on the real Jolla, I find that the standard DB storage location  
has changed, and DBs are now put in a subdirectory of the  
application's installation folder. e.g.


/home/nemo/.local/share/landed25_QT5/QML/OfflineStorage
/home/nemo/.local/share/CreateDBQt5/QML/OfflineStorage

This means without some magic, Sailfish apps can no longer share DBs.

In C++ there is a property offlineStoragePath, and a setter method  
setOfflineStoragePath().


http://qt-project.org/doc/qt-5/qqmlengine.html#offlineStoragePath-prop

I might be able to use this to change the location of the DB, e.g to  
one of the Qt StandardLocations:


http://qt-project.org/doc/qt-5.0/qtcore/qstandardpaths.html#StandardLocation-enum

But setOfflineStoragePath() appears not to be directly available to QML.

http://stackoverflow.com/questions/14209585/how-to-set-custom-offline-storage-path-from-javascript-in-qtquick

So I guess I could call setOfflineStoragePath in each apps' main cpp file.

Or maybe I could even write a declarative plugin to expose  
setOfflineStoragepath to QML, but that is probably overkill as it  
would instantiate QQmlEngine - just t o set a path.


Or is there a better way? Are there any Harbour entry considerations  
to an app creating / accessing a DB somewhere other than in its own  
folder?


Thanks

Chris

___
SailfishOS.org Devel mailing list


- Ende der weitergeleiteten Nachricht -


___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] SailfishOS SDK January update available today.

2014-01-16 Thread Antoine Reversat
Release notes == changelog.


On Thu, Jan 16, 2014 at 2:11 AM, Tone Kastlunger
users.giulie...@gmail.comwrote:

 Changelog? :)



 On Wed, Jan 15, 2014 at 5:24 PM, Jarko Vihriala 
 jarko.vihri...@jolla.comwrote:


  Hello again,

  Today at 16:00 UTC we are publishing a little update on SailfishOS SDK.
 The update itself touches only the Build Engine.

  What you need to do is to boot up the Build Engine after the updates
 have been published (i.e. click the sdk icon in Qt Creator) and wait 10
 minutes while it refreshes its repositories. Then access the SDK Control
 Center Updates view and you should see that Engine updates are available.

  Release note:
  - SDK Control Center

- - Download and reinstall build targets (i.e.) sysroots. This is
done using the new pull-down menu called 'Pre-configured targets'  in
'Targets' view of Control Center.


- - Provide a tool to verify that basic submission criterias are
fulfilled with Harbour intake requirements. This is done from the new
view called 'Harbour Tools' in Control Center.


  If you have any questions, you can either send email to this mailing
 list: devel@lists.sailfishos.org or write it up on together.jolla.comand tag 
 your issue with 'sdk'.

  Happy hacking,
 Jolla SDK Team.

 ___
 SailfishOS.org Devel mailing list



 ___
 SailfishOS.org Devel mailing list

___
SailfishOS.org Devel mailing list

Re: [SailfishDevel] Division by zero in Slider.qml

2014-01-16 Thread Marcin M.
In the second case it's not 0, but 10.

--
Marcin


2014/1/16 Hendrik Borghorst hendrikborgho...@gmail.com

 Hello folks,

 I've noticed some strange behaviour in Silica Silder. If you set
 minimumValue=maximumValue , the handle gets invisible and cannot get
 activated
 again.

 if you've a look at (except from Slider.qml) you'll see:

 function _updateHighlightToValue() {
 highlight.x = (sliderValue - minimumValue) / (maximumValue -
 minimumValue) * _grooveWidth - highlight.width/2 + leftMargin
 }
 that there is a case where an zero divison is done. For example (
 min=Max=0 or
 min=-5 and max=5)

 greetings
 ___
 SailfishOS.org Devel mailing list

___
SailfishOS.org Devel mailing list

Re: [SailfishDevel] Disabling navigation gestures

2014-01-16 Thread Seppo Tiainen
Hi,

You can check if these easy QML tools are enough for you app:
- gesture.grab command within a MultiPointTouchArea ( onGestureStarted:
{gesture.grab();} )
- or, page by page you can use backNavigation: false and/or
forwardNavigation: false.

Seppo


2014/1/15 Alexander Ladygin fake...@gmail.com

 Hi there
 Just a thought: may be you could do it like it's done in Gallery app,
 where tapping one time brings down menu, where you could navigate back and
 forward.

 Best regards,
 Alexander.

 On Tue, Jan 14, 2014 at 1:45 PM, Antoine Reversat a.rever...@gmail.comwrote:

 Yeah that's what I was going to do as a last resort :(


 On Tue, Jan 14, 2014 at 2:49 AM, Bob Jelica sailf...@jelica.se wrote:

 Hey,

 I’m fighting with the same problem. Only way, at least that I’ve found
 thus far, is to use backNavigation/forwardNavigation properties and then
 ”faking” the navigation buttons in top-left corner with a switch and a
 label :)

 //bob

 On 14 Jan 2014, at 03:42, Antoine Reversat a.rever...@gmail.com wrote:

  Hi,
 
  I would like to know if it is possible to disable navigation gestures
 . I'm using a Map element and navigation gestures override the panning
 gesture. I don't want to disable the navigation buttons at the top left
 corner so backNavigation and forwardNavigation properties don't work for me.
 
  Antoine
  ___
  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

Re: [SailfishDevel] No inbox? - SMS

2014-01-16 Thread Seppo Tiainen
Hi,

I would like to add two items to the list:

5) If you use Qt.openUrlExternally(sms: + smsNumber + ?body= +
smsText); in your app you will not be returned back to the app but you will
have to close the sms sending UI (at least when cancelling) and this may
result in some kind of stack error (?) in some cases (black screen,
reboot). I think a fix is needed. - The same method for tel: works great!

6) Regarding item 5), there is no display of the recipient (number/contact)
of the SMS when you are supposed to finally send the text. Risky?

regards,
Seppo


2014/1/10 christopher.l...@thurweb.ch

 Hi All

 As I have had the flu for the past few days, I have been working from
 home, and thus receiving and sending quiet a few SMSes with work
 colleagues. On the whole I found the SMS app useable, even if it could
 benefit from some tweaking.

 I found the prod to reply fairly obvious, IMHO no need for a reply
 button there; but I completely missed the swipe to the left to reply by
 phone call.  Perhaps the moral here is that some of the UX interactions
 are at first not natural, as they are different to other platforms - even
 the N9. I am in 2 minds as to wether such interactions will become more
 natural with time, or if I will remain permanently locked out of some
 functionality because I never chance on the magic touch that reveals it.

 Some things I think do need improvement are:
 1) text is readable with glasses on, but not without, or in difficult
 conditions. Pinch to zoom would be ace and natural.
 2) When you reply to an SMS, the new SMS is hidden at the very bottom of
 screen, and requires a second prod to show the keyboard. I think it would
 be better if the new SMS opened with the keyboard deployed.
 3) No cursors (or at least any that I have found) to move around in the
 text of the SMS to make corrections.
 4) Location of the send button is unfortunate. I also find it a bit small
 and subtle - I would prefer a larger more obvious button.

 mfg

 Chris

 Zitat von Kalle Vahlman kalle.vahl...@movial.com:

  2014/1/10 Chris Walker cdw_noki...@the-walker-household.co.uk:

 On the way home from the meeting, I wanted to send a text to my wife.
 If I thought email was difficult, that was a walk in the park compared
 to trying to send an SMS. Seriously people, have you tried this thing
 in the real world? Where's the Reply button? Jeez. You sure are making
 life tough.


 This intrigues me. What exactly did you find difficult in sending an SMS?

 From what I see on the device, it should be quite obvious how to do
 that both through the people app or the messaging app, and
 not-so-obvious but guessable (long press) from the call app.

 --
 Kalle Vahlman, Movial Creative Technologies Inc.
 Porkkalankatu 20, FI-00180 Helsinki
 Tel +358 9 8567 6400
 Fax +358 9 8567 6401
 www.movial.com
 ___
 SailfishOS.org Devel mailing list




 ___
 SailfishOS.org Devel mailing list

___
SailfishOS.org Devel mailing list

[SailfishDevel] SMS issues/wishes

2014-01-16 Thread Seppo Tiainen
Hi,

I would like to add two more items to the SMS wish list:

1) If you use Qt.openUrlExternally(sms: + smsNumber + ?body= +
smsText); in your app you will not be returned back to the app but you will
have to close the sms sending UI (at least when cancelling) and this may
result in some kind of stack error (?) in some cases (black screen,
reboot). I think a fix is needed. - The same method for tel: works great!
Please don't change that.

2) Regarding item 1), there is no display of the recipient (number/contact)
of the SMS when you are supposed to finally send the text. Risky if not
swiping to see more info?

regards,
Seppo
___
SailfishOS.org Devel mailing list

Re: [SailfishDevel] QML Timer stops running

2014-01-16 Thread Jens Persson
So, I switched my shutdown logic to qml timers and they work just fine when
the gstreamer pipeline is in paused state. And I got a bit curious so I
also tested with the qml multimedia plugin and it worked just fine too. So
basically all you need is one line (and one import) to make timers work in
qml:

Audio { source: file.mp3 }

That's it. I don't know which way is the best but I know which is the
laziest. Just throw in a few cool sounds to complement the obnoxious
beeper. :)

Greets Jens

On Tue, Jan 14, 2014 at 12:32 PM, Thomas Tanghus tho...@tanghus.net wrote:

 That's an interesting approach :) I just might try that if it doesn't pass
 QA.

 On Tuesday 14 January 2014 07:28 Jens Persson wrote:
  Ok, did some fast checking now. Yes you were right, QTimer doesn't work,
  singleShot or not. :( But ... it works for my app because it plays audio
  and it works even if the gstreamer pipeline is in paused state. My app
 uses
  gstreamer directly but you can try some other (easier) way, I think
 there's
  quite a few of them. Just load an audio file and set it to paused state
 and
  timers will hopefully work just fine. Hopefully you will make it to the
  harbour this way. :)
 

___
SailfishOS.org Devel mailing list

Re: [SailfishDevel] Division by zero in Slider.qml

2014-01-16 Thread Matthew Vogt
Thanks, I have filed a bug report for this issue.

Matt

From: devel-boun...@lists.sailfishos.org [devel-boun...@lists.sailfishos.org] 
on behalf of Hendrik Borghorst [hendrikborgho...@gmail.com]
Sent: Thursday, January 16, 2014 9:30 AM
To: Sailfish OS Developers
Subject: [SailfishDevel] Division by zero in Slider.qml

Hello folks,

I've noticed some strange behaviour in Silica Silder. If you set
minimumValue=maximumValue , the handle gets invisible and cannot get activated
again.

if you've a look at (except from Slider.qml) you'll see:

function _updateHighlightToValue() {
highlight.x = (sliderValue - minimumValue) / (maximumValue -
minimumValue) * _grooveWidth - highlight.width/2 + leftMargin
}
that there is a case where an zero divison is done. For example ( min=Max=0 or
min=-5 and max=5)

greetings
___
SailfishOS.org Devel mailing list
___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] QML Timer stops running

2014-01-16 Thread Martin Windolph
Hi,


to avoid trial and error with Harbour for you: I don’t think you will make it 
into Harbour with this Audio Workaround :-(


This is a part of my last rejection reason:

“It seems that there are problems in audio usage. […] Also audio usage is 
blocking suspend when I press Power button .”

In my case there were a few Audio elements in my app that blocked suspend mode, 
allthough they had finished running or were paused. And at least in my case it 
seems to be a bug in Sailfishs QtMultimedia implementation that will (I hope 
so) get fixed some day.


br

Martin






Von: Jens Persson
Gesendet: ‎Donnerstag‎, ‎16‎. ‎Januar‎ ‎2014 ‎23‎:‎24
An: Sailfish OS Developers





So, I switched my shutdown logic to qml timers and they work just fine when the 
gstreamer pipeline is in paused state. And I got a bit curious so I also tested 
with the qml multimedia plugin and it worked just fine too. So basically all 
you need is one line (and one import) to make timers work in qml:

Audio { source: file.mp3 }





That's it. I don't know which way is the best but I know which is the laziest. 
Just throw in a few cool sounds to complement the obnoxious beeper. :)





Greets Jens




On Tue, Jan 14, 2014 at 12:32 PM, Thomas Tanghus tho...@tanghus.net wrote:

That's an interesting approach :) I just might try that if it doesn't pass QA.



On Tuesday 14 January 2014 07:28 Jens Persson wrote:
 Ok, did some fast checking now. Yes you were right, QTimer doesn't work,
 singleShot or not. :( But ... it works for my app because it plays audio
 and it works even if the gstreamer pipeline is in paused state. My app uses
 gstreamer directly but you can try some other (easier) way, I think there's
 quite a few of them. Just load an audio file and set it to paused state and
 timers will hopefully work just fine. Hopefully you will make it to the
 harbour this way. :)
___
SailfishOS.org Devel mailing list___
SailfishOS.org Devel mailing list

Re: [SailfishDevel] Disabling navigation gestures

2014-01-16 Thread Antoine Reversat
Hi,

I ended up using Bobs solution. I disabled backNavigation and made a custom
button to go back.


On Thu, Jan 16, 2014 at 1:47 PM, Seppo Tiainen seppo.tiai...@gmail.comwrote:

 Hi,

 You can check if these easy QML tools are enough for you app:
 - gesture.grab command within a MultiPointTouchArea ( onGestureStarted:
 {gesture.grab();} )
 - or, page by page you can use backNavigation: false and/or
 forwardNavigation: false.

 Seppo


 2014/1/15 Alexander Ladygin fake...@gmail.com

 Hi there
 Just a thought: may be you could do it like it's done in Gallery app,
 where tapping one time brings down menu, where you could navigate back and
 forward.

 Best regards,
 Alexander.

 On Tue, Jan 14, 2014 at 1:45 PM, Antoine Reversat 
 a.rever...@gmail.comwrote:

 Yeah that's what I was going to do as a last resort :(


 On Tue, Jan 14, 2014 at 2:49 AM, Bob Jelica sailf...@jelica.se wrote:

 Hey,

 I’m fighting with the same problem. Only way, at least that I’ve found
 thus far, is to use backNavigation/forwardNavigation properties and then
 ”faking” the navigation buttons in top-left corner with a switch and a
 label :)

 //bob

 On 14 Jan 2014, at 03:42, Antoine Reversat a.rever...@gmail.com
 wrote:

  Hi,
 
  I would like to know if it is possible to disable navigation gestures
 . I'm using a Map element and navigation gestures override the panning
 gesture. I don't want to disable the navigation buttons at the top left
 corner so backNavigation and forwardNavigation properties don't work for 
 me.
 
  Antoine
  ___
  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

___
SailfishOS.org Devel mailing list

[SailfishDevel] Font rendering bug

2014-01-16 Thread Michal Jerz
Hello,

There is something wrong with font rendering.  A different (better looking, 
larger) font is used when an application is started automatically right 
after deployment (and each time it is started from the Terminal), and a 
different font (uglier, smaller) is used when an application is started from 
an icon.

Some example screenshots and a simple example code (link in the comments) to 
test it can be found here:

https://together.jolla.com/question/2338/font-changes-in-deployed-applications-to-a-tiny-and-ugly-one/

(screenshots not always show up on that site, please refresh if you can't 
see them).

One person tested it on his setup (SDK, device) and got the same results. 
According to him, starting the app directly from QtCreator (after deploying 
it as RPM-package) in the device, or launching it from the Terminal, does 
not make the type of application to silica-qt5, but just qt5, and fonts 
render more clearly and brightly. Starting from an icon makes the type of 
application silica-qt5 and fonts render worse. The fonts are also of 
different letterspacing, and alignment

Interestingly, if the initialPage is set as Component then the font is 
always the same (the worse looking, though). Otherwise, different fonts are 
shown depending on how the application is launched (terminal or icon) as 
described above.

Can someone please take a look at it? It is a HUGE problem because it 
changes the look of an application depending on how it is launched. I posted 
it on together.jolla.com weeks ago, but it didn't attract anyone's 
attention.


Thanks,
Michal
___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] Font rendering bug

2014-01-16 Thread Michal Jerz
P.S. If someone wants to try and see the font rendering issue, here's a very 
simple example (simply a page showing some text):

https://app.box.com/s/zf1seb00bd9q2u9ji7u6

When launched automatically right after deployment (and when started from 
the terminal by typing Biorhythms) the font is completely different than 
when launched from an icon

(Sorry, I can't find an email client that correctly follows threads on this 
mailinglist)


Hello,

There is something wrong with font rendering.  A different (better looking, 
larger) font is used when an application is started automatically right 
after deployment (and each time it is started from the Terminal), and a 
different font (uglier, smaller) is used when an application is started 
from 
an icon.

Some example screenshots and a simple example code (link in the comments) 
to 
test it can be found here:

https://together.jolla.com/question/2338/font-changes-in-deployed-applications-to-a-tiny-and-ugly-one/

(screenshots not always show up on that site, please refresh if you can't 
see them).

One person tested it on his setup (SDK, device) and got the same results. 
According to him, starting the app directly from QtCreator (after 
deploying 
it as RPM-package) in the device, or launching it from the Terminal, does 
not make the type of application to silica-qt5, but just qt5, and fonts 
render more clearly and brightly. Starting from an icon makes the type of 
application silica-qt5 and fonts render worse. The fonts are also of 
different letterspacing, and alignment

Interestingly, if the initialPage is set as Component then the font is 
always the same (the worse looking, though). Otherwise, different fonts are 
shown depending on how the application is launched (terminal or icon) as 
described above.

Can someone please take a look at it? It is a HUGE problem because it 
changes the look of an application depending on how it is launched. I 
posted 
it on together.jolla.com weeks ago, but it didn't attract anyone's 
attention.


Thanks,
Michal

___
SailfishOS.org Devel mailing list