summaryrefslogtreecommitdiff
path: root/tools/designer
diff options
context:
space:
mode:
authorNorwegian Rock Cat <qt-info@nokia.com>2009-05-11 11:19:35 +0200
committerNorwegian Rock Cat <qt-info@nokia.com>2009-05-11 11:20:19 +0200
commitdedbb56e3677ef67eded709eb8a826e4a9848b52 (patch)
tree84a564c0575029728e6a474e77ff664351fb232f /tools/designer
parentb22ae5c1492f8f0e004a3a4120fd9f60045dfbf0 (diff)
downloadqt4-tools-dedbb56e3677ef67eded709eb8a826e4a9848b52.tar.gz
Compile on Mac OS X.
The friend thing doesn't really work when it's defined in the class you want to be a friend of, so do the promotion technique instead. Reviewed-by: Thierry Bastian
Diffstat (limited to 'tools/designer')
-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 012b4982cb..0bb91ee004 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);
}