From 8c85019869e2bb1bd973d3c3f83d0fd28d048bb4 Mon Sep 17 00:00:00 2001 From: ColinDuquesnoy Date: Sat, 2 Dec 2017 20:11:47 +0100 Subject: [PATCH] WithCommandLineArguments: use autoQuitDelay --- .../Infrastructure/Application/WithCommandLineArguments.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/MellowPlayer/Infrastructure/Application/WithCommandLineArguments.cpp b/lib/MellowPlayer/Infrastructure/Application/WithCommandLineArguments.cpp index 32c10f5a..76412209 100644 --- a/lib/MellowPlayer/Infrastructure/Application/WithCommandLineArguments.cpp +++ b/lib/MellowPlayer/Infrastructure/Application/WithCommandLineArguments.cpp @@ -13,5 +13,9 @@ WithCommandLineArguments::WithCommandLineArguments(IApplication& application, void WithCommandLineArguments::initialize() { commandLineArguments_.parse(); + + if (commandLineArguments_.autoQuitDelay() != 0) + QTimer::singleShot(commandLineArguments_.autoQuitDelay(), [&]() { application_.quit(); } ); + ApplicationDecorator::initialize(); }