Skip to content

Commit

Permalink
Fix segfault in ConfigHandler (#2029)
Browse files Browse the repository at this point in the history
Signed-off-by: Haris Gušić <[email protected]>
  • Loading branch information
veracioux authored Oct 31, 2021
1 parent 731b82a commit c3cde5a
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/utils/confighandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -466,9 +466,8 @@ QSet<QString>& ConfigHandler::recognizedGeneralOptions()
{

#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
static QSet<QString> options =
QSet<QString>(::recognizedGeneralOptions.keys().begin(),
::recognizedGeneralOptions.keys().end());
auto keys = ::recognizedGeneralOptions.keys();
static QSet<QString> options = QSet<QString>(keys.begin(), keys.end());
#else
static QSet<QString> options =
QSet<QString>::fromList(::recognizedGeneralOptions.keys());
Expand All @@ -479,8 +478,8 @@ QSet<QString>& ConfigHandler::recognizedGeneralOptions()
QSet<QString>& ConfigHandler::recognizedShortcutNames()
{
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
static QSet<QString> names = QSet<QString>(
recognizedShortcuts.keys().begin(), recognizedShortcuts.keys().end());
auto keys = recognizedShortcuts.keys();
static QSet<QString> names = QSet<QString>(keys.begin(), keys.end());
#else
static QSet<QString> names =
QSet<QString>::fromList(recognizedShortcuts.keys());
Expand Down

0 comments on commit c3cde5a

Please sign in to comment.