From 63de22e622bc09d03f594f2fe85ce2db4e9a9efe Mon Sep 17 00:00:00 2001 From: Chris Hennes Date: Mon, 12 May 2025 10:22:38 -0500 Subject: [PATCH] Gui: Manually specify correct QVariant conversion There are multiple possible conversion paths for a QPixmap to QVariant, which results in a compiler warning. Explicitly specify the path we intend to silence the warning. --- src/Gui/Dialogs/DlgCustomizeSpaceball.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Gui/Dialogs/DlgCustomizeSpaceball.cpp b/src/Gui/Dialogs/DlgCustomizeSpaceball.cpp index 70a92a304a..2dea8e547c 100644 --- a/src/Gui/Dialogs/DlgCustomizeSpaceball.cpp +++ b/src/Gui/Dialogs/DlgCustomizeSpaceball.cpp @@ -210,7 +210,7 @@ QVariant ButtonModel::data (const QModelIndex &index, int role) const { static QPixmap icon(BitmapFactory().pixmap("spaceball_button").scaled (32, 32, Qt::IgnoreAspectRatio, Qt::SmoothTransformation)); - return {icon}; + return QVariant(QIcon(icon)); // Cannot make a QPixmap into a QVariant, so convert to a QIcon first } if (role == Qt::UserRole) return {QString::fromStdString(groupVector.at(index.row())->GetASCII("Command"))};