diff options
author | Ken Moore <moorekou@gmail.com> | 2015-08-21 08:19:10 -0400 |
---|---|---|
committer | Ken Moore <moorekou@gmail.com> | 2015-08-21 08:19:10 -0400 |
commit | cdb86c894a919c847b87999d729c94956ef58a63 (patch) | |
tree | b1ece566c95443b1bdd3c09256936be2acc30833 /libLumina/LuminaSingleApplication.cpp | |
parent | Another quick fix to the single-instance framework - add a manual existance c... (diff) | |
download | lumina-cdb86c894a919c847b87999d729c94956ef58a63.tar.gz lumina-cdb86c894a919c847b87999d729c94956ef58a63.tar.bz2 lumina-cdb86c894a919c847b87999d729c94956ef58a63.zip |
Add a bit more text output for the single instance framework. This makes it really clear what is happening if anything *does* go wrong.
Diffstat (limited to 'libLumina/LuminaSingleApplication.cpp')
-rw-r--r-- | libLumina/LuminaSingleApplication.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/libLumina/LuminaSingleApplication.cpp b/libLumina/LuminaSingleApplication.cpp index 2ecbc276..900e7f23 100644 --- a/libLumina/LuminaSingleApplication.cpp +++ b/libLumina/LuminaSingleApplication.cpp @@ -96,13 +96,17 @@ void LSingleApplication::PerformLockChecks(){ }else{ //forward the current inputs to the locked process for processing and exit //Check the connection to the local server first + qDebug() << "Single-instance lock found"; QLocalSocket socket(this); socket.connectToServer(cfile); socket.waitForConnected(); - if(!socket.isValid()){ exit(1); } //error - could not forward info + if(!socket.isValid() || socket.state()!=QLocalSocket::ConnectedState){ + //error - could not forward info for some reason + qDebug() << " - Could not connect to locking process: exiting..."; + exit(1); + } - qDebug() << "Single-instance lock found"; - qDebug() << " - Forwarding inputs to locking process and exiting..."; + qDebug() << " - Forwarding inputs to locking process and closing down this instance..."; socket.write( inputlist.join("::::").toLocal8Bit() ); socket.waitForDisconnected(500); //max out at 1/2 second (only hits this if no inputs) } |