[vlc-devel] [PATCH]Fixed a typo in Qt's playlist interface
geo.couprie at gmail.com
Wed Apr 30 01:01:00 CEST 2008
On Tue, Apr 29, 2008 at 10:56 PM, Lukas Durfina <lukas.durfina at gmail.com> wrote:
> On Tue, 29 Apr 2008 20:33:43 +0200, Geoffroy Couprie
> <geo.couprie at gmail.com> wrote:
> > The -1 index made Qt and VLC crash when I clicked on "Show Playlist"
> > in "Playlist" menu.
> > --
> > Geoffroy Couprie
> I was afraid, that this will happen.
> Can you give me these info, please?
> - which OS and qt?
I'm on Ubuntu Hardy and I use Qt4
> - did you use qt-debug version?
The error I come up with is:
ASSERT: "logicalIndex >= 0" in file itemviews/qheaderview.cpp, line 1215
and then, VLC closes.
> -1 was used to disable sorting at startup,
> so when you use 0, can you see that
> playlist is sorted by first column?
The first column is empty, and there's no label. But it sorts the
playlist, and I think it uses the tracks.
> Have you any ideas how to disable
> this startup sorting?
I'm not a Qt expert, but I just read through the Qt doc, and they say
that from Qt 4.2, they use QVLCTreeView::setSortingEnabled(true) to
activate sorting (and that its default value is false). I tried with
setSortingEnabled(false) and -1 in sortByColumn, and it doesn't fix
There's something more that I see. At line 65 of
modules/gui/qt4/components/playlist/standardpanel.cpp, there is:
view->setSortingEnabled( true );
view->sortByColumn( -1, Qt::AscendingOrder );
Could the model be loaded before the sort is enabled? I tried, but i
run into the same error. Even with that, it seems nice to load the
playlist before sorting it :)
Maybe checking what Qt library is available could do the trick.
Why do you want to disable the sort? It doesn't work on others versions of Qt?
More information about the vlc-devel