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

2014-01-15 Thread Tone Kastlunger
Changelog? :)



On Wed, Jan 15, 2014 at 5:24 PM, Jarko Vihriala wrote:

>
>  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.com and
> tag your issue with 'sdk'.
>
>  Happy hacking,
> Jolla SDK Team.
>
> ___
> SailfishOS.org Devel mailing list
>
___
SailfishOS.org Devel mailing list

[SailfishDevel] Division by zero in Slider.qml

2014-01-15 Thread Hendrik Borghorst
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


Re: [SailfishDevel] Two executables and D-Bus interfaces in a package

2014-01-15 Thread Matthias Fehring
Ok, one should not go away to make food... :D So my other post is not 
relevant anymore...



Am 15.01.2014 23:50, schrieb Gabriel Böhme:

Ohh,...

 should read more careful, or stop watching videos next to it.^^ ;)

 Am 15.01.2014 23:48, schrieb Andrey Kozhevnikov:


we're talking about dbus interfaces, not apis :)

On 16.01.2014 04:47, Gabriel Böhme wrote:

I think DBUS is not restricted at all as far as I know, Bernd wrote the 
following some days ago:


This comment was about one specific DBus API (PackageKit), which will be
made unavailable to 3rd party applications soon to prevent unrequested
sideloading of RPM packages. An API designed for use by 3rd party
applications for this task will be made available.

DBus APIs generally are available to you if you have the right to acces
them from your application without raising the applications
privileges. PackageKit (hopefully) is the one big exception there at the
moment. We're trying to create additional documentation on stability of
DBus APIs to help you to avoid using an API which will still change a lot.

Gabriel.

Am 15.01.2014 23:43, schrieb Andrey Kozhevnikov:
D-Bus interfaces not allowed for harbour.
And you can use everything you want if dont need to go to harbour :)

On 16.01.2014 04:35, Matthias Fehring wrote:
Hello,

I have a question concerning the harbour rules and the currently allowed 
stuff.


My application (http://ocnews.buschmann23.de [1]) consists of two 
executable files. One is the
frontend, the other one is a daemon/engine. Both are communicating through 
D-Bus, the

daemon/engine is also started on request through D-Bus.

Now the harbour rules seems only to allow one executable per package. How 
to go around these

problem? Creating two packages?

The other thing is the D-Bus interface of the daemon/engine. The new rpm 
validator in the SDK
says, that it is not allowed to install files in 
/usr/share/dbus-1/interfaces and

/usr/share/dbus-1/services.

Is there a solution for that or can it currently not published through 
Jolla Store when it uses

it's own D-Bus interface?

Best greetings
Matthias
___
SailfishOS.org Devel mailing list

___
SailfishOS.org Devel mailing list


___
SailfishOS.org Devel mailing list

___
SailfishOS.org Devel mailing list



Links:
--
[1] http://ocnews.buschmann23.de

___
SailfishOS.org Devel mailing list

___
SailfishOS.org Devel mailing list

Re: [SailfishDevel] Two executables and D-Bus interfaces in a package

2014-01-15 Thread Matthias Fehring
Yes, I read that already yesterday or the day before and thougt that own 
D-Bus interfaces are allowed.

But then the result of the rpm validator is a bit irritating. :)

But I will try to submit it to harbour and will see what happens.

Am 15.01.2014 23:47, schrieb Gabriel Böhme:
I think DBUS is not restricted at all as far as I know, Bernd wrote the 
following some days ago:


This comment was about one specific DBus API (PackageKit), which will be
made unavailable to 3rd party applications soon to prevent unrequested
sideloading of RPM packages. An API designed for use by 3rd party
applications for this task will be made available.

DBus APIs generally are available to you if you have the right to acces
them from your application without raising the applications
privileges. PackageKit (hopefully) is the one big exception there at the
moment. We're trying to create additional documentation on stability of
DBus APIs to help you to avoid using an API which will still change a lot.

 Gabriel.

 Am 15.01.2014 23:43, schrieb Andrey Kozhevnikov:


D-Bus interfaces not allowed for harbour.
And you can use everything you want if dont need to go to harbour :)

On 16.01.2014 04:35, Matthias Fehring wrote:


Hello,

I have a question concerning the harbour rules and the currently allowed 
stuff.


My application (http://ocnews.buschmann23.de [1]) consists of two 
executable files. One is
the frontend, the other one is a daemon/engine. Both are communicating 
through D-Bus, the

daemon/engine is also started on request through D-Bus.

Now the harbour rules seems only to allow one executable per package. How 
to go around these

problem? Creating two packages?

The other thing is the D-Bus interface of the daemon/engine. The new rpm 
validator in the SDK
says, that it is not allowed to install files in 
/usr/share/dbus-1/interfaces and

/usr/share/dbus-1/services.

Is there a solution for that or can it currently not published through 
Jolla Store when it

uses it's own D-Bus interface?

Best greetings
Matthias
___
SailfishOS.org Devel mailing list


___
SailfishOS.org Devel mailing list




Links:
--
[1] http://ocnews.buschmann23.de

___
SailfishOS.org Devel mailing list

___
SailfishOS.org Devel mailing list

Re: [SailfishDevel] Two executables and D-Bus interfaces in a package

2014-01-15 Thread Gabriel Böhme
Ohh,...

should read more careful, or stop watching videos next to it.^^ ;)

Am 15.01.2014 23:48, schrieb Andrey Kozhevnikov:
> we're talking about dbus interfaces, not apis :)
>
> On 16.01.2014 04:47, Gabriel Böhme wrote:
>> I think DBUS is not restricted at all as far as I know, Bernd wrote
>> the following some days ago:
>>
>> /This comment was about one specific DBus API (PackageKit), which will be
>> made unavailable to 3rd party applications soon to prevent unrequested
>> sideloading of RPM packages. An API designed for use by 3rd party
>> applications for this task will be made available.
>>
>> DBus APIs generally are available to you if you have the right to acces
>> them from your application without raising the applications
>> privileges. PackageKit (hopefully) is the one big exception there at the
>> moment. We're trying to create additional documentation on stability of
>> DBus APIs to help you to avoid using an API which will still change a lot./
>>
>>
>> Gabriel.
>>
>>
>>
>> Am 15.01.2014 23:43, schrieb Andrey Kozhevnikov:
>>> D-Bus interfaces not allowed for harbour.
>>> And you can use everything you want if dont need to go to harbour :)
>>>
>>> On 16.01.2014 04:35, Matthias Fehring wrote:
 Hello,

 I have a question concerning the harbour rules and the currently
 allowed stuff.

 My application (http://ocnews.buschmann23.de) consists of two
 executable files. One is the frontend, the other one is a
 daemon/engine. Both are communicating through D-Bus, the
 daemon/engine is also started on request through D-Bus.

 Now the harbour rules seems only to allow one executable per
 package. How to go around these problem? Creating two packages?

 The other thing is the D-Bus interface of the daemon/engine. The
 new rpm validator in the SDK says, that it is not allowed to
 install files in /usr/share/dbus-1/interfaces and
 /usr/share/dbus-1/services.

 Is there a solution for that or can it currently not published
 through Jolla Store when it uses it's own D-Bus interface?


 Best greetings
 Matthias
 ___
 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] Two executables and D-Bus interfaces in a package

2014-01-15 Thread Andrey Kozhevnikov

we're talking about dbus interfaces, not apis :)

On 16.01.2014 04:47, Gabriel Böhme wrote:
I think DBUS is not restricted at all as far as I know, Bernd wrote 
the following some days ago:


/This comment was about one specific DBus API (PackageKit), which will be
made unavailable to 3rd party applications soon to prevent unrequested
sideloading of RPM packages. An API designed for use by 3rd party
applications for this task will be made available.

DBus APIs generally are available to you if you have the right to acces
them from your application without raising the applications
privileges. PackageKit (hopefully) is the one big exception there at the
moment. We're trying to create additional documentation on stability of
DBus APIs to help you to avoid using an API which will still change a lot./


Gabriel.



Am 15.01.2014 23:43, schrieb Andrey Kozhevnikov:

D-Bus interfaces not allowed for harbour.
And you can use everything you want if dont need to go to harbour :)

On 16.01.2014 04:35, Matthias Fehring wrote:

Hello,

I have a question concerning the harbour rules and the currently 
allowed stuff.


My application (http://ocnews.buschmann23.de) consists of two 
executable files. One is the frontend, the other one is a 
daemon/engine. Both are communicating through D-Bus, the 
daemon/engine is also started on request through D-Bus.


Now the harbour rules seems only to allow one executable per 
package. How to go around these problem? Creating two packages?


The other thing is the D-Bus interface of the daemon/engine. The new 
rpm validator in the SDK says, that it is not allowed to install 
files in /usr/share/dbus-1/interfaces and /usr/share/dbus-1/services.


Is there a solution for that or can it currently not published 
through Jolla Store when it uses it's own D-Bus interface?



Best greetings
Matthias
___
SailfishOS.org Devel mailing list


___
SailfishOS.org Devel mailing list




___
SailfishOS.org Devel mailing list


___
SailfishOS.org Devel mailing list

Re: [SailfishDevel] Two executables and D-Bus interfaces in a package

2014-01-15 Thread Gabriel Böhme
I think DBUS is not restricted at all as far as I know, Bernd wrote the
following some days ago:

/This comment was about one specific DBus API (PackageKit), which will be
made unavailable to 3rd party applications soon to prevent unrequested
sideloading of RPM packages. An API designed for use by 3rd party
applications for this task will be made available.

DBus APIs generally are available to you if you have the right to acces
them from your application without raising the applications
privileges. PackageKit (hopefully) is the one big exception there at the
moment. We're trying to create additional documentation on stability of
DBus APIs to help you to avoid using an API which will still change a lot./


Gabriel.



Am 15.01.2014 23:43, schrieb Andrey Kozhevnikov:
> D-Bus interfaces not allowed for harbour.
> And you can use everything you want if dont need to go to harbour :)
>
> On 16.01.2014 04:35, Matthias Fehring wrote:
>> Hello,
>>
>> I have a question concerning the harbour rules and the currently
>> allowed stuff.
>>
>> My application (http://ocnews.buschmann23.de) consists of two
>> executable files. One is the frontend, the other one is a
>> daemon/engine. Both are communicating through D-Bus, the
>> daemon/engine is also started on request through D-Bus.
>>
>> Now the harbour rules seems only to allow one executable per package.
>> How to go around these problem? Creating two packages?
>>
>> The other thing is the D-Bus interface of the daemon/engine. The new
>> rpm validator in the SDK says, that it is not allowed to install
>> files in /usr/share/dbus-1/interfaces and /usr/share/dbus-1/services.
>>
>> Is there a solution for that or can it currently not published
>> through Jolla Store when it uses it's own D-Bus interface?
>>
>>
>> Best greetings
>> Matthias
>> ___
>> SailfishOS.org Devel mailing list
>
> ___
> SailfishOS.org Devel mailing list

___
SailfishOS.org Devel mailing list

Re: [SailfishDevel] Two executables and D-Bus interfaces in a package

2014-01-15 Thread Matthias Fehring

Thank you for the fast answer. The openrepos.net is the solution for me. :)

Best greetings
Matthias

Am 15.01.2014 23:43, schrieb Andrey Kozhevnikov:

D-Bus interfaces not allowed for harbour.
And you can use everything you want if dont need to go to harbour :)

On 16.01.2014 04:35, Matthias Fehring wrote:

Hello,

I have a question concerning the harbour rules and the currently allowed 
stuff.


My application (http://ocnews.buschmann23.de) consists of two executable 
files. One is the frontend, the other one is a daemon/engine. Both are 
communicating through D-Bus, the daemon/engine is also started on request 
through D-Bus.


Now the harbour rules seems only to allow one executable per package. How 
to go around these problem? Creating two packages?


The other thing is the D-Bus interface of the daemon/engine. The new rpm 
validator in the SDK says, that it is not allowed to install files in 
/usr/share/dbus-1/interfaces and /usr/share/dbus-1/services.


Is there a solution for that or can it currently not published through 
Jolla Store when it uses it's own D-Bus interface?



Best greetings
Matthias
___
SailfishOS.org Devel mailing list


___
SailfishOS.org Devel mailing list

___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] Two executables and D-Bus interfaces in a package

2014-01-15 Thread Andrey Kozhevnikov

D-Bus interfaces not allowed for harbour.
And you can use everything you want if dont need to go to harbour :)

On 16.01.2014 04:35, Matthias Fehring wrote:

Hello,

I have a question concerning the harbour rules and the currently 
allowed stuff.


My application (http://ocnews.buschmann23.de) consists of two 
executable files. One is the frontend, the other one is a 
daemon/engine. Both are communicating through D-Bus, the daemon/engine 
is also started on request through D-Bus.


Now the harbour rules seems only to allow one executable per package. 
How to go around these problem? Creating two packages?


The other thing is the D-Bus interface of the daemon/engine. The new 
rpm validator in the SDK says, that it is not allowed to install files 
in /usr/share/dbus-1/interfaces and /usr/share/dbus-1/services.


Is there a solution for that or can it currently not published through 
Jolla Store when it uses it's own D-Bus interface?



Best greetings
Matthias
___
SailfishOS.org Devel mailing list


___
SailfishOS.org Devel mailing list


[SailfishDevel] Two executables and D-Bus interfaces in a package

2014-01-15 Thread Matthias Fehring

Hello,

I have a question concerning the harbour rules and the currently allowed 
stuff.


My application (http://ocnews.buschmann23.de) consists of two executable 
files. One is the frontend, the other one is a daemon/engine. Both are 
communicating through D-Bus, the daemon/engine is also started on request 
through D-Bus.


Now the harbour rules seems only to allow one executable per package. How to 
go around these problem? Creating two packages?


The other thing is the D-Bus interface of the daemon/engine. The new rpm 
validator in the SDK says, that it is not allowed to install files in 
/usr/share/dbus-1/interfaces and /usr/share/dbus-1/services.


Is there a solution for that or can it currently not published through Jolla 
Store when it uses it's own D-Bus interface?



Best greetings
Matthias
___
SailfishOS.org Devel mailing list


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

2014-01-15 Thread christopher . lamb

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


Re: [SailfishDevel] QML Timer stops running

2014-01-15 Thread Thomas Tanghus
On Wednesday 15 January 2014 18:33 Oleksii Serdiuk wrote:
> On 15/01/14 18:31, Oleksii Serdiuk wrote:
> > On 15/01/14 13:16, Thomas Tanghus wrote:
>  The reason for the 5-10 second wakeup is that I want to update cover
>  until
>  screen goes black, and I haven't found a way to detect that, and
>  applicationActive doesn't do it. Maybe my search-foo looked for the
>  wrong
>  keywords.
> >>> 
> >>> Use Cover.status property:
> >>> 
> >>> https://sailfishos.org/sailfish-silica/qml-sailfishsilica-cover.html#sta
> >>> tus-> prop
> >>> 
> >>> Cover.Active - the cover is visible, and the user can interact with it
> >> 
> >> So (saying my covers id is 'cover') I could do:
> >> property bool visible: cover.active || applicationActive;
> > 
> > Yes, this should work. However, I wouldn't recommend naming a property
> > `visible` because this will hide `visible` property of core QML Item
> > component and might lead to weird behavior.

Good point.

> One correction, though:
> 
> property bool visible: cover.status == Cover.Active || applicationActive

Didn't even see that. Thanks.

  property bool someName: cover.status === Cover.Active || applicationActive;

is a good trade-off for not seeing the time changing when peeking :)

I wonder if onSomeNameChanged is being triggered when waking up from
deep sleep.

-- 
Med venlig hilsen / Best Regards

Thomas Tanghus
___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] QML Timer stops running

2014-01-15 Thread Oleksii Serdiuk
On 15/01/14 18:31, Oleksii Serdiuk wrote:
> On 15/01/14 13:16, Thomas Tanghus wrote:
>> On Wednesday 15 January 2014 12:48 Oleksii Serdiuk wrote:
>>> On 15/01/14 11:54, Thomas Tanghus wrote:
 On Wednesday 15 January 2014 08:26 Jonni Rainisto wrote:
> dont use libiphb every 5 seconds, that will kill
> batterylife for suspend (store QA will reject apps that eat battery). Its
> more meant to be triggered every 10, 15, 30 etc. minutes. So if you want
> to
> make 25 minute timer that works even while suspended, then you should do
> libiphb to wake up after 25 minutes.

 The reason for the 5-10 second wakeup is that I want to update cover until
 screen goes black, and I haven't found a way to detect that, and
 applicationActive doesn't do it. Maybe my search-foo looked for the wrong
 keywords.
>>>
>>> Use Cover.status property:
>>>
>>> https://sailfishos.org/sailfish-silica/qml-sailfishsilica-cover.html#status->
>>>  prop
>>>
>>> Cover.Active - the cover is visible, and the user can interact with it
>>
>> So (saying my covers id is 'cover') I could do:
>>
>> property bool visible: cover.active || applicationActive;
> 
> Yes, this should work. However, I wouldn't recommend naming a property
> `visible` because this will hide `visible` property of core QML Item
> component and might lead to weird behavior.

One correction, though:

property bool visible: cover.status == Cover.Active || applicationActive

-- 
With best regards,
Olekii Serdiuk



smime.p7s
Description: S/MIME Cryptographic Signature
___
SailfishOS.org Devel mailing list

Re: [SailfishDevel] QML Timer stops running

2014-01-15 Thread Oleksii Serdiuk
On 15/01/14 13:16, Thomas Tanghus wrote:
> On Wednesday 15 January 2014 12:48 Oleksii Serdiuk wrote:
>> On 15/01/14 11:54, Thomas Tanghus wrote:
>>> On Wednesday 15 January 2014 08:26 Jonni Rainisto wrote:
 dont use libiphb every 5 seconds, that will kill
 batterylife for suspend (store QA will reject apps that eat battery). Its
 more meant to be triggered every 10, 15, 30 etc. minutes. So if you want
 to
 make 25 minute timer that works even while suspended, then you should do
 libiphb to wake up after 25 minutes.
>>>
>>> The reason for the 5-10 second wakeup is that I want to update cover until
>>> screen goes black, and I haven't found a way to detect that, and
>>> applicationActive doesn't do it. Maybe my search-foo looked for the wrong
>>> keywords.
>>
>> Use Cover.status property:
>>
>> https://sailfishos.org/sailfish-silica/qml-sailfishsilica-cover.html#status->
>>  prop
>>
>> Cover.Active - the cover is visible, and the user can interact with it
> 
> So (saying my covers id is 'cover') I could do:
> 
> property bool visible: cover.active || applicationActive;

Yes, this should work. However, I wouldn't recommend naming a property
`visible` because this will hide `visible` property of core QML Item
component and might lead to weird behavior.

-- 
With best regards,
Olekii Serdiuk



smime.p7s
Description: S/MIME Cryptographic Signature
___
SailfishOS.org Devel mailing list

Re: [SailfishDevel] MerSDK VM - "src" folder change (under Windows) not possible

2014-01-15 Thread Juha Kallioinen

Hi,

no worries about the known issues, I just wanted to advertise that we 
have such a page :-)


Changing the extra src directory is currently only possible via a clean 
reinstall. Making it re-configurable after installation is on the TODO list.


Best regards,
 Juha

On 15.01.2014 18:43, Simon Bolek wrote:
OMG! I wonder how many of you thought "what a moron not to read known 
issues" - please do not answer this...
...i did remove, clean and install SDK again, and it does work. 
However before that, i also tried to change the settings under 
AppData, but it did not work for some reason. Apparently only complete 
removal and new installation helps.


thanks+br
simon :-)

On Wed, Jan 15, 2014 at 5:11 PM, Juha Kallioinen 
mailto:juha.kallioi...@jolla.com>> wrote:


Hi Simon,

if you want to get rid of your old settings, clean the Qt creator
config directory after uninstallation (be sure to close qt creator
before cleaning too).

This is mentioned in the known issues page:

https://sailfishos.org/wiki/SDK_Alpha_Qt5_Known_Issues

* If you want to change settings such as SDK installation location
or additional source code location path, you need to remove SDK
installation and manually delete the config file directory
SailfishAlpha3 (in Windows it's under
C:\Users\\AppData\Roaming\SailfishAlpha3 and in other
systems it's under $HOME/.config/SailfishAlpha3) and then
re-install SDK.

Best regards,
 Juha


On 15.01.2014 18:07, Simon Bolek wrote:

Short update. I finally removed SailfishOS SDK and installed it
again.
I used ccleaner to clean registry etc.
Installed SDK again AND... still the same :((( (crying)
QtCreator sees the old settings. (see screenshots)
HELP! Is there something obvious i'm missing?

br
simon ;-)

On Tue, Jan 14, 2014 at 4:14 PM, Simon Bolek
mailto:simon.bo...@googlemail.com>>
wrote:

hi,
I have a difficulty in changing src shared folder for VM
MerSDK in QtCreator. It seems impossible right now.
Working on windows 7 with the latest SailfishOS installed.

While installing I set, stupid me, Project Folder to:
C:/path1/path1;C:/path2/path2
thinking QtCreator would understand both. After that started
a project and noticed that QtCreator  does not accept that.

Under
Tools->Options->Mer: MerSDK-"Shared Folders"-"src"
I see
"C:/path1/path1;C:/path2/path2"
Also in QtCreator in my particular App under Projects I see
System Environment variable
MER_SSH_SHARED_SRC = C:/path1/path1;C:/path2/path2.

So far so good.
Me thinking change settings -> all is well.
However the following changes did not change anything.

1) in the MerSDK VM under Shared Folders changed:
src1 to C:/path1/path1 or
tried with src, src2 etc.

2) in

C:\PATH_TO\SailfishOS\share\qtcreator\SailfishAlpha3\qtcreator\mersdk.xml
changed SharedSrc to C:/path1/path1 or C:\path1\path1

3) tried to override MER_SSH_SHARED_SRC in the particular
project with only
C:/path1/path1 or C:\path1\path1

Nothing helps :( Every time i remove Mer SDK under Options
and add it, first QtCreator sees only the one correct folder
C:\path1\path1 , but after Apply and invoking Options again
it shows me
C:/path1/path1;C:/path2/path2.

I also searched in the filesystem C:\ for all files
containing string:
C:/path1/path1;C:/path2/path2
or only
C:/path2/path2
there is nothing left in any .ini, .txt, .vbox etc. files.

Any hints? What am I possibly doing wrong. I am not able to
compile any project, as it gets me the error: Project is
outside of mer shared src "C:/path1/path1;C:/path2/path2"

The only way I see, how to work around this, is to delete and
install sailfishos again :(

br
simon:-)




___
SailfishOS.org Devel mailing list



___
SailfishOS.org Devel mailing list




___
SailfishOS.org Devel mailing list


___
SailfishOS.org Devel mailing list

Re: [SailfishDevel] MerSDK VM - "src" folder change (under Windows) not possible

2014-01-15 Thread Simon Bolek
OMG! I wonder how many of you thought "what a moron not to read known
issues" - please do not answer this...
...i did remove, clean and install SDK again, and it does work. However
before that, i also tried to change the settings under AppData, but it did
not work for some reason. Apparently only complete removal and new
installation helps.

thanks+br
simon :-)

On Wed, Jan 15, 2014 at 5:11 PM, Juha Kallioinen
wrote:

>  Hi Simon,
>
> if you want to get rid of your old settings, clean the Qt creator config
> directory after uninstallation (be sure to close qt creator before cleaning
> too).
>
> This is mentioned in the known issues page:
>
> https://sailfishos.org/wiki/SDK_Alpha_Qt5_Known_Issues
>
> * If you want to change settings such as SDK installation location or
> additional source code location path, you need to remove SDK installation
> and manually delete the config file directory SailfishAlpha3 (in Windows
> it's under C:\Users\\AppData\Roaming\SailfishAlpha3 and in other
> systems it's under $HOME/.config/SailfishAlpha3) and then re-install SDK.
>
> Best regards,
>  Juha
>
>
> On 15.01.2014 18:07, Simon Bolek wrote:
>
>   Short update. I finally removed SailfishOS SDK and installed it again.
>  I used ccleaner to clean registry etc.
>  Installed SDK again AND... still the same :((( (crying)
>  QtCreator sees the old settings. (see screenshots)
> HELP! Is there something obvious i'm missing?
>
>  br
> simon ;-)
>
>  On Tue, Jan 14, 2014 at 4:14 PM, Simon Bolek 
> wrote:
>
>>   hi,
>> I have a difficulty in changing src shared folder for VM MerSDK in
>> QtCreator. It seems impossible right now.
>> Working on windows 7 with the latest SailfishOS installed.
>>
>> While installing I set, stupid me, Project Folder to:
>> C:/path1/path1;C:/path2/path2
>> thinking QtCreator would understand both. After that started a project
>> and noticed that QtCreator  does not accept that.
>>
>> Under
>> Tools->Options->Mer: MerSDK-"Shared Folders"-"src"
>> I see
>>  "C:/path1/path1;C:/path2/path2"
>>  Also in QtCreator in my particular App under Projects I see System
>> Environment variable
>> MER_SSH_SHARED_SRC = C:/path1/path1;C:/path2/path2.
>>
>>  So far so good.
>> Me thinking change settings -> all is well.
>> However the following changes did not change anything.
>>
>>  1) in the MerSDK VM under Shared Folders changed:
>>  src1 to C:/path1/path1 or
>>  tried with src, src2 etc.
>>
>>  2) in
>> C:\PATH_TO\SailfishOS\share\qtcreator\SailfishAlpha3\qtcreator\mersdk.xml
>>  changed SharedSrc to C:/path1/path1 or C:\path1\path1
>>
>>  3) tried to override MER_SSH_SHARED_SRC in the particular project with
>> only
>> C:/path1/path1 or C:\path1\path1
>>
>>  Nothing helps :( Every time i remove Mer SDK under Options and add it,
>> first QtCreator sees only the one correct folder C:\path1\path1 , but after
>> Apply and invoking Options again it shows me
>> C:/path1/path1;C:/path2/path2.
>>
>>  I also searched in the filesystem C:\ for all files containing string:
>> C:/path1/path1;C:/path2/path2
>>  or only
>> C:/path2/path2
>>  there is nothing left in any .ini, .txt, .vbox etc. files.
>>
>>  Any hints? What am I possibly doing wrong. I am not able to compile any
>> project, as it gets me the error: Project is outside of mer shared src
>> "C:/path1/path1;C:/path2/path2"
>>
>>  The only way I see, how to work around this, is to delete and install
>> sailfishos again :(
>>
>> br
>> simon:-)
>>
>
>
>
> ___
> SailfishOS.org Devel mailing list
>
>
>
> ___
> SailfishOS.org Devel mailing list
>
___
SailfishOS.org Devel mailing list

Re: [SailfishDevel] MerSDK VM - "src" folder change (under Windows) not possible

2014-01-15 Thread Juha Kallioinen

Hi Simon,

if you want to get rid of your old settings, clean the Qt creator config 
directory after uninstallation (be sure to close qt creator before 
cleaning too).


This is mentioned in the known issues page:

https://sailfishos.org/wiki/SDK_Alpha_Qt5_Known_Issues

* If you want to change settings such as SDK installation location or 
additional source code location path, you need to remove SDK 
installation and manually delete the config file directory 
SailfishAlpha3 (in Windows it's under 
C:\Users\\AppData\Roaming\SailfishAlpha3 and in other systems 
it's under $HOME/.config/SailfishAlpha3) and then re-install SDK.


Best regards,
 Juha

On 15.01.2014 18:07, Simon Bolek wrote:

Short update. I finally removed SailfishOS SDK and installed it again.
I used ccleaner to clean registry etc.
Installed SDK again AND... still the same :((( (crying)
QtCreator sees the old settings. (see screenshots)
HELP! Is there something obvious i'm missing?

br
simon ;-)

On Tue, Jan 14, 2014 at 4:14 PM, Simon Bolek 
mailto:simon.bo...@googlemail.com>> wrote:


hi,
I have a difficulty in changing src shared folder for VM MerSDK in
QtCreator. It seems impossible right now.
Working on windows 7 with the latest SailfishOS installed.

While installing I set, stupid me, Project Folder to:
C:/path1/path1;C:/path2/path2
thinking QtCreator would understand both. After that started a
project and noticed that QtCreator  does not accept that.

Under
Tools->Options->Mer: MerSDK-"Shared Folders"-"src"
I see
"C:/path1/path1;C:/path2/path2"
Also in QtCreator in my particular App under Projects I see System
Environment variable
MER_SSH_SHARED_SRC = C:/path1/path1;C:/path2/path2.

So far so good.
Me thinking change settings -> all is well.
However the following changes did not change anything.

1) in the MerSDK VM under Shared Folders changed:
src1 to C:/path1/path1 or
tried with src, src2 etc.

2) in
C:\PATH_TO\SailfishOS\share\qtcreator\SailfishAlpha3\qtcreator\mersdk.xml
changed SharedSrc to C:/path1/path1 or C:\path1\path1

3) tried to override MER_SSH_SHARED_SRC in the particular project
with only
C:/path1/path1 or C:\path1\path1

Nothing helps :( Every time i remove Mer SDK under Options and add
it, first QtCreator sees only the one correct folder
C:\path1\path1 , but after Apply and invoking Options again it
shows me
C:/path1/path1;C:/path2/path2.

I also searched in the filesystem C:\ for all files containing string:
C:/path1/path1;C:/path2/path2
or only
C:/path2/path2
there is nothing left in any .ini, .txt, .vbox etc. files.

Any hints? What am I possibly doing wrong. I am not able to
compile any project, as it gets me the error: Project is outside
of mer shared src "C:/path1/path1;C:/path2/path2"

The only way I see, how to work around this, is to delete and
install sailfishos again :(

br
simon:-)




___
SailfishOS.org Devel mailing list


___
SailfishOS.org Devel mailing list

[SailfishDevel] SailfishOS SDK January update available today.

2014-01-15 Thread Jarko Vihriala

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.com and tag your 
issue with 'sdk'.

Happy hacking,
Jolla SDK Team.
___
SailfishOS.org Devel mailing list

Re: [SailfishDevel] QML Timer stops running

2014-01-15 Thread Thomas Tanghus
On Wednesday 15 January 2014 12:48 Oleksii Serdiuk wrote:
> On 15/01/14 11:54, Thomas Tanghus wrote:
> > On Wednesday 15 January 2014 08:26 Jonni Rainisto wrote:
> >> dont use libiphb every 5 seconds, that will kill
> >> batterylife for suspend (store QA will reject apps that eat battery). Its
> >> more meant to be triggered every 10, 15, 30 etc. minutes. So if you want
> >> to
> >> make 25 minute timer that works even while suspended, then you should do
> >> libiphb to wake up after 25 minutes.
> > 
> > The reason for the 5-10 second wakeup is that I want to update cover until
> > screen goes black, and I haven't found a way to detect that, and
> > applicationActive doesn't do it. Maybe my search-foo looked for the wrong
> > keywords.
> 
> Use Cover.status property:
> 
> https://sailfishos.org/sailfish-silica/qml-sailfishsilica-cover.html#status-> 
> prop
> 
> Cover.Active - the cover is visible, and the user can interact with it

So (saying my covers id is 'cover') I could do:

property bool visible: cover.active || applicationActive;

> However, when user is peeking, status property is Cover.Inactive:

Minor issue compared to the code you don't have to write ;)

> Cover.Inactive - the cover is not active, the user cannot interact with
> the cover, and it is not visible unless the user is peeking

-- 
Med venlig hilsen / Best Regards

Thomas Tanghus
___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] QML Timer stops running

2014-01-15 Thread Oleksii Serdiuk
On 15/01/14 11:54, Thomas Tanghus wrote:
> On Wednesday 15 January 2014 08:26 Jonni Rainisto wrote:
>> dont use libiphb every 5 seconds, that will kill
>> batterylife for suspend (store QA will reject apps that eat battery). Its
>> more meant to be triggered every 10, 15, 30 etc. minutes. So if you want to
>> make 25 minute timer that works even while suspended, then you should do
>> libiphb to wake up after 25 minutes.
> 
> The reason for the 5-10 second wakeup is that I want to update cover until 
> screen goes black, and I haven't found a way to detect that, and 
> applicationActive doesn't do it. Maybe my search-foo looked for the wrong 
> keywords.

Use Cover.status property:

https://sailfishos.org/sailfish-silica/qml-sailfishsilica-cover.html#status-prop

Cover.Active - the cover is visible, and the user can interact with it

However, when user is peeking, status property is Cover.Inactive:

Cover.Inactive - the cover is not active, the user cannot interact with
the cover, and it is not visible unless the user is peeking

-- 
With best regards,
Olekii Serdiuk



smime.p7s
Description: S/MIME Cryptographic Signature
___
SailfishOS.org Devel mailing list

Re: [SailfishDevel] QML Timer stops running

2014-01-15 Thread Luca Donaggio
Thanks!


On Wed, Jan 15, 2014 at 12:18 PM, Jonni Rainisto
wrote:

>  Yes,
>
> You can for example listen to for activity suspend resume
> https://github.com/nemomobile/qmsystem/bvib/master/system/qmactivity.h
>
> And for display on/off signal is displayStateChanged:
> https://github.com/nemomobile/qmsystem/blob/master/system/qmdisplaystate.h
>
> Br, Jonni
>
>  --
> *From:* devel-boun...@lists.sailfishos.org [
> devel-boun...@lists.sailfishos.org] on behalf of Luca Donaggio [
> donag...@gmail.com]
> *Sent:* Wednesday, January 15, 2014 11:29 AM
>
> *To:* Sailfish OS Developers
> *Subject:* Re: [SailfishDevel] QML Timer stops running
>
> I'm in a  similar situation: I've written a small app for my personal
> use that periodically download some stats from one of my company's web
> servers.
>  I'm perfectly fine with it not doing anything while in deep-sleep, but I
> would like to do a forced update as soon as the device wakes up.
>  How can I detect such event from C++ side (my app is run as a daemon
> actually, so no qml involved)? Is there some DBus signal I can listen to?
>
>  Thanks,
>
>  Luca Donaggio
>
>
> On Wed, Jan 15, 2014 at 9:26 AM, Jonni Rainisto 
> wrote:
>
>> Hi,
>>
>> For the love of ***, dont use libiphb every 5 seconds, that will kill
>> batterylife for suspend (store QA will reject apps that eat battery). Its
>> more meant to be triggered every 10, 15, 30 etc. minutes. So if you want to
>> make 25 minute timer that works even while suspended, then you should do
>> libiphb to wake up after 25 minutes.
>>
>> Or if you want to make libiphb to wake up device every 10 minutes, you
>> can make your application to check how much time has really passed since
>> last wakeup by checking hw clock (as that is the only clock which is
>> updated even while beeing suspended) timestamps like this:
>>
>> static void tv_get_monotime(struct timeval *tv)
>> {
>> #if defined(CLOCK_BOOTTIME)
>>   struct timespec ts;
>>   if (clock_gettime(CLOCK_BOOTTIME, &ts) < 0)
>>   if (clock_gettime(CLOCK_MONOTONIC, &ts) < 0)
>>   qFatal("Can't clock_gettime!");
>>   TIMESPEC_TO_TIMEVAL(tv, &ts);
>> #endif
>> }
>>
>>
>> 
>> From: devel-boun...@lists.sailfishos.org [
>> devel-boun...@lists.sailfishos.org] on behalf of Thomas Tanghus [
>> tho...@tanghus.net]
>> Sent: Tuesday, January 14, 2014 4:11 PM
>> To: Sailfish OS Developers
>> Subject: Re: [SailfishDevel] QML Timer stops running
>>
>> On Tuesday 14 January 2014 13:05 Graham Cobb wrote:
>> > On 14/01/14 01:14, Thomas Tanghus wrote:
>> > > On Tuesday 14 January 2014 01:53 Ove Kåven wrote:
>> > >> No matter what OS or platform you're on, counting the number of times
>> > >> your timer callback is called is *never* a good idea, even on desktop
>> > >> PCs. Timer callbacks can be skipped for any number of reasons (heavy
>> > >> system load, laptop suspend, etc).
>> >
>> > > Good point. That will also at least work around the issue when in
>> > > "pre-deep- sleep".
>> >
>> > I agree with Ove (that is how every timer function I have ever worked on
>> > works, from interrupt handlers in embedded system kernels through to the
>> > GPE Calendar app) -- repeating timers are a convenience, but are never
>> > treated as accurate.
>> >
>> > But I would also suggest that for any apps that do timing, when the app
>> > is not being displayed (and so the screen doesn't need to be updated),
>> > the code should switch to using a single-shot timer set to the time when
>> > the next event happens, instead of using repeating timers.  If the
>> > kitchen timer is set for 25 minutes and the screen is blank you don't
>> > want your app waking up every second.  Of course, it is a little bit
>> > tedious to write the code to cancel the long timer and restart short
>> > timers when the screen is turned back on but the user will thank you
>> for it.
>>
>> It sounds like a good idea, and should be fairly easy to implement. I just
>> don't know how to detect when the screen is off (this is my first
>> baby-steps
>> in mobile coding). We have the applicationActive property, but the cover
>> can
>> still be active and visible while it is false.
>>
>> > Unfortunately, I have no idea how you actually set up a single shot
>> > timer that will fire correctly in deep sleep from the Qt environment
>> > (the last time I implemented that logic was on Maemo).
>>
>> Rainisto pointed to libiphb[1] which I have now implemented with a crude
>> wakeup every 5-10 seconds. Not optimal, but I'm OK with it for v 0.1.1 ;)
>>
>> [1] http://talk.maemo.org/showpost.php?p=1401318&postcount=2
>>
>> --
>> Med venlig hilsen / Best Regards
>>
>> Thomas Tanghus
>> ___
>> SailfishOS.org Devel mailing list
>> ___
>> SailfishOS.org Devel mailing list
>>
>
>
>
> --
> Luca Donaggio
>
> __

Re: [SailfishDevel] QML Timer stops running

2014-01-15 Thread Thomas Tanghus
Excellent, thanks

On Wednesday 15 January 2014 11:18 Jonni Rainisto wrote:
> Yes,
> 
> You can for example listen to for activity suspend resume
> https://github.com/nemomobile/qmsystem/bvib/master/system/qmactivity.h ://github.com/nemomobile/qmsystem/blob/master/system/qmactivity.h>
> 
> And for display on/off signal is displayStateChanged:
> https://github.com/nemomobile/qmsystem/blob/master/system/qmdisplaystate.h
> 
> Br, Jonni
> 
> 
> From: devel-boun...@lists.sailfishos.org
> [devel-boun...@lists.sailfishos.org] on behalf of Luca Donaggio
> [donag...@gmail.com] Sent: Wednesday, January 15, 2014 11:29 AM
> To: Sailfish OS Developers
> Subject: Re: [SailfishDevel] QML Timer stops running
> 
> I'm in a  similar situation: I've written a small app for my personal use
> that periodically download some stats from one of my company's web servers.
> I'm perfectly fine with it not doing anything while in deep-sleep, but I
> would like to do a forced update as soon as the device wakes up. How can I
> detect such event from C++ side (my app is run as a daemon actually, so no
> qml involved)? Is there some DBus signal I can listen to?
> 
> Thanks,
> 
> Luca Donaggio
> 
> 
> On Wed, Jan 15, 2014 at 9:26 AM, Jonni Rainisto
> mailto:jonni.raini...@jolla.com>> wrote: Hi,
> 
> For the love of ***, dont use libiphb every 5 seconds, that will kill
> batterylife for suspend (store QA will reject apps that eat battery). Its
> more meant to be triggered every 10, 15, 30 etc. minutes. So if you want to
> make 25 minute timer that works even while suspended, then you should do
> libiphb to wake up after 25 minutes.
> 
> Or if you want to make libiphb to wake up device every 10 minutes, you can
> make your application to check how much time has really passed since last
> wakeup by checking hw clock (as that is the only clock which is updated
> even while beeing suspended) timestamps like this:
> 
> static void tv_get_monotime(struct timeval *tv)
> {
> #if defined(CLOCK_BOOTTIME)
>   struct timespec ts;
>   if (clock_gettime(CLOCK_BOOTTIME, &ts) < 0)
>   if (clock_gettime(CLOCK_MONOTONIC, &ts) < 0)
>   qFatal("Can't clock_gettime!");
>   TIMESPEC_TO_TIMEVAL(tv, &ts);
> #endif
> }
> 
> 
> 
> From:
> devel-boun...@lists.sailfishos.org g>
> [devel-boun...@lists.sailfishos.org rg>] on behalf of Thomas Tanghus
> [tho...@tanghus.net] Sent: Tuesday, January 14,
> 2014 4:11 PM
> To: Sailfish OS Developers
> Subject: Re: [SailfishDevel] QML Timer stops running
> 
> On Tuesday 14 January 2014 13:05 Graham Cobb wrote:
> > On 14/01/14 01:14, Thomas Tanghus wrote:
> > > On Tuesday 14 January 2014 01:53 Ove Kåven wrote:
> > >> No matter what OS or platform you're on, counting the number of times
> > >> your timer callback is called is *never* a good idea, even on desktop
> > >> PCs. Timer callbacks can be skipped for any number of reasons (heavy
> > >> system load, laptop suspend, etc).
> > > 
> > > Good point. That will also at least work around the issue when in
> > > "pre-deep- sleep".
> > 
> > I agree with Ove (that is how every timer function I have ever worked on
> > works, from interrupt handlers in embedded system kernels through to the
> > GPE Calendar app) -- repeating timers are a convenience, but are never
> > treated as accurate.
> > 
> > But I would also suggest that for any apps that do timing, when the app
> > is not being displayed (and so the screen doesn't need to be updated),
> > the code should switch to using a single-shot timer set to the time when
> > the next event happens, instead of using repeating timers.  If the
> > kitchen timer is set for 25 minutes and the screen is blank you don't
> > want your app waking up every second.  Of course, it is a little bit
> > tedious to write the code to cancel the long timer and restart short
> > timers when the screen is turned back on but the user will thank you for
> > it.
> It sounds like a good idea, and should be fairly easy to implement. I just
> don't know how to detect when the screen is off (this is my first baby-steps
> in mobile coding). We have the applicationActive property, but the cover
> can still be active and visible while it is false.
> 
> > Unfortunately, I have no idea how you actually set up a single shot
> > timer that will fire correctly in deep sleep from the Qt environment
> > (the last time I implemented that logic was on Maemo).
> 
> Rainisto pointed to libiphb[1] which I have now implemented with a crude
> wakeup every 5-10 seconds. Not optimal, but I'm OK with it for v 0.1.1 ;)
> 
> [1] http://talk.maemo.org/showpost.php?p=1401318&postcount=2
> 
> --
> Med venlig hilsen / Best Regards
> 
> Thomas Tanghus
> ___
> SailfishOS.org Devel mailing list
> ___
> SailfishOS.o

Re: [SailfishDevel] QML Timer stops running

2014-01-15 Thread Jonni Rainisto
Yes,

You can for example listen to for activity suspend resume
https://github.com/nemomobile/qmsystem/bvib/master/system/qmactivity.h

And for display on/off signal is displayStateChanged:
https://github.com/nemomobile/qmsystem/blob/master/system/qmdisplaystate.h

Br, Jonni


From: devel-boun...@lists.sailfishos.org [devel-boun...@lists.sailfishos.org] 
on behalf of Luca Donaggio [donag...@gmail.com]
Sent: Wednesday, January 15, 2014 11:29 AM
To: Sailfish OS Developers
Subject: Re: [SailfishDevel] QML Timer stops running

I'm in a  similar situation: I've written a small app for my personal use that 
periodically download some stats from one of my company's web servers.
I'm perfectly fine with it not doing anything while in deep-sleep, but I would 
like to do a forced update as soon as the device wakes up.
How can I detect such event from C++ side (my app is run as a daemon actually, 
so no qml involved)? Is there some DBus signal I can listen to?

Thanks,

Luca Donaggio


On Wed, Jan 15, 2014 at 9:26 AM, Jonni Rainisto 
mailto:jonni.raini...@jolla.com>> wrote:
Hi,

For the love of ***, dont use libiphb every 5 seconds, that will kill 
batterylife for suspend (store QA will reject apps that eat battery). Its more 
meant to be triggered every 10, 15, 30 etc. minutes. So if you want to make 25 
minute timer that works even while suspended, then you should do libiphb to 
wake up after 25 minutes.

Or if you want to make libiphb to wake up device every 10 minutes, you can make 
your application to check how much time has really passed since last wakeup by 
checking hw clock (as that is the only clock which is updated even while beeing 
suspended) timestamps like this:

static void tv_get_monotime(struct timeval *tv)
{
#if defined(CLOCK_BOOTTIME)
  struct timespec ts;
  if (clock_gettime(CLOCK_BOOTTIME, &ts) < 0)
  if (clock_gettime(CLOCK_MONOTONIC, &ts) < 0)
  qFatal("Can't clock_gettime!");
  TIMESPEC_TO_TIMEVAL(tv, &ts);
#endif
}



From: 
devel-boun...@lists.sailfishos.org 
[devel-boun...@lists.sailfishos.org] 
on behalf of Thomas Tanghus [tho...@tanghus.net]
Sent: Tuesday, January 14, 2014 4:11 PM
To: Sailfish OS Developers
Subject: Re: [SailfishDevel] QML Timer stops running

On Tuesday 14 January 2014 13:05 Graham Cobb wrote:
> On 14/01/14 01:14, Thomas Tanghus wrote:
> > On Tuesday 14 January 2014 01:53 Ove Kåven wrote:
> >> No matter what OS or platform you're on, counting the number of times
> >> your timer callback is called is *never* a good idea, even on desktop
> >> PCs. Timer callbacks can be skipped for any number of reasons (heavy
> >> system load, laptop suspend, etc).
>
> > Good point. That will also at least work around the issue when in
> > "pre-deep- sleep".
>
> I agree with Ove (that is how every timer function I have ever worked on
> works, from interrupt handlers in embedded system kernels through to the
> GPE Calendar app) -- repeating timers are a convenience, but are never
> treated as accurate.
>
> But I would also suggest that for any apps that do timing, when the app
> is not being displayed (and so the screen doesn't need to be updated),
> the code should switch to using a single-shot timer set to the time when
> the next event happens, instead of using repeating timers.  If the
> kitchen timer is set for 25 minutes and the screen is blank you don't
> want your app waking up every second.  Of course, it is a little bit
> tedious to write the code to cancel the long timer and restart short
> timers when the screen is turned back on but the user will thank you for it.

It sounds like a good idea, and should be fairly easy to implement. I just
don't know how to detect when the screen is off (this is my first baby-steps
in mobile coding). We have the applicationActive property, but the cover can
still be active and visible while it is false.

> Unfortunately, I have no idea how you actually set up a single shot
> timer that will fire correctly in deep sleep from the Qt environment
> (the last time I implemented that logic was on Maemo).

Rainisto pointed to libiphb[1] which I have now implemented with a crude
wakeup every 5-10 seconds. Not optimal, but I'm OK with it for v 0.1.1 ;)

[1] http://talk.maemo.org/showpost.php?p=1401318&postcount=2

--
Med venlig hilsen / Best Regards

Thomas Tanghus
___
SailfishOS.org Devel mailing list
___
SailfishOS.org Devel mailing list



--
Luca Donaggio
___
SailfishOS.org Devel mailing list

Re: [SailfishDevel] QML Timer stops running

2014-01-15 Thread Thomas Tanghus
On Wednesday 15 January 2014 08:26 Jonni Rainisto wrote:
> Hi,
> 
> For the love of ***,

:D

> dont use libiphb every 5 seconds, that will kill
> batterylife for suspend (store QA will reject apps that eat battery). Its
> more meant to be triggered every 10, 15, 30 etc. minutes. So if you want to
> make 25 minute timer that works even while suspended, then you should do
> libiphb to wake up after 25 minutes.

The reason for the 5-10 second wakeup is that I want to update cover until 
screen goes black, and I haven't found a way to detect that, and 
applicationActive doesn't do it. Maybe my search-foo looked for the wrong 
keywords.

> Or if you want to make libiphb to wake up device every 10 minutes, you can
> make your application to check how much time has really passed since last
> wakeup by checking hw clock (as that is the only clock which is updated
> even while beeing suspended) timestamps like this:
> 
> static void tv_get_monotime(struct timeval *tv)
> {
> #if defined(CLOCK_BOOTTIME)
>   struct timespec ts;
>   if (clock_gettime(CLOCK_BOOTTIME, &ts) < 0)
>   if (clock_gettime(CLOCK_MONOTONIC, &ts) < 0)
>   qFatal("Can't clock_gettime!");
>   TIMESPEC_TO_TIMEVAL(tv, &ts);
> #endif
> }

Thanks for the snippet. That will come in handy.

-- 
Med venlig hilsen / Best Regards

Thomas Tanghus
___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] Disabling navigation gestures

2014-01-15 Thread Alexander Ladygin
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 wrote:

> Yeah that's what I was going to do as a last resort :(
>
>
> On Tue, Jan 14, 2014 at 2:49 AM, Bob Jelica  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  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

Re: [SailfishDevel] QML Timer stops running

2014-01-15 Thread Mikko Leppänen
Hi,

I don't know but perhaps you can use qtsensors(e.g. tapsensor)  in order to
track/register some special event indicating
that the phone is live again.

​-Mikko​


2014/1/15 Luca Donaggio 

> I'm in a  similar situation: I've written a small app for my personal use
> that periodically download some stats from one of my company's web servers.
> I'm perfectly fine with it not doing anything while in deep-sleep, but I
> would like to do a forced update as soon as the device wakes up.
> How can I detect such event from C++ side (my app is run as a daemon
> actually, so no qml involved)? Is there some DBus signal I can listen to?
>
> Thanks,
>
> Luca Donaggio
>
>
> On Wed, Jan 15, 2014 at 9:26 AM, Jonni Rainisto 
> wrote:
>
>> Hi,
>>
>> For the love of ***, dont use libiphb every 5 seconds, that will kill
>> batterylife for suspend (store QA will reject apps that eat battery). Its
>> more meant to be triggered every 10, 15, 30 etc. minutes. So if you want to
>> make 25 minute timer that works even while suspended, then you should do
>> libiphb to wake up after 25 minutes.
>>
>> Or if you want to make libiphb to wake up device every 10 minutes, you
>> can make your application to check how much time has really passed since
>> last wakeup by checking hw clock (as that is the only clock which is
>> updated even while beeing suspended) timestamps like this:
>>
>> static void tv_get_monotime(struct timeval *tv)
>> {
>> #if defined(CLOCK_BOOTTIME)
>>   struct timespec ts;
>>   if (clock_gettime(CLOCK_BOOTTIME, &ts) < 0)
>>   if (clock_gettime(CLOCK_MONOTONIC, &ts) < 0)
>>   qFatal("Can't clock_gettime!");
>>   TIMESPEC_TO_TIMEVAL(tv, &ts);
>> #endif
>> }
>>
>>
>> 
>> From: devel-boun...@lists.sailfishos.org [
>> devel-boun...@lists.sailfishos.org] on behalf of Thomas Tanghus [
>> tho...@tanghus.net]
>> Sent: Tuesday, January 14, 2014 4:11 PM
>> To: Sailfish OS Developers
>> Subject: Re: [SailfishDevel] QML Timer stops running
>>
>> On Tuesday 14 January 2014 13:05 Graham Cobb wrote:
>> > On 14/01/14 01:14, Thomas Tanghus wrote:
>> > > On Tuesday 14 January 2014 01:53 Ove Kåven wrote:
>> > >> No matter what OS or platform you're on, counting the number of times
>> > >> your timer callback is called is *never* a good idea, even on desktop
>> > >> PCs. Timer callbacks can be skipped for any number of reasons (heavy
>> > >> system load, laptop suspend, etc).
>> >
>> > > Good point. That will also at least work around the issue when in
>> > > "pre-deep- sleep".
>> >
>> > I agree with Ove (that is how every timer function I have ever worked on
>> > works, from interrupt handlers in embedded system kernels through to the
>> > GPE Calendar app) -- repeating timers are a convenience, but are never
>> > treated as accurate.
>> >
>> > But I would also suggest that for any apps that do timing, when the app
>> > is not being displayed (and so the screen doesn't need to be updated),
>> > the code should switch to using a single-shot timer set to the time when
>> > the next event happens, instead of using repeating timers.  If the
>> > kitchen timer is set for 25 minutes and the screen is blank you don't
>> > want your app waking up every second.  Of course, it is a little bit
>> > tedious to write the code to cancel the long timer and restart short
>> > timers when the screen is turned back on but the user will thank you
>> for it.
>>
>> It sounds like a good idea, and should be fairly easy to implement. I just
>> don't know how to detect when the screen is off (this is my first
>> baby-steps
>> in mobile coding). We have the applicationActive property, but the cover
>> can
>> still be active and visible while it is false.
>>
>> > Unfortunately, I have no idea how you actually set up a single shot
>> > timer that will fire correctly in deep sleep from the Qt environment
>> > (the last time I implemented that logic was on Maemo).
>>
>> Rainisto pointed to libiphb[1] which I have now implemented with a crude
>> wakeup every 5-10 seconds. Not optimal, but I'm OK with it for v 0.1.1 ;)
>>
>> [1] http://talk.maemo.org/showpost.php?p=1401318&postcount=2
>>
>> --
>> Med venlig hilsen / Best Regards
>>
>> Thomas Tanghus
>> ___
>> SailfishOS.org Devel mailing list
>> ___
>> SailfishOS.org Devel mailing list
>>
>
>
>
> --
> Luca Donaggio
>
> ___
> SailfishOS.org Devel mailing list
>
___
SailfishOS.org Devel mailing list

Re: [SailfishDevel] QML Timer stops running

2014-01-15 Thread Luca Donaggio
I'm in a  similar situation: I've written a small app for my personal use
that periodically download some stats from one of my company's web servers.
I'm perfectly fine with it not doing anything while in deep-sleep, but I
would like to do a forced update as soon as the device wakes up.
How can I detect such event from C++ side (my app is run as a daemon
actually, so no qml involved)? Is there some DBus signal I can listen to?

Thanks,

Luca Donaggio


On Wed, Jan 15, 2014 at 9:26 AM, Jonni Rainisto wrote:

> Hi,
>
> For the love of ***, dont use libiphb every 5 seconds, that will kill
> batterylife for suspend (store QA will reject apps that eat battery). Its
> more meant to be triggered every 10, 15, 30 etc. minutes. So if you want to
> make 25 minute timer that works even while suspended, then you should do
> libiphb to wake up after 25 minutes.
>
> Or if you want to make libiphb to wake up device every 10 minutes, you can
> make your application to check how much time has really passed since last
> wakeup by checking hw clock (as that is the only clock which is updated
> even while beeing suspended) timestamps like this:
>
> static void tv_get_monotime(struct timeval *tv)
> {
> #if defined(CLOCK_BOOTTIME)
>   struct timespec ts;
>   if (clock_gettime(CLOCK_BOOTTIME, &ts) < 0)
>   if (clock_gettime(CLOCK_MONOTONIC, &ts) < 0)
>   qFatal("Can't clock_gettime!");
>   TIMESPEC_TO_TIMEVAL(tv, &ts);
> #endif
> }
>
>
> 
> From: devel-boun...@lists.sailfishos.org [
> devel-boun...@lists.sailfishos.org] on behalf of Thomas Tanghus [
> tho...@tanghus.net]
> Sent: Tuesday, January 14, 2014 4:11 PM
> To: Sailfish OS Developers
> Subject: Re: [SailfishDevel] QML Timer stops running
>
> On Tuesday 14 January 2014 13:05 Graham Cobb wrote:
> > On 14/01/14 01:14, Thomas Tanghus wrote:
> > > On Tuesday 14 January 2014 01:53 Ove Kåven wrote:
> > >> No matter what OS or platform you're on, counting the number of times
> > >> your timer callback is called is *never* a good idea, even on desktop
> > >> PCs. Timer callbacks can be skipped for any number of reasons (heavy
> > >> system load, laptop suspend, etc).
> >
> > > Good point. That will also at least work around the issue when in
> > > "pre-deep- sleep".
> >
> > I agree with Ove (that is how every timer function I have ever worked on
> > works, from interrupt handlers in embedded system kernels through to the
> > GPE Calendar app) -- repeating timers are a convenience, but are never
> > treated as accurate.
> >
> > But I would also suggest that for any apps that do timing, when the app
> > is not being displayed (and so the screen doesn't need to be updated),
> > the code should switch to using a single-shot timer set to the time when
> > the next event happens, instead of using repeating timers.  If the
> > kitchen timer is set for 25 minutes and the screen is blank you don't
> > want your app waking up every second.  Of course, it is a little bit
> > tedious to write the code to cancel the long timer and restart short
> > timers when the screen is turned back on but the user will thank you for
> it.
>
> It sounds like a good idea, and should be fairly easy to implement. I just
> don't know how to detect when the screen is off (this is my first
> baby-steps
> in mobile coding). We have the applicationActive property, but the cover
> can
> still be active and visible while it is false.
>
> > Unfortunately, I have no idea how you actually set up a single shot
> > timer that will fire correctly in deep sleep from the Qt environment
> > (the last time I implemented that logic was on Maemo).
>
> Rainisto pointed to libiphb[1] which I have now implemented with a crude
> wakeup every 5-10 seconds. Not optimal, but I'm OK with it for v 0.1.1 ;)
>
> [1] http://talk.maemo.org/showpost.php?p=1401318&postcount=2
>
> --
> Med venlig hilsen / Best Regards
>
> Thomas Tanghus
> ___
> SailfishOS.org Devel mailing list
> ___
> SailfishOS.org Devel mailing list
>



-- 
Luca Donaggio
___
SailfishOS.org Devel mailing list

Re: [SailfishDevel] Harbour: howto to delete a draft application ?

2014-01-15 Thread Reto Zingg

Hi,

On 15.01.2014 11:16, Franck Routier (perso) wrote:

Hi,

when first playing with harbour, I created an "Untitled" application,
before creating the right one.
This untitled app is here in the list of my apps, with a draft status,
and I can find no way to delete it.

How can I do ?



please contact developer-care at jolla.com and request it, AFAIK there 
is no way to do it for you.


br
Reto


BR,
Franck
___
SailfishOS.org Devel mailing list



___
SailfishOS.org Devel mailing list


[SailfishDevel] Harbour: howto to delete a draft application ?

2014-01-15 Thread Franck Routier (perso)
Hi,

when first playing with harbour, I created an "Untitled" application,
before creating the right one.
This untitled app is here in the list of my apps, with a draft status,
and I can find no way to delete it.

How can I do ?

BR,
Franck
___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] QML Timer stops running

2014-01-15 Thread Jonni Rainisto
Hi,

For the love of ***, dont use libiphb every 5 seconds, that will kill 
batterylife for suspend (store QA will reject apps that eat battery). Its more 
meant to be triggered every 10, 15, 30 etc. minutes. So if you want to make 25 
minute timer that works even while suspended, then you should do libiphb to 
wake up after 25 minutes. 

Or if you want to make libiphb to wake up device every 10 minutes, you can make 
your application to check how much time has really passed since last wakeup by 
checking hw clock (as that is the only clock which is updated even while beeing 
suspended) timestamps like this:

static void tv_get_monotime(struct timeval *tv)
{
#if defined(CLOCK_BOOTTIME) 
  struct timespec ts;
  if (clock_gettime(CLOCK_BOOTTIME, &ts) < 0)
  if (clock_gettime(CLOCK_MONOTONIC, &ts) < 0)
  qFatal("Can't clock_gettime!");
  TIMESPEC_TO_TIMEVAL(tv, &ts);
#endif
}



From: devel-boun...@lists.sailfishos.org [devel-boun...@lists.sailfishos.org] 
on behalf of Thomas Tanghus [tho...@tanghus.net]
Sent: Tuesday, January 14, 2014 4:11 PM
To: Sailfish OS Developers
Subject: Re: [SailfishDevel] QML Timer stops running

On Tuesday 14 January 2014 13:05 Graham Cobb wrote:
> On 14/01/14 01:14, Thomas Tanghus wrote:
> > On Tuesday 14 January 2014 01:53 Ove Kåven wrote:
> >> No matter what OS or platform you're on, counting the number of times
> >> your timer callback is called is *never* a good idea, even on desktop
> >> PCs. Timer callbacks can be skipped for any number of reasons (heavy
> >> system load, laptop suspend, etc).
>
> > Good point. That will also at least work around the issue when in
> > "pre-deep- sleep".
>
> I agree with Ove (that is how every timer function I have ever worked on
> works, from interrupt handlers in embedded system kernels through to the
> GPE Calendar app) -- repeating timers are a convenience, but are never
> treated as accurate.
>
> But I would also suggest that for any apps that do timing, when the app
> is not being displayed (and so the screen doesn't need to be updated),
> the code should switch to using a single-shot timer set to the time when
> the next event happens, instead of using repeating timers.  If the
> kitchen timer is set for 25 minutes and the screen is blank you don't
> want your app waking up every second.  Of course, it is a little bit
> tedious to write the code to cancel the long timer and restart short
> timers when the screen is turned back on but the user will thank you for it.

It sounds like a good idea, and should be fairly easy to implement. I just
don't know how to detect when the screen is off (this is my first baby-steps
in mobile coding). We have the applicationActive property, but the cover can
still be active and visible while it is false.

> Unfortunately, I have no idea how you actually set up a single shot
> timer that will fire correctly in deep sleep from the Qt environment
> (the last time I implemented that logic was on Maemo).

Rainisto pointed to libiphb[1] which I have now implemented with a crude
wakeup every 5-10 seconds. Not optimal, but I'm OK with it for v 0.1.1 ;)

[1] http://talk.maemo.org/showpost.php?p=1401318&postcount=2

--
Med venlig hilsen / Best Regards

Thomas Tanghus
___
SailfishOS.org Devel mailing list
___
SailfishOS.org Devel mailing list