| Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date | |
| All threads index page 2 | |
Hi,
On windows with Qt 4.2.3 there seems to be a problem with QFileDialog. It is very slow when using
the non-native version of it.
I reduced it to the following (use any values for the parameters below the effect is the same):
// This opens the native dialog instantly
QStringList files = QFileDialog::getOpenFileNames ( this, "Test Dialog",
".", "files (*.*)");
// This takes around 6 seconds to create the Qt based dialog
QStringList files = QFileDialog::getOpenFileNames ( this, "Test Dialog",
".", "files (*.*)", 0,
QFileDialog::DontUseNativeDialog);
Can someone check if this causes them a significant slowdown on windows too?
I traced the slowdown occurs in qt as the static method calls the following qt code when creating
the problematic dialog:
qfiledialog.cpp:1640 ( QString path = model->filePath(index); )
qdirmodel.cpp:1275 ( if (d->resolveSymlinks && fi.isSymLink()) )
qfileinfo:1062 ( return d->getFileFlags(QAbstractFileEngine::LinkType); )
and so on. Only in the case the non-native dialog is requested. It appears that d->resolveSymlinks
is always true in qdirmodel.cpp:1275, regardless of whether one appends the flag
QFileDialog::DontResolveSymlinks or not. I have no links in the startup folder of the dialog. Does
the dialog first go to root (and therefore has trouble resolving network mount links) and then cd
into the given directory? Is this a bug or did i miss something?
--stathis
Attachment:
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature