From 9486e7f6c3394178bd886ebc9189835ab60221a8 Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Thu, 25 Oct 2018 16:57:20 +0200 Subject: Add test/ meson.build --- test/singleapplication-40/main.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 test/singleapplication-40/main.cpp (limited to 'test/singleapplication-40/main.cpp') diff --git a/test/singleapplication-40/main.cpp b/test/singleapplication-40/main.cpp new file mode 100644 index 0000000..246dd63 --- /dev/null +++ b/test/singleapplication-40/main.cpp @@ -0,0 +1,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 +#include +#include + +#include + +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(); +} + -- cgit v1.2.1