Pavel Sanda wrote:
> i took some time to explore qt sources and it seems that trolltech moved
> the part which contains any hidden-files related code of qfiledialog into
> private methods/classes (QFileDialogPrivate::_q_showHidden) and theres no
> API access to it, which is bit absurd since the dialog allows this view per
> users request in popup menu.

Could you try the attached patch (against branch)?

Jürgen
Index: src/frontends/qt4/LyXFileDialog.cpp
===================================================================
--- src/frontends/qt4/LyXFileDialog.cpp	(Revision 22895)
+++ src/frontends/qt4/LyXFileDialog.cpp	(Arbeitskopie)
@@ -49,9 +49,16 @@
 			     FileDialog::Button const & b2)
 				 // FIXME replace that with theApp->gui()->currentView()
 	: QFileDialog(qApp->focusWidget(),
-		      toqstr(t), toqstr(p), toqstr(filters.as_string())),
+		      toqstr(t), QString(), toqstr(filters.as_string())),
 		      b1_(0), b2_(0)
 {
+	QString const path = toqstr(p);
+	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);
 	setWindowTitle(toqstr(t));
 
 	QList<QHBoxLayout *> layout = findChildren<QHBoxLayout *>();

Reply via email to