blob: 246dd6397db5ee3c1307e428aa9c353bdd3f5c70 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
/* https://github.com/itay-grudev/SingleApplication/issues/40
* SingleApplication doesn't work when two processes are started with millisecond delay
*
* To reproduce: run the app twice with './test/singleapp & ./test/singleapp'
*/
#include <QCoreApplication>
#include <QDebug>
#include <QTimer>
#include <singleapplication.h>
int main(int argc, char *argv[])
{
SingleApplication app(argc, argv);
qDebug() << "process started, pid:" << QCoreApplication::applicationPid();
QTimer::singleShot(3000, &app, SLOT(quit()));
return app.exec();
}
|