diff options
| author | Carlo Vanini <silhusk@gmail.com> | 2016-08-20 20:23:17 (GMT) |
|---|---|---|
| committer | Carlo Vanini <silhusk@gmail.com> | 2016-08-20 20:23:17 (GMT) |
| commit | ca1379c2f8041f775625255018463a25f9c782b9 (patch) | |
| tree | f62dff3ee6032756772d1fc6e7e139f573a5f51f | |
| parent | 0151bc85a9d7204075fe8aad73b01dd970f93c43 (diff) | |
show error message if software-properties-kde cannot be found
Settings -> "Configure Software Sources" invokes the external program
software-properties-kde, if it is not found show an error message.
BUG: 366590
| -rw-r--r-- | src/muonapt/QAptActions.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/muonapt/QAptActions.cpp b/src/muonapt/QAptActions.cpp index d3360a3..0d10107 100644 --- a/src/muonapt/QAptActions.cpp +++ b/src/muonapt/QAptActions.cpp @@ -393,6 +393,18 @@ void QAptActions::runSourcesEditor() const QString kdesu = QFile::decodeName(CMAKE_INSTALL_FULL_LIBEXECDIR_KF5 "/kdesu"); const QString editor = QStandardPaths::findExecutable("software-properties-kde"); + if (editor.isEmpty()) { + QString text = i18nc("@label", + "Could not find <command>software-properties-kde</command> " + "on your system, please install it. Alternatively, you can use " + "<application>Plasma Discover</application> to configure " + "software sources."); + QString title = i18nc("@title:window", + "Cannot find <command>software-properties-kde</command>"); + KMessageBox::sorry(m_mainWindow, text, title); + return; + } + arguments << kdesu << "--" << editor << QStringLiteral("--attach") << QString::number(winID); if (m_reloadWhenEditorFinished) { arguments << QStringLiteral("--dont-update"); |
