From dedbb56e3677ef67eded709eb8a826e4a9848b52 Mon Sep 17 00:00:00 2001 From: Norwegian Rock Cat Date: Mon, 11 May 2009 11:19:35 +0200 Subject: 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 --- tools/designer/src/lib/shared/qdesigner_toolbar.cpp | 11 ++++++++--- 1 file 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(tb)->initStyleOption(&opt); + static_cast(tb)->initStyleOption(&opt); return tb->style()->subElementRect(QStyle::SE_ToolBarHandle, &opt, tb); } -- cgit v0.12