]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/LyXFileDialog.cpp
Fix the tab ordering of GuiDocument components.
[lyx.git] / src / frontends / qt4 / LyXFileDialog.cpp
index e0f94e7386c638e4fe4b2a8e66ae0712b6c335d4..5fabf915c204c357f83930394c06d6cf7205f40d 100644 (file)
@@ -14,7 +14,6 @@
 
 #include "qt_helpers.h"
 
-#include "support/FileFilterList.h"
 #include "support/lstrings.h"
 
 #include <QApplication>
@@ -44,18 +43,21 @@ static QString getLabel(QString const & qstr)
 
 LyXFileDialog::LyXFileDialog(QString const & title,
                             QString const & path,
-                            support::FileFilterList const & filters,
+                            QStringList const & filters,
                             FileDialog::Button const & b1,
                             FileDialog::Button const & b2)
                                 // FIXME replace that with guiApp->currentView()
-       : QFileDialog(qApp->focusWidget(), title, path, toqstr(filters.as_string()))
+       : QFileDialog(qApp->focusWidget(), title, path)
 {
-       QDir dir(path);
+       setFilters(filters);
+#if QT_VERSION < 0x040304
        // FIXME: workaround for a bug in qt which makes LyX crash
-       // with hidden paths (bug 4513). Recheck with recent Qt versions.
+       // with hidden paths (bug 4513). Fixed as of Qt 4.3.4
+       QDir dir(path);
        if (path.contains("/."))
                dir.setFilter(QDir::Hidden);
        setDirectory(dir);
+#endif
        setWindowTitle(title);
 
        QList<QHBoxLayout *> layout = findChildren<QHBoxLayout *>();
@@ -91,4 +93,4 @@ void LyXFileDialog::button2Clicked()
 
 } // namespace lyx
 
-#include "LyXFileDialog_moc.cpp"
+#include "moc_LyXFileDialog.cpp"