Keyboard: warn about missing ckbcomp, thanks @abucodonosor

This commit is contained in:
Adriaan de Groot 2017-10-23 11:48:54 -04:00
parent 36a711c87f
commit 9b5772c482
2 changed files with 9 additions and 0 deletions

View File

@ -1,3 +1,5 @@
# NOTE: you must have ckbcomp installed and runnable
# on the live system, for keyboard layout previews.
---
# The name of the file to write X11 keyboard settings to
# The default value is the name used by upstream systemd-localed.

View File

@ -20,6 +20,7 @@
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
*/
#include "utils/Logger.h"
#include "keyboardpreview.h"
KeyBoardPreview::KeyBoardPreview( QWidget* parent )
@ -113,10 +114,16 @@ bool KeyBoardPreview::loadCodes() {
process.setEnvironment(QStringList() << "LANG=C" << "LC_MESSAGES=C");
process.start("ckbcomp", param);
if (!process.waitForStarted())
{
cDebug() << "WARNING: ckbcomp not found , keyboard preview disabled";
return false;
}
if (!process.waitForFinished())
{
cDebug() << "WARNING: ckbcomp failed, keyboard preview disabled";
return false;
}
// Clear codes
codes.clear();