Author: mir3x
Date: Wed Feb  3 19:19:48 2016
New Revision: 31735

URL: http://svn.gna.org/viewcvs/freeciv?rev=31735&view=rev
Log:
Fixed QFileDialog::getSaveFileName creating $HOME subdirectory.

Reported by G√ľnter Heine and Markus Koschany <apo>.

See bug #24359


Modified:
    trunk/client/gui-qt/fc_client.cpp

Modified: trunk/client/gui-qt/fc_client.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/fc_client.cpp?rev=31735&r1=31734&r2=31735&view=diff
==============================================================================
--- trunk/client/gui-qt/fc_client.cpp   (original)
+++ trunk/client/gui-qt/fc_client.cpp   Wed Feb  3 19:19:48 2016
@@ -110,6 +110,7 @@
 ****************************************************************************/
 void fc_client::init()
 {
+  QString path;
   central_wdg = new QWidget;
   central_layout = new QGridLayout;
   chat_completer = new QCompleter;
@@ -152,8 +153,10 @@
   pages[PAGE_NETWORK]->setVisible(false);
 
   // PAGE_GAME
-  QSettings::setPath(QSettings::NativeFormat, QSettings::UserScope,
-                     "$HOME/.config");
+  path = QStandardPaths::writableLocation(QStandardPaths::ConfigLocation);
+  if (path.isEmpty() == false) {
+    QSettings::setPath(QSettings::NativeFormat, QSettings::UserScope, path);
+  }
   read_settings();
   pages[PAGE_GAME] = new QWidget(central_wdg);
   init_mapcanvas_and_overview();


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to