Commit 048e97b1 authored by Tomaz  Canabrava's avatar Tomaz Canabrava Committed by Tomaz Canabrava
Browse files

Check if shellcheck exists

parent 0df63a2c
......@@ -203,7 +203,7 @@
<number>0</number>
</property>
<item>
<widget class="QPlainTextEdit" name="plainTextEdit"/>
<widget class="QPlainTextEdit" name="warning"/>
</item>
</layout>
</widget>
......
......@@ -11,11 +11,13 @@
#include "ui_qcwidget.h"
#include <KMessageBox>
#include <QStandardPaths>
struct QuickCommandsWidget::Private {
QuickCommandsModel *model = nullptr;
FilterModel *filterModel = nullptr;
Konsole::SessionController *controller = nullptr;
bool hasShellCheck = false;
};
QuickCommandsWidget::QuickCommandsWidget(QWidget *parent)
......@@ -25,6 +27,11 @@ QuickCommandsWidget::QuickCommandsWidget(QWidget *parent)
{
ui->setupUi(this);
priv->hasShellCheck = !QStandardPaths::findExecutable(QStringLiteral("shellcheck")).isEmpty();
if (!priv->hasShellCheck) {
ui->warning->setPlainText(QStringLiteral("Missing executable shellcheck"));
}
priv->filterModel = new FilterModel(this);
connect(ui->btnAdd, &QPushButton::clicked, this, &QuickCommandsWidget::addMode);
connect(ui->btnSave, &QPushButton::clicked, this, &QuickCommandsWidget::saveCommand);
......
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