summaryrefslogtreecommitdiffstats
path: root/tools/designer/src
diff options
context:
space:
mode:
Diffstat (limited to 'tools/designer/src')
-rw-r--r--tools/designer/src/lib/shared/qdesigner_toolbar.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/tools/designer/src/lib/shared/qdesigner_toolbar.cpp b/tools/designer/src/lib/shared/qdesigner_toolbar.cpp
index 012b498..0bb91ee 100644
--- a/tools/designer/src/lib/shared/qdesigner_toolbar.cpp
+++ b/tools/designer/src/lib/shared/qdesigner_toolbar.cpp
@@ -443,12 +443,17 @@ QAction *ToolBarEventFilter::actionAt(const QToolBar *tb, const QPoint &pos)
QRect ToolBarEventFilter::handleArea(const QToolBar *tb)
{
//that's a trick to get acces to the initStyleOption which is a protected member
- class ToolBar : public QToolBar
+ class FriendlyToolBar : public QToolBar
{
- friend class ToolBarEventFilter;
+ public:
+#ifdef Q_NO_USING_KEYWORD
+ void initStyleOption(QStyleOptionToolBar *option) { QToolBar::initStyleOption(option); }
+#else
+ using QToolBar::initStyleOption;
+#endif
};
QStyleOptionToolBar opt;
- static_cast<const ToolBar*>(tb)->initStyleOption(&opt);
+ static_cast<const FriendlyToolBar*>(tb)->initStyleOption(&opt);
return tb->style()->subElementRect(QStyle::SE_ToolBarHandle, &opt, tb);
}