|
|
|
|
@ -150,8 +150,6 @@ class NotificationThread : public QThread |
|
|
|
|
{ |
|
|
|
|
Q_OBJECT |
|
|
|
|
void run() override { |
|
|
|
|
// Prevent application exit until the thread (and hence the sound) completes
|
|
|
|
|
QEventLoopLocker(this); |
|
|
|
|
// We cannot parent to the thread itself so let's create
|
|
|
|
|
// a QObject on the stack and parent everythign to it
|
|
|
|
|
QObject parent; |
|
|
|
|
@ -196,6 +194,9 @@ class NotificationThread : public QThread |
|
|
|
|
m->play(); |
|
|
|
|
exec(); |
|
|
|
|
} |
|
|
|
|
private: |
|
|
|
|
// Prevent application exit until the thread (and hence the sound) completes
|
|
|
|
|
QEventLoopLocker m_locker; |
|
|
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
@ -261,6 +262,8 @@ Startup::Startup(QObject *parent): |
|
|
|
|
|
|
|
|
|
connect(sequence.last(), &KJob::finished, this, &Startup::finishStartup); |
|
|
|
|
sequence.first()->start(); |
|
|
|
|
|
|
|
|
|
// app will be closed when all KJobs finish thanks to the QEventLoopLocker in each KJob
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void Startup::upAndRunning( const QString& msg ) |
|
|
|
|
@ -277,7 +280,6 @@ void Startup::finishStartup() |
|
|
|
|
{ |
|
|
|
|
qCDebug(PLASMA_SESSION) << "Finished"; |
|
|
|
|
upAndRunning(QStringLiteral("ready")); |
|
|
|
|
qApp->quit(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void Startup::updateLaunchEnv(const QString &key, const QString &value) |
|
|
|
|
|