]> Some of my projects - aniplayer2.git/commitdiff
Activate window when AniPlayer is told to open a new file.
authorAPTX <marek321@gmail.com>
Sun, 16 Feb 2014 13:07:53 +0000 (14:07 +0100)
committerAPTX <marek321@gmail.com>
Sun, 16 Feb 2014 13:07:53 +0000 (14:07 +0100)
aniplayer/aniplayerapplication.cpp

index b9dd7c8b9c98b572986a970c373ed57dbe9c1437..6443d33f131c888d53f1678e352dacdc7c1e6f04 100644 (file)
@@ -19,17 +19,20 @@ AniPlayerApplication::AniPlayerApplication(int &argc, char **argv) :
 
 void AniPlayerApplication::handleMessage(const QString &message)
 {
-               if (message.left(4) != "open")
-                       return;
+       if (message.left(4) != "open")
+               return;
 
-               QString file;
+       QString file;
 
-               int pos = -1;
-               if ((pos = message.indexOf(' ')) != -1)
-                       file = message.mid(pos + 1);
+       int pos = -1;
+       if ((pos = message.indexOf(' ')) != -1)
+               file = message.mid(pos + 1);
 
-               if (!file.isEmpty())
-                       emit openFileRequested(file);
+       if (file.isEmpty())
+               return;
+
+       emit openFileRequested(file);
+       activateWindow();
 }
 
 const char * const AniPlayerApplication::revision()