diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2023-02-07 11:45:01 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2023-02-07 16:07:32 +0000 |
commit | 914c7c3fe0dc674c4c23ec83eb2f5be1413c6c9f (patch) | |
tree | 6a3a2b080172ebe1d9a048f1155eb8d7b160aea1 | |
parent | 1a900d830f2f570d4eaf13f47dc4d46c93ff6a01 (diff) | |
download | qttools-914c7c3fe0dc674c4c23ec83eb2f5be1413c6c9f.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.cpp | 3 | ||||
-rw-r--r-- | src/designer/src/components/propertyeditor/designerpropertymanager.h | 1 |
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 bb98d5824..6dc262842 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}; |