Commit 6547b707 authored by Daniel Nicoletti's avatar Daniel Nicoletti

Allow canceling a job with Delete key shortcut

BUG: 331249
parent ab9c8293
......@@ -35,6 +35,7 @@
#include <QProcess>
#include <QDebug>
#include <QPointer>
#include <QShortcut>
#include <KMessageBox>
#include <KIconLoader>
......@@ -173,6 +174,10 @@ PrintQueueUi::PrintQueueUi(const KCupsPrinter &printer, QWidget *parent) :
// Restore the dialog size
KConfigGroup configGroup(KSharedConfig::openConfig(QLatin1String("print-manager")), "PrintQueue");
KWindowConfig::restoreWindowSize(windowHandle(), configGroup);
auto delJobShortcut = new QShortcut(QKeySequence::Delete, ui->jobsView);
delJobShortcut->setContext(Qt::WidgetShortcut);
connect(delJobShortcut, &QShortcut::activated, this, &PrintQueueUi::cancelJob);
}
PrintQueueUi::~PrintQueueUi()
......
Markdown is supported
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