summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorMateusz Łukasik <mati75@linuxmint.pl>2015-07-07 19:59:33 +0200
committerMateusz Łukasik <mati75@linuxmint.pl>2015-07-07 19:59:33 +0200
commitac1e595cfef357d7ef481dbbefb88996af72eb79 (patch)
treec6a8a171488f1296d0b816c7cf6ae45f874cb453 /src/main.cpp
parent6027a8ff2d6ae4eba912427c30c58208009c1ebc (diff)
Imported Upstream version 14.9.0.6994~ds0
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 0c68125..cfae263 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -19,6 +19,8 @@
#include "myapplication.h"
#include "smplayer.h"
+#include <QDir>
+
int main( int argc, char ** argv )
{
MyApplication a( "smplayer", argc, argv );
@@ -30,6 +32,11 @@ int main( int argc, char ** argv )
*/
a.setQuitOnLastWindowClosed(false);
+
+#ifdef Q_OS_WIN
+ // Change the working directory to the application path
+ QDir::setCurrent(a.applicationDirPath());
+#endif
#if QT_VERSION >= 0x040400
// Enable icons in menus