[keyboard] Make keyboard preview more robust
- Replace #define with static const char - Handle FreeBSD as well (for testing purposes)
This commit is contained in:
parent
b704933b58
commit
3c014a868c
@ -24,18 +24,24 @@
|
||||
|
||||
#include "utils/Logger.h"
|
||||
|
||||
#ifdef Q_OS_FREEBSD
|
||||
static const char XKB_FILE[] = "/usr/local/share/X11/xkb/rules/base.lst";
|
||||
#else
|
||||
static const char XKB_FILE[] = "/usr/share/X11/xkb/rules/base.lst";
|
||||
#endif
|
||||
|
||||
//###
|
||||
//### Public methods
|
||||
//###
|
||||
|
||||
|
||||
QMap<QString, KeyboardGlobal::KeyboardInfo> KeyboardGlobal::getKeyboardLayouts() {
|
||||
return parseKeyboardLayouts(XKB_FILE);
|
||||
return parseKeyboardLayouts( XKB_FILE );
|
||||
}
|
||||
|
||||
|
||||
QMap<QString, QString> KeyboardGlobal::getKeyboardModels() {
|
||||
return parseKeyboardModels(XKB_FILE);
|
||||
return parseKeyboardModels( XKB_FILE );
|
||||
}
|
||||
|
||||
|
||||
|
@ -35,8 +35,6 @@
|
||||
#include <QRegExp>
|
||||
#include <QDebug>
|
||||
|
||||
#define XKB_FILE "/usr/share/X11/xkb/rules/base.lst"
|
||||
|
||||
class KeyboardGlobal
|
||||
{
|
||||
public:
|
||||
|
Loading…
Reference in New Issue
Block a user