diff --git a/client/main.cpp b/client/main.cpp
index 94d3baf..65864f0 100644
--- a/client/main.cpp
+++ b/client/main.cpp
@@ -38,23 +38,11 @@ extern ProtocolWidgetFactory *OstProtocolWidgetFactory;
QSettings *appSettings;
QMainWindow *mainWindow;
-#if defined(Q_OS_WIN32)
-QString kGzipPathDefaultValue;
-QString kDiffPathDefaultValue;
-QString kAwkPathDefaultValue;
-#endif
-
int main(int argc, char* argv[])
{
QApplication app(argc, argv);
int exitCode;
-#if defined(Q_OS_WIN32)
- kGzipPathDefaultValue = app.applicationDirPath() + "/gzip.exe";
- kDiffPathDefaultValue = app.applicationDirPath() + "/diff.exe";
- kAwkPathDefaultValue = app.applicationDirPath() + "/gawk.exe";
-#endif
-
app.setApplicationName("Ostinato");
app.setOrganizationName("Ostinato");
app.setProperty("version", version);
diff --git a/client/preferences.cpp b/client/preferences.cpp
index cbd9a58..06a18b1 100644
--- a/client/preferences.cpp
+++ b/client/preferences.cpp
@@ -25,6 +25,12 @@ along with this program. If not, see
#include
#include
+#if defined(Q_OS_WIN32)
+QString kGzipPathDefaultValue;
+QString kDiffPathDefaultValue;
+QString kAwkPathDefaultValue;
+#endif
+
QString kUserDefaultValue;
Preferences::Preferences()
@@ -53,9 +59,14 @@ Preferences::~Preferences()
void Preferences::initDefaults()
{
- Q_ASSERT(appSettings);
- // Read username from the environment
+#if defined(Q_OS_WIN32)
+ kGzipPathDefaultValue = QApplication::applicationDirPath() + "/gzip.exe";
+ kDiffPathDefaultValue = QApplication::applicationDirPath() + "/diff.exe";
+ kAwkPathDefaultValue = QApplication::applicationDirPath() + "/gawk.exe";
+#endif
+
+ // Read default username from the environment
#ifdef Q_OS_WIN32
kUserDefaultValue = QString(qgetenv("USERNAME").constData());
#else