Trolltech Home | Qt4-preview-feedback Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qt4-preview-feedback Archive, March 2008
Qt 4.4 Beta - Mac (Carbon) qwidget.cpp fails to compile


Message 1 in thread

Hello!

Trying to build Qt 4.4-beta1 from source on Mac OS X 10.4.11 with  
Apple's GCC 4.2.1 compiler, I run into this problem.

src/gui/kernel/qwidget.cpp, line 133:

#ifdef Q_WS_MAC
#define QT_NO_PAINT_DEBUG
#else
extern bool qt_sendSpontaneousEvent(QObject*, QEvent*); //  
qapplication_xxx.cpp
#endif


That is, on a Macintosh, the "extern bool qt_sendSpontaneousEvent"  
declaration is ifdef'd out.

But we call it on line 4421 of the same file, and it refuses to  
compile with "qt_sendSpontaneousEvent is not declared in this scope".

Here's one possible patch:

====
--- src/gui/kernel/qwidget.cpp	2008-03-15 17:29:41.000000000 -0600
+++ src/gui/kernel/qwidget.cpp	2008-03-15 17:30:28.000000000 -0600
@@ -4418,7 +4418,11 @@

              //actually send the paint event
              QPaintEvent e(toBePainted);
+#if Q_WS_MAC
+            QApplication::sendSpontaneousEvent(q, &e);
+#else
              qt_sendSpontaneousEvent(q, &e);
+#endif

              //restore
              if (paintEngine) {
====


But why is the ifdef statement on line 133?


Thanks!




To unsubscribe - send "unsubscribe" in the subject to qt4-preview-feedback-request@xxxxxxxxxxxxx


Message 2 in thread

On Mar 15, 2008, at 5:45 PM, Boyd Waters wrote:
> +#if Q_WS_MAC

should be

#ifdef Q_WS_MAC

sorry...

To unsubscribe - send "unsubscribe" in the subject to qt4-preview-feedback-request@xxxxxxxxxxxxx