summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@nokia.com>2009-12-08 14:30:38 +0100
committerMorten Johan Sørvig <morten.sorvig@nokia.com>2009-12-08 14:50:03 +0100
commit971acc6d34559a2c5035888a5891ea29ad8628af (patch)
tree3db75eb996c46bd64012b132415262b86be4033f
parent3f5e4ed4d2b110f4c6e952b74c9f852a2dc14a54 (diff)
downloadqt4-tools-971acc6d34559a2c5035888a5891ea29ad8628af.tar.gz
Compile with -no-exceptions on Mac.
qfontdialog_mac.mm needs to handle exceptions thrown by Cocoa, even if Qt is configured with if -no-exceptions. This ads a bit of qmake logic for the benefit of a single file, but I would like to keep -no-exceptions working. The savings are significant (around 10-15%). Revby: Richard Moe Gustavsen
-rwxr-xr-xconfigure2
-rw-r--r--src/gui/dialogs/dialogs.pri18
2 files changed, 17 insertions, 3 deletions
diff --git a/configure b/configure
index 6dc3898c94..486dc0c2c0 100755
--- a/configure
+++ b/configure
@@ -131,7 +131,7 @@ compilerSupportsFlag()
cat >conftest.cpp <<EOF
int main() { return 0; }
EOF
- "$TEST_COMPILER" "$@" -o /dev/null conftest.cpp
+ "$TEST_COMPILER" "$@" -o conftest.o conftest.cpp
ret=$?
rm -f conftest.cpp conftest.o
return $ret
diff --git a/src/gui/dialogs/dialogs.pri b/src/gui/dialogs/dialogs.pri
index b9fad41d78..63f64a2d0d 100644
--- a/src/gui/dialogs/dialogs.pri
+++ b/src/gui/dialogs/dialogs.pri
@@ -28,13 +28,27 @@ HEADERS += \
dialogs/qprintpreviewdialog.h
!embedded:mac {
- OBJECTIVE_SOURCES += dialogs/qcolordialog_mac.mm \
- dialogs/qfiledialog_mac.mm \
+ OBJECTIVE_SOURCES += dialogs/qfiledialog_mac.mm \
dialogs/qfontdialog_mac.mm \
dialogs/qnspanelproxy_mac.mm \
dialogs/qpagesetupdialog_mac.mm \
dialogs/qprintdialog_mac.mm
+
+# Compile qcolordialog_mac.mm with exception support, disregarding the -no-exceptions
+# configure option. (qcolordialog_mac needs to catch exceptions thrown by cocoa)
+ EXCEPTION_SOURCES = dialogs/qcolordialog_mac.mm
+ exceptions_compiler.commands = $$QMAKE_CXX -c
+ exceptions_compiler.commands += $(CXXFLAGS) $(INCPATH) ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
+ exceptions_compiler.commands += -fexceptions
+ exceptions_compiler.dependency_type = TYPE_C
+ exceptions_compiler.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)}
+ exceptions_compiler.input = EXCEPTION_SOURCES
+ exceptions_compiler.variable_out = OBJECTS
+ exceptions_compiler.name = compiling[exceptopns] ${QMAKE_FILE_IN}
+ silent:exceptions_compiler.commands = @echo compiling[exceptopns] ${QMAKE_FILE_IN} && $$exceptions_compiler.commands
+ QMAKE_EXTRA_COMPILERS += exceptions_compiler
}
+
win32 {
HEADERS += dialogs/qwizard_win_p.h
SOURCES += dialogs/qdialogsbinarycompat_win.cpp \