]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/LyXFileDialog.cpp
On Mac, moving down a paragraph should place the cursor at the end of the current...
[lyx.git] / src / frontends / qt4 / LyXFileDialog.cpp
index e0f94e7386c638e4fe4b2a8e66ae0712b6c335d4..2bc7ba1a030d8eb6e2e0d2d26932c51a351362e4 100644 (file)
@@ -14,7 +14,6 @@
 
 #include "qt_helpers.h"
 
-#include "support/FileFilterList.h"
 #include "support/lstrings.h"
 
 #include <QApplication>
@@ -44,18 +43,13 @@ 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);
-       // FIXME: workaround for a bug in qt which makes LyX crash
-       // with hidden paths (bug 4513). Recheck with recent Qt versions.
-       if (path.contains("/."))
-               dir.setFilter(QDir::Hidden);
-       setDirectory(dir);
+       setNameFilters(filters);
        setWindowTitle(title);
 
        QList<QHBoxLayout *> layout = findChildren<QHBoxLayout *>();
@@ -91,4 +85,4 @@ void LyXFileDialog::button2Clicked()
 
 } // namespace lyx
 
-#include "LyXFileDialog_moc.cpp"
+#include "moc_LyXFileDialog.cpp"