diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2022-11-08 08:27:36 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-11-15 10:04:16 +0000 |
commit | 7174e9d6a6cf61dab5f85940f2270e5d0911c560 (patch) | |
tree | 0377dcb15571b5514d09785df5851003d33f3cec | |
parent | 0aeada426d7d1f959ae6fbec24be89b2c54d29bb (diff) | |
download | qttools-7174e9d6a6cf61dab5f85940f2270e5d0911c560.tar.gz |
Qt Designer: Disable editing separator action names
Separator actions are generated using QMenu::addSeparator();
they are not designable.
Fixes: QTBUG-108243
Change-Id: I0c2141f9703e84cedda72038fcc070386ad00565
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
(cherry picked from commit 802684fe2381a17870ad3761de570d2dfcfbdf37)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/designer/src/components/objectinspector/objectinspectormodel.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/designer/src/components/objectinspector/objectinspectormodel.cpp b/src/designer/src/components/objectinspector/objectinspectormodel.cpp index 13fd9e7bb..cfe5d673c 100644 --- a/src/designer/src/components/objectinspector/objectinspectormodel.cpp +++ b/src/designer/src/components/objectinspector/objectinspectormodel.cpp @@ -47,8 +47,10 @@ static bool sameIcon(const QIcon &i1, const QIcon &i2) return i1.cacheKey() == i2.cacheKey(); } -static inline bool isNameColumnEditable(const QObject *) +static inline bool isNameColumnEditable(const QObject *o) { + if (auto *action = qobject_cast<const QAction *>(o)) + return !action->isSeparator(); return true; } |