Re: [SailfishDevel] ListView with SectionDelegate (Strange Behaviour)

2014-01-31 Thread Andrey Kozhevnikov
you might need to use specific field for section name and write 
uppercase first letter to it.


On 01.02.2014 02:32, Norbert Wenzel wrote:
Sorry for tofu, I'm not able to manage the Google webmail reply 
interface correctly, and I don't have my Thunderbird with me atm.


I just wanted to say that since updating to the new Sailfish version 
(1.0.3.8) the problem seems to be gone. I can't confirm that for the 
your test, but the page I made in my app and tested on my device shows 
correctly. The only problem is that the comparison is case sensitive, 
I don't know if that is the intended behaviour, but I assume that can 
be specified/fixed in QML.


regards,
Norbert




On Thu, Jan 30, 2014 at 7:09 PM, > wrote:


Sali Norbert

thanks for your confirmation.

I have not filed a bug report with the Qt-Project, as my tests on
Desktop, Android etc indicate that this is not a general Qt 5.x
bug, but a Sailfish specific one. (Despite my expectations, I got
expected behaviour on those platforms).

My understanding is that this is currently the best place to
report Sailfish development bugs.

If there is a more appropriate place, then I will gladly report it
there.

Chris

Zitat von "Norbert Wenzel" mailto:norbert.wenzel.li...@gmail.com>>:

On 01/29/2014 07:56 PM, christopher.l...@thurweb.ch
 wrote:

This time it is a ListView / SilicaListVew with a
SectionDelegate based
on FirstCharacter.

For the items initially displayed this works well, with
the section
headers exactly where I would expect them[...]
But as I flick up, I then a section header between each
item (e.g
between Gargantua and Gilbert).


I can also confirm that behaviour. In your example and also in
an app I'm coding myself.

Did you already file a bug or are you still investigating?

Norbert
___
SailfishOS.org Devel mailing list







___
SailfishOS.org Devel mailing list


___
SailfishOS.org Devel mailing list

Re: [SailfishDevel] ListView with SectionDelegate (Strange Behaviour)

2014-01-31 Thread Norbert Wenzel
Sorry for tofu, I'm not able to manage the Google webmail reply interface
correctly, and I don't have my Thunderbird with me atm.

I just wanted to say that since updating to the new Sailfish version
(1.0.3.8) the problem seems to be gone. I can't confirm that for the your
test, but the page I made in my app and tested on my device shows
correctly. The only problem is that the comparison is case sensitive, I
don't know if that is the intended behaviour, but I assume that can be
specified/fixed in QML.

regards,
Norbert




On Thu, Jan 30, 2014 at 7:09 PM,  wrote:

> Sali Norbert
>
> thanks for your confirmation.
>
> I have not filed a bug report with the Qt-Project, as my tests on Desktop,
> Android etc indicate that this is not a general Qt 5.x bug, but a Sailfish
> specific one. (Despite my expectations, I got expected behaviour on those
> platforms).
>
> My understanding is that this is currently the best place to report
> Sailfish development bugs.
>
> If there is a more appropriate place, then I will gladly report it there.
>
> Chris
>
> Zitat von "Norbert Wenzel" :
>
>  On 01/29/2014 07:56 PM, christopher.l...@thurweb.ch wrote:
>>
>>> This time it is a ListView / SilicaListVew with a SectionDelegate based
>>> on FirstCharacter.
>>>
>>> For the items initially displayed this works well, with the section
>>> headers exactly where I would expect them[...]
>>> But as I flick up, I then a section header between each item (e.g
>>> between Gargantua and Gilbert).
>>>
>>
>> I can also confirm that behaviour. In your example and also in an app I'm
>> coding myself.
>>
>> Did you already file a bug or are you still investigating?
>>
>> Norbert
>> ___
>> SailfishOS.org Devel mailing list
>>
>>
>
>
>
___
SailfishOS.org Devel mailing list

Re: [SailfishDevel] ListView with SectionDelegate (Strange Behaviour)

2014-01-30 Thread Gabriel Böhme
Hi again,

I can add, that the append/insert "bug" is also happening in Qt 5.2. But
maybe it's not really a bug, because appending means -> okay add it at
the end of the list. With a model coming from C++ side, it could be
possible to order it, the way you want it, every time a new item is
added. But for QML only models it seems impossible and should maybe
added, so a feature request is maybe the better choice in this case? :-/

But Chris' problem seems to be really a bug, but I've also checked the
Silica QML files a bit, but can't see what cause the issues. Maybe Jolla
modified the Qt 5.x sources, so maybe there is a bug? 

Cheers, Gabriel.

Am Donnerstag, den 30.01.2014, 19:09 +0100 schrieb
christopher.l...@thurweb.ch:
> Sali Norbert
> 
> thanks for your confirmation.
> 
> I have not filed a bug report with the Qt-Project, as my tests on  
> Desktop, Android etc indicate that this is not a general Qt 5.x bug,  
> but a Sailfish specific one. (Despite my expectations, I got expected  
> behaviour on those platforms).
> 
> My understanding is that this is currently the best place to report  
> Sailfish development bugs.
> 
> If there is a more appropriate place, then I will gladly report it there.
> 
> Chris
> 
> Zitat von "Norbert Wenzel" :
> 
> > On 01/29/2014 07:56 PM, christopher.l...@thurweb.ch wrote:
> >> This time it is a ListView / SilicaListVew with a SectionDelegate based
> >> on FirstCharacter.
> >>
> >> For the items initially displayed this works well, with the section
> >> headers exactly where I would expect them[...]
> >> But as I flick up, I then a section header between each item (e.g
> >> between Gargantua and Gilbert).
> >
> > I can also confirm that behaviour. In your example and also in an  
> > app I'm coding myself.
> >
> > Did you already file a bug or are you still investigating?
> >
> > Norbert
> > ___
> > SailfishOS.org Devel mailing list
> >
> 
> 
> 
> ___
> SailfishOS.org Devel mailing list



signature.asc
Description: This is a digitally signed message part
___
SailfishOS.org Devel mailing list

Re: [SailfishDevel] ListView with SectionDelegate (Strange Behaviour)

2014-01-30 Thread christopher . lamb

Sali Norbert

thanks for your confirmation.

I have not filed a bug report with the Qt-Project, as my tests on  
Desktop, Android etc indicate that this is not a general Qt 5.x bug,  
but a Sailfish specific one. (Despite my expectations, I got expected  
behaviour on those platforms).


My understanding is that this is currently the best place to report  
Sailfish development bugs.


If there is a more appropriate place, then I will gladly report it there.

Chris

Zitat von "Norbert Wenzel" :


On 01/29/2014 07:56 PM, christopher.l...@thurweb.ch wrote:

This time it is a ListView / SilicaListVew with a SectionDelegate based
on FirstCharacter.

For the items initially displayed this works well, with the section
headers exactly where I would expect them[...]
But as I flick up, I then a section header between each item (e.g
between Gargantua and Gilbert).


I can also confirm that behaviour. In your example and also in an  
app I'm coding myself.


Did you already file a bug or are you still investigating?

Norbert
___
SailfishOS.org Devel mailing list





___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] ListView with SectionDelegate (Strange Behaviour)

2014-01-30 Thread Norbert Wenzel

On 01/29/2014 07:56 PM, christopher.l...@thurweb.ch wrote:

This time it is a ListView / SilicaListVew with a SectionDelegate based
on FirstCharacter.

For the items initially displayed this works well, with the section
headers exactly where I would expect them[...]
But as I flick up, I then a section header between each item (e.g
between Gargantua and Gilbert).


I can also confirm that behaviour. In your example and also in an app 
I'm coding myself.


Did you already file a bug or are you still investigating?

Norbert
___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] ListView with SectionDelegate (Strange Behaviour)

2014-01-30 Thread christopher . lamb

Hi Gabriel

Thank you for taking the time to reproduce this issue. It is  
reassuring to know that based on the admittedly slim evidence of this  
issue alone I am not going completely mad!


I agree that the 2 issues sound related (I will have a poke around  
with your code later today).


Based on the assumption that this is probably a Qt issue rather than a  
Sailfish issue I was about to open an issue on the Qt Bug tracker.


Then standing on the platform waiting for my train to arrive I  
thought: How difficult could it be to fire up my Qt5.2 installation  
and create a Desktop version of this project to reproduce this issue?


By the time the train pulled in I had my first ever Qt Desktop project  
running! I had expected to see the same sections bug, but unexpectedly  
I got the expected behaviour! i.e on Qt 5.2.0 desktop I cannot  
reproduce this bug.


My next thought was: "Maybe this is still a Qt problem, but has been  
fixed in Qt 5.2.0?


Luckily I have an old Qt 5.0.0 installation lurking on my laptop. So I  
added a Qt version and kit for that, and launched the project as  
Qt5.0.0.


Again no Section header bug.

Then I turned to Android with Qt 5.2.0, and once again got expected  
behaviour (no bug).


So to cut a long story short, this behaviour appears to be limited to  
Sailfish (or the particular Qt version used by Sailfish)


I can reproduce it on the Emulator and real Jolla Device.

I cannot reproduce it on Harmattan Qt 4.7.4 (from which I am porting the code)

I cannot reproduce it on Qt Desktop (5.0.0 and 5.2.0)

I cannot reproduce it on Android Qt 5.2.0 (Emulator and Galaxy Note 3  
with KitKat).


Grüsse

Chris





Zitat von "Gabriel Böhme" :


Hi Chris,

I can reproduce this behavior with the code you posted and it seems to
be a bug.
I have encountered some days ago also a problem with section handling.
If you are appending a new Item to the list, while you use FullString
section headers, it's creating a new section, even if it is already
there. The expected behavior should be, that the new item is sorted
under the right section. Especially in my intended use case, it's a
problem because I want to fetch some data from an online source and sort
it in different sections. But how to do that, without appending? Insert
is also not possible at all, because it's varying always. Even if the
model is set after, appending (again) - it's not working. Also a code
example added at the bottom (just modified your code). The new
person/item with name "Tom" should be displayed in Boss section, but the
ListView creates another "Boss" section at the end of the list.

Maybe both are relating to each other?

Thank you very much.

Gabriel.

import QtQuick 2.0
import Sailfish.Silica 1.0

Page {
id: page

SilicaListView {
id:  contactList

anchors.fill: parent
model: contactModel
delegate: Label {
text: model.name
width: page.width
}
section.property: "section"
section.criteria: ViewSection.FullString
section.delegate: Rectangle {
height: 50
width: page.width
color: Theme.secondaryHighlightColor
opacity: 0.5

Label {
anchors.horizontalCenter: parent.horizontalCenter
text: section
}
}

PullDownMenu {
MenuItem {
text: "Add a person"
onClicked: {
// comment out to set the model again, but thats not 
working at
all. :-/
// contactList.model = emptyList
contactModel.insert({"name": "Tom", "section":
"Boss"})
// contactList.model = contactModel
}
}
}
}

ListModel {id: emptyList}

ListModel {
id: contactModel
ListElement {
name: "Achim"
section: "Boss"
}
ListElement {
name: "Ana"
section: "Friends"
}
ListElement {
name: "Bezelbub"
section: "Friends"
}
ListElement {
name: "Billy"
section: "Friends"
}
ListElement {
name: "Boris"
section: "Friends"
}
ListElement {
name: "Carrie"
section: "Friends"
}
ListElement {
name: "Cassie"
section: "Friends"
}
ListElement {
name: "Eziekiel"
section: "Family"
}
ListElement {
name: "Gargantua"
section: "Family"
}
ListElement {
name: "Gilbert"
section: "Family"
}
ListElement {
name: "Giles"
section: "Family"
}
ListElement {
name: "Gog"
section: "Workgroup"
}
ListElement {
name: "Mabel"
  

Re: [SailfishDevel] ListView with SectionDelegate (Strange Behaviour)

2014-01-29 Thread Gabriel Böhme
Hi Chris,

I can reproduce this behavior with the code you posted and it seems to
be a bug. 
I have encountered some days ago also a problem with section handling.
If you are appending a new Item to the list, while you use FullString
section headers, it's creating a new section, even if it is already
there. The expected behavior should be, that the new item is sorted
under the right section. Especially in my intended use case, it's a
problem because I want to fetch some data from an online source and sort
it in different sections. But how to do that, without appending? Insert
is also not possible at all, because it's varying always. Even if the
model is set after, appending (again) - it's not working. Also a code
example added at the bottom (just modified your code). The new
person/item with name "Tom" should be displayed in Boss section, but the
ListView creates another "Boss" section at the end of the list.

Maybe both are relating to each other? 

Thank you very much.

Gabriel.

import QtQuick 2.0
import Sailfish.Silica 1.0

Page {
id: page

SilicaListView {
id:  contactList

anchors.fill: parent
model: contactModel
delegate: Label {
text: model.name
width: page.width
}
section.property: "section"
section.criteria: ViewSection.FullString
section.delegate: Rectangle {
height: 50
width: page.width
color: Theme.secondaryHighlightColor
opacity: 0.5

Label {
anchors.horizontalCenter: parent.horizontalCenter
text: section
}
}

PullDownMenu {
MenuItem {
text: "Add a person"
onClicked: {
// comment out to set the model again, but thats not 
working at
all. :-/
// contactList.model = emptyList
contactModel.insert({"name": "Tom", "section":
"Boss"})
// contactList.model = contactModel
}
}
}
}

ListModel {id: emptyList}

ListModel {
id: contactModel
ListElement {
name: "Achim"
section: "Boss"
}
ListElement {
name: "Ana"
section: "Friends"
}
ListElement {
name: "Bezelbub"
section: "Friends"
}
ListElement {
name: "Billy"
section: "Friends"
}
ListElement {
name: "Boris"
section: "Friends"
}
ListElement {
name: "Carrie"
section: "Friends"
}
ListElement {
name: "Cassie"
section: "Friends"
}
ListElement {
name: "Eziekiel"
section: "Family"
}
ListElement {
name: "Gargantua"
section: "Family"
}
ListElement {
name: "Gilbert"
section: "Family"
}
ListElement {
name: "Giles"
section: "Family"
}
ListElement {
name: "Gog"
section: "Workgroup"
}
ListElement {
name: "Mabel"
section: "Workgroup"
}
ListElement {
name: "Magog"
section: "Workgroup"
}
}
}



Am Mittwoch, den 29.01.2014, 19:56 +0100 schrieb
christopher.l...@thurweb.ch:
> Hi all
> 
> I have come across some more strange behaviour.
> 
> This time it is a ListView / SilicaListVew with a SectionDelegate  
> based on FirstCharacter.
> 
> For the items initially displayed this works well, with the section  
> headers exactly where I would expect them (e.g between Anne and Babs  
> in the code below)
> 
> But as I flick up, I then a section header between each item (e.g  
> between Gargantua and Gilbert).
> 
> The code below demonstrates this on the emulator.
> 
> Grüsse
> 
> Chris
> 
> 
> import QtQuick 2.0
> import Sailfish.Silica 1.0
> 
> Page {
>  id: page
> 
>  SilicaListView {
>  id:  contactList
>  anchors.fill: parent
>  model: contactModel
>  delegate: Label {
>  text: model.displayLabel
>  width: page.width
>  }
>  section.property: "displayLabel"
>  section.criteria: ViewSection.FirstCharacter
>  section.delegate: Rectangle {
>  height: 10
>  width: page.width
>  color: "lightblue"
>  }
>  }
> 
>  ListModel {
>  id: contactModel
>  ListElement {
>  displayLabel: "Achim"
>  }
>  ListElement {
>  displayLabel: "Ana"
>  }
>  ListElement {
>  displayLabel: "Anne"
>  }
>  ListElement {
>  displayLabel: "Babs"
>  }
>  ListElement {
>  displayLabel

[SailfishDevel] ListView with SectionDelegate (Strange Behaviour)

2014-01-29 Thread christopher . lamb

Hi all

I have come across some more strange behaviour.

This time it is a ListView / SilicaListVew with a SectionDelegate  
based on FirstCharacter.


For the items initially displayed this works well, with the section  
headers exactly where I would expect them (e.g between Anne and Babs  
in the code below)


But as I flick up, I then a section header between each item (e.g  
between Gargantua and Gilbert).


The code below demonstrates this on the emulator.

Grüsse

Chris


import QtQuick 2.0
import Sailfish.Silica 1.0

Page {
id: page

SilicaListView {
id:  contactList
anchors.fill: parent
model: contactModel
delegate: Label {
text: model.displayLabel
width: page.width
}
section.property: "displayLabel"
section.criteria: ViewSection.FirstCharacter
section.delegate: Rectangle {
height: 10
width: page.width
color: "lightblue"
}
}

ListModel {
id: contactModel
ListElement {
displayLabel: "Achim"
}
ListElement {
displayLabel: "Ana"
}
ListElement {
displayLabel: "Anne"
}
ListElement {
displayLabel: "Babs"
}
ListElement {
displayLabel: "Barnie"
}
ListElement {
displayLabel: "Barry"
}
ListElement {
displayLabel: "Bezelbub"
}
ListElement {
displayLabel: "Billy"
}
ListElement {
displayLabel: "Boris"
}
ListElement {
displayLabel: "Carrie"
}
ListElement {
displayLabel: "Cassie"
}
ListElement {
displayLabel: "Charlie"
}
ListElement {
displayLabel: "Chris"
}
ListElement {
displayLabel: "Diana"
}
ListElement {
displayLabel: "Donald"
}
ListElement {
displayLabel: "Doris"
}
ListElement {
displayLabel: "Egbert"
}
ListElement {
displayLabel: "Ethel"
}
ListElement {
displayLabel: "Eziekiel"
}
ListElement {
displayLabel: "Franzi"
}
ListElement {
displayLabel: "Freddy"
}
ListElement {
displayLabel: "Gargantua"
}
ListElement {
displayLabel: "Gilbert"
}
ListElement {
displayLabel: "Giles"
}
ListElement {
displayLabel: "Gog"
}
ListElement {
displayLabel: "Mabel"
}
ListElement {
displayLabel: "Magog"
}
}
}




___
SailfishOS.org Devel mailing list