LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File qtVlm-fix-qt-homedir.patch of Package qtVlm (Project home:DocB)

diff -Naur a/src/main.cpp b/src/main.cpp
--- a/src/main.cpp	2014-02-06 10:33:13.000000000 -0600
+++ b/src/main.cpp	2014-08-23 07:10:37.946648512 -0500
@@ -104,6 +104,9 @@
     homeDir = settings.value("Personal").toString();
 
 
+#elif defined(Q_OS_LINUX)
+    qWarning() << "Using QT5 and Linux";
+    homeDir = QDir::homePath();
 #elif defined(Q_WS_X11)
     homeDir = QDir::homePath();
 #elif defined(Q_WS_MAC)
@@ -118,6 +121,21 @@
     QString dataDir = appExeFolder;
 
 
+#if defined (__UNIX_QTVLM)
+    qWarning() << "Setting target directories for files";
+    appFolder.insert("home",appExeFolder);
+    appFolder.insert("img",appExeFolder+"/img/");
+    appFolder.insert("flags",dataDir+"/img/flags/");
+    appFolder.insert("boatsImg",homeDir+"/qtVlm/img/boats/");
+    appFolder.insert("grib",homeDir+"/qtVlm/grib/");
+    appFolder.insert("maps",homeDir+"/qtVlm/maps/");
+    appFolder.insert("polar",homeDir+"/qtVlm/polar/");
+    appFolder.insert("test",homeDir+"/qtVlm/test/");
+    appFolder.insert("tr",appExeFolder+"/tr/");
+    appFolder.insert("tracks",homeDir+"/qtVlm/tracks/");
+    appFolder.insert("userFiles",homeDir+"/qtVlm/");
+    appFolder.insert("icon",appExeFolder+"/icon/");
+#else
     appFolder.insert("home",appExeFolder);
     appFolder.insert("img",appExeFolder+"/img/");
     appFolder.insert("flags",dataDir+"/img/flags/");
@@ -129,6 +146,7 @@
     appFolder.insert("tracks",dataDir+"/tracks/");
     appFolder.insert("userFiles",dataDir+"/");
     appFolder.insert("icon",appExeFolder+"/icon/");
+#endif
 
     qWarning() << "[main]: appFoloder for polar: " << appFolder.value("polar");