diff options
author | Norwegian Rock Cat <qt-info@nokia.com> | 2009-05-11 09:19:35 (GMT) |
---|---|---|
committer | Norwegian Rock Cat <qt-info@nokia.com> | 2009-05-11 09:20:19 (GMT) |
commit | dedbb56e3677ef67eded709eb8a826e4a9848b52 (patch) | |
tree | 84a564c0575029728e6a474e77ff664351fb232f | |
parent | b22ae5c1492f8f0e004a3a4120fd9f60045dfbf0 (diff) | |
download | Qt-dedbb56e3677ef67eded709eb8a826e4a9848b52.zip Qt-dedbb56e3677ef67eded709eb8a826e4a9848b52.tar.gz Qt-dedbb56e3677ef67eded709eb8a826e4a9848b52.tar.bz2 |
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
-rw-r--r-- | tools/designer/src/lib/shared/qdesigner_toolbar.cpp | 11 |
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); } |