Commit e794a848 authored by Nicolas Fella's avatar Nicolas Fella
Browse files

Delay quitting import until notification was shown

If we quit immediately then the notification is never shown
parent 286a0d55
Pipeline #217314 passed with stage
in 1 minute and 16 seconds
......@@ -33,13 +33,20 @@ void Palapeli::ImportHelper::doWork()
//show notification
const Palapeli::MetadataComponent* cmp = puzzle->component<Palapeli::MetadataComponent>();
if (cmp)
auto *noti = KNotification::event(QStringLiteral("importingPuzzle"),
i18n("Importing puzzle \"%1\" into your collection", cmp->,
// Delay quitting until the notification expires
// Otherwise the notification is never shown
connect(noti, &KNotification::closed, this, []{
qApp->quit ();
} else {
qApp->quit ();
qApp->quit ();
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment