mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-09-14 20:33:05 +02:00
No source code changes. Removed execute permissions from 7 files total: *.pro and *.pri files (4) main.cpp (2) *.txt file (1) Signed-off-by: Kim Kirwan <Kim@KimKirwan.com>
26 lines
582 B
C++
26 lines
582 B
C++
#include <singleapplication.h>
|
|
#include "messagereceiver.h"
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
// Allow secondary instances
|
|
SingleApplication app( argc, argv, true );
|
|
|
|
MessageReceiver msgReceiver;
|
|
|
|
// If this is a secondary instance
|
|
if( app.isSecondary() ) {
|
|
app.sendMessage( app.arguments().join(' ').toUtf8() );
|
|
return 0;
|
|
} else {
|
|
QObject::connect(
|
|
&app,
|
|
&SingleApplication::receivedMessage,
|
|
&msgReceiver,
|
|
&MessageReceiver::receivedMessage
|
|
);
|
|
}
|
|
|
|
return app.exec();
|
|
}
|