summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNorwegian Rock Cat <qt-info@nokia.com>2009-05-11 09:19:35 (GMT)
committerNorwegian Rock Cat <qt-info@nokia.com>2009-05-11 09:20:19 (GMT)
commitdedbb56e3677ef67eded709eb8a826e4a9848b52 (patch)
tree84a564c0575029728e6a474e77ff664351fb232f
parentb22ae5c1492f8f0e004a3a4120fd9f60045dfbf0 (diff)
downloadQt-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.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);
}