Re: [SailfishDevel] SSH on OSX

2016-07-18 Thread Krisztian Olah
Thanks guys, I did find a solution in the comment section here:
http://joshuawise.com/horndis#available_versions

On 17 July 2016 at 11:27, Chris Walker <
cdw_noki...@the-walker-household.co.uk> wrote:

> On Sat, 16 Jul 2016 16:00:52 +0100
> Krisztian Olah  wrote:
>
> > Hello guys,
> >I just got a new macbook and I am not familiar with OSX, could
> > anyone please point me to an up to date guide on how to set up usb
> > networking on OSX, I'm using El Capitan. I did try to search, but
> > came up short. Thanks in advance
>
> This blog post is a bit old by now but it might help -
>
> http://flyingsheeponsailfish.blogspot.co.uk/2014/01/connecting-to-jolla-via-ssh-over-usb.html
> ___
> 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] SSH on OSX

2016-07-16 Thread Krisztian Olah
Thanks Andrin, I'll have a look.

On Sat Jul 16 16:21:58 2016 GMT+0100, Andrin Bertschi wrote:
> @Kris, Take a look here 
> https://together.jolla.com/question/282/usb-file-transfer-support-for-mac-os-x/?answer=9717#post-id-9717
> As far as I remember, the steps with Horndis worked for me but it was not on 
> El Capitan.
> There seem to be issues with El Capitan as the project website says but some 
> people on this github issue
> seem to have succeeded in getting it to work 
> https://github.com/jwise/HoRNDIS/issues/42.
> 
> I eventually ended up sshing via wifi.
> 
> andrin
> 
> > On 16 Jul 2016, at 17:00, Krisztian Olah  wrote:
> > 
> > Hello guys,
> >I just got a new macbook and I am not familiar with OSX, could anyone 
> > please point me to an up to date guide on how to set up usb networking on 
> > OSX, I'm using El Capitan. I did try to search, but came up short.
> > Thanks in advance
> > Kris
> > ___
> > 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


[SailfishDevel] SSH on OSX

2016-07-16 Thread Krisztian Olah
Hello guys,
   I just got a new macbook and I am not familiar with OSX, could anyone
please point me to an up to date guide on how to set up usb networking on
OSX, I'm using El Capitan. I did try to search, but came up short.
Thanks in advance
Kris
___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

Re: [SailfishDevel] Open source in-app ad API helper for QML - please, join

2016-05-31 Thread Krisztian Olah
I really like this idea, with the addition that they'd get flagged in the 
store, so that the end user can decide beforehand whether they want to install 
it or not, alas that's entirely up to Jolla.

I'd like to contribute in the near future, but in the next couple of months I 
am super busy, likely have some free time from September. No promises though.

Kris  

On Tue May 31 09:44:31 2016 GMT+0100, Zoltán Lutor wrote:
> Hi,
> 
> It is a good feature candidate then in this 'sdk' - we can built in
> donation via e.g. PayPal and if that happened, no ads will be shown any
> more...
> Thx for the idea...
> 
> If you added it as an issue to the BitBucket project you could track the
> progress it in the future!
> 
> Br,
> 
> Zoltan
> 
> 2016-05-31 9:24 GMT+02:00 Martin Kolman :
> 
> > Tue, 31 May 2016 07:13:33 + Peter Kovacs:
> >
> > Ads are a classic earn design. As buying an App.
> > Some Open Source enthusiasts are oppose these ways. And you find them in
> > the Jolla Platform, because jolla is much closer to these idealistic views
> > then Apple or Android.
> >
> > I personally don't not mind Ads, if I can switch them off for a
> > donation/buyoff. But this is only me.
> >
> > Yeah - as long as there is a way to pay the developer not to show the adds
> > I would be fine with that (one needs to support the developers, especially
> > on Sailfish OS).
> > On the other hand I would most probably simply not use an app where the
> > ads can't be "paid off".
> >
> > Maybe Crowed funding developing method is the only way Hardcore OSS people
> > would accept?
> >
> > I would personally more focus on guidelines how to use ads.
> >
> > All the best
> > Peter
> >
> > Tone Kastlunger  schrieb am Di., 31. Mai 2016,
> > 08:58:
> >
> >> This is an excellent discussion point; I believe this is a very clear
> >> aspect of the key problem of SFOS at the moment - the whole point of SFOS
> >> is to DIFFERENTIATE itself from android.
> >>
> >> Note : I love coding for SFOS, it's inspiring and motivating. Sure, it
> >> has it's limitations and quirks, but still, its a great experience IMHO.
> >>
> >> The facts are that, if you ask someone the question: "Would you mind ads
> >> in app XX?" they will reply "Hell NO".
> >> But nevertheless, if app XX gets published with ads, and the app is good,
> >> nobody will care about the ads, and use it anyways.
> >>
> >> So, this can mean that:
> >>
> >> 1) nobody wants ads
> >> 2) nobody cares if they are there, tho
> >>
> >> My experience has been a harsh rejection of ads by the jolla community,
> >> with my app where I had included ads.
> >> In the timeframe the app had ads included, I noticed two trends :
> >> a) people who stopped using the app completely due to the adds
> >> b) people who kept on using it (hence rule 2) applies).
> >>
> >> I'd wonder if codign a SFOS app with ads and publish it as an Android app
> >> on the jolla store will actually fix things?
> >>
> >>
> >> On Tue, May 31, 2016 at 8:20 AM,  wrote:
> >>
> >>> Yes, that is how it is. Paid model does not work for masses - maybe iOS
> >>> is exception to some extent...
> >>>
> >>>
> >>> I fully understand those who are fed up with annoying ads - just like
> >>> me, too.
> >>>
> >>>
> >>> But it does not imply ads are evil as such. Just they have to be placed
> >>> carefully and accordingly...
> >>>
> >>>
> >>> Anyway, I just wanted to invite other developers for helping me
> >>> finishing this 'sdk'...
> >>>
> >>>
> >>> Zoltán
> >>>
> >>> Andrew Penkrat írta ekkor: 2016.05.30. 23:46
> >>> I want to add my experience from the developer's point of view. I have
> >>> an Android app with about 1000 installations (and 100 active users). This
> >>> app has ads as well as an option to disable them for a $2 donation.
> >>>
> >>> Nobody ever activated this option. So most probably I won't be able to
> >>> get any revenue from the app without ads.
> >>>
> >>> 2016-05-30 23:22 GMT+03:00 Martin Kolman < 
> >>> martin.kol...@gmail.com>:
> >>>
>  Mon, 30 May 2016 19:32:54 + Alexey Andreyev:
> 
> 
>  Hello, Zoltán! :)
>  Feel free to criticize me, but... ads in our jolla? No, thanks! :)
> 
>  I subscribe to this - while I understand developers are looking for
>  revenue streams I really like
>  how current native Sailfish OS apps are pretty much add free (for one
>  reason or another).
>  Just take a look how reckless add usage ruins application usability on
>  Android.
>  I'm fine with donations, paid/premium versions, etc. but please no
>  adds! :)
> 
>  I guess if you are a developer it make sence to ask for donations /
>  create non-free apps, but please, no ads at all.
>  (Espesially with additional web engine module loaded eating my
>  resources)
> 
>  Again, this is just my opinion. I understand it opens new possibilities
>  for some projects, etc, etc.
> 
>  пн, 30 мая 2016 г. в 21:48, Zoltán Lutor < 
>  zoltan.lu...@gmai

Re: [SailfishDevel] [Official Announcement] Join the Sailfish Community Device Program now!

2016-05-26 Thread Krisztian Olah
Hi Dirk,
  If it's a rebranded aqua fish, which I believe it is, it won't have the other 
half feature. I didn't see any mention of nfc, even though that was the 
specific feature I was looking for. 
Any one in the know please correct me if I'm wrong. Without nfc it isn't enough 
improvement over my Jolla to consider it.
Just my 2 pence.
Kris

On Thu May 26 14:12:19 2016 GMT+0100, Dirk Thierbach wrote:
> Jolla Community wrote:
> > As a thank you for your loyalty, we've just announced a new program for
> > *you*, the Jolla community! By joining the Sailfish Community Device
> > Program, you will get access to special content and R&D sessions, event
> > invitations, and the new Sailfish OS smartphone, the limited community
> > edition /*Jolla C*/.
> 
> So that's a Snapdragon 212 phone, a SoC which looks very similar to the
> Snapdragon 400 used in the old Jolla. Though the second SIM slot is nice
> to have.
> 
> Now the interesting question is if the design, uh, oversights of the
> old Jolla phone have been fixed? That is,
> 
> * is the FM radio actually usable (internal antenna connected)?
> * can the USB used in OTG mode?
> * is the NFC sensor available for general usage, instead of being
>   reserved to identify the other half?
> 
> From the image on https://jolla.com/jollac, it looks like the concept
> of the other half has been kept.
> 
> - Dirk
> ___
> 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] What's the correct way to do this?

2015-06-05 Thread Krisztian Olah
You are passing a carmodel as an argument to carpassDetails, chances are you 
did not define member named id or register in carmodel, but probably that's not 
want to do anyway. You seem to expect carDetails to be some different type, I 
did not find any definition to its type other than it being a QVariant in 
careRecordsPage.qml.

The way you want to pass carDetails is correct, but you are passing the model. 

On Fri Jun 5 17:57:52 2015 GMT+0100, Chris Walker wrote:
> On Fri, 5 Jun 2015 16:53:22 +
> Krisztian Olah  wrote:
> 
> > It looks like the object carDetails does not exist in the scope
> > you're trying to access it. What scope is your carDetails object in?
> > If you could briefly describe in which file each relevant
> > function/object  reside, would be helpful. 
> 
> I've just pushed the code to github. So would that be better than me
> trying to explain it?
> 
> It's here :-
> https://github.com/tonercloud/fuelpad
> ___
> 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] What's the correct way to do this?

2015-06-05 Thread Krisztian Olah
It looks like the object carDetails does not exist in the scope you're trying 
to access it. What scope is your carDetails object in? If you could briefly 
describe in which file each relevant function/object  reside, would be helpful. 

On Fri Jun 5 17:06:05 2015 GMT+0100, Chris Walker wrote:
> Perhaps somebody can either help me with this one or point me to some
> docs that tell me the correct way to do it.
> 
> I want to pass several bits of information to another qml page. I've
> looked at the various pages and they only tell me how to pass variables
> not how to set them up in the first place which is where I'm struggling.
> 
> My qml (at the end of a label) looks like this :-
> onClicked: console.log("Clicked " + mark + " " + model + " " + register)
>// + { passcarDetails(model);
> 
> The console shows that the three pieces of information are being
> selected and part of my function looks like this :-
> function passcarDetails(carDetails)
> {
> console.log("about to push to CarRecordPage, for car - id: " +
>  carDetails.id + ", register: " +
>  carDetails.register)
> 
> It's failing at that point as the console says :-
> passcarDetails:40 - about to push to CarRecordPage, for car - id:
> undefined, register: undefined
> 
> So where am I going wrong, and more importantly, what can I do about it?
> 
> Any help appreciated.
> ___
> 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] Update on SailfishOS roadmap

2015-02-22 Thread Krisztian Olah
Hi,
It is going to be Qt 5.2 for a while, there are libs from 5.2 that are still 
not allowed.

Kris

On Sun Feb 22 21:46:32 2015 GMT, Alex Smirnoff wrote:
> Hello.
> What about Qt version?
> Is it still 5.2.2 in update 11?
> I really need qt 5.3 to be able to build version 1.2 of QtQuick Controlls.
> 
> Alex.
> 
> 2015-02-13 13:09 GMT+01:00 Soumya Bijjal :
> 
> > Hi all,
> >
> > Here is an update on our progress from the past month. Do note that they
> > are all work in progress and not release ready for another few months.
> >
> > * Tablet hardware adaptation is nearly ready for MWC
> >   - USB charging, stereo speakers, sensors, accelerometer, Bluetooth, WLAN
> > functionalities have been verified
> >
> > * Work on the new UI framework is progressing at a good pace
> >   - lock screen has been separated from the homescreen
> >   - improved notifications with visual grouping and additional actions
> >   - events view with a richer user experience
> >   - improved home screen interactions and transitions
> >   - new swipe edge transition
> >
> > * Lock screen media player controls implemented for the native media
> > player app, under review https://together.jolla.com/
> > question/3414/control-music-from-the-lock-screen/
> >
> > * IMAP idle/push support implemented https://together.jolla.com/
> > question/493/imap-idle-imap-push-for-the-e-mail-app/
> >
> > * Landscape mode enabled in Maps
> >
> > * Toolchain has been updated (upgraded to GCC 4.8, binutils 2.25, switch
> > to Thumb2+NEON for ARM by default, march=i686 and SSE2 minimum for X86)
> > and will take into effect with update13; expect a huge download size for
> > the update
> >
> > * Dual-stack support  (ipv4 and ipv6) for cellular connectivity in the
> > middleware
> >
> > * Update to GStreamer 1.x: souphttpstc is enabled, AAC encoding/decoding
> > works
> >
> > * Prototyping of encrypted filesystem: This is currently on hold for a
> > short while due to MWC preparations
> > - We have a development template to build filesystem layout on tablet
> > that could allow home encryption
> > - Most of the real work is still ahead of us: studying if in-place
> > conversion  can be done with changing LVM logical volumes, /var/
> > encryption, user application binaries and user app data encryption and most
> > of all placement to home instead of root, boot target for password query
> >
> > * Drop upower in favour of statefs:
> >   - udev is used directly to fetch power and battery temperature
> > information via statefs power-udev provider
> >   - MCE now fetches battery info from statefs
> >
> > * Performance improvements:
> >   - Improved performance of adding items to the scenegraph, particularly
> > when e.g. scrolling lists
> >   - Pool allocator for shadow nodes in the scenegraph used to reduce
> > possible memory fragmentation
> >   - Substantially reduced the number of nodes required by the scenegraph
> >   - Reduced the amount of memory required by internal JS structures
> >   - Reduced the need to heap allocate when dealing with IR structures
> >   - Reduced the amount of memory required for SQLite caches
> >
> > As  for the next OS release, we are currently at release candidate 5 for
> > Yliaavanlampi (update 11) and expect to have another release candidate
> > before we can decide on the release schedule.
> >
> > For this iteration, we have two main goals:
> > 1. Demonstrate the new UI framework and Tablet functionality at the
> > Mobile World Congress, Barcelona
> > 2. Make the device usable in filesystem full condition to allow the
> > user to recover from it on her own
> >
> > In addition, we have planned to work on the following:
> > * Tablet specific work:
> >   - Bluetooth audio configuration
> >   - Integrate microphone
> >   - Improve boot up and shutdown time
> >   - Support for OBEX FTP Bluetooth profile
> >   - Upgrade Bluetooth AVRCP to version 1.3
> >   - Check Bluetooth+WLAN coexistence
> >   - Verify MTP functionality
> >   - Performance improvements
> >   - Intel support for Android runtime
> > * Enable OpenVPN support on the OS
> > * Update to Facebook API 2.2
> > * Telepathy farstream / SIP Audio routing policy
> > * Bug fixing on issues related to Bluetooth sync, presence and
> > accounts/calDAV
> > * New settings options to
> >  - display disk space used by images, media, backup, app data etc
> >  - display SD card information
> > * Update main view of Gallery app for the Tablet
> >
> > The following activities continue from the last iteration:
> > * Adapt middleware to modemless device i.e. Tablet
> > * Work towards Pulseaudio 6.0
> > * Drop upower in favour of statefs
> > * Allow factory reset operation to reset the OS to the latest available
> > public version instead of the age old factory image
> > * Run btrfs balance operation before installing OS update
> > * Improvements to PackageKit for software update handling
> > * Sensor detection, USB, camera adaptation and filesystem layout for the
> > Tablet

Re: [SailfishDevel] Problem with SearchField hiding and clearing on text entry

2015-02-17 Thread Krisztian Olah
Hi Tadeusz,

Although Qt docs don't mention it specifically, I suspect that
QSqlTableModel's setFilter method resets the model causing the attached
views redrawing themselves, including their headers. You clould use a
QSortFilterProxyModel which would not reset upon setting its filter,
resulting in the desired behaviour.

Regards Kris

On 16 February 2015 at 14:49, Tadeusz Sośnierz 
wrote:

> Hey,
> I started writing myself a little app with D&D spell list. Worked well
> enough until I tried the search functionality. I'm using SilicaListView
> with SearchField in it to grep through the QSqlTableModel, and when I
> type one letter into the search box it clears itself and defocuses the
> keyboard. The search still occurs, for that single letter that got typed
> in.
>
> [1] is where I react on keyboard input. If I comment out spells.search()
> line the issue with SearchField no longer occurs (but it's pretty
> useless for obvious reasons). That makes me think that something on the
> C++ side is wrong ([2]), but I don't see why it would affect the view so
> dramatically.
>
> Could anyone point out where did I screw it up? General code criticism
> is welcome too :)
>
> Best regards,
> Tadeusz Sośnierz
>
> [1]
> https://github.com/tadzik/harbour-dndhelper/blob/master/
> qml/pages/SpellList.qml#L16
> [2]
> https://github.com/tadzik/harbour-dndhelper/blob/master/src/Spells.cpp#L74
>
>
> ___
> SailfishOS.org Devel mailing list
> To unsubscribe, please send a mail to devel-unsubscribe@lists.
> sailfishos.org
___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

Re: [SailfishDevel] Sharing model between pages ("by reference")

2015-02-01 Thread Krisztian Olah
Hi Dirk, perhaps what you really want to do is filter the data through 1or 2 
proxy models, that way you get 2 different models whilst still using the same 
source model. When data changes in the source it notifies the proxies as well 
of the change and both views update.

Otherwise, if it is not what you want to do, but to use the exact same model in 
both views, just make sure that you pass the exact same address to QML. 

Regards 
Kris 

On Sun Feb 1 10:44:49 2015 GMT, Dirk Zimmermann wrote:
> On 01.02.2015 11:19, Andrey Kozhevnikov wrote:
> > Why didn't you tried before asking? This is working in exactly same way
> > as you described in your question.
> 
> I asked because in my case it didn't work. Otherwise there wouldn't have
> been a reason to ask :)
> 
> > Below is template pages. MainPage declares testModel, FirstPage and
> > SecondPage using same model as reference, assigned to listModel
> > property. Everything works flawlessly.
> 
> Thanks for the feedback, there must be something else in my code that
> lets the two models deviate (as in not referencing the same object anymore).
> 
> Dirk
> ___
> 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] Installation trouble with the SDK

2015-01-08 Thread Krisztian Olah
Hi Kim,
You can switch off the overlay scrollbar thing with "export
LIBOVERLAY_SCROLLBAR=0", did you try if that helps? Alternatively you could
find out wether it is a Unity problem by installing another desktop say
LXDE; I doubt it is related.
___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

Re: [SailfishDevel] Problems deploying with SDK 1412

2015-01-08 Thread Krisztian Olah
Thanks Michael,
Creating the /opt/sdk/ path seems to have soved the issue, I can't remember
ever having to do this manually. I very recently restored my Jolla to
factory settings so that might have had something to do with it as well.

Thanks again
Kris

On 8 January 2015 at 18:35, Michael Neufing  wrote:

> Hi Kris,
>
> are you using deployment by copying binaries to device?
> If yes, can you check if the folder /opt/sdk exists on your device? If
> not, create it and test again.
> This solved my problems with this deployment mode.
>
> You could also set the deployment mode to RPM.
>
> Michael.
>
>
>
> Zitat von Krisztian Olah :
>
>
>  Hi list,
>> I installed the new SDK yesterday, but since it's installed I cant seem to
>> be able to deploy onto device fails due to an rsync error:
>>
>> rsync: mkdir "/opt/sdk/Trash" failed: No such file or directory (2)
>>
>> rsync error: error in file IO (code 11) at main.c(656) [Receiver=3.1.0]
>>
>> Deploy failed
>>
>> rsync: [sender] write error: Broken pipe (32)
>>
>> 16:50:40: The process
>> "/home/kriszik_arch/.config/SailfishBeta1/mer-sdk-tools/
>> MerSDK/SailfishOS-armv7hl/deploy"
>> exited with code 1.
>>
>> Error while building/deploying project Trash (kit:
>> MerSDK-SailfishOS-armv7hl)
>>
>> When executing step 'Rsync'
>>
>>
>> This is the boilerplate project that is preset by Jolla upon choosing
>> SailfishOS for new project, but same thing happens with my project too.
>> SSH
>> works as it's supposed to, the SDK's connection test reports success, but
>> deploy fails. I didn't try with the emulator, becase I do not wish to work
>> with it even if it worked. I tried to reinstall, checked md5, cleared
>> .config (I am on Arch linux x86_64 KDE), but as of now no luck. Is there
>> anything I might have missed?
>>
>>
>> I would appricate any insight.
>>
>> Thanks
>>
>> Kris
>>
>
>
> ___
> SailfishOS.org Devel mailing list
> To unsubscribe, please send a mail to devel-unsubscribe@lists.
> sailfishos.org
>
___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

[SailfishDevel] Problems deploying with SDK 1412

2015-01-08 Thread Krisztian Olah
Hi list,
I installed the new SDK yesterday, but since it's installed I cant seem to
be able to deploy onto device fails due to an rsync error:

rsync: mkdir "/opt/sdk/Trash" failed: No such file or directory (2)

rsync error: error in file IO (code 11) at main.c(656) [Receiver=3.1.0]

Deploy failed

rsync: [sender] write error: Broken pipe (32)

16:50:40: The process
"/home/kriszik_arch/.config/SailfishBeta1/mer-sdk-tools/MerSDK/SailfishOS-armv7hl/deploy"
exited with code 1.

Error while building/deploying project Trash (kit:
MerSDK-SailfishOS-armv7hl)

When executing step 'Rsync'


This is the boilerplate project that is preset by Jolla upon choosing
SailfishOS for new project, but same thing happens with my project too. SSH
works as it's supposed to, the SDK's connection test reports success, but
deploy fails. I didn't try with the emulator, becase I do not wish to work
with it even if it worked. I tried to reinstall, checked md5, cleared
.config (I am on Arch linux x86_64 KDE), but as of now no luck. Is there
anything I might have missed?


I would appricate any insight.

Thanks

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

Re: [SailfishDevel] SearchField Mystery

2014-10-22 Thread Krisztian Olah
Hi Francois, I tried with your approach, but it didn't solve the problem in
my case. However I did find the culprit, it was Listview's remove animation
it moved the header along the y axis for some reason. :S

Thanks
Kris

On 22 October 2014 09:45, François K.  wrote:

> Hi Krisztian,
>
> I faced the same issues last week, and solved it this way :
> http://pastebin.com/8JRd3ATp (borrowed from the SearchField example
> provided by Jolla).
>
> I tried several things, it's the only one that seems to give the expected
> result. But I don't know why :/
>
> Cheers,
>
> --
> François
> ___
> 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

[SailfishDevel] SearchField Mystery

2014-10-21 Thread Krisztian Olah
Hi all, I have encountered a very strange bug with SearchField. I have
refactored my SearchHeader component(containing a Label and a SearchField)
so that I can reuse in other scenarios as well. I noticed after the
refactoring that when user enters the same characters multiple times such
as "" or "" and view count becomes 0 as the proxymodel removes non
matching elements my header changes its y property; In fact it changes its
y depending on what letter have been pressed multiple times. If letters are
not repeating the aforementioned phenomenon does still occure, but it's
easier to observe how differently it works with other letters for instance
nothing happens when "g" is passed, but SearchField moves to about 50%
of the screen whith "z".

The code that triggers this:
https://github.com/KrisztianOlah/london-sail/blob/searchHeaderBug/qml/gui/TrafficSearchHeader.qml

https://github.com/KrisztianOlah/london-sail/blob/searchHeaderBug/qml/gui/SearchHeader.qml

The whole project:
https://github.com/KrisztianOlah/london-sail/tree/searchHeaderBug

The old version of the file which does not have this bug:
https://github.com/KrisztianOlah/london-sail/blob/master/qml/gui/SearchHeader.qml


  I don't believe that my code should be affected by the string in the
SearchField other than  filtering the list, but if the problem exists
between chair and keyboard please enlighten me.  :)

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

Re: [SailfishDevel] ListView vs Repeater

2014-10-14 Thread Krisztian Olah
  Hi Oleksii,
  After writing the code I realized that RemorseItem by default excecutes
its executable onDestruction() when its timer is on. I am not quite sure
why it didn't work the same way before or why I precieved it differently.

Thanks again Kris

On 14 October 2014 08:46, Oleksii Serdiuk  wrote:

> Hi Kris,
>
> Aha! So what you want is:
>
> 1. User selects to remove an item in the ListView.
> 2. RemorseItem activates so user can cancel the deletion.
> 3. When timer times out, the item is actually deleted from the model.
>
> And, in this case, 3. breaks when user scrolls the item away before
> timeout: delegate is deleted -> RemorseItem never times out -> item not
> deleted from the model.
>
> Then yes, performing deletion in Component.onDestruction() is the way
> Jolla's standard apps do (at least I've seen it in one of their apps).
> So you're on the right track :-)
>
> On 13/10/14 23:54, Krisztian Olah wrote:
> >Hi Oleksii,
> >   It is the model that handles the actual removal, but I want a
> > RemorseItem to call it, which is in return requested by the delegate. I
> > want all list items to have their own remorse timer in case user wants
> > to cancel one but not the other.
> >   In my current version it works fine, except when the user scrolls away
> > too far the RemorseItem is destroyed and the file is left on the disk,
> > but come to think of it; perhaps I could just call the model.remove()
> > function when onDestruction() signal is emitted. Thanks, if I didn't
> > write this letter I might not think of it. :)
> >
> > Anyway if you want to see the latest version you can have a look here:
> >
> https://github.com/KrisztianOlah/london-sail/blob/devel/qml/pages/MyMapsPage.qml
> >
> > I'd be happy for any feedback. :)
> >
> > Thanks Kris
> >
> > On 13 October 2014 20:10, Oleksii Serdiuk  > <mailto:conta...@oleksii.name>> wrote:
> >
> > Hi Kris,
> >
> > If I understood you right, why do you try to remove list elements
> > directly from the ListVie. You should be removing them from the
> > model and it will also remove components from the list.
> >
> > See
> > http://qt-project.org/doc/qt-__5/qml-qtqml-models-listmodel.__html
> > <http://qt-project.org/doc/qt-5/qml-qtqml-models-listmodel.html>
> >
> > You can access ListView's model through its 'model' property:
> >
> > > listView.model.remove(index);
> >
> >
> > If you'd like to animate the removal, set 'remove' property of
> > ListView (SilicaListView is based on ListView) to some transition
> > animation.
> >
> >
> http://qt-project.org/doc/qt-__5/qml-qtquick-listview.html#__remove-prop
> > <
> http://qt-project.org/doc/qt-5/qml-qtquick-listview.html#remove-prop>
> >
> >
> > That would be a "proper" way to do it :-)
> >
> >
> >
> > On 10.10.2014 17:00, Krisztian Olah wrote:
> >
> >Hi everyone,
> >
> >I need some help between choosing ListView or Repeater.
> > I've got a SilicaListView whose elements I want to remove(only
> > remove,
> > never add) dynamically from GUI. When I have fairly a long list
> > count(~25), reaching the element with
> > ListView.contentItem.children[__index] is not possible for the
> > mid to end
> > of the list, probably because ListView destroys items that are
> not
> > visible. When that happens children[index] will not refer to the
> > same
> > element as model.index and therefore I cannot call remove() on
> > the item.
> > Using a Repeater would of course prevent this, but I don't think
> > I can
> > have a RemoveAnimation and I think I would have to reset the
> model.
> >
> >Is there another way that I didn't think of that would allow
> > me to
> > remove items from my model with animation and would allow me to
> > have a
> > list up to 1000 members(in real use it will probably be under
> > 100) long?
> >
> >Thanks in advance
> > Kris
>
> --
> With best regards,
> Oleksii Serdiuk
>
>
> ___
> 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] ListView vs Repeater

2014-10-13 Thread Krisztian Olah
   Hi Oleksii,
  It is the model that handles the actual removal, but I want a RemorseItem
to call it, which is in return requested by the delegate. I want all list
items to have their own remorse timer in case user wants to cancel one but
not the other.
  In my current version it works fine, except when the user scrolls away
too far the RemorseItem is destroyed and the file is left on the disk, but
come to think of it; perhaps I could just call the model.remove() function
when onDestruction() signal is emitted. Thanks, if I didn't write this
letter I might not think of it. :)

Anyway if you want to see the latest version you can have a look here:
https://github.com/KrisztianOlah/london-sail/blob/devel/qml/pages/MyMapsPage.qml

I'd be happy for any feedback. :)

Thanks Kris

On 13 October 2014 20:10, Oleksii Serdiuk  wrote:

> Hi Kris,
>
> If I understood you right, why do you try to remove list elements directly
> from the ListVie. You should be removing them from the model and it will
> also remove components from the list.
>
> See http://qt-project.org/doc/qt-5/qml-qtqml-models-listmodel.html
>
> You can access ListView's model through its 'model' property:
>
> > listView.model.remove(index);
>
>
> If you'd like to animate the removal, set 'remove' property of ListView
> (SilicaListView is based on ListView) to some transition animation.
>
> http://qt-project.org/doc/qt-5/qml-qtquick-listview.html#remove-prop
>
>
> That would be a "proper" way to do it :-)
>
>
>
> On 10.10.2014 17:00, Krisztian Olah wrote:
>
>>Hi everyone,
>>
>>I need some help between choosing ListView or Repeater.
>> I've got a SilicaListView whose elements I want to remove(only remove,
>> never add) dynamically from GUI. When I have fairly a long list
>> count(~25), reaching the element with
>> ListView.contentItem.children[index] is not possible for the mid to end
>> of the list, probably because ListView destroys items that are not
>> visible. When that happens children[index] will not refer to the same
>> element as model.index and therefore I cannot call remove() on the item.
>> Using a Repeater would of course prevent this, but I don't think I can
>> have a RemoveAnimation and I think I would have to reset the model.
>>
>>Is there another way that I didn't think of that would allow me to
>> remove items from my model with animation and would allow me to have a
>> list up to 1000 members(in real use it will probably be under 100) long?
>>
>>Thanks in advance
>> Kris
>>
>
> --
> With best regards,
> Oleksii Serdiuk
>
>
> ___
> 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] ListView vs Repeater

2014-10-10 Thread Krisztian Olah
Thanks Lucien, The signal/slot approach worked like a charm.

On 10 October 2014 16:10,  wrote:

> Hello Olah,
>
> I would not recommand using Repeater for long list views, as Repeater do
> not manage the items. As you have guessed, ListView destroys items that are
> out of the view, to save memory and have better performances.
>
> In your case, the best way is to animate the removal only if the item is
> visible. This can be achieved quite easily:
>
> 1. create a signal inside the ListView (like doRemoval(int index)), and
> give it an id
> 2. inside each delegate, connect this signal to a method to perform
> animation and removal. Don't forget if the index sent by doRemoval matches
> the index of the delegate.
> 3. Send the signal when an item have to be removed, passing the index. If
> this item is out of the displayed items, nothing will happen, but if it is
> inside, the item will be removed.
>
> Regards,
> Lucien
>
>
> - Mail original -
> De: "Krisztian Olah" 
> À: "Sailfish OS Developers" 
> Envoyé: Vendredi 10 Octobre 2014 17:00:42
> Objet: [SailfishDevel] ListView vs Repeater
>
>
>
> Hi everyone,
>
>
> I need some help between choosing ListView or Repeater.
>
>
> I've got a SilicaListView whose elements I want to remove(only remove,
> never add) dynamically from GUI. When I have fairly a long list count(~25),
> reaching the element with ListView.contentItem.children[index] is not
> possible for the mid to end of the list, probably because ListView destroys
> items that are not visible. When that happens children[index] will not
> refer to the same element as model.index and therefore I cannot call
> remove() on the item. Using a Repeater would of course prevent this, but I
> don't think I can have a RemoveAnimation and I think I would have to reset
> the model.
>
>
> Is there another way that I didn't think of that would allow me to remove
> items from my model with animation and would allow me to have a list up to
> 1000 members(in real use it will probably be under 100) long?
>
>
> Thanks in advance
> Kris
> ___
> 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

[SailfishDevel] ListView vs Repeater

2014-10-10 Thread Krisztian Olah
  Hi everyone,

  I need some help between choosing ListView or Repeater.
I've got a SilicaListView whose elements I want to remove(only remove,
never add) dynamically from GUI. When I have fairly a long list count(~25),
reaching the element with ListView.contentItem.children[index] is not
possible for the mid to end of the list, probably because ListView destroys
items that are not visible. When that happens children[index] will not
refer to the same element as model.index and therefore I cannot call
remove() on the item. Using a Repeater would of course prevent this, but I
don't think I can have a RemoveAnimation and I think I would have to reset
the model.

  Is there another way that I didn't think of that would allow me to remove
items from my model with animation and would allow me to have a list up to
1000 members(in real use it will probably be under 100) long?

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

Re: [SailfishDevel] Dynamic VisualItemModel in SlideshowView

2014-09-29 Thread Krisztian Olah
Just use a delegate like in the given example: 
https://sailfishos.org/sailfish-silica/qml-sailfishsilica-slideshowview.html
If still baffled, you should read 
http://qt-project.org/doc/qt-4.8/qdeclarativemodels.html#listmodel

On Mon Sep 29 2014 05:53:56 GMT+0100 (BST), Peter Pykäläinen wrote:
> Because I need a slideshow.
> How can I do a slideshowview with ListModel?
> 
> 
> // Peter Pykäläinen
> 
> On 28 September 2014 23:21, Krisztian Olah  wrote:
> 
> > Why not use a ListModel then?
> >
> > On 28 September 2014 18:44, Peter Pykäläinen 
> > wrote:
> >
> >> Hi,
> >>
> >> anybody know how to populate SlideshowView's VisualItemModel dynamically?
> >> I need to have 20 items in the VisualItemModel and I don't want to define
> >> them at init.
> >>
> >> Was thinking of a javascript which would add an item into the model, but
> >> apparently VisualItemModel does not have that option.
> >>
> >> // Peter Pykäläinen
> >>
> >> ___
> >> 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] Dynamic VisualItemModel in SlideshowView

2014-09-28 Thread Krisztian Olah
Why not use a ListModel then?

On 28 September 2014 18:44, Peter Pykäläinen 
wrote:

> Hi,
>
> anybody know how to populate SlideshowView's VisualItemModel dynamically?
> I need to have 20 items in the VisualItemModel and I don't want to define
> them at init.
>
> Was thinking of a javascript which would add an item into the model, but
> apparently VisualItemModel does not have that option.
>
> // Peter Pykäläinen
>
> ___
> 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

[SailfishDevel] QQmlComponent: Cannot create new component instance before completing the previous

2014-09-11 Thread Krisztian Olah
Hi all, I've just introduced a bug that could cause segfault. It is unknown
to me what conditions trigger the bug exactly. I'm clueless as to why it
happens, I would be greatful for any kind of help.

I attached the error in a txt file I got in console when it crashed.
Basically a lot of: "QQmlComponent: Cannot create new component instance
before completing the previous"
and underneath "speed: $SOMEDOUBLE" was the result of:


Component.onCompleted: {

console.log(" speed: " +
(messageLabel.paintedWidth - self.width) )

}

in messageLabel. So for some reason it wanted to construct a whole bunch of
Labels until it ran out of stack memory.

When the code works as expected I still get this warning/error msg just not
as many and don't crash:
"QQmlComponent: Cannot create new component instance before completing the
previous"

Here is the code in question:
RunningText is in StopHeader which is in turn a headerItem of a
SilicaListView the bug occurs(given unknown conditions which are rare) when
pushing the Page containig this SilicaListView
for a greater context see: https://github.com/KrisztianOlah/london-sail/


//RunnungText.qml

Item {

id: self

property color backgroundColor: Theme.highlightColor

property double backgroundOpacity: 0.4

property color textColor: Theme.highlightDimmerColor


state: (messageLabel.text === "") ? "invisible" : "visible"

Connections {

target: arrivalsData

onCurrentStopMessagesChanged: {

messageLabel.text = arrivalsData.getCurrentStopMessages()

}

}


Rectangle {

id: shade

color: backgroundColor

opacity: backgroundOpacity

anchors.fill: parent

Label {

id: messageLabel

color: textColor

clip: true

text: arrivalsData.getCurrentStopMessages()

anchors.verticalCenter: parent.verticalCenter

onTextChanged: {

state = (messageLabel.text === "") ? "invisible" : "visible"

arrivalsData.refreshArrivalsModel()

}

}

NumberAnimation {

id: animation

target: messageLabel

from: parent.width

to: 0 - messageLabel.paintedWidth

//should have the same speed for any length text

duration: (messageLabel.paintedWidth + self.width) * 5

property: "x"

running: true

loops: Animation.Infinite

}


}

OpacityRampEffect {

sourceItem: shade

direction: OpacityRamp.RightToLeft

slope: 0.5

offset: 0.001

}

states: [

State {

name: "visible"

PropertyChanges {

target: self

height: 50

}

},

State {

name: "invisible"

PropertyChanges {

target: self

height: 0

}

}


]

}


//StopHeader.qml

Item {

id: self

property Stop currentStop: arrivalsData.getCurrentStop()

property string stopPointIndicator: currentStop.getStopPointIndicator()

property string direction: currentStop.getTowards()

property alias distance: distanceLabel.text

property string message: ""

property string stopCode: currentStop.getID()

property int type: currentStop.getType()

property string title: currentStop.getName()

property bool isFavorite: arrivalsData.isStopFavorite(stopCode)

property double headerOpacity: Theme.highlightBackgroundOpacity


Connections {

target: self.currentStop

onDataChanged: {

self.stopPointIndicator = currentStop.getStopPointIndicator()

self.direction = currentStop.getTowards()

self.distance = distanceLabel.text

self.stopCode = currentStop.getID()

self.type = currentStop.getType()

self.title = currentStop.getName()

self.isFavorite = arrivalsData.isStopFavorite(stopCode)


}

}


anchors {

left: parent.left

right: parent.right

}

height: pageHeader.height + stopHeader.height + messageBox.height
+ Theme.paddingMedium*4


Label {

id: pageHeader

text: title

font.pixelSize: Theme.fontSizeLarge

color: Theme.highlightColor

horizontalAlignment: Text.AlignRight

wrapMode: Text.WordWrap

anchors {

top: parent.top

topMargin: Theme.paddingMedium*2

right: parent.right

rightMargin: Theme.paddingLarge

left: parent.left

leftMargin: 130

}

}

RunningText {

id: messageBox

anchors {

top: pageHeader.bottom

topMargin: Theme.paddingMedium*2

left: parent.left

right: parent.right

}

}

Re: [SailfishDevel] core dump location

2014-09-07 Thread Krisztian Olah
Hi, in case anyone is interested in generating coredumps:

Sailfish saves core files if enabled in working directory which should be
~/ or /home/nemo/ if you like for applications started from launcher.
To enable generating coredumps use (the method I posted earlier works too):
ulimit -c unlimited

To generate a useful coredump the debuginfo package(located in RPMS
directory in your build directory) is needed to be installed.
A nice and short read here: http://fedoraproject.org/wiki/StackTraces

Thanks again Alejandro for pointing me in the right direction


On 3 September 2014 14:27, Krisztian Olah  wrote:

> Thanks Alejandro,
> I'm unfamiliar with both ulimit and Sailfish in this regard.
> If I understand correctly I need to:
> devel-su echo  "*   softcore1000" >>
> /etc/security/limits.conf
> devel-su echo  "*   softhard1000" >>
> /etc/security/limits.conf
> devel-su service nemodb restart
>
> Then I will have coredumps generated in working dir, journal or some other
> directory somewhere in /var provided my app crashes, right?
>
>
> On 3 September 2014 12:18, Alejandro Exojo  wrote:
>
>> El Saturday 30 August 2014, Krisztian Olah escribió:
>> > Hi all,
>> > just a quick question. Where does Sailfish dump cores? I checked (as
>> root)
>> > sydtemd-coredumpctl, but it seems empty. According to
>> > /proc/sys/kernel/core_pattern the name should be "core" so I did a find,
>> > but that came up short as well. While it is entierly possible that I
>> don't
>> > have a core file although I crashed a few days ago, I wouldn't know
>> because
>> > I'm not quite sure where I'm supposed to look for it.
>>
>> AFAIK, core dumps are disabled by default in most systems.
>>
>> $ ulimit -c
>> 0
>>
>> See /etc/security/limits.conf.
>>
>> --
>> Alex (a.k.a. suy) | GPG ID 0x0B8B0BC2
>> http://barnacity.net/ | http://disperso.net
>> ___
>> 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] core dump location

2014-09-03 Thread Krisztian Olah
Thanks Alejandro,
I'm unfamiliar with both ulimit and Sailfish in this regard.
If I understand correctly I need to:
devel-su echo  "*   softcore1000" >>
/etc/security/limits.conf
devel-su echo  "*   softhard1000" >>
/etc/security/limits.conf
devel-su service nemodb restart

Then I will have coredumps generated in working dir, journal or some other
directory somewhere in /var provided my app crashes, right?


On 3 September 2014 12:18, Alejandro Exojo  wrote:

> El Saturday 30 August 2014, Krisztian Olah escribió:
> > Hi all,
> > just a quick question. Where does Sailfish dump cores? I checked (as
> root)
> > sydtemd-coredumpctl, but it seems empty. According to
> > /proc/sys/kernel/core_pattern the name should be "core" so I did a find,
> > but that came up short as well. While it is entierly possible that I
> don't
> > have a core file although I crashed a few days ago, I wouldn't know
> because
> > I'm not quite sure where I'm supposed to look for it.
>
> AFAIK, core dumps are disabled by default in most systems.
>
> $ ulimit -c
> 0
>
> See /etc/security/limits.conf.
>
> --
> Alex (a.k.a. suy) | GPG ID 0x0B8B0BC2
> http://barnacity.net/ | http://disperso.net
> ___
> 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

[SailfishDevel] core dump location

2014-08-30 Thread Krisztian Olah
Hi all,
just a quick question. Where does Sailfish dump cores? I checked (as root)
sydtemd-coredumpctl, but it seems empty. According to
/proc/sys/kernel/core_pattern the name should be "core" so I did a find,
but that came up short as well. While it is entierly possible that I don't
have a core file although I crashed a few days ago, I wouldn't know because
I'm not quite sure where I'm supposed to look for it.

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

Re: [SailfishDevel] sqlite absolute path

2014-08-07 Thread Krisztian Olah
Thanks Andrey,
I thought it was supposed to get created automatically.
It works flawlessly now
Thanks again
Kris


On 7 August 2014 21:09, Andrey Kozhevnikov  wrote:

>  QDir dir(QStandardPaths::writableLocation(QStandardPaths::DataLocation));
> if (!dir.exists()) {
>
> dir.mkpath(QStandardPaths::writableLocation(QStandardPaths::DataLocation));
> }
>
> 08.08.2014 03:06, Krisztian Olah пишет:
>
> Hi again,
>   I fixed the issue with applicationName() and also figured out why
> setApplicationName() didn't work for me. Basically I had a global Database
> object that got initalized before main() was called, therefore setting
> applicationName in main would have no effect in Database. Database is now
> an object created on the heap to which all objects that need to use it get
> a pointer.
>   QStandardPaths::writableLocation(QStandardPaths::DataLocation) now
> correctly returns "/home/nemo/.local/share/harbour-myapp/" however,
> setting it as a path does not work for me /harbour-myapp directory
> doesn't get created and my database doesn't get saved.
> Saving my data to /home/nemo/.local/share/ still works if I set the path
> manually, I just cannot save the data in my corresponding subdirectory with
> QStandardPaths::writableLocation(QStandardPaths::DataLocation)
>
>  Help would be greatly appricated
> Kris
>
>
> On 6 August 2014 14:20, Krisztian Olah  wrote:
>
>> Hi,
>> I just noticed that application name is not set and
>> QCoreApplication::applicationName() returns empty string. Neither
>> QCoreApplication::setApplicationName(arg) nor
>> QGuiApplication::setApplicationName(arg) seem to make a difference.
>> My db file is currently just dumped to /home/nemo/.local/share appending
>> with "/harbour-myapp/" is not possible, I guess that
>> QCoreApplication::applicationName needs to be set in order to get the
>> proper path.
>>
>>  Internet search came up only with one relevant page that just turned
>> into a rant, but gave me little to no insight.
>>
>>  How do I set applicationName?
>> https://lists.sailfishos.org/pipermail/devel/2014-February/003258.html
>> seems to imly that it should happen automatically, so does Qt's
>> documentation here:
>> http://qt-project.org/doc/qt-5/qcoreapplication.html#applicationName-prop
>>
>>  Thanks in advance
>> Kris
>>
>>
>> On 4 August 2014 00:01,  wrote:
>>
>>> Thanks again, works like a charm.
>>>
>>> On Sun Aug 03 2014 14:06:32 GMT+0100 (BST), Lukas Vogel wrote:
>>>  > You shouldn't write in /usr/* directory. Rather use standard path:
>>> > See
>>> https://lists.sailfishos.org/pipermail/devel/2014-February/003258.html
>>> >
>>> >
>>> > See also:
>>> > http://comments.gmane.org/gmane.comp.handhelds.sailfishos.devel/3632
>>> >
>>> >
>>> >
>>> > 2014-08-03 15:00 GMT+02:00 Krisztian Olah :
>>> >
>>> > > Hi I need a bit of help with saving my database. When I do:
>>> > >
>>> > > QSqlDatabase db;
>>> > > db.setDatabaseName("/usr/share//data/data.sqlite")
>>> > > db.open()
>>> > > ...
>>> > >
>>> > > I get this error: "QSqlQuery::exec: database not open"
>>> > > thus the file isn't created at all.
>>> > > However if I change name to "data.sqlite" it works fine, but saves
>>> it to
>>> > > /home/nemo/
>>> > > Could someone tell me what I need to do in order to save the file
>>> under
>>> > > the correct path?
>>> > >
>>> > > Thanks in advance
>>> > > Kris
>>> > >
>>> > > ___
>>> > > SailfishOS.org Devel mailing list
>>> > > To unsubscribe, please send a mail to
>>> > > devel-unsubscr...@lists.sailfishos.org
>>> > >
>>> >
>>>
>>>   --
>>> Sent from my Jolla
>>>
>>
>>
>
>
> ___
> 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] sqlite absolute path

2014-08-07 Thread Krisztian Olah
Hi again,
  I fixed the issue with applicationName() and also figured out why
setApplicationName() didn't work for me. Basically I had a global Database
object that got initalized before main() was called, therefore setting
applicationName in main would have no effect in Database. Database is now
an object created on the heap to which all objects that need to use it get
a pointer.
  QStandardPaths::writableLocation(QStandardPaths::DataLocation) now
correctly returns "/home/nemo/.local/share/harbour-myapp/" however, setting
it as a path does not work for me /harbour-myapp directory doesn't get
created and my database doesn't get saved.
Saving my data to /home/nemo/.local/share/ still works if I set the path
manually, I just cannot save the data in my corresponding subdirectory with
QStandardPaths::writableLocation(QStandardPaths::DataLocation)

Help would be greatly appricated
Kris


On 6 August 2014 14:20, Krisztian Olah  wrote:

> Hi,
> I just noticed that application name is not set and
> QCoreApplication::applicationName() returns empty string. Neither
> QCoreApplication::setApplicationName(arg) nor
> QGuiApplication::setApplicationName(arg) seem to make a difference.
> My db file is currently just dumped to /home/nemo/.local/share appending
> with "/harbour-myapp/" is not possible, I guess that
> QCoreApplication::applicationName needs to be set in order to get the
> proper path.
>
> Internet search came up only with one relevant page that just turned into
> a rant, but gave me little to no insight.
>
> How do I set applicationName?
> https://lists.sailfishos.org/pipermail/devel/2014-February/003258.html
> seems to imly that it should happen automatically, so does Qt's
> documentation here:
> http://qt-project.org/doc/qt-5/qcoreapplication.html#applicationName-prop
>
> Thanks in advance
> Kris
>
>
> On 4 August 2014 00:01,  wrote:
>
>> Thanks again, works like a charm.
>>
>> On Sun Aug 03 2014 14:06:32 GMT+0100 (BST), Lukas Vogel wrote:
>> > You shouldn't write in /usr/* directory. Rather use standard path:
>> > See
>> https://lists.sailfishos.org/pipermail/devel/2014-February/003258.html
>> >
>> >
>> > See also:
>> > http://comments.gmane.org/gmane.comp.handhelds.sailfishos.devel/3632
>> >
>> >
>> >
>> > 2014-08-03 15:00 GMT+02:00 Krisztian Olah :
>> >
>> > > Hi I need a bit of help with saving my database. When I do:
>> > >
>> > > QSqlDatabase db;
>> > > db.setDatabaseName("/usr/share//data/data.sqlite")
>> > > db.open()
>> > > ...
>> > >
>> > > I get this error: "QSqlQuery::exec: database not open"
>> > > thus the file isn't created at all.
>> > > However if I change name to "data.sqlite" it works fine, but saves it
>> to
>> > > /home/nemo/
>> > > Could someone tell me what I need to do in order to save the file
>> under
>> > > the correct path?
>> > >
>> > > Thanks in advance
>> > > Kris
>> > >
>> > > ___
>> > > SailfishOS.org Devel mailing list
>> > > To unsubscribe, please send a mail to
>> > > devel-unsubscr...@lists.sailfishos.org
>> > >
>> >
>>
>> --
>> Sent from my Jolla
>>
>
>
___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

Re: [SailfishDevel] sqlite absolute path

2014-08-06 Thread Krisztian Olah
Hi,
I just noticed that application name is not set and
QCoreApplication::applicationName() returns empty string. Neither
QCoreApplication::setApplicationName(arg) nor
QGuiApplication::setApplicationName(arg) seem to make a difference.
My db file is currently just dumped to /home/nemo/.local/share appending
with "/harbour-myapp/" is not possible, I guess that
QCoreApplication::applicationName needs to be set in order to get the
proper path.

Internet search came up only with one relevant page that just turned into a
rant, but gave me little to no insight.

How do I set applicationName?
https://lists.sailfishos.org/pipermail/devel/2014-February/003258.html
seems to imly that it should happen automatically, so does Qt's
documentation here:
http://qt-project.org/doc/qt-5/qcoreapplication.html#applicationName-prop

Thanks in advance
Kris


On 4 August 2014 00:01,  wrote:

> Thanks again, works like a charm.
>
> On Sun Aug 03 2014 14:06:32 GMT+0100 (BST), Lukas Vogel wrote:
> > You shouldn't write in /usr/* directory. Rather use standard path:
> > See
> https://lists.sailfishos.org/pipermail/devel/2014-February/003258.html
> >
> >
> > See also:
> > http://comments.gmane.org/gmane.comp.handhelds.sailfishos.devel/3632
> >
> >
> >
> > 2014-08-03 15:00 GMT+02:00 Krisztian Olah :
> >
> > > Hi I need a bit of help with saving my database. When I do:
> > >
> > > QSqlDatabase db;
> > > db.setDatabaseName("/usr/share//data/data.sqlite")
> > > db.open()
> > > ...
> > >
> > > I get this error: "QSqlQuery::exec: database not open"
> > > thus the file isn't created at all.
> > > However if I change name to "data.sqlite" it works fine, but saves it
> to
> > > /home/nemo/
> > > Could someone tell me what I need to do in order to save the file under
> > > the correct path?
> > >
> > > Thanks in advance
> > > Kris
> > >
> > > ___
> > > SailfishOS.org Devel mailing list
> > > To unsubscribe, please send a mail to
> > > devel-unsubscr...@lists.sailfishos.org
> > >
> >
>
> --
> Sent from my Jolla
>
___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

Re: [SailfishDevel] Platform icons

2014-08-04 Thread Krisztian Olah
Thanks everyone.

@Marcin that's exactly what I was gonna do. ;)


On 4 August 2014 16:44, Marcin M.  wrote:

> You might simply want to scp all of them from the Emulator to your desktop
> system.
>
> --
> Marcin
>
>
> 2014-08-04 16:11 GMT+02:00 :
>
> Hi,
>>
>> Am Mon Aug 04 2014 15:21:58 GMT+0200 (CEST) schrieb
>> fasza2mob...@gmail.com:
>> > Hi all,
>> > Is there a way to see a list/dictionary  of platform icons, such as
>> image://theme/icon-[s/m/l]-iconname; Preferebly with the corresponding
>> pictures, but a path in the OS will do just fine.
>> >
>>
>> One way would be to install Cargo Dock on your device or the emulator and
>> (Developer mode enabled) navigate to
>> /usr/share/themes/jolla-ambient/meegotouch/icons/ to see them all.
>>
>>
>> Regards,
>> Martin
>> ___
>> 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

[SailfishDevel] sqlite absolute path

2014-08-03 Thread Krisztian Olah
Hi I need a bit of help with saving my database. When I do:

QSqlDatabase db;
db.setDatabaseName("/usr/share//data/data.sqlite")
db.open()
...

I get this error: "QSqlQuery::exec: database not open"
thus the file isn't created at all.
However if I change name to "data.sqlite" it works fine, but saves it to
/home/nemo/
Could someone tell me what I need to do in order to save the file under the
correct path?

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

Re: [SailfishDevel] Versions

2014-07-20 Thread Krisztian Olah
Hi Chris, I've been using a bash script to do just that. I am not very good
at bash, mind you, so there is plenty of room for improvement, but you can
have a look at it and modify to your likes/needs. You are free to do
whatever you want with it; to  modify, to share, to not share...

Regards Kris

Post Script(pun intended):

#!/bin/bash

NEWVERSION=$1

isVersionValid () {
   if [ `echo $NEWVERSION | grep "[0-9][0-9]*.[0-9][0-9]*.[0-9][0-9]*"` ==
$NEWVERSION ]
   then
 return 0
   else
 return 1
   fi
}

setNewVersion() {
  sed -i s/[0-9][0-9]*.[0-9][0-9]*.[0-9][0-9]*/$NEWVERSION/ $1
}

isVersionChanged() {
  if [ `cat $1 | grep -o "[0-9][0-9]*.[0-9][0-9]*.[0-9][0-9]*"` ==
$NEWVERSION ]
  then
return 0
  else
echo
"!"
echo $1 " is not changed to " $NEWVERSION
echo "You should check the write permissions:"
echo
echo `ls -l $1`
echo
"!"
return 1
  fi
}
###
#Sanity check
if [ $# != 1 ]
then
  echo "Error! Please use only one argument."
  exit 1
fi


if isVersionValid
then
  setNewVersion ./rpm/london-sail.yaml
  setNewVersion ./rpm/london-sail.spec
  setNewVersion ./pages/AboutPage.qml
else
  echo $NEWVERSION "is not a valid version number. Try using the
number.number.number convention."
  exit 2
fi

if  isVersionChanged ./rpm/london-sail.yaml && isVersionChanged
./rpm/london-sail.spec && isVersionChanged ./pages/AboutPage.qml
then
  echo "Version is successfully changed to" $NEWVERSION
else
  echo "Error!"
  exit 3
fi



On 20 July 2014 11:26, Chris Walker 
wrote:

> Is there any way to have my 'About' page pick up the Version and
> Release information from the yaml file?
>
> At the moment, I'm hard coding the versioninfo in the About page but
> I'd like it to be updated automagically in the future.
>
> I looked around but couldn't see this information anywhere so I'm
> guessing that this question hasn't been asked/answered before but if it
> has, please feel free to point me in the right direction.
> ___
> 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] Pagestack problems

2014-07-10 Thread Krisztian Olah
First off, you should place each class to its own heeader and source file
to reduce future compile time. When you change only one class
 you won't have to recompile everything thus it's easier to find the
classes.

You should use one of the Qt Sql Model classes:
http://qt-project.org/doc/qt-4.8/sql-model.html

something like:

logic <---> qml
logic <---> databaseManager
databaseManager <---> databaseModel
view <---> databaseModel

logic has a member function/slot to return a pointer to the model that
qml displays in a view.

logic also has a function/slot that takes the required data from qml that
is needed to add  a new entry in the database. This function invokes a
member function of databaseManager that does the real work, hence only
databaseManager touches the database the view will interact with the model
to which it has a pointer from logic which in turn asks  for the pointer
from databaseManager. When a new entry is added databaseManager updates its
model that emits the needed signals that informs any connected views about
the changes.






On 10 July 2014 15:14,  wrote:

> Hello, looking a bit at your code, you are using a pagestack.push, meaning
> that you effectively adds another page to your pagestack.
>
> For adding a new beer, I think that the best would be using a Dialog
> component.
>
> - Mail original -
> De: "Chris Walker" 
> À: devel@lists.sailfishos.org
> Envoyé: Jeudi 10 Juillet 2014 15:53:10
> Objet: Re: [SailfishDevel] Pagestack problems
>
> On Thu, 10 Jul 2014 19:45:28 +0600
> Andrey Kozhevnikov  wrote:
>
> > you do not need to reload page, so there wouldn't any navigation
> > problems at all :)
>
> I'm afraid you have me thoroughly confused now.
>
> Can you do me a favour and take a look at my code and let me know where
> I'm going wrong and what I should be doing?
>
> It's here - https://github.com/tonercloud/beertent/tree/master/beertent
>
> The only change I've made since I uploaded that is to add #include
>  to beertent.cpp
>
> Ta.
> ___
> 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] Measuring distance with GPS

2014-07-07 Thread Krisztian Olah
Hi Niels and Kristof,
  You can just link QtPositioning, if you are using C++ you can use
QGeoCoordinate::distanceTo(const QGeoCoordinate &), there is an equivalent
for QML, check out:
 http://qt-project.org/doc/qt-5/qml-coordinate.html#distanceto

It's probably gonna be faster than whatever you can conjure in JS. ;)

   Regards Kris



On 7 July 2014 18:52, Niels Christian Ørgaard  wrote:

> Hi Timur,
>
> I was literally googling something similar earlier today (contemplating a
> quick health-app), and came across this:
> http://qt-project.org/forums/viewthread/19189
>
> You should be able to just compare current and previous location, and
> calculate distance between these; if you do this at regular intervals
> (every few seconds?), and add up each short distance, you will get the
> total travelled distance.
>
> There are various methods for calculating distance between 2 sets of
> longitude and latitude, though for precision you may want to include
> altitude as well.
> Example:
> http://www.ridgesolutions.ie/index.php/2013/11/14/algorithm-to-calculate-speed-from-two-gps-latitude-and-longitude-points-and-time-difference/
>
> Cheers,
> Nc.
>
>
> 2014-07-07 20:13 GMT+02:00 Timur Kristóf :
>
>> Hi,
>>
>> I'd like to ask a simple question: what is the simplest way to make a
>> Sailfish app that measures the distance the user has walked. Preferably
>> using QML only, but I'm not afraid of writing QML code either.
>>
>> Thanks,
>> Timur
>>
>> ___
>> 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

[SailfishDevel] Locked in QA

2014-06-07 Thread Krisztian Olah
Hi Sailors,
  I submited an update to my app "London Sail" yesterday, today noon I
found a blocker bug in one of the features, so I was trying to remove the
app going through QA before it goes out, but unfortunately it was already
locked (being processed?) in QA. I did remove the binary through the web
interface, and it seemed to stopped my app going live.
I fixed the bug and uploaded the new binary, but now it shows up as "Locked
in QA" and I cannot (re)submit it. I realize that I am the one at fault and
I do appologize if it causes/caused any inconvenience, but could you please
unblock my App? I did submit the new binary, but if it is preferable I can
manually resubmit it once the lock is removed.
Thanks very much and sorry again
Kris
___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

Re: [SailfishDevel] ScrollDecorators' Colour

2014-06-02 Thread Krisztian Olah
Thanks Andrey, now it makes complete sense. Just one more question: Then
ScrollDecorator is NOT derived from Vertical- and HorizontalScrollDecorator
but composes/contains them, right?


On 3 June 2014 05:11, Andrey Kozhevnikov  wrote:

>  ScrollDecorator component cannot be colored. Only Vertical and Horizontal
> separately.
> Vertical/HorizontalScrollDecorator inherits Rectangle, so you should
> understand now how to use it ;)
>
> 03.06.2014 11:07, Krisztian Olah пишет:
>
> Ouch, that did hurt. I only checked ScrollDecocartor in QtCreator not the
> horizontal or vertical one.  Mind you it is not documented at
> https://sailfishos.org/sailfish-silica/sailfish-silica-all.html for
> either of them.
>
>  Sorry for the silly question. :$
>
>
> On 3 June 2014 04:46, Andrey Kozhevnikov  wrote:
>
>>  ORLY?
>>
>> SilicaListView / SilicaFlickable {
>> ...
>>     VerticalScrollDecorator { color: "red" }
>> }
>>
>> 03.06.2014 10:41, Krisztian Olah пишет:
>>
>>  Hi list,
>>
>>Is it possible to change the colour of the ScrollDecorator component?
>> I couldn't find anything regarding this in the Silica reference nor
>> anywhere else. I remembered that the browser has been opened so I checked
>> in the source, but it seems to have been reimplemented in QML.
>>   ScrollDecorator doesn't seem to have a color property, so if it is left
>> out is it due to some technical reason?
>>
>>  Thanks in advance for any insight
>> Kris
>>
>>
>>  PS.: It would be nice if all theme dependent colours in the Silica
>> Reference were available to be pryed uppon under "Theme". I found
>> "highlightDimmerColor" and "highlightBackgroundColor" in Sailfish browser's
>> source; I saw highlightBackgroundColor somewhere before, but I can't recall
>> in what document, in any case neither of them are in Theme's documentation.
>>
>>
>>  ___
>> 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
>
>
>
> ___
> 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] ScrollDecorators' Colour

2014-06-02 Thread Krisztian Olah
Ouch, that did hurt. I only checked ScrollDecocartor in QtCreator not the
horizontal or vertical one.  Mind you it is not documented at
https://sailfishos.org/sailfish-silica/sailfish-silica-all.html for either
of them.

Sorry for the silly question. :$


On 3 June 2014 04:46, Andrey Kozhevnikov  wrote:

>  ORLY?
>
> SilicaListView / SilicaFlickable {
> ...
> VerticalScrollDecorator { color: "red" }
> }
>
> 03.06.2014 10:41, Krisztian Olah пишет:
>
> Hi list,
>
>Is it possible to change the colour of the ScrollDecorator component?
> I couldn't find anything regarding this in the Silica reference nor
> anywhere else. I remembered that the browser has been opened so I checked
> in the source, but it seems to have been reimplemented in QML.
>   ScrollDecorator doesn't seem to have a color property, so if it is left
> out is it due to some technical reason?
>
>  Thanks in advance for any insight
> Kris
>
>
>  PS.: It would be nice if all theme dependent colours in the Silica
> Reference were available to be pryed uppon under "Theme". I found
> "highlightDimmerColor" and "highlightBackgroundColor" in Sailfish browser's
> source; I saw highlightBackgroundColor somewhere before, but I can't recall
> in what document, in any case neither of them are in Theme's documentation.
>
>
> ___
> 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

[SailfishDevel] ScrollDecorators' Colour

2014-06-02 Thread Krisztian Olah
Hi list,

  Is it possible to change the colour of the ScrollDecorator component? I
couldn't find anything regarding this in the Silica reference nor anywhere
else. I remembered that the browser has been opened so I checked in the
source, but it seems to have been reimplemented in QML.
  ScrollDecorator doesn't seem to have a color property, so if it is left
out is it due to some technical reason?

Thanks in advance for any insight
Kris


PS.: It would be nice if all theme dependent colours in the Silica
Reference were available to be pryed uppon under "Theme". I found
"highlightDimmerColor" and "highlightBackgroundColor" in Sailfish browser's
source; I saw highlightBackgroundColor somewhere before, but I can't recall
in what document, in any case neither of them are in Theme's documentation.
___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

Re: [SailfishDevel] QThread priority

2014-05-29 Thread Krisztian Olah
Andrey, you are right if I'm not using the signals/slots, but calling it
directly causes it to run in current thread. It works just fine now, thanks.

Denis, I did check out QtConcurrent::run(), but since I return void from
the function and I have to call the function multiple times possibly in the
same thread so that I can append to QXmlStreamReader's data, I think it is
easier to just use QThread in this case. However thank you for your input,
I'm sure I will make use of QtConcurrent in the QFuture.  (pun intended) ;)


On 29 May 2014 12:23, Krisztian Olah  wrote:

>   Thanks Denis, I'll look into QtConcurrent + QFutureWatcher tonight when
> I'll have time. I will also consult pthread's documentation after comparing
> the two approaches.
>
> Thanks again
> Kris
>
>
> On 29 May 2014 11:01, Denis Zalevskiy 
> wrote:
>
>> On Thursday 29 May 2014 13:55:40 Denis Zalevskiy wrote:
>> > To run parser in parallel just to get results in the main thread it is
>> > better to use QtConcurrent::run() + QFutureWatcher.
>> >
>>
>> Also, to set priority I guess you can use posix pthread functions, smth.
>> like
>>
>> ::pthread_setschedprio(::pthread_self(), SCHED_IDLE);
>>
>> - denis
>>
>> > - denis
>> >
>> > > > Thanks again
>> > > > Kris
>> > > >
>> > > >
>> > > > On 28 May 2014 06:16, Andrey Kozhevnikov > > > >
>> > > > <mailto:coderusin...@gmail.com>> wrote:
>> > > > it can't "doesn't help much". you initializing thread wrong.
>> > > >
>> > > > simple threading way is:
>> > > >
>> > > > MyXmlParser *parser = new MyXmlParser(xmlDocument);
>> > > > QThread *thread = new QThread(parser);
>> > > > parser->moveToThread(thread);
>> > > > QObject::connect(thread, SIGNAL(started()), parser,
>> SLOT(parse()));
>> > > > QObject::connect(parser, SIGNAL(parseComplete(QVariantMap)),
>> this,
>> > > > SLOT(onParseComplete(QVariantMap)));
>> > > > thread->start();
>> > > >
>> > > > 28.05.2014 03:24, Krisztian Olah ?:
>> > > >>   Hi list,
>> > > >>
>> > > >>   I have a rather large xml file to parse and it causes the UI
>> to
>> > > >>
>> > > >> freeze, I assingned the parser to a different thread, but it
>> > > >> doesn't help much. According to the Qt documentation
>> > > >> QThread::setPriority() doesn't work on Linux, is there some
>> kind
>> > > >> of workaround that could be used?
>> > > >>
>> > > >> Thanks
>> > > >> Kris
>> > > >>
>> > > >>
>> > > >> ___
>> > > >> SailfishOS.org Devel mailing list
>> > > >> To unsubscribe, please send a mail
>> > > >> todevel-unsubscr...@lists.sailfishos.org
>> > > >> <mailto:devel-unsubscr...@lists.sailfishos.org>>
>> > > >
>> > > > ___
>> > > > SailfishOS.org Devel mailing list
>> > > > To unsubscribe, please send a mail to
>> > > > devel-unsubscr...@lists.sailfishos.org
>> > > > <mailto: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
>>
>> ___
>> 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] QThread priority

2014-05-29 Thread Krisztian Olah
  Thanks Denis, I'll look into QtConcurrent + QFutureWatcher tonight when
I'll have time. I will also consult pthread's documentation after comparing
the two approaches.

Thanks again
Kris


On 29 May 2014 11:01, Denis Zalevskiy 
wrote:

> On Thursday 29 May 2014 13:55:40 Denis Zalevskiy wrote:
> > To run parser in parallel just to get results in the main thread it is
> > better to use QtConcurrent::run() + QFutureWatcher.
> >
>
> Also, to set priority I guess you can use posix pthread functions, smth.
> like
>
> ::pthread_setschedprio(::pthread_self(), SCHED_IDLE);
>
> - denis
>
> > - denis
> >
> > > > Thanks again
> > > > Kris
> > > >
> > > >
> > > > On 28 May 2014 06:16, Andrey Kozhevnikov  > > >
> > > > <mailto:coderusin...@gmail.com>> wrote:
> > > > it can't "doesn't help much". you initializing thread wrong.
> > > >
> > > > simple threading way is:
> > > >
> > > > MyXmlParser *parser = new MyXmlParser(xmlDocument);
> > > > QThread *thread = new QThread(parser);
> > > > parser->moveToThread(thread);
> > > > QObject::connect(thread, SIGNAL(started()), parser,
> SLOT(parse()));
> > > > QObject::connect(parser, SIGNAL(parseComplete(QVariantMap)),
> this,
> > > > SLOT(onParseComplete(QVariantMap)));
> > > > thread->start();
> > > >
> > > > 28.05.2014 03:24, Krisztian Olah ?:
> > > >>   Hi list,
> > > >>
> > > >>   I have a rather large xml file to parse and it causes the UI
> to
> > > >>
> > > >> freeze, I assingned the parser to a different thread, but it
> > > >> doesn't help much. According to the Qt documentation
> > > >> QThread::setPriority() doesn't work on Linux, is there some kind
> > > >> of workaround that could be used?
> > > >>
> > > >> Thanks
> > > >> Kris
> > > >>
> > > >>
> > > >> ___
> > > >> SailfishOS.org Devel mailing list
> > > >> To unsubscribe, please send a mail
> > > >> todevel-unsubscr...@lists.sailfishos.org
> > > >> <mailto:devel-unsubscr...@lists.sailfishos.org>>
> > > >
> > > > ___
> > > > SailfishOS.org Devel mailing list
> > > > To unsubscribe, please send a mail to
> > > > devel-unsubscr...@lists.sailfishos.org
> > > > <mailto: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
>
> ___
> 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] QThread priority

2014-05-28 Thread Krisztian Olah
Hi Andrey,
   Thanks for the answer, your snippet looks very similar to what I have.
Perhaps if I posted my code segment would be of help in helping me figuring
out where I'm wrong.
   During parsing CPU usage reaches 97-100% which causes my GUI to hang(I
have about 500 000 opening and closing tags and half of the enclosed items
I need to process: save, in some cases insert spaces, etc), especially
awkward when I start parsing whilst still fetching the data from
network(sometimes hangs during pageStack.push() ), but it's bad for up to
2-5 seconds nevertheless. I wouldn't mind if parsing took 10 seconds if GUI
was responsive. This is what I'm doing:

void SomeClass::someMethod() {
  MyContainer* container = new MyContainer();
  //reader has a handle to container, through which it
populates the container
  MyXmlStreamReader* parser = new MyXmlStreamReader(container);
  QThread* parserThread = new QThread();
  parser->moveToThread(parserThread);


connect(parser, SIGNAL(finished()), this, SLOT(onParsingFinished) );

connect(parser, SIGNAL(finished()), parserThread, SLOT(quit()) );

connect(parser, SIGNAL(finished()), parser, SLOT(deleteLater()) );

connect(parserThread, SIGNAL(finished()), parserThread,
SLOT(deleteLater()) );


parserThread->start();


reply = networkMngr->get(QNetworkRequest(someUrl)); //both
pointers are class members


connect(reply, SIGNAL(finished()), this, SLOT(onAllDataRecieved()) );


//this starts the parser with the data available at the time,

  // when parser reaches the end of xml document it emits
its finished() signal

connect(reply, SIGNAL(readyRead()), this, SLOT(parseReadyData()) );

}


Thanks again

Kris



On 28 May 2014 06:16, Andrey Kozhevnikov  wrote:

>  it can't "doesn't help much". you initializing thread wrong.
>
> simple threading way is:
>
> MyXmlParser *parser = new MyXmlParser(xmlDocument);
> QThread *thread = new QThread(parser);
> parser->moveToThread(thread);
> QObject::connect(thread, SIGNAL(started()), parser, SLOT(parse()));
> QObject::connect(parser, SIGNAL(parseComplete(QVariantMap)), this,
> SLOT(onParseComplete(QVariantMap)));
> thread->start();
>
> 28.05.2014 03:24, Krisztian Olah пишет:
>
>   Hi list,
>   I have a rather large xml file to parse and it causes the UI to freeze,
> I assingned the parser to a different thread, but it doesn't help much.
> According to the Qt documentation QThread::setPriority() doesn't work on
> Linux, is there some kind of workaround that could be used?
>
>  Thanks
> Kris
>
>
> ___
> 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

[SailfishDevel] QThread priority

2014-05-27 Thread Krisztian Olah
  Hi list,
  I have a rather large xml file to parse and it causes the UI to freeze, I
assingned the parser to a different thread, but it doesn't help much.
According to the Qt documentation QThread::setPriority() doesn't work on
Linux, is there some kind of workaround that could be used?

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

[SailfishDevel] SilicaListView inside a Column and SilicaFlickable

2014-05-10 Thread Krisztian Olah
Hi everyone, I found this snippet in the Qt Devdays Beiing document(p16), I
want to do something similar; Having a SilicaListView in a Column which in
return is in a SilicaFlickable.

SilicaFlickable {
PullDownMenu { ... }
Column {
SlideshowView {
model: monthModel
delegate: DateGrid { ... }
...
}
SilicaListView {
model: agendaModel
delegate: EventItem { ... }
...
}
}
}

The problem is, that in Column top and bottom anchor doesn't work, my list
items show up on the  top of the page stacked on top of each other
(pesumably, because just one item is visible). If I move my SilicaListView
outside Column then it kind of works, provided I anchor top to
column.bottom and bottom to parent.bottom(though I get a binding loop with
flick.contentHeight). The thing is I don't want SilicaListView to be
interactive I want only SilicaFlickable to be scrollable and I want it to
scroll to the bottom of listview.
   If I needed to know listview's contentHeight, provided top and bottom
aren't anchored then listview.height or listview.contentHeight won't give
the right answer, am I correct? Is the correct way to get contentHeight:
   cHeight = children.height + spacing*count
?


SilicaFlickable {
id: flick
...
Column {
id: column
...
SilicaListView {
id: listview
spacing: 10
interactive: false
...
}
}
}

Any help would be much appreciated,
Thanks in advance
Kris
___
SailfishOS.org Devel mailing list