diff options
-rw-r--r-- | backends/vkeybd/virtual-keyboard.cpp | 2 | ||||
-rw-r--r-- | common/xmlparser.cpp | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/backends/vkeybd/virtual-keyboard.cpp b/backends/vkeybd/virtual-keyboard.cpp index ed78f9a67c..0e2b98a91d 100644 --- a/backends/vkeybd/virtual-keyboard.cpp +++ b/backends/vkeybd/virtual-keyboard.cpp @@ -207,7 +207,7 @@ void VirtualKeyboard::switchMode(Mode *newMode) { _currentMode = newMode; } -void VirtualKeyboard::switchMode(const String& newMode) { +void VirtualKeyboard::switchMode(const String &newMode) { if (!_modes.contains(newMode)) { warning("Keyboard mode '%s' unknown", newMode.c_str()); } else { diff --git a/common/xmlparser.cpp b/common/xmlparser.cpp index aee44666f3..1c652fa19d 100644 --- a/common/xmlparser.cpp +++ b/common/xmlparser.cpp @@ -247,10 +247,12 @@ bool XMLParser::closeKey() { } bool XMLParser::parse() { - if (_stream == 0) return parserError("XML stream not ready for reading."); + // Make sure we are at the start of the stream. + _stream->seek(0, SEEK_SET); + if (_XMLkeys == 0) buildLayout(); |