[SailfishDevel] sailfish ui on laptop

2014-01-26 Thread Christophe Varoqui
Hello,

First, sorry to post there, but I couldn't find a sailfish-users mailing
list.

I use a yoga 2 laptop with ubuntu as my primary workhorse, which has some
interesting caracteristics:
- highdpi : 3200x1800 pixels
- touch screen
- can be folded 360° to a tablet format

I'm quite underwhelmed with the current Linux desktop environments
available with this setup, and though the sailfish ui could make a lot of
sense there.

Is there a way to install and evaluate this ui in my setup ?

Anyway, I hope you will appreciate someone out there thinks there is
potential in sailfish ui in the desktop space with modern hardware.

Best regards,
Christophe
___
SailfishOS.org Devel mailing list

Re: [SailfishDevel] Qt Creator Code AutoCompletion in QML for C++ declarative plugins

2014-01-26 Thread christopher . lamb

Hi David

Thanks, your guess is correct. I had not seen the option under Tools / C++.

Unfortunately it does not help either.

During breakfast I have found a solution: closing all projects and  
QtCreator, then reopening gives autocompletion with the correct  
updated properties / method names.


Chris

Zitat von "David Greaves" :


On 26/01/14 16:23, christopher.l...@thurweb.ch wrote:

Hi All

My app exposes chunks of functionality to the QML side from C++ declarative
plugins.

On the QML side QtCreator gives me automatic code completion for elements
exposed from such plugins, suggesting property and method names.

So far so good.

The trouble is, I often refactor the C++ code as I add complexity  
e.g. renaming
properties and methods as better names occur to me, or reflect a  
change in purpose.


The trouble is, back on the QML side, QtCreator code-completion  
still suggests

the original names long after these have been renamed or eliminated.

Is there any way to "flush" / update the code completion so it reflects the
current state of affairs? Cleaning does not help, nor does "Reset  
Code Model".


Just guessing but this ^^ option is under Tools => QML/JS ... have you tried
Tools => C++ => "Update Code Model"

David






___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] Binding weirdness on Jolla device after deploy with screen locked

2014-01-26 Thread Tero Siironen
Just to confirm this, I'm having same issues with my app. If I launch
it and put the screen off right away the application's screen is not
updated when I open it again from the cover. Have to swipe it back to
home and reopen it to get updated window.


-- 
Tero

2014/1/26  :
> Hi Ove
>
> That's pretty much the behaviour I get, and the swipe to multitasking and
> back fixes things.
>
> The behaviour 1s 100% reproducible  when the screen is locked during deploy,
> and never occurs when deploying to an unlocked screen.
>
> That the problem to do with bindings is only a wild assumption on my part,
> it could be down to the screen not updating as you suggest.
>
> Grüsse
>
> Chris
>
>
> Zitat von "Ove Kåven" :
>
>
>> Den 26. jan. 2014 13:42, skrev christopher.l...@thurweb.ch:
>>>
>>> Hi all
>>>
>>> I have come across some weird behaviour on the Jolla:
>>>
>>> Bindings don't seem to work immediately after an app has deployed when
>>> the screen is locked.
>>
>>
>> Are you able to tell the difference between something like this, and the
>> more straightforward issue of the app display simply not updating? I
>> frequently experience the latter immediately after a deploy. If I click
>> anything, or try to use the pulley menu, I can hear the sounds and get the
>> console logs, but the display doesn't start updating before I swipe out to
>> the multitasking view and then reactivate it. Everything works otherwise.
>>
>> ___
>> SailfishOS.org Devel mailing list
>>
>
>
>
> ___
> SailfishOS.org Devel mailing list
___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] Harbour compliant way to read contacts

2014-01-26 Thread Thomas Tanghus
On Sunday 26 January 2014 20:48 Bernd Wachter wrote:
> Our plans for contacts are to first make all local contacts available to
> your applications, and then fine-tune how we're dealing with contacts
> from 3rd party services. 

Sounds like a reasonable approach. You shouldn't be blocked from your own 
data.
But 3rd parties of course shouldn't block development of standards like 
CardDAV - nudge-nudge ;)

-- 
Med venlig hilsen / Best Regards

Thomas Tanghus
___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] LED Flash functionality on a real Jolla

2014-01-26 Thread Artem Marchenko
Cool to see that happening, guys!

Will help me to move Flashlight app to proper gstreamer too if it is ever
allowed in harbour or if I (or anybody else) manages to bundle it with the
app. Should be possible.

Cheers,
Artem.



On Sat, Jan 25, 2014 at 6:50 PM,  wrote:

> Mohammed et al
>
> I have just posted the code of my demo Flashlight app to Github
>
> https://github.com/sailfishapps/ThrowawayDemos/
> tree/master/Working/GSTTorch2
>
> This uses Gstreamer, and in its current form is far from Harbour
> compliancy.
>
> It exposes a torch to QML using the Jolla LED flash that can be turned on
> and off, and changed from Beam mode to Flash mode.
>
> So far the main focus is on the "back-end" c++ part, as I require this
> functionality as part of my main app.
>
> As and when time permits I will enrich this demo including:
>
>
> * use of resource policy engine to arbitrate access to camera
> * expose flash rate to QML as property so it can be changed from GUI (e.g.
> with a slider control).
>
> Have fun
>
> Chris
>
>
>
> Zitat von "Mohammed Hassan" :
>
>  I am glad it worked for you :-)
>>
>> Perhaps I should start working on an open flash light app.
>> Would anyone like to contribute to such app? I have already 2 apps to
>> maintain
>> and I can't easily fit a 3rd.
>>
>> Cheers,
>>
>> On Fri, Jan 24, 2014 at 09:43:54PM +0100, christopher.lamb@thurweb.chwrote:
>>
>>> Hi Mohammed
>>>
>>> That's it!
>>>
>>> It's strange how things go. Yesterday was one of those days: At work
>>> I spent hours fighting with a recalcitrant Confluence installation
>>> that refused to start properly, and the evening I could not get the
>>> GST code working properly.
>>>
>>> Today was very different. I discovered that that the mysql database
>>> under the Confluence was corrupt. Once i found that, it more or less
>>> fixed itself. Then this evening I see from your mail that my GST
>>> code only needs one character changed to work!
>>>
>>> Zitat von "Mohammed Hassan" :
>>> >
>>> >g_object_set (G_OBJECT(src), "mode", 2, NULL);
>>> >
>>> >That should do it for you. Works fine here after changing mode to 2
>>> >instead of 1
>>>
>>> It really does work, both in developer mode from Qt Creator, and
>>> once installed from the Jolla itself. Thank you! I will integrate
>>> this functionality into my core app this weekend.
>>>
>>>
>>> Zitat von "Mohammed Hassan" :
>>> >
>>> >Those errors are harmless. Just ignore them. They decrease with each
>>> >update as we implement more camera features ;)
>>> >
>>>
>>> Looking forward to the update(s)! 8)
>>>
>>> chris
>>>
>>>
>>>
>>
>
>
> ___
> SailfishOS.org Devel mailing list
>



-- 
Artem Marchenko
http://agilesoftwaredevelopment.com
http://twitter.com/AgileArtem
___
SailfishOS.org Devel mailing list

Re: [SailfishDevel] Qt Creator Code AutoCompletion in QML for C++ declarative plugins

2014-01-26 Thread David Greaves
On 26/01/14 16:23, christopher.l...@thurweb.ch wrote:
> Hi All
> 
> My app exposes chunks of functionality to the QML side from C++ declarative
> plugins.
> 
> On the QML side QtCreator gives me automatic code completion for elements
> exposed from such plugins, suggesting property and method names.
> 
> So far so good.
> 
> The trouble is, I often refactor the C++ code as I add complexity e.g. 
> renaming
> properties and methods as better names occur to me, or reflect a change in 
> purpose.
> 
> The trouble is, back on the QML side, QtCreator code-completion still suggests
> the original names long after these have been renamed or eliminated.
> 
> Is there any way to "flush" / update the code completion so it reflects the
> current state of affairs? Cleaning does not help, nor does "Reset Code Model".

Just guessing but this ^^ option is under Tools => QML/JS ... have you tried
Tools => C++ => "Update Code Model"

David

___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] Qt Creator Code AutoCompletion in QML for C++ declarative plugins

2014-01-26 Thread christopher . lamb

Hoi Sven

thanks.

The "problem" (and it is a small one only) is limited to the  
auto-completion. Code builds perfectly well enough.


QtCreator's clean function wipes out the moc files, but seems to have  
no effect on auto-complete.


grüsse

Chris

Zitat von "Sven Putze" :


Hi,

try to build/run qmake from the menu and if that does not help,  
throw away the Makefile. The property binding depends on the Qt meta  
system, bound to the Q_OBJECT macro. Often recompiling does not  
start the needed steps to recreate the moc files and things get  
strange.


BR.
Sven



The trouble is, I often refactor the C++ code as I add complexity  
e.g. renaming properties and methods as better names occur to me,  
or reflect a change in purpose.


The trouble is, back on the QML side, QtCreator code-completion  
still suggests the original names long after these have been  
renamed or eliminated.


Is there any way to "flush" / update the code completion so it  
reflects the current state of affairs? Cleaning does not help, nor  
does "Reset Code Model".




___
SailfishOS.org Devel mailing list





___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] Harbour compliant way to read contacts

2014-01-26 Thread Bernd Wachter
Gabriel Böhme  writes:

> So Jolla get's punishment, because a user want's to use HIS Contacts,
> because they are fetched from 3rd party service, the user put HIS
> contacts?! - Wow strange.

Technically it's app access, but obviously it boils down to some 
services not wanting you to freely do with your data what you want. 

> But making "added by hand" contacts is/could be possible? And what about if
> the user have to accept that a app wants to use his contacts from 3rd
> party? Maybe verifyed with soöe kind of JollaContactAccessAPI. So that an
> app can use the ContactsAPI just with a valid token, or something like
> that. :)

This may or may not be allowed by the 3rd party services, so would
always be service specific.

Our plans for contacts are to first make all local contacts available to
your applications, and then fine-tune how we're dealing with contacts
from 3rd party services. 

___
SailfishOS.org Devel mailing list

Re: [SailfishDevel] Harbour compliant way to read contacts

2014-01-26 Thread Martin Grimme
2014-01-26, Gabriel Böhme :
> So Jolla get's punishment, because a user want's to use HIS Contacts,
> because they are fetched from 3rd party service, the user put HIS
> contacts?! - Wow strange.

What makes you think that the contacts you sync from a 3rd party
service are still YOUR contacts? Haven't you read the fine-print of
the 3rd party service?
Basically, whatever you upload, you give up your rights on it to the
3rd party service. ;)
I'm not really surprised about such terms and conditions.


Martin
___
SailfishOS.org Devel mailing list

Re: [SailfishDevel] Qt Creator Code AutoCompletion in QML for C++ declarative plugins

2014-01-26 Thread Sven Putze
Hi,

try to build/run qmake from the menu and if that does not help, throw away the 
Makefile. The property binding depends on the Qt meta system, bound to the 
Q_OBJECT macro. Often recompiling does not start the needed steps to recreate 
the moc files and things get strange.

BR.
Sven

> 
> The trouble is, I often refactor the C++ code as I add complexity e.g. 
> renaming properties and methods as better names occur to me, or reflect a 
> change in purpose.
> 
> The trouble is, back on the QML side, QtCreator code-completion still 
> suggests the original names long after these have been renamed or eliminated.
> 
> Is there any way to "flush" / update the code completion so it reflects the 
> current state of affairs? Cleaning does not help, nor does "Reset Code Model".
> 

___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] Qt Creator Code AutoCompletion in QML for C++ declarative plugins

2014-01-26 Thread Andrey Kozhevnikov
i think you need to post your suggestions according QtCreator to Digia, 
not Jolla ;)


On 27.01.2014 00:36, Gabriel Böhme wrote:


Would also be a good feature, to have the Refactoring function for QML 
in QtCreator - if you want to change id/property/... names. Is it 
possible?!



Cheers, Gabriel.

--

Von meinem Nokia N9 gesendet


Andrey Kozhevnikov schrieb am 26.01.14 17:25:

writing qmltypes file can help you :)

On 26.01.2014 22:23, christopher.l...@thurweb.ch 
 wrote:


Hi All

My app exposes chunks of functionality to the QML side from C++
declarative plugins.

On the QML side QtCreator gives me automatic code completion for
elements exposed from such plugins, suggesting property and method
names.

So far so good.

The trouble is, I often refactor the C++ code as I add complexity
e.g. renaming properties and methods as better names occur to me,
or reflect a change in purpose.

The trouble is, back on the QML side, QtCreator code-completion
still suggests the original names long after these have been
renamed or eliminated.

Is there any way to "flush" / update the code completion so it
reflects the current state of affairs? Cleaning does not help, nor
does "Reset Code Model".

mfg

Chris


___
SailfishOS.org Devel mailing list


___
SailfishOS.org Devel mailing list



___
SailfishOS.org Devel mailing list

Re: [SailfishDevel] Qt Creator Code AutoCompletion in QML for C++ declarative plugins

2014-01-26 Thread Gabriel Böhme
Would also be a good feature, to have the Refactoring function for QML in
QtCreator - if you want to change id/property/... names. Is it possible?!


Cheers, Gabriel.



--



Von meinem Nokia N9 gesendet



Andrey Kozhevnikov schrieb am 26.01.14 17:25:
writing qmltypes file can help you :)

On 26.01.2014 22:23, christopher.l...@thurweb.ch wrote:

> Hi All
>
> My app exposes chunks of functionality to the QML side from C++
> declarative plugins.
>
> On the QML side QtCreator gives me automatic code completion for elements
> exposed from such plugins, suggesting property and method names.
>
> So far so good.
>
> The trouble is, I often refactor the C++ code as I add complexity e.g.
> renaming properties and methods as better names occur to me, or reflect a
> change in purpose.
>
> The trouble is, back on the QML side, QtCreator code-completion still
> suggests the original names long after these have been renamed or
> eliminated.
>
> Is there any way to "flush" / update the code completion so it reflects
> the current state of affairs? Cleaning does not help, nor does "Reset Code
> Model".
>
> mfg
>
> Chris
>
>
> ___
> SailfishOS.org Devel mailing list
>

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

Re: [SailfishDevel] Harbour compliant way to read contacts

2014-01-26 Thread Gabriel Böhme
So Jolla get's punishment, because a user want's to use HIS Contacts,
because they are fetched from 3rd party service, the user put HIS
contacts?! - Wow strange.


But making "added by hand" contacts is/could be possible? And what about if
the user have to accept that a app wants to use his contacts from 3rd
party? Maybe verifyed with soöe kind of JollaContactAccessAPI. So that an
app can use the ContactsAPI just with a valid token, or something like
that. :)


Just guessing,...Gabriel.



--



Von meinem Nokia N9 gesendet



Andrey Kozhevnikov schrieb am 26.01.14 19:23:
issue not in app permissions. issue in restriction access to "cloud"
contacts got from 3rd party services, and so on

On 27.01.2014 00:21, Marcin M. wrote:

 And wouldn't separate permission for each app solve the thing?
  --
Marcin


2014-01-26 Bernd Wachter 

>  writes:
>
> > Hi Sven
> >
> > I am equally curious:
> >
> > Reading and rereading Bernd's mail I see
> >
> > " ..contacts synced to the device from some third party services..."
> >
> > I entered all the contacts on my phone myself (most via bluetooth from
> > the N9). No third parties are involved at all. So surely my apps
> > should have full readonly access.
> >
> > If the source is an issue, then the source should be an attribute of
> > each contact, thus allowing apps access to kosher contacts, and
> > barring access to those from third parties.
>
>  That's what we're currently working on.
>
> > Surely what an app does with the contacts is more important than the
> > source of the contacts?
>
>  We need to follow the terms of service from where we sync the contacts,
> or they might revoke our API keys without warning, which then would
> affect the whole userbase. In doing so we need to allow for creative
> interpretation of the TOS on their end as well -- we're the ones in
> trouble if they decide to revoke our API keys after all.
>
> TLDR: Lawyers are making our contacts middleware unnecessarily
> complicated, not all features implemented yet.
>
> Bernd
>
> ___
> SailfishOS.org Devel mailing list
>



___
SailfishOS.org Devel mailing list



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

[SailfishDevel] Impossible to send a PROPFIND request via XMLHttpRequest !?

2014-01-26 Thread Matthias Barmeier

Hi,

if I try to send a PROPFIND request via XMLHttpRequest I got:


Error: Unsupported HTTP method type


This makes live for QML developers harder then necessary.


Will this be fixed or is there a hidden trick to get a PROPFIND response 
via QML ?



Ciao
Matze

___
SailfishOS.org Devel mailing list

Re: [SailfishDevel] Harbour compliant way to read contacts

2014-01-26 Thread Andrey Kozhevnikov
issue not in app permissions. issue in restriction access to "cloud" 
contacts got from 3rd party services, and so on


On 27.01.2014 00:21, Marcin M. wrote:

And wouldn't separate permission for each app solve the thing?
--
Marcin


2014-01-26 Bernd Wachter >


mailto:christopher.l...@thurweb.ch>>
writes:

> Hi Sven
>
> I am equally curious:
>
> Reading and rereading Bernd's mail I see
>
> " ..contacts synced to the device from some third party services..."
>
> I entered all the contacts on my phone myself (most via
bluetooth from
> the N9). No third parties are involved at all. So surely my apps
> should have full readonly access.
>
> If the source is an issue, then the source should be an attribute of
> each contact, thus allowing apps access to kosher contacts, and
> barring access to those from third parties.

That's what we're currently working on.

> Surely what an app does with the contacts is more important than the
> source of the contacts?

We need to follow the terms of service from where we sync the
contacts,
or they might revoke our API keys without warning, which then would
affect the whole userbase. In doing so we need to allow for creative
interpretation of the TOS on their end as well -- we're the ones in
trouble if they decide to revoke our API keys after all.

TLDR: Lawyers are making our contacts middleware unnecessarily
complicated, not all features implemented yet.

Bernd

___
SailfishOS.org Devel mailing list




___
SailfishOS.org Devel mailing list


___
SailfishOS.org Devel mailing list

Re: [SailfishDevel] Harbour compliant way to read contacts

2014-01-26 Thread Marcin M.
And wouldn't separate permission for each app solve the thing?
--
Marcin


2014-01-26 Bernd Wachter 

>  writes:
>
> > Hi Sven
> >
> > I am equally curious:
> >
> > Reading and rereading Bernd's mail I see
> >
> > " ..contacts synced to the device from some third party services..."
> >
> > I entered all the contacts on my phone myself (most via bluetooth from
> > the N9). No third parties are involved at all. So surely my apps
> > should have full readonly access.
> >
> > If the source is an issue, then the source should be an attribute of
> > each contact, thus allowing apps access to kosher contacts, and
> > barring access to those from third parties.
>
> That's what we're currently working on.
>
> > Surely what an app does with the contacts is more important than the
> > source of the contacts?
>
> We need to follow the terms of service from where we sync the contacts,
> or they might revoke our API keys without warning, which then would
> affect the whole userbase. In doing so we need to allow for creative
> interpretation of the TOS on their end as well -- we're the ones in
> trouble if they decide to revoke our API keys after all.
>
> TLDR: Lawyers are making our contacts middleware unnecessarily
> complicated, not all features implemented yet.
>
> Bernd
>
> ___
> SailfishOS.org Devel mailing list
>
___
SailfishOS.org Devel mailing list

Re: [SailfishDevel] Python and Qt Widgets development possible?

2014-01-26 Thread Andrey Kozhevnikov
everything possible, but widgets is the worst what can happen for 
sailfish. get time to learn qml, its easy.


On 27.01.2014 00:15, Gabriel Böhme wrote:


 Hi Dietmar,


I've started to learn coding with Python/PyQt on N900 just before the 
N9 and all the QML stuff started. That was a bit hard.



I started to learn also QML and fell in love - kind of. On one side 
it's so easy and fast to creat stunning UI's and the other point - it 
makes sense to split UI ane logic clearly. And if you are doing so, 
it's easy to publish/port your application on another platform. You 
just have to rewrite, your UI in QML - and because it's so easy, it 
takes in the most cases just some hours, or in difficult cases some days.



But than you offer the best UI experience everywhere, because it's 
writen especially for the platform (for example Desktop, Tablet, 
Smartphone)



It's a bit a hard situation to do the first step, but after all I 
think it's worth it.



But yes, it takes time to learn QML and yes it takes time to write a 
new/modify your application and no, it's not really possible to offer 
with less to no changes a native look and feel. But I could be wrong, 
I remember Thomas Perl was working on something like that, to make it 
easier - don't know the details.



Cheers, Gabriel.

--

Von meinem Nokia N9 gesendet


Marcin M. schrieb am 26.01.14 18:34:

Just a thought - maybe using some legacy (i.e. Fremantle) theme could 
be a fix. But I have no idea whether it can be done and with how much 
effort.


--
Marcin


2014-01-26 >


Hi Dietmar

Zitat von "Dietmar Schwertberger" mailto:maill...@schwertberger.de>>:



Switching to QML/Qt Quick seems a major effort and especially,
it is very un-pythonic to use this mixture of two languages.


There is only one language here, QML, which is an extension of
javascript.
Qt Quick is a set of components used by QML. This component set is
further extended by the Sailfish Silica component set.

I did not find QML itself that hard to learn, and there are lots
of examples and tutorials on the interweb.

The mix of 2 languages comes when need to do some heavy-lifting
and have to fall back to C++. Having said that C++ and QML are
well integrated.

Zitat von "Dietmar Schwertberger" mailto:maill...@schwertberger.de>>:


...there's quite some effort to stay compatible over
multiple platforms 


You have hit the nail on the head. Multiplatform coding is not
easy, especially if you want to keep native interaction, and look
and feel. We know that Sailfish is quite a bit different from any
other platform. Multi-platform is not impossible, but it does
involve compromises.

I have been working for some while to port a Harmattan app to
Sailfish. For the most part I have got it working, but not without
some obstacles. Off the top of my head (and without going into
detail), here is a list of differences I found between these 2
platforms

1) Qt Version  4.7.4 --> 5.x

2) QtQuick version 1.0 --> 2.0

3) Mobility 1.2 --> Qt 5.0 equivalents

4) Project Template Files C++ main function, Pro file

5) Project structure

6) Sailfish look and feel, user interaction

7) Sailfish Specials: e.g Cover

8) Missing QML Components / Extra Components,

9) Component Property differences

10) Library differences inc. Bugs

11) Niggly Technical Stuff

11.1) How a javascript file imports a second javascript file

11.2) Location of LocalStorage DB

12) Harbour rules (somethings are technically possible, but not
allowed to be harbour compliant)

13) etc 

Grüsse

Chris


___
SailfishOS.org Devel mailing list



___
SailfishOS.org Devel mailing list



___
SailfishOS.org Devel mailing list


___
SailfishOS.org Devel mailing list

Re: [SailfishDevel] Python and Qt Widgets development possible?

2014-01-26 Thread Gabriel Böhme
 Hi Dietmar,


I've started to learn coding with Python/PyQt on N900 just before the N9
and all the QML stuff started. That was a bit hard.


I started to learn also QML and fell in love - kind of. On one side it's so
easy and fast to creat stunning UI's and the other point - it makes sense
to split UI ane logic clearly. And if you are doing so, it's easy to
publish/port your application on another platform. You just have to
rewrite, your UI in QML - and because it's so easy, it takes in the most
cases just some hours, or in difficult cases some days.


But than you offer the best UI experience everywhere, because it's writen
especially for the platform (for example Desktop, Tablet, Smartphone)


It's a bit a hard situation to do the first step, but after all I think
it's worth it.


But yes, it takes time to learn QML and yes it takes time to write a
new/modify your application and no, it's not really possible to offer with
less to no changes a native look and feel. But I could be wrong, I remember
Thomas Perl was working on something like that, to make it easier - don't
know the details.


Cheers, Gabriel.



--



Von meinem Nokia N9 gesendet



Marcin M. schrieb am 26.01.14 18:34:
Just a thought - maybe using some legacy (i.e. Fremantle) theme could be a
fix. But I have no idea whether it can be done and with how much effort.

--
Marcin


2014-01-26 

> Hi Dietmar
>
> Zitat von "Dietmar Schwertberger" :
>
>
>
>> Switching to QML/Qt Quick seems a major effort and especially, it is very
>> un-pythonic to use this mixture of two languages.
>>
>
> There is only one language here, QML, which is an extension of javascript.
> Qt Quick is a set of components used by QML. This component set is further
> extended by the Sailfish Silica component set.
>
> I did not find QML itself that hard to learn, and there are lots of
> examples and tutorials on the interweb.
>
> The mix of 2 languages comes when need to do some heavy-lifting and have
> to fall back to C++. Having said that C++ and QML are well integrated.
>
> Zitat von "Dietmar Schwertberger" :
>
>
>> ...there's quite some effort to stay compatible over
>> multiple platforms 
>>
>
> You have hit the nail on the head. Multiplatform coding is not easy,
> especially if you want to keep native interaction, and look and feel. We
> know that Sailfish is quite a bit different from any other platform.
> Multi-platform is not impossible, but it does involve compromises.
>
> I have been working for some while to port a Harmattan app to Sailfish.
> For the most part I have got it working, but not without some obstacles.
> Off the top of my head (and without going into detail), here is a list of
> differences I found between these 2 platforms
>
> 1) Qt Version  4.7.4 --> 5.x
>
> 2) QtQuick version 1.0 --> 2.0
>
> 3) Mobility 1.2 --> Qt 5.0 equivalents
>
> 4) Project Template Files C++ main function, Pro file
>
> 5) Project structure
>
> 6) Sailfish look and feel, user interaction
>
> 7) Sailfish Specials: e.g Cover
>
> 8) Missing QML Components / Extra Components,
>
> 9) Component Property differences
>
> 10) Library differences inc. Bugs
>
> 11) Niggly Technical Stuff
>
> 11.1) How a javascript file imports a second javascript file
>
> 11.2) Location of LocalStorage DB
>
> 12) Harbour rules (somethings are technically possible, but not allowed to
> be harbour compliant)
>
> 13) etc 
>
> Grüsse
>
> Chris
>
>
> ___
> SailfishOS.org Devel mailing list
>


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

Re: [SailfishDevel] (USB) access to sdcard?

2014-01-26 Thread Bernd Wachter
Wim de Vries  writes:

> Hi,
> Currently the SDCARD is mounted at /run/usr/10/media/sdcard.
> Can I hard-code this into my app, or will it change in future?

You should not rely on it beeing there forever. In a future update we'll
provide middleware to handle SD-card related functionality (informing if
SD-card is present, and at which path, notify about removal, ...); until
then using the SD-card from your application is not officially
supported, and if you do use it, you need to take care of SD-card
discovery and error handling if the SD-card gets removed by yourself.

> Also, I want my users to be able to put data (aviation maps+more) on
> the SD card via a USB connection.
> Currently there is no access via USB (just the home is available).

It will be enabled in a future update, we're currently testing that
feature.

Bernd

___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] Harbour compliant way to read contacts

2014-01-26 Thread Bernd Wachter
 writes:

> Hi Sven
>
> I am equally curious:
>
> Reading and rereading Bernd's mail I see
>
> " ..contacts synced to the device from some third party services..."
>
> I entered all the contacts on my phone myself (most via bluetooth from
> the N9). No third parties are involved at all. So surely my apps
> should have full readonly access.
>
> If the source is an issue, then the source should be an attribute of
> each contact, thus allowing apps access to kosher contacts, and
> barring access to those from third parties.

That's what we're currently working on. 

> Surely what an app does with the contacts is more important than the
> source of the contacts?

We need to follow the terms of service from where we sync the contacts,
or they might revoke our API keys without warning, which then would
affect the whole userbase. In doing so we need to allow for creative
interpretation of the TOS on their end as well -- we're the ones in
trouble if they decide to revoke our API keys after all. 

TLDR: Lawyers are making our contacts middleware unnecessarily
complicated, not all features implemented yet.

Bernd

___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] LED Flash functionality on a real Jolla: using policy engine

2014-01-26 Thread christopher . lamb

Hi Mohmammed

following your suggestion earlier in this thread:
"You will also have to make use of resource policy engine to arbitrate  
access to camera."


I have updated this demo:

https://github.com/sailfishapps/ThrowawayDemos/tree/master/Working/GSTTorch2

to do so using nemo-qml-plugin-policy. As far as I can tell from  
testing with my torch app and the camera app, it works.


I chose this approach because it seemed the easiest and  
best-documented (basically the readme at  
https://github.com/nemomobile/nemo-qml-plugin-policy was enough).


I considered writing C++ code to directly access libresourceqt, but  
baulked at the code I would have to write just to get permission for  
the LED.


My question is: is using nemo-qml-plugin-policy to get resource  
permissions a valid method for Sailfish apps? Or is there an even  
better way?


I have found no documentation on the topic of Sailfish and resource  
policy engine, other than source code ...


Thanks

Chris



___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] Qt Creator Code AutoCompletion in QML for C++ declarative plugins

2014-01-26 Thread christopher . lamb

Hi Andrey

Zitat von "Andrey Kozhevnikov" :


writing qmltypes file can help you :)



Thanks. How is that best done with the Sailfish SDK? It does not  
include a qmlplugindump tool.


I have found copies of qmlplugindump in other Qt installations on my  
workstation, but have not got them working properly.


Come to that I have not found much documentation on the topic, other than.

http://unix0.wordpress.com/2012/08/07/how-to-add-qml-module-with-plugins-for-qt-creator/

Grüsse

Chris

___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] Python and Qt Widgets development possible?

2014-01-26 Thread Marcin M.
Just a thought - maybe using some legacy (i.e. Fremantle) theme could be a
fix. But I have no idea whether it can be done and with how much effort.

--
Marcin


2014-01-26 

> Hi Dietmar
>
> Zitat von "Dietmar Schwertberger" :
>
>
>
>> Switching to QML/Qt Quick seems a major effort and especially, it is very
>> un-pythonic to use this mixture of two languages.
>>
>
> There is only one language here, QML, which is an extension of javascript.
> Qt Quick is a set of components used by QML. This component set is further
> extended by the Sailfish Silica component set.
>
> I did not find QML itself that hard to learn, and there are lots of
> examples and tutorials on the interweb.
>
> The mix of 2 languages comes when need to do some heavy-lifting and have
> to fall back to C++. Having said that C++ and QML are well integrated.
>
> Zitat von "Dietmar Schwertberger" :
>
>
>> ...there's quite some effort to stay compatible over
>> multiple platforms 
>>
>
> You have hit the nail on the head. Multiplatform coding is not easy,
> especially if you want to keep native interaction, and look and feel. We
> know that Sailfish is quite a bit different from any other platform.
> Multi-platform is not impossible, but it does involve compromises.
>
> I have been working for some while to port a Harmattan app to Sailfish.
> For the most part I have got it working, but not without some obstacles.
> Off the top of my head (and without going into detail), here is a list of
> differences I found between these 2 platforms
>
> 1) Qt Version  4.7.4 --> 5.x
>
> 2) QtQuick version 1.0 --> 2.0
>
> 3) Mobility 1.2 --> Qt 5.0 equivalents
>
> 4) Project Template Files C++ main function, Pro file
>
> 5) Project structure
>
> 6) Sailfish look and feel, user interaction
>
> 7) Sailfish Specials: e.g Cover
>
> 8) Missing QML Components / Extra Components,
>
> 9) Component Property differences
>
> 10) Library differences inc. Bugs
>
> 11) Niggly Technical Stuff
>
> 11.1) How a javascript file imports a second javascript file
>
> 11.2) Location of LocalStorage DB
>
> 12) Harbour rules (somethings are technically possible, but not allowed to
> be harbour compliant)
>
> 13) etc 
>
> Grüsse
>
> Chris
>
>
> ___
> SailfishOS.org Devel mailing list
>
___
SailfishOS.org Devel mailing list

Re: [SailfishDevel] Qt Creator Code AutoCompletion in QML for C++ declarative plugins

2014-01-26 Thread Andrey Kozhevnikov

writing qmltypes file can help you :)

On 26.01.2014 22:23, christopher.l...@thurweb.ch wrote:

Hi All

My app exposes chunks of functionality to the QML side from C++ 
declarative plugins.


On the QML side QtCreator gives me automatic code completion for 
elements exposed from such plugins, suggesting property and method names.


So far so good.

The trouble is, I often refactor the C++ code as I add complexity e.g. 
renaming properties and methods as better names occur to me, or 
reflect a change in purpose.


The trouble is, back on the QML side, QtCreator code-completion still 
suggests the original names long after these have been renamed or 
eliminated.


Is there any way to "flush" / update the code completion so it 
reflects the current state of affairs? Cleaning does not help, nor 
does "Reset Code Model".


mfg

Chris


___
SailfishOS.org Devel mailing list


___
SailfishOS.org Devel mailing list


[SailfishDevel] Qt Creator Code AutoCompletion in QML for C++ declarative plugins

2014-01-26 Thread christopher . lamb

Hi All

My app exposes chunks of functionality to the QML side from C++  
declarative plugins.


On the QML side QtCreator gives me automatic code completion for  
elements exposed from such plugins, suggesting property and method  
names.


So far so good.

The trouble is, I often refactor the C++ code as I add complexity e.g.  
renaming properties and methods as better names occur to me, or  
reflect a change in purpose.


The trouble is, back on the QML side, QtCreator code-completion still  
suggests the original names long after these have been renamed or  
eliminated.


Is there any way to "flush" / update the code completion so it  
reflects the current state of affairs? Cleaning does not help, nor  
does "Reset Code Model".


mfg

Chris


___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] Binding weirdness on Jolla device after deploy with screen locked

2014-01-26 Thread christopher . lamb

Hi Ove

That's pretty much the behaviour I get, and the swipe to multitasking  
and back fixes things.


The behaviour 1s 100% reproducible  when the screen is locked during  
deploy, and never occurs when deploying to an unlocked screen.


That the problem to do with bindings is only a wild assumption on my  
part, it could be down to the screen not updating as you suggest.


Grüsse

Chris


Zitat von "Ove Kåven" :


Den 26. jan. 2014 13:42, skrev christopher.l...@thurweb.ch:

Hi all

I have come across some weird behaviour on the Jolla:

Bindings don't seem to work immediately after an app has deployed when
the screen is locked.


Are you able to tell the difference between something like this, and  
the more straightforward issue of the app display simply not  
updating? I frequently experience the latter immediately after a  
deploy. If I click anything, or try to use the pulley menu, I can  
hear the sounds and get the console logs, but the display doesn't  
start updating before I swipe out to the multitasking view and then  
reactivate it. Everything works otherwise.


___
SailfishOS.org Devel mailing list





___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] Binding weirdness on Jolla device after deploy with screen locked

2014-01-26 Thread Ove Kåven

Den 26. jan. 2014 13:42, skrev christopher.l...@thurweb.ch:

Hi all

I have come across some weird behaviour on the Jolla:

Bindings don't seem to work immediately after an app has deployed when
the screen is locked.


Are you able to tell the difference between something like this, and the 
more straightforward issue of the app display simply not updating? I 
frequently experience the latter immediately after a deploy. If I click 
anything, or try to use the pulley menu, I can hear the sounds and get 
the console logs, but the display doesn't start updating before I swipe 
out to the multitasking view and then reactivate it. Everything works 
otherwise.


___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] Python and Qt Widgets development possible?

2014-01-26 Thread christopher . lamb

Hi Dietmar

Zitat von "Dietmar Schwertberger" :



Switching to QML/Qt Quick seems a major effort and especially, it is  
very un-pythonic to use this mixture of two languages.


There is only one language here, QML, which is an extension of javascript.
Qt Quick is a set of components used by QML. This component set is  
further extended by the Sailfish Silica component set.


I did not find QML itself that hard to learn, and there are lots of  
examples and tutorials on the interweb.


The mix of 2 languages comes when need to do some heavy-lifting and  
have to fall back to C++. Having said that C++ and QML are well  
integrated.


Zitat von "Dietmar Schwertberger" :



...there's quite some effort to stay compatible over
multiple platforms 


You have hit the nail on the head. Multiplatform coding is not easy,  
especially if you want to keep native interaction, and look and feel.  
We know that Sailfish is quite a bit different from any other  
platform. Multi-platform is not impossible, but it does involve  
compromises.


I have been working for some while to port a Harmattan app to  
Sailfish. For the most part I have got it working, but not without  
some obstacles. Off the top of my head (and without going into  
detail), here is a list of differences I found between these 2 platforms


1) Qt Version  4.7.4 --> 5.x

2) QtQuick version 1.0 --> 2.0

3) Mobility 1.2 --> Qt 5.0 equivalents

4) Project Template Files C++ main function, Pro file

5) Project structure

6) Sailfish look and feel, user interaction

7) Sailfish Specials: e.g Cover

8) Missing QML Components / Extra Components,

9) Component Property differences

10) Library differences inc. Bugs

11) Niggly Technical Stuff

11.1) How a javascript file imports a second javascript file

11.2) Location of LocalStorage DB

12) Harbour rules (somethings are technically possible, but not  
allowed to be harbour compliant)


13) etc 

Grüsse

Chris

___
SailfishOS.org Devel mailing list


[SailfishDevel] Binding weirdness on Jolla device after deploy with screen locked

2014-01-26 Thread christopher . lamb

Hi all

I have come across some weird behaviour on the Jolla:

Bindings don't seem to work immediately after an app has deployed when  
the screen is locked.


To demonstrate this I have created the code snippet at the end of this  
mail. To reproduce, create a default Sailfish project, paste the code  
into FirstPage.qml.


My code has:
1) an Item "dummy" with an enabled property bound to applicationActive.
2) a BackgroundItem with an enabled property bound to dummy.enabled
3) a Label in the BackgroundItem with with text property bound to  
dummy.enabled


When the app is active, the label should display "Correct Label"

However, if the app is deployed when the screen is locked, on  
unlocking and activating the app
the label text shows "Oops Wrong label" even though console.log output  
suggests that the text has changed to "Correct Label".


Also, when the backgroundItem is clicked, the highlight colour is not  
shown (but an onClicked event is generated).


The app behaves as expected (label correctly displayed, highlight  
colour shown) when:

a) The app is pushed to the left, and then reactivated,
b) The app is deployed while the screen is unlocked (immediately shown  
fullscreen),

c) The app is opened from the app icon direct on the Jolla,
d) The app is deployed to the Emulator.

Grüsse

Chris


//Start FirstPage.qml
import QtQuick 2.0
import Sailfish.Silica 1.0

Page {
id: page

Item {
//represents a much more complex object (e.g. c++ plugin)
//reduced to item here for demo purposes
id: dummy
enabled: applicationActive
onEnabledChanged: console.log("QML dummy onEnabledChanged: "  
+ enabled);

}

BackgroundItem {
enabled: dummy.enabled
onEnabledChanged: console.log("QML BackgroundItem  
onEnabledChanged: " + enabled);

width: parent.width
height: 160
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
Label {
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
text: dummy.enabled ? "Correct Label" : "Oops! Wrong label"
onTextChanged: console.log("QML text onTextChanged: " + text);
color: Theme.primaryColor
}
onClicked:console.log("BackgroundItem clicked")
}
}
//End FirstPage.qml

___
SailfishOS.org Devel mailing list


[SailfishDevel] Python and Qt Widgets development possible?

2014-01-26 Thread Dietmar Schwertberger

Hi!

Until now I have been using PySide to write Qt Widgets applications that 
were running fine

under Windows and Maemo.
With some if/else I got native look & feel on both platforms.

Now I've tried the same with PyQt5 on Sailfish OS and the application looks
like a Windows application and even opens new windows when I e.g. open 
the menu.

Unfortunately it seems that QML is the only way to get native look and feel.
Am I right?

Switching to QML/Qt Quick seems a major effort and especially, it is 
very un-pythonic

to use this mixture of two languages.
Even when I switch, it seems that there's quite some effort to stay 
compatible over
multiple platforms as you more or less have to use Silica components on 
Sailfish OS
and on the other hand I won't gain usability on a mouse based platform 
like Windows.


With Maemo I had the impression that it was quite easy to port any GUI 
application
and get at least a reasonable UI. Seems that this is not true with 
Sailfish OS any more.

You have to choose between all or nothing...

Regards,

Dietmar

___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] ComboBox with many MenuItems

2014-01-26 Thread Franck Routier (perso)
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Interestingly, the workaround that worked with paged ComboBox (that is
use onCurrentItemChanged) stopped to work as soon as I switch to
MenuItems defined from a Repeater.
With MenuItems defined from Repeater, onCurrentItemChanged fires
everytime the page is shown, and currentItem is always the first
ListElement of the model...

With Repeater, I had to use onCurrentIndexChanged.

BR,
Franck
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.15 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJS5N2dAAoJEGEvoAir78RoJjEIAJ9UtzRm7lrf6fD427ufsPtT
91PzNHF6kS5zELypp2pZwIJouFNN1YT3s5tkXCupa8oUP6/jp4kDfhN6Nkjw0q+K
IwM9fTox5OIF2F18abg9yE4CB0Si4nhYNb2VgwtI+RHekvEzNEhZXrVAR+FxzheB
GMaJX+c68u0RSC2VB8AH1m29789YIlFYx+A/XGMJnD3tRnRu2hsnsHfLYWMZYxp9
PZM4BOdOF0ah0Bu2CteE6dyOAr7MWfyJTvgvRrTBa35ppwsyKUxrvAz0AMFinRTT
Y3sX2dOo6jfpGHWZRb9698zRADr4eI0pwfcuXRHS/kBhefs+eDK9BM1XYVfLpO0=
=/DtU
-END PGP SIGNATURE-
___
SailfishOS.org Devel mailing list