Changeset View
Changeset View
Standalone View
Standalone View
kdevplatform/shell/runcontroller.cpp
Show First 20 Lines • Show All 583 Lines • ▼ Show 20 Line(s) | 580 | { | |||
---|---|---|---|---|---|
584 | if (!(job->capabilities() & KJob::Killable)) { | 584 | if (!(job->capabilities() & KJob::Killable)) { | ||
585 | // see e.g. https://bugs.kde.org/show_bug.cgi?id=314187 | 585 | // see e.g. https://bugs.kde.org/show_bug.cgi?id=314187 | ||
586 | qCWarning(SHELL) << "non-killable job" << job << "registered - this might lead to crashes on shutdown."; | 586 | qCWarning(SHELL) << "non-killable job" << job << "registered - this might lead to crashes on shutdown."; | ||
587 | } | 587 | } | ||
588 | 588 | | |||
589 | if (!d->jobs.contains(job)) { | 589 | if (!d->jobs.contains(job)) { | ||
590 | QAction* stopJobAction = nullptr; | 590 | QAction* stopJobAction = nullptr; | ||
591 | if (Core::self()->setupFlags() != Core::NoUi) { | 591 | if (Core::self()->setupFlags() != Core::NoUi) { | ||
592 | stopJobAction = new QAction(job->objectName().isEmpty() ? i18n("<%1> Unnamed job", job->staticMetaObject.className()) : job->objectName(), this); | 592 | stopJobAction = new QAction(job->objectName().isEmpty() ? i18n("<%1> Unnamed job", QString::fromUtf8(job->staticMetaObject.className())) : job->objectName(), this); | ||
593 | stopJobAction->setData(QVariant::fromValue(static_cast<void*>(job))); | 593 | stopJobAction->setData(QVariant::fromValue(static_cast<void*>(job))); | ||
594 | d->stopJobsMenu->addAction(stopJobAction); | 594 | d->stopJobsMenu->addAction(stopJobAction); | ||
595 | connect (stopJobAction, &QAction::triggered, this, &RunController::slotKillJob); | 595 | connect (stopJobAction, &QAction::triggered, this, &RunController::slotKillJob); | ||
596 | 596 | | |||
597 | job->setUiDelegate( new KDialogJobUiDelegate() ); | 597 | job->setUiDelegate( new KDialogJobUiDelegate() ); | ||
598 | } | 598 | } | ||
599 | 599 | | |||
600 | d->jobs.insert(job, stopJobAction); | 600 | d->jobs.insert(job, stopJobAction); | ||
▲ Show 20 Lines • Show All 446 Lines • Show Last 20 Lines |