[Kde-bindings] Re: Notes on building on Mac OS X

Arno Rehn arno at arnorehn.de
Sun Feb 20 01:05:15 UTC 2011


I pushed a fix to master. Can you try again? :)

On Friday 18 February 2011 23:59:15 Arno Rehn wrote:
> On Friday 18 February 2011 17:33:33 Ben Skelton wrote:
> > My QAccessibleBridgePlugin problem seems taken care of with a change to
> 
> qtcore/tests/test.cpp:
> > > #ifdef TEST_QT_NO_ACCESSIBILITY
> > > #include "QtGui/qaccessible.h"
> > > #include "QtGui/qaccessiblebridge.h"
> > > 
> > > int main(int argc, char ** argv)
> > > {
> > > 
> > >   QAccessibleEvent event(QEvent::AccessibilityHelp, 0);
> > >   QAccessibleBridgePlugin plugin(0);
> > > 
> > > }
> > > 
> > > #endif
> 
> Hm, this will get rid of all accessibility stuff in OS X builds. But I
> guess it's an okay solution for now.
> 
> > > Kauri:~ benskelton$ otool -tV
> > > /Users/benskelton/Desktop/build/lib/libQtGui.dylib | c++filt | grep
> > > macMenu
> > > 
> > > 000000000001568a	callq	QMenu::macMenu(NSMenu*)
> > > 0000000000017977	callq	0x006e849c	; symbol stub for:
> > > QCoreApplicationPrivate::macMenuBarName()
> > > QMenuPrivate::macMenu(NSMenu*):
> > > QMenu::macMenu(NSMenu*):
> > > 0000000000066359	jmp	QMenuPrivate::macMenu(NSMenu*)
> > > 0000000000066c38	callq	QMenu::macMenu(NSMenu*)
> > > 0000000000067796	callq	QMenu::macMenu(NSMenu*)
> > > 0000000000067961	callq	QMenu::macMenu(NSMenu*)
> > > QMenuBarPrivate::macMenu():
> > > QMenuBar::macMenu():
> > > 0000000000068159	jmp	QMenuBarPrivate::macMenu()
> > > 000000000006842f	callq	QMenuBar::macMenu()
> > > 00000000000686d2	callq	QMenuBar::macMenu()
> > > 0000000000068a8b	callq	QMenuPrivate::macMenu(NSMenu*)
> > 
> > Looking at the comments in the Qt source for macMenu:
> > >     If Qt is built against Carbon, the OSMenuRef is a MenuRef that can
> > >     be used with Carbon's Menu Manager API.
> > >     
> > >     If Qt is built against Cocoa, the OSMenuRef is a NSMenu pointer.
> > 
> > otool shows an NSMenu* argument because my Qt is built for Cocoa. It
> > appears that Qt sets QT_MAC_USE_COCOA for Cocoa builds and does not set
> > this for Carbon builds. Qt documentation says that Cocoa builds are
> > default for Qt/Mac.
> 
> That #define is somewhere defined in qfeatures.h and is picked up correctly
> by smokegen (otherwise it wouldn't make it a void*). However, __OBJC__ has
> to be defined as well for the NSMenu* typedef. I don't really know where
> the __OBJC__ define is coming from (we're compiling C++ after all), so
> I'll simply blacklist QMenu::macMenu() as well.
> 
> > > Kauri:~ benskelton$ otool -tV
> > > /Users/benskelton/Desktop/build/lib/libQtGui.dylib | c++filt | grep
> > > qt_mac_set_cursor
> > 
> > > qt_mac_set_cursor(QCursor const*, QPoint const&):
> > which seems ok, right? Not sure if this is relevant in some way, but in
> > the
> 
> Qt source this function does nothing for the default case on the mac:
> > > void qt_mac_set_cursor(const QCursor *c, const QPoint &)
> > > {
> > > #ifdef QT_MAC_USE_COCOA
> > > 
> > >     Q_UNUSED(c);
> > >     return;
> > > 
> > > #else
> 
> This function is internal anyway, I guess. So we can safely blacklist it.
> 
> > Sorry for all the naive questions. I hope somebody with some knowledge
> > can see something here.
> 
> No problem. The questions aren't naive at all. The smoke internals are a
> little complex :)

-- 
Arno Rehn
arno at arnorehn.de



More information about the Kde-bindings mailing list