From e0d26d94d7db9dd24f0d46dde13f3d516ed71d0d Mon Sep 17 00:00:00 2001 From: sniperbeamer Date: Thu, 8 Oct 2009 19:27:39 +0000 Subject: [PATCH] Use DocumentsLocation as default dir git-svn-id: https://svn.code.sf.net/p/keepassx/code/trunk@348 b624d157-de02-0410-bad0-e51aec6abb33 --- src/lib/FileDialogs.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/lib/FileDialogs.cpp b/src/lib/FileDialogs.cpp index 8405f97..463df1b 100644 --- a/src/lib/FileDialogs.cpp +++ b/src/lib/FileDialogs.cpp @@ -18,6 +18,9 @@ ***************************************************************************/ #include +#if QT_VERSION >= 0x040400 + #include +#endif IFileDialog* KpxFileDialogs::iFileDialog=NULL; QtStandardFileDialogs DefaultQtDlgs; @@ -146,8 +149,13 @@ int QtStandardFileDialogs::getLastFilter(){ QString FileDlgHistory::getDir(const QString& name){ Entry e=History.value(name); - if(e.isNull()) + if(e.isNull()) { +#if QT_VERSION >= 0x040400 + return QDesktopServices::storageLocation(QDesktopServices::DocumentsLocation); +#else return QDir::homePath(); +#endif + } else return e.Dir; }