mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
Close the application started notification when the job failed to open
So far, we leave the splash on which is confusing. https://invent.kde.org/teams/plasma-mobile/issues/-/issues/70
This commit is contained in:
parent
89dbff8995
commit
3fc96fbc25
3 changed files with 12 additions and 0 deletions
|
|
@ -399,6 +399,12 @@ void ApplicationListModel::runApplication(const QString &storageId)
|
|||
KIO::ApplicationLauncherJob *job = new KIO::ApplicationLauncherJob(service);
|
||||
job->setUiDelegate(new KNotificationJobUiDelegate(KJobUiDelegate::AutoHandlingEnabled));
|
||||
job->start();
|
||||
connect(job, &KJob::finished, this, [this, job] {
|
||||
if (job->error()) {
|
||||
qWarning() << "error launching" << job->error() << job->errorString();
|
||||
Q_EMIT launchError(job->errorString());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
int ApplicationListModel::maxFavoriteCount() const
|
||||
|
|
|
|||
|
|
@ -116,6 +116,7 @@ Q_SIGNALS:
|
|||
void favoriteCountChanged();
|
||||
void maxFavoriteCountChanged();
|
||||
void appletChanged();
|
||||
void launchError(const QString &msg);
|
||||
|
||||
protected:
|
||||
void initWayland();
|
||||
|
|
|
|||
|
|
@ -204,6 +204,11 @@ Item {
|
|||
|
||||
// boundsBehavior: Flickable.StopAtBounds
|
||||
|
||||
Connections {
|
||||
target: HomeScreenComponents.ApplicationListModel
|
||||
onLaunchError: NanoShell.StartupFeedback.close()
|
||||
}
|
||||
|
||||
model: HomeScreenComponents.ApplicationListModel
|
||||
|
||||
header: Rectangle {
|
||||
|
|
|
|||
Loading…
Reference in a new issue