[SailfishDevel] Updating gcc?

2016-11-04 Thread Marcin Mielniczuk
Current gcc in Mer is 4.8, which is 2 years old. Current releases (5.4,
6.1) have full support for C++14, 4.8's support for C++11 is only
experimental.

C++11 brought many important changes such as constexprs or simply really
useful ones (auto types). It'd be great to have them in Mer.

Are there any plans for updating gcc in Mer?

-- 
Marcin

___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org


[SailfishDevel] Documentation for mlite5

2016-11-04 Thread Marcin Mielniczuk
Is there any online documentation regarding mlite5? I'm not really sure
how I should use it in my project, whether I should include 
or . What is the preferred way of achieving decent
linking? I found some examples using PKGCONFIG - is it the good way?

There should be at least a minimal example in the README, the rest can
be derived from the doxygen comments. But, since the doxygen comments
are already there, why not put the docs online?

-- 
Marcin


___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org


Re: [SailfishDevel] Persistently storing a ListModel

2016-11-04 Thread Andrey Kozhevnikov
pointer is an address to memory, its pontless to save, you should save 
data.

dconf can be accessed using MGconfItem from mlite5 library.

-- Исходное сообщение --
От: "Marcin Mielniczuk" 
Кому: "Andrey Kozhevnikov" ; "Sailfish OS 
Developers" 

Отправлено: 04.11.2016 22:00:19
Тема: Re: [SailfishDevel] Persistently storing a ListModel


Thanks a lot!

So I'm trying to store a pointer to ListModel and ConfigurationValue
drops this silently because it's an invalid value, doesn't it?

What is the standard way in Sailfish to access DConf from C++? I think
about reimplementing the model as a subclass of QAbstractListModel 
anyway.


Marcin

On 01.11.2016 20:46, Andrey Kozhevnikov wrote:

 you storing pointer to model, not model contents :)
 to store model data you should recursively convert model data to
 array, and vise versa.

 -- Исходное сообщение --
 От: "Marcin Mielniczuk" 
 Кому: "Sailfish OS Developers" 
 Отправлено: 01.11.2016 22:32:57
 Тема: [SailfishDevel] Persistently storing a ListModel


 Hi,

 I'm currently using org.nemomobile.configuration to store the
 application settings. Now it came out it'd be beneficial to store a
 ListModel between runs (if a user wants it).

 I tried the naive approach:

 property ListModel myModel: modelStorage.value

 ConfigurationValue {
 id: modelStorage
 key: Constants.modelStorageKey
 defaultValue: ListModel {}
 }

 But no dconf key seems to be generated after I populate the model.

 What is my best bet in this case? Is this the expected behavior or 
have

 I done something wrong on my side?

 --
 Marcin


 ___
 SailfishOS.org Devel mailing list
 To unsubscribe, please send a mail to
 devel-unsubscr...@lists.sailfishos.org


 ___
 SailfishOS.org Devel mailing list
 To unsubscribe, please send a mail to
 devel-unsubscr...@lists.sailfishos.org




___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

Re: [SailfishDevel] Recommended replacement for a spinner?

2016-11-04 Thread Marcin Mielniczuk
This helped a lot! Thanks!

Marcin

On 01.11.2016 21:59, Osmo Salomaa wrote:
> On 01.11.2016 21:15, Marcin Mielniczuk wrote:
>> In my app I'd like to present the user a spinner to let them choose an
>> arbitrary integer.
>>
>> What is a recommended replacement for this in Sailfish Silica? A
>> TextField with IntValidator? Or is there anything better?
>
> Add inputMethodHints and it should be good.
>
> TextField {
> inputMethodHints: Qt.ImhDigitsOnly
> }
>
> Silica does offer a slider, but it's probably bad if the integer is
> indeed arbitrary, as you'd need to set a minimum and maximum, and a
> linear scale between them might not be appropriate.
>

___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org


Re: [SailfishDevel] Persistently storing a ListModel

2016-11-04 Thread Marcin Mielniczuk
Thanks a lot!

So I'm trying to store a pointer to ListModel and ConfigurationValue
drops this silently because it's an invalid value, doesn't it?

What is the standard way in Sailfish to access DConf from C++? I think
about reimplementing the model as a subclass of QAbstractListModel anyway.

Marcin

On 01.11.2016 20:46, Andrey Kozhevnikov wrote:
> you storing pointer to model, not model contents :)
> to store model data you should recursively convert model data to
> array, and vise versa.
>
> -- Исходное сообщение --
> От: "Marcin Mielniczuk" 
> Кому: "Sailfish OS Developers" 
> Отправлено: 01.11.2016 22:32:57
> Тема: [SailfishDevel] Persistently storing a ListModel
>
>> Hi,
>>
>> I'm currently using org.nemomobile.configuration to store the
>> application settings. Now it came out it'd be beneficial to store a
>> ListModel between runs (if a user wants it).
>>
>> I tried the naive approach:
>>
>> property ListModel myModel: modelStorage.value
>>
>> ConfigurationValue {
>> id: modelStorage
>> key: Constants.modelStorageKey
>> defaultValue: ListModel {}
>> }
>>
>> But no dconf key seems to be generated after I populate the model.
>>
>> What is my best bet in this case? Is this the expected behavior or have
>> I done something wrong on my side?
>>
>> -- 
>> Marcin
>>
>>
>> ___
>> SailfishOS.org Devel mailing list
>> To unsubscribe, please send a mail to
>> devel-unsubscr...@lists.sailfishos.org
>
> ___
> SailfishOS.org Devel mailing list
> To unsubscribe, please send a mail to
> devel-unsubscr...@lists.sailfishos.org

___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org