From 0dd027af90caf23bbafcac5207247047079e4c32 Mon Sep 17 00:00:00 2001 From: Artem Grinev Date: Tue, 27 Oct 2020 04:53:05 +0300 Subject: [PATCH] [keyboard] Fixed condition bug --- src/modules/keyboard/Config.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/keyboard/Config.cpp b/src/modules/keyboard/Config.cpp index e766c8a53..aab7db014 100644 --- a/src/modules/keyboard/Config.cpp +++ b/src/modules/keyboard/Config.cpp @@ -89,7 +89,7 @@ xkbmap_query_grp_option() { outputLine = setxkbmapQuery.readLine(); } - while( !setxkbmapQuery.atEnd() || !outputLine.startsWith("options:") ); + while( setxkbmapQuery.canReadLine() && !outputLine.startsWith("options:") ); if( !outputLine.startsWith("options:") ) { @@ -124,7 +124,7 @@ AdditionalLayoutInfo Config::getAdditionalLayoutInfo( const QString &layout ) { tableLine = layoutTable.readLine(); } - while( !layoutTable.atEnd() || !tableLine.startsWith( layout ) ); + while( layoutTable.canReadLine() && !tableLine.startsWith( layout ) ); if( !tableLine.startsWith( layout ) ) {