summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2023-02-07 11:45:01 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-02-07 16:07:33 +0000
commit94e3b4b056abd4961c06daab310325374f0e1b71 (patch)
tree75e8cb4843cbe20077df5fdb9594e4beee1f184f
parent7daa1d14e7a2488f2504cada8655809f8ea0eb89 (diff)
downloadqttools-94e3b4b056abd4961c06daab310325374f0e1b71.tar.gz
Qt Designer: Fix bitCount helper function to work with QPalette
The QPalette resolve mask type has been changed to 64bit. Make it a template so that it works correctly. Task-number: QTBUG-110963 Change-Id: I61394c58155bdc37a98dac0c763e6a7d9fbbfe84 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> (cherry picked from commit ce100433b239ac13b1711b5292481605ce8456e8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/designer/src/components/propertyeditor/designerpropertymanager.cpp3
-rw-r--r--src/designer/src/components/propertyeditor/designerpropertymanager.h1
2 files changed, 2 insertions, 2 deletions
diff --git a/src/designer/src/components/propertyeditor/designerpropertymanager.cpp b/src/designer/src/components/propertyeditor/designerpropertymanager.cpp
index 2b45a317b..778a5d461 100644
--- a/src/designer/src/components/propertyeditor/designerpropertymanager.cpp
+++ b/src/designer/src/components/propertyeditor/designerpropertymanager.cpp
@@ -888,7 +888,8 @@ DesignerPropertyManager::~DesignerPropertyManager()
bool DesignerPropertyManager::m_IdBasedTranslations = false;
-int DesignerPropertyManager::bitCount(int mask) const
+template <class IntT>
+static int bitCount(IntT mask)
{
int count = 0;
for (; mask; count++)
diff --git a/src/designer/src/components/propertyeditor/designerpropertymanager.h b/src/designer/src/components/propertyeditor/designerpropertymanager.h
index d62eec7b8..df05cd6a1 100644
--- a/src/designer/src/components/propertyeditor/designerpropertymanager.h
+++ b/src/designer/src/components/propertyeditor/designerpropertymanager.h
@@ -155,7 +155,6 @@ private:
typedef QMap<QtProperty *, bool> PropertyBoolMap;
PropertyBoolMap m_resetMap;
- int bitCount(int mask) const;
struct FlagData
{
uint val{0};