From a8b98487d49f536097eb248dd8a2d02c06cba155 Mon Sep 17 00:00:00 2001 From: Robert Adam Date: Fri, 9 Sep 2022 12:57:15 +0200 Subject: [PATCH] FIX(client): Clear shortcut data also for user-types Up to now the logic for clearing shortcut data upon a change in the shortcut config window was to see if the type() of the current data matches that of the shortcut's default data. However, for user-defined types QVariant::type() always returns QVariant::UserType and thus different user-defined types could not be distinguished. If we instead use QVariant::userType(), this problem does no longer exist. --- src/mumble/GlobalShortcut.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mumble/GlobalShortcut.cpp b/src/mumble/GlobalShortcut.cpp index b0998f20c..04bbe4f91 100644 --- a/src/mumble/GlobalShortcut.cpp +++ b/src/mumble/GlobalShortcut.cpp @@ -665,7 +665,7 @@ void GlobalShortcutConfig::on_qtwShortcuts_itemChanged(QTreeWidgetItem *item, in sc.bSuppress = item->checkState(3) == Qt::Checked; const ::GlobalShortcut *gs = GlobalShortcutEngine::engine->qmShortcuts.value(sc.iIndex); - if (gs && sc.qvData.type() != gs->qvDefault.type()) { + if (gs && sc.qvData.userType() != gs->qvDefault.userType()) { item->setData(1, Qt::DisplayRole, gs->qvDefault); } }