Commit 68da7b86 authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

ksplash kcm: Show error output when preview process crashes

parent 6d93f65b
......@@ -187,7 +187,7 @@ void KCMSplashScreen::test(const QString &plugin)
m_testProcess = new QProcess(this);
connect(m_testProcess, &QProcess::errorOccurred, this, [this](QProcess::ProcessError error) {
Q_UNUSED(error)
emit testingFailed();
emit testingFailed(QString::fromLocal8Bit(m_testProcess->readAllStandardError()));
});
connect(m_testProcess, QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished), this, [this](int exitCode, QProcess::ExitStatus exitStatus) {
Q_UNUSED(exitCode)
......
......@@ -62,7 +62,7 @@ public Q_SLOTS:
Q_SIGNALS:
void testingChanged();
void testingFailed();
void testingFailed(const QString &processErrorOutput);
void error(const QString &message);
private:
......
......@@ -48,8 +48,11 @@ KCM.GridViewKCM {
Connections {
target: kcm
function onTestingFailed() {
testingFailedLabel.text = i18n("Failed to test the splash screen.")
function onTestingFailed(processErrorOutput) {
testingFailedLabel.text = i18n("Failed to show the splash screen preview.")
if (processErrorOutput) {
testingFailedLabel.text += "\n" + processErrorOutput
}
testingFailedLabel.visible = true
}
function onError(text) {
......
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