Sections
Report typeBug Status?Closed Resolution?Fixed
ProductQt Functional areaItemviews Version found4.2.3
Priority?1 - Highest Scheduled for?4.3.0

Description

QFileDialogs with AnyFile are broken in 4.2.3.  This is actually a QListView bug that shows up in QFileDialog.

What happens is that you get all the files in the ListView lined up horizontally without wrapping. In other words you get a horizontal scrollbar with a long range and a lot of unused screen real estate.

Example:

#include <QApplication>
#include <QFileDialog>
#include <QString>
#include <QLibraryInfo>

int main(int argc, char** argv)
{
    QApplication app(argc, argv);
    QFileDialog dialog(0, QString(),
                       QLibraryInfo::location(QLibraryInfo::ExamplesPath));
    dialog.setFileMode(QFileDialog::AnyFile);
    dialog.exec();
    return 0;
}

This patch fixes the problem:

--- src/gui/itemviews/qlistview.cpp    2007-03-12 23:26:23 -0000
+++ src/gui/itemviews/qlistview.cpp    2007-03-12 23:26:23 -0000

@@ -1454,6 +1454,7 @@
{
     Q_D(QListView);
     if (d->model->columnCount(d->root) > 0) { // no columns means no contents
+        d->batchStartRow = 0;
         if (layoutMode() == SinglePass)
             d->doItemsLayout(d->model->rowCount(d->root)); // layout everything
         else if (!d->batchLayoutTimer.isActive())

History

2007-03-07 22:08 - Entry created
2007-03-08 10:18 - Version for fix set to '4.3.0'
2007-03-08 10:18 - Priority changed to '1 - Highest'
2007-03-08 10:26 - Task status changed to 'Active'
2007-03-08 14:01 - Task status changed to 'Closed'
2007-03-08 14:01 - Resolution set to 'Fixed'
2007-03-13 20:03 - Version found set to '4.2.3'

Patron of KDECustomers

Customers