On Wed, Oct 10, 2012 at 6:56 PM, Pierre Stirnweiss <pstirnweiss@googlemail.com> wrote:
On Wed, Oct 10, 2012 at 8:31 AM, Ben Cooksley <bcooksley@kde.org> wrote:
On Tue, Oct 9, 2012 at 7:36 PM, Pierre Stirnweiss
<pstirnweiss@googlemail.com> wrote:
> On Mon, Oct 8, 2012 at 11:57 PM, Ben Cooksley <bcooksley@kde.org> wrote:
>>
>> On Tue, Oct 9, 2012 at 8:27 AM, Pierre Stirnweiss
>> <pstirnweiss@googlemail.com> wrote:
>> > Hello everybody,
>>
>> Hi Pierre,
>>
>> >
>> > As I am new to this list, first a little introduction:
>> > My name is Pierre Stirnweiss. I am french and 37 years old and currently
>> > live in Munich, Germany. I work on Calligra Words.
>> >
>> > Now to the stuff:
>> >
>> > I am having problems using the KCategorizedView.
>> >
>> > Here is the code: http://paste.kde.org/564680/
>> >
>> > The code is used in Calligra Words for the StylesManager dialog.
>> >
>> > What happens is:
>> >
>> > The items are properly displayed on opening the dialog. However, if I
>> > scroll
>> > the viewport with the mouse wheel, nothing happens. If I scroll it using
>> > the
>> > scrollbar's cursor, it starts by scrolling the items, then when the last
>> > one
>> > is reached, I can continue scrolling, but again, only the first items
>> > are
>> > displayed.
>> > Also it seems that subSortLessThan is never called. lessThan neither
>> > actually.
>> >
>> > If i use a normal QListView, or if I don't setCategorizedModel(true),
>> > the
>> > viewport scrolls normally. Sorting does not happen either.
>> >
>> > I have already lost a lot of hair on this and hope somebody can help me.
>>
>> I notice you have not set a Category Drawer, which could be the cause of
>> this.
>> You may find the code in IconMode::initWidget() in
>> kde-workspace/systemsettings/icons/IconMode.cpp to be helpful here.
>>
>> >
>> > PierreSt
>> > Calligra Words developer
>>
>> Regards,
>> Ben Cooksley
>>
>> >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to
>> >> unsubscribe <<
>
>
> Thanks for your answer. The KCategoryDrawer is created line 666 and set line
> 670 (of the paste). Do I need to implement a special one? The category title
> is actually properly drawn (AFAICS)

Oops, missed that. I do see that you have parented the drawer to the
KCategorizedView though.
As a wild guess - try not parenting the KCategoryDrawer instances to
their respective views - I can't recall exactly but there might have
been a problem with doing that as otherwise I wouldn't have deleted it
by hand in the IconMode code in System Settings.

>
> PierreSt

Regards,
Ben

Unfortunately it didn't work.

I will try with a simpler underlying model to see if i still have the weird behaviour.

PierreSt

I have removed the decoration role and sizeHīnt role of my model, now i get a simple list of strings. what happens now is that i scroll down to the last item, then i can scroll a bit further and the application crashes with the following backtrace:



Application: Calligra Words (calligrawords), signal: Segmentation fault

Using host libthread_db library "/lib64/libthread_db.so.1".

[KCrash Handler]

#5 0x00007f1bdf3f8dbf in ?? () from /usr/lib64/libQtGui.so.4

#6 0x00007f1bdf3e6fde in ?? () from /usr/lib64/libQtGui.so.4

#7 0x00007f1bdef1be4e in QWidgetPrivate::paintBackground(QPainter*, QRegion const&, int) const () from /usr/lib64/libQtGui.so.4

#8 0x00007f1bdef2190a in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib64/libQtGui.so.4

#9 0x00007f1bdef2246f in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib64/libQtGui.so.4

#10 0x00007f1bdef222b4 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib64/libQtGui.so.4

#11 0x00007f1bdef222b4 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib64/libQtGui.so.4

#12 0x00007f1bdef222b4 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib64/libQtGui.so.4

#13 0x00007f1bdef222b4 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib64/libQtGui.so.4

#14 0x00007f1bdef222b4 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib64/libQtGui.so.4

#15 0x00007f1bdef21505 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib64/libQtGui.so.4

#16 0x00007f1bdef2246f in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib64/libQtGui.so.4

#17 0x00007f1bdef21505 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib64/libQtGui.so.4

#18 0x00007f1bdef2246f in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib64/libQtGui.so.4

#19 0x00007f1bdef21505 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib64/libQtGui.so.4

#20 0x00007f1bdef2246f in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib64/libQtGui.so.4

#21 0x00007f1bdef21505 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib64/libQtGui.so.4

#22 0x00007f1bdef2246f in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib64/libQtGui.so.4

#23 0x00007f1bdef21505 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib64/libQtGui.so.4

#24 0x00007f1bdf0eb348 in ?? () from /usr/lib64/libQtGui.so.4

#25 0x00007f1bdef16610 in QWidgetPrivate::syncBackingStore() () from /usr/lib64/libQtGui.so.4

#26 0x00007f1bdef262ac in QWidget::event(QEvent*) () from /usr/lib64/libQtGui.so.4

#27 0x00007f1bdeed664c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQtGui.so.4

#28 0x00007f1bdeedaaca in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQtGui.so.4

#29 0x00007f1be39dbb98 in KoApplication::notify (this=<optimized out>, receiver=0x1d798c0, event=0x1e7c9a0) at /home/pierre/Hacking/source/calligra/libs/main/KoApplication.cpp:504

#30 0x00007f1bde00116e in QCoreApplication::notifyInternal (this=0x7fff81a93170, receiver=receiver@entry=0x1d798c0, event=event@entry=0x1e7c9a0) at kernel/qcoreapplication.cpp:915

#31 0x00007f1bde004ad1 in sendEvent (event=0x1e7c9a0, receiver=0x1d798c0) at kernel/qcoreapplication.h:231

#32 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0xcbf1f0) at kernel/qcoreapplication.cpp:1539

#33 0x00007f1bde02f243 in sendPostedEvents () at kernel/qcoreapplication.h:236

#34 postEventSourceDispatch (s=0xd5dc40) at kernel/qeventdispatcher_glib.cpp:279

#35 0x00007f1bd667d3b5 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0

#36 0x00007f1bd667d6e8 in ?? () from /usr/lib64/libglib-2.0.so.0

#37 0x00007f1bd667d7a4 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0

#38 0x00007f1bde02f3d6 in QEventDispatcherGlib::processEvents (this=0xcc4a70, flags=...) at kernel/qeventdispatcher_glib.cpp:424

#39 0x00007f1bdef767ae in ?? () from /usr/lib64/libQtGui.so.4

#40 0x00007f1bddfffebf in QEventLoop::processEvents (this=this@entry=0x7fff81a930c0, flags=...) at kernel/qeventloop.cpp:149

#41 0x00007f1bde000148 in QEventLoop::exec (this=0x7fff81a930c0, flags=...) at kernel/qeventloop.cpp:204

#42 0x00007f1bde004de8 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1187

#43 0x00007f1be3d3d5b1 in kdemain (argc=<optimized out>, argv=0x7fff81a93288) at /home/pierre/Hacking/source/calligra/words/part/main.cpp:43

#44 0x00007f1bdd0d1455 in __libc_start_main () from /lib64/libc.so.6

#45 0x0000000000400931 in _start () at ../sysdeps/x86_64/elf/start.S:113




Is this duplicates of https://bugs.kde.org/show_bug.cgi?id=235111 ?

Has anybody else experienced this?

PierreSt