
--- qt-mac-opensource-src-4.2.2/configure	2006-11-27 12:38:12.000000000 -0500
+++ qt-mac-opensource-src-4.2.2-patched/configure	2007-01-29 13:40:55.000000000 -0500
@@ -3275,7 +3275,6 @@
             done
         fi
         if [ "$PLATFORM_MAC" = "yes" ]; then
-            echo "export MACOSX_DEPLOYMENT_TARGET = 10.2" >>"$mkfile"
             echo "CARBON_LFLAGS =-framework CoreServices -framework CoreFoundation" >>"$mkfile"
             EXTRA_LFLAGS="$EXTRA_LFLAGS \$(CARBON_LFLAGS)"
             EXTRA_CFLAGS="$EXTRA_CFLAGS \$(CARBON_CFLAGS)"
@@ -4428,7 +4427,7 @@
         COMPILER_VERSION="3.*"
         ;;
     *4.*)
-        COMPILER_VERSION="4"
+        COMPILER_VERSION="4.*"
         ;;
     *)
         ;;
@@ -5103,7 +5102,7 @@
 echo "Finding project files. Please wait..."
 "$outpath/bin/qmake" -prl -r "${relpath}/projects.pro"
 if [ -z "$QMAKE_PROJECTS" ]; then
-    QMAKE_PROJECTS=`find "$relpath/." -name '*.pro' -print | sed 's-/\./-/-'`
+    QMAKE_PROJECTS=`find "$relpath/." -name '*.pro' -print | grep -v /examples/ | grep -v /demos/ | sed 's-/\./-/-'`
 else
     QT_PROJECTS=
     for a in `echo $QMAKE_PROJECTS`; do
--- qt-mac-opensource-src-4.2.2/examples/tools/plugandpaint/mainwindow.cpp	2006-11-27 12:37:52.000000000 -0500
+++ qt-mac-opensource-src-4.2.2-patched/examples/tools/plugandpaint/mainwindow.cpp	2007-01-29 13:40:55.000000000 -0500
@@ -204,7 +204,7 @@
 #if defined(Q_OS_WIN)
     if (pluginsDir.dirName().toLower() == "debug" || pluginsDir.dirName().toLower() == "release")
         pluginsDir.cdUp();
-#elif defined(Q_OS_MAC)
+#elif defined(Q_WS_MAC)
     if (pluginsDir.dirName() == "MacOS") {
         pluginsDir.cdUp();
         pluginsDir.cdUp();
--- qt-mac-opensource-src-4.2.2/mkspecs/macx-g++/qmake.conf	2006-11-27 12:38:12.000000000 -0500
+++ qt-mac-opensource-src-4.2.2-patched/mkspecs/macx-g++/qmake.conf	2007-01-29 13:43:19.000000000 -0500
@@ -11,7 +11,7 @@
 QMAKE_INCREMENTAL_STYLE = sublibs
 QMAKE_COMPILER_DEFINES  += __APPLE__ __GNUC__
 
-QMAKE_CC		= cc
+QMAKE_CC		= gcc-4.0
 QMAKE_LEX		= flex
 QMAKE_LEXFLAGS		=
 QMAKE_YACC		= yacc
@@ -34,7 +34,7 @@
 QMAKE_CFLAGS_PPC        = -arch ppc
 QMAKE_CFLAGS_X86        = -arch i386
 
-QMAKE_CXX		= c++
+QMAKE_CXX		= g++-4.0
 QMAKE_CXXFLAGS		= $$QMAKE_CFLAGS
 QMAKE_CXXFLAGS_DEPS	= $$QMAKE_CFLAGS_DEPS
 QMAKE_CXXFLAGS_WARN_ON	= $$QMAKE_CFLAGS_WARN_ON
@@ -61,7 +61,7 @@
 QMAKE_LFLAGS_RELEASE	=
 QMAKE_LFLAGS_DEBUG	=
 QMAKE_LFLAGS_APP	=
-QMAKE_LFLAGS_SHLIB	= -single_module -dynamiclib 
+QMAKE_LFLAGS_SHLIB	= -single_module -dynamiclib
 QMAKE_LFLAGS_INCREMENTAL = -undefined suppress -flat_namespace
 QMAKE_LFLAGS_PLUGIN	= $$QMAKE_LFLAGS_SHLIB
 QMAKE_LFLAGS_SONAME	= -install_name$${LITERAL_WHITESPACE}
@@ -82,19 +82,19 @@
 QMAKE_MOC		= $$[QT_INSTALL_BINS]/moc
 QMAKE_UIC		= $$[QT_INSTALL_BINS]/uic
 
-QMAKE_AR		= ar cq
-QMAKE_RANLIB		= ranlib -s
+QMAKE_AR		= /usr/bin/ar cq
+QMAKE_RANLIB		= /usr/bin/ranlib -s
 
 QMAKE_TAR		= tar -cf
 QMAKE_GZIP		= gzip -9f
 
-QMAKE_COPY		= cp -f
+QMAKE_COPY		= /bin/cp -f
 QMAKE_COPY_FILE		= $$QMAKE_COPY
 QMAKE_COPY_DIR		= $$QMAKE_COPY -R
-QMAKE_MOVE		= mv -f
-QMAKE_DEL_FILE		= rm -f
-QMAKE_DEL_DIR		= rmdir
-QMAKE_CHK_DIR_EXISTS	= test -d
-QMAKE_MKDIR		= mkdir -p
+QMAKE_MOVE		= /bin/mv -f
+QMAKE_DEL_FILE		= /bin/rm -f
+QMAKE_DEL_DIR		= /bin/rmdir
+QMAKE_CHK_DIR_EXISTS	= /bin/test -d
+QMAKE_MKDIR		= /bin/mkdir -p
 include(../common/unix.conf)
 load(qt_config)
--- qt-mac-opensource-src-4.2.2/projects.pro	2006-11-27 12:37:38.000000000 -0500
+++ qt-mac-opensource-src-4.2.2-patched/projects.pro	2007-01-29 13:40:55.000000000 -0500
@@ -10,7 +10,6 @@
    SUBDIRS += src
    !cross_compile:SUBDIRS += tools
    else:SUBDIRS += tools/qtestlib
-   SUBDIRS += demos examples
 } else {
    #make sure the order makes sense
    contains(QT_PROJECTS, tools) {
@@ -32,7 +31,6 @@
           !cross_compile:SUBDIRS += tools
           else:SUBDIRS += tools/qtestlib
        } else:isEqual(PROJECT, examples) {
-          SUBDIRS += demos examples
        } else:isEqual(PROJECT, libs) {
           SUBDIRS += src
        } else:isEqual(PROJECT, qmake) {
@@ -126,4 +124,4 @@
     usagereporter.path=$$[QT_INSTALL_BINS]
     usagereporter.files=$$QT_BUILD_TREE/bin/qtusagereporter
     INSTALLS += usagereporter
-}
\ No newline at end of file
+}
--- qt-mac-opensource-src-4.2.2/qmake/qmake.pri	2006-11-27 12:37:33.000000000 -0500
+++ qt-mac-opensource-src-4.2.2-patched/qmake/qmake.pri	2007-01-29 13:40:55.000000000 -0500
@@ -100,7 +100,6 @@
         SOURCES += qfsfileengine_unix.cpp
         mac {
           SOURCES += qcore_mac.cpp qsettings_mac.cpp
-          QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.2 #enables weak linking for 10.2 (exported)
           LIBS += -framework CoreServices
         }
     } else:win32 {
--- qt-mac-opensource-src-4.2.2/src/corelib/global/qglobal.cpp	2006-11-27 12:37:35.000000000 -0500
+++ qt-mac-opensource-src-4.2.2-patched/src/corelib/global/qglobal.cpp	2007-01-29 13:40:55.000000000 -0500
@@ -1476,7 +1476,7 @@
 const int QSysInfo::ByteOrder = ((*((unsigned char *) &qt_one) == 0) ? BigEndian : LittleEndian);
 #endif
 
-#if !defined(QWS) && defined(Q_OS_MAC)
+#if !defined(QWS) && defined(Q_WS_MAC)
 
 #include "private/qcore_mac_p.h"
 #include "qnamespace.h"
--- qt-mac-opensource-src-4.2.2/src/corelib/global/qglobal.h	2006-11-27 12:37:35.000000000 -0500
+++ qt-mac-opensource-src-4.2.2-patched/src/corelib/global/qglobal.h	2007-01-29 13:46:06.000000000 -0500
@@ -1124,7 +1124,7 @@
 Q_CORE_EXPORT const char *qVersion();
 Q_CORE_EXPORT bool qSharedBuild();
 
-#if defined(Q_OS_MAC)
+#if defined(Q_WS_MAC)
 inline int qMacVersion() { return QSysInfo::MacintoshVersion; }
 #endif
 
--- qt-mac-opensource-src-4.2.2/src/corelib/global/qlibraryinfo.cpp	2006-11-27 12:37:35.000000000 -0500
+++ qt-mac-opensource-src-4.2.2-patched/src/corelib/global/qlibraryinfo.cpp	2007-01-29 13:40:55.000000000 -0500
@@ -32,7 +32,7 @@
 #else
 # include "qcoreapplication.h"
 #endif
-#ifdef Q_OS_MAC
+#ifdef Q_WS_MAC
 #  include "private/qcore_mac_p.h"
 #endif
 
@@ -97,7 +97,7 @@
         qtconfig = qmake_libraryInfoFile();
 #else
     if (!QFile::exists(qtconfig) && QCoreApplication::instance()) {
-#ifdef Q_OS_MAC
+#ifdef Q_WS_MAC
 	CFBundleRef bundleRef = CFBundleGetMainBundle();
         if (bundleRef) {
 	    QCFType<CFURLRef> urlRef = CFBundleCopyResourceURL(bundleRef,
@@ -412,7 +412,7 @@
             return QFileInfo(qmake_libraryInfoFile()).absolutePath();
 #else
             if (QCoreApplication::instance()) {
-#ifdef Q_OS_MAC
+#ifdef Q_WS_MAC
 	        CFBundleRef bundleRef = CFBundleGetMainBundle();
 		if (bundleRef) {
 		    QCFType<CFURLRef> urlRef = CFBundleCopyBundleURL(bundleRef);
--- qt-mac-opensource-src-4.2.2/src/corelib/global/qnamespace.h	2006-11-27 12:37:35.000000000 -0500
+++ qt-mac-opensource-src-4.2.2-patched/src/corelib/global/qnamespace.h	2007-01-29 13:40:55.000000000 -0500
@@ -919,7 +919,7 @@
     };
 
 #if defined(QT3_SUPPORT)
-#if defined(Q_OS_MAC)
+#if defined(Q_WS_MAC)
 #ifndef qdoc
     typedef int MacintoshVersion;
 
--- qt-mac-opensource-src-4.2.2/src/corelib/io/io.pri	2006-11-27 12:37:35.000000000 -0500
+++ qt-mac-opensource-src-4.2.2-patched/src/corelib/io/io.pri	2007-01-29 13:40:55.000000000 -0500
@@ -60,7 +60,7 @@
             HEADERS += io/qfilesystemwatcher_inotify_p.h
         }
 
-        freebsd-*|macx-*:{
+        freebsd-*|macx-*|darwin-*:{
             SOURCES += io/qfilesystemwatcher_kqueue.cpp
             HEADERS += io/qfilesystemwatcher_kqueue_p.h
         }
--- qt-mac-opensource-src-4.2.2/src/corelib/io/qdir.cpp	2006-11-27 12:37:35.000000000 -0500
+++ qt-mac-opensource-src-4.2.2-patched/src/corelib/io/qdir.cpp	2007-01-29 13:40:55.000000000 -0500
@@ -1761,7 +1761,7 @@
     return QLatin1Char('/');
 #elif defined (Q_FS_FAT) || defined(Q_WS_WIN)
     return QLatin1Char('\\');
-#elif defined (Q_OS_MAC)
+#elif defined (Q_WS_MAC)
     return QLatin1Char(':');
 #else
     return QLatin1Char('/');
--- qt-mac-opensource-src-4.2.2/src/corelib/io/qfsfileengine_unix.cpp	2006-11-27 12:37:35.000000000 -0500
+++ qt-mac-opensource-src-4.2.2-patched/src/corelib/io/qfsfileengine_unix.cpp	2007-01-29 13:40:55.000000000 -0500
@@ -36,7 +36,7 @@
 #include <stdlib.h>
 #include <limits.h>
 #include <errno.h>
-#if !defined(QWS) && defined(Q_OS_MAC)
+#if !defined(QWS) && defined(Q_WS_MAC)
 # include <private/qcore_mac_p.h>
 #endif
 
@@ -400,7 +400,7 @@
             ret |= ExeOtherPerm;
     }
     if(type & TypesMask) {
-#if !defined(QWS) && defined(Q_OS_MAC)
+#if !defined(QWS) && defined(Q_WS_MAC)
         bool foundAlias = false;
         {
             FSRef fref;
@@ -535,7 +535,7 @@
                 return ret;
             }
         }
-#if !defined(QWS) && defined(Q_OS_MAC)
+#if !defined(QWS) && defined(Q_WS_MAC)
         {
             FSRef fref;
             if(FSPathMakeRef((const UInt8 *)QFile::encodeName(QDir::cleanPath(d->file)).data(), &fref, 0) == noErr) {
--- qt-mac-opensource-src-4.2.2/src/corelib/io/qprocess_unix.cpp	2006-11-27 12:37:35.000000000 -0500
+++ qt-mac-opensource-src-4.2.2-patched/src/corelib/io/qprocess_unix.cpp	2007-01-29 13:40:55.000000000 -0500
@@ -65,7 +65,7 @@
 #include "qprocess.h"
 #include "qprocess_p.h"
 
-#ifdef Q_OS_MAC
+#ifdef Q_WS_MAC
 #include <private/qcore_mac_p.h>
 #endif
 
@@ -605,7 +605,7 @@
     argv[arguments.count() + 1] = 0;
 
     // allow invoking of .app bundles on the Mac.
-#ifdef Q_OS_MAC
+#ifdef Q_WS_MAC
     QFileInfo fileInfo(encodedProgramName);
     if (encodedProgramName.endsWith(".app") && fileInfo.isDir()) {
         QCFType<CFURLRef> url = CFURLCreateWithFileSystemPath(0,
--- qt-mac-opensource-src-4.2.2/src/corelib/io/qsettings.cpp	2006-11-27 12:37:35.000000000 -0500
+++ qt-mac-opensource-src-4.2.2-patched/src/corelib/io/qsettings.cpp	2007-01-29 13:40:55.000000000 -0500
@@ -275,7 +275,7 @@
 
 // see also qsettings_win.cpp and qsettings_mac.cpp
 
-#if !defined(Q_OS_WIN) && !defined(Q_OS_MAC)
+#if !defined(Q_OS_WIN) && !defined(Q_WS_MAC)
 QSettingsPrivate *QSettingsPrivate::create(QSettings::Format format, QSettings::Scope scope,
                                            const QString &organization, const QString &application)
 {
@@ -927,7 +927,7 @@
     extension = (format == QSettings::NativeFormat) ? QLatin1String(".conf") : QLatin1String(".ini");
     readFunc = 0;
     writeFunc = 0;
-#if defined(Q_OS_MAC)
+#if defined(Q_WS_MAC)
     caseSensitivity = (format == QSettings::NativeFormat) ? Qt::CaseSensitive : Qt::CaseInsensitive;
 #else
     caseSensitivity = IniCaseSensitivity;
@@ -1073,7 +1073,7 @@
 
         pathHash->insert(pathHashKey(QSettings::IniFormat, QSettings::UserScope), userPath);
         pathHash->insert(pathHashKey(QSettings::IniFormat, QSettings::SystemScope), systemPath);
-#ifndef Q_OS_MAC
+#ifndef Q_WS_MAC
         pathHash->insert(pathHashKey(QSettings::NativeFormat, QSettings::UserScope), userPath);
         pathHash->insert(pathHashKey(QSettings::NativeFormat, QSettings::SystemScope), systemPath);
 #endif
@@ -1455,7 +1455,7 @@
             because they don't exist) are treated as empty files.
         */
         if (file.isReadable() && fileInfo.size() != 0) {
-#ifdef Q_OS_MAC
+#ifdef Q_WS_MAC
             if (format == QSettings::NativeFormat) {
                 ok = readPlistFile(confFile->name, &confFile->originalKeys);
             } else
@@ -1501,7 +1501,7 @@
         ParsedSettingsMap mergedKeys = confFile->mergedKeyMap();
 
         if (file.isWritable()) {
-#ifdef Q_OS_MAC
+#ifdef Q_WS_MAC
             if (format == QSettings::NativeFormat) {
                 ok = writePlistFile(confFile->name, mergedKeys);
             } else
@@ -2560,7 +2560,7 @@
 */
 QSettings::QSettings(QObject *parent)
     : QObject(*QSettingsPrivate::create(NativeFormat, UserScope,
-#ifdef Q_OS_MAC
+#ifdef Q_WS_MAC
                                         QCoreApplication::organizationDomain().isEmpty()
                                             ? QCoreApplication::organizationName()
                                             : QCoreApplication::organizationDomain()
@@ -3223,7 +3223,7 @@
 void QSettings::setSystemIniPath(const QString &dir)
 {
     setPath(IniFormat, SystemScope, dir);
-#if !defined(Q_OS_WIN) && !defined(Q_OS_MAC)
+#if !defined(Q_OS_WIN) && !defined(Q_WS_MAC)
     setPath(NativeFormat, SystemScope, dir);
 #endif
 }
@@ -3237,7 +3237,7 @@
 void QSettings::setUserIniPath(const QString &dir)
 {
     setPath(IniFormat, UserScope, dir);
-#if !defined(Q_OS_WIN) && !defined(Q_OS_MAC)
+#if !defined(Q_OS_WIN) && !defined(Q_WS_MAC)
     setPath(NativeFormat, UserScope, dir);
 #endif
 }
--- qt-mac-opensource-src-4.2.2/src/corelib/io/qsettings_p.h	2006-11-27 12:37:35.000000000 -0500
+++ qt-mac-opensource-src-4.2.2-patched/src/corelib/io/qsettings_p.h	2007-01-29 13:40:55.000000000 -0500
@@ -260,7 +260,7 @@
     void initAccess();
     void syncConfFile(int confFileNo);
     bool writeIniFile(QIODevice &device, const ParsedSettingsMap &map);
-#ifdef Q_OS_MAC
+#ifdef Q_WS_MAC
     bool readPlistFile(const QString &fileName, ParsedSettingsMap *map) const;
     bool writePlistFile(const QString &fileName, const ParsedSettingsMap &map) const;
 #endif
--- qt-mac-opensource-src-4.2.2/src/corelib/plugin/qlibrary.cpp	2006-11-27 12:37:36.000000000 -0500
+++ qt-mac-opensource-src-4.2.2-patched/src/corelib/plugin/qlibrary.cpp	2007-01-29 13:40:55.000000000 -0500
@@ -34,7 +34,7 @@
 #include <qmap.h>
 #include <qsettings.h>
 #include <qdatetime.h>
-#ifdef Q_OS_MAC
+#ifdef Q_WS_MAC
 #  include <private/qcore_mac_p.h>
 #endif
 #ifndef NO_ERRNO_H
--- qt-mac-opensource-src-4.2.2/src/corelib/plugin/qlibrary_unix.cpp	2006-11-27 12:37:36.000000000 -0500
+++ qt-mac-opensource-src-4.2.2-patched/src/corelib/plugin/qlibrary_unix.cpp	2007-01-29 13:40:55.000000000 -0500
@@ -30,7 +30,7 @@
 
 #ifndef QT_NO_LIBRARY
 
-#ifdef Q_OS_MAC
+#ifdef Q_WS_MAC
 #  include <private/qcore_mac_p.h>
 #endif
 
@@ -177,7 +177,7 @@
             pHnd = dlopen(QFile::encodeName(attempt), dlFlags);
         }
     }
-#ifdef Q_OS_MAC
+#ifdef Q_WS_MAC
     if (!pHnd) {
         if (CFBundleRef bundle = CFBundleGetBundleWithIdentifier(QCFString(fileName))) {
             QCFType<CFURLRef> url = CFBundleCopyExecutableURL(bundle);
@@ -207,7 +207,7 @@
     return true;
 }
 
-#ifdef Q_OS_MAC
+#ifdef Q_WS_MAC
 Q_CORE_EXPORT void *qt_mac_resolve_sys(void *handle, const char *symbol)
 {
     return dlsym(handle, symbol);
--- qt-mac-opensource-src-4.2.2/src/corelib/tools/qlocale.cpp	2006-11-27 12:37:36.000000000 -0500
+++ qt-mac-opensource-src-4.2.2-patched/src/corelib/tools/qlocale.cpp	2007-01-29 13:40:55.000000000 -0500
@@ -35,7 +35,7 @@
 #   include "qt_windows.h"
 #   include <time.h>
 #endif
-#if !defined(QWS) && defined(Q_OS_MAC)
+#if !defined(QWS) && defined(Q_WS_MAC)
 #   include "private/qcore_mac_p.h"
 #endif
 #include "private/qnumeric_p.h"
@@ -828,7 +828,7 @@
 }
 
 
-#elif defined(Q_OS_MAC)
+#elif defined(Q_WS_MAC)
 /******************************************************************************
 ** Wrappers for Mac locale system functions
 */
--- qt-mac-opensource-src-4.2.2/src/corelib/tools/qpoint.h	2006-11-27 12:37:36.000000000 -0500
+++ qt-mac-opensource-src-4.2.2-patched/src/corelib/tools/qpoint.h	2007-01-29 13:40:55.000000000 -0500
@@ -64,7 +64,7 @@
 
 private:
 
-#if defined(Q_OS_MAC)
+#if defined(Q_WS_MAC)
     int yp;
     int xp;
 #else
--- qt-mac-opensource-src-4.2.2/src/corelib/tools/qrect.h	2006-11-27 12:37:36.000000000 -0500
+++ qt-mac-opensource-src-4.2.2-patched/src/corelib/tools/qrect.h	2007-01-29 13:40:55.000000000 -0500
@@ -152,7 +152,7 @@
 #if defined(Q_WS_X11) || defined(Q_OS_TEMP)
     friend void qt_setCoords(QRect *r, int xp1, int yp1, int xp2, int yp2);
 #endif
-#if defined(Q_OS_MAC)
+#if defined(Q_WS_MAC)
     int y1;
     int x1;
     int y2;
--- qt-mac-opensource-src-4.2.2/src/gui/dialogs/qprintdialog.h	2006-11-27 12:37:39.000000000 -0500
+++ qt-mac-opensource-src-4.2.2-patched/src/gui/dialogs/qprintdialog.h	2007-01-29 13:40:55.000000000 -0500
@@ -46,7 +46,7 @@
 
     int exec();
 
-#if defined (Q_OS_UNIX) && !defined (Q_OS_MAC) && defined (QT3_SUPPORT)
+#if defined (Q_OS_UNIX) && !defined (Q_WS_MAC) && defined (QT3_SUPPORT)
     void setPrinter(QPrinter *, bool = false);
     QPrinter *printer() const;
     void addButton(QPushButton *button);
--- qt-mac-opensource-src-4.2.2/src/gui/kernel/qapplication.h	2006-11-27 12:37:43.000000000 -0500
+++ qt-mac-opensource-src-4.2.2-patched/src/gui/kernel/qapplication.h	2007-01-29 13:40:55.000000000 -0500
@@ -273,7 +273,7 @@
 #if defined(Q_OS_WIN32) || defined(Q_OS_CYGWIN)
     static QT3_SUPPORT Qt::WindowsVersion winVersion() { return (Qt::WindowsVersion)QSysInfo::WindowsVersion; }
 #endif
-#if defined(Q_OS_MAC)
+#if defined(Q_WS_MAC)
     static QT3_SUPPORT Qt::MacintoshVersion macVersion() { return (Qt::MacintoshVersion)QSysInfo::MacintoshVersion; }
 #endif
     inline static  QT3_SUPPORT void setOverrideCursor(const QCursor &cursor, bool replace)
--- qt-mac-opensource-src-4.2.2/src/gui/kernel/qapplication_p.h	2006-11-27 12:37:42.000000000 -0500
+++ qt-mac-opensource-src-4.2.2-patched/src/gui/kernel/qapplication_p.h	2007-01-29 13:40:55.000000000 -0500
@@ -68,7 +68,7 @@
 # ifdef Q_OS_TEMP
   extern DWORD qt_cever;
 # endif
-#elif defined (Q_OS_MAC)
+#elif defined (Q_WS_MAC)
 extern QSysInfo::MacVersion qt_macver;
 #endif
 #if defined(Q_WS_QWS)
--- qt-mac-opensource-src-4.2.2/src/gui/text/qfont.cpp	2006-11-27 12:37:38.000000000 -0500
+++ qt-mac-opensource-src-4.2.2-patched/src/gui/text/qfont.cpp	2007-01-29 13:40:55.000000000 -0500
@@ -2025,7 +2025,7 @@
 {
     QFontEngine *engine = d->engineForScript(QUnicodeTables::Common);
     Q_ASSERT(engine != 0);
-#ifdef Q_OS_MAC
+#ifdef Q_WS_MAC
     if (!engine->fontDef.fixedPitchComputed) {
         QChar ch[2] = { QChar('i'), QChar('m') };
         QGlyphLayout g[2];
--- qt-mac-opensource-src-4.2.2/src/gui/text/qfontdatabase.cpp	2006-11-27 12:37:38.000000000 -0500
+++ qt-mac-opensource-src-4.2.2-patched/src/gui/text/qfontdatabase.cpp	2007-01-29 13:40:55.000000000 -0500
@@ -338,7 +338,7 @@
         writingSystemCheck(false),
         loaded(false),
 #endif
-#if !defined(QWS) && defined(Q_OS_MAC)
+#if !defined(QWS) && defined(Q_WS_MAC)
         fixedPitchComputed(false),
 #endif
         name(n), count(0), foundries(0) {
@@ -360,7 +360,7 @@
     bool writingSystemCheck : 1;
     bool loaded : 1;
 #endif
-#if !defined(QWS) && defined(Q_OS_MAC)
+#if !defined(QWS) && defined(Q_WS_MAC)
     bool fixedPitchComputed : 1;
 #endif
 #ifdef Q_WS_X11
@@ -384,7 +384,7 @@
     QtFontFoundry *foundry(const QString &f, bool = false);
 };
 
-#if !defined(QWS) && defined(Q_OS_MAC)
+#if !defined(QWS) && defined(Q_WS_MAC)
 inline static void qt_mac_get_fixed_pitch(QtFontFamily *f)
 {
     if(f && !f->fixedPitchComputed) {
@@ -939,7 +939,7 @@
         }
 #else
         if (pitch != '*') {
-#if !defined(QWS) && defined(Q_OS_MAC)
+#if !defined(QWS) && defined(Q_WS_MAC)
             qt_mac_get_fixed_pitch(const_cast<QtFontFamily*>(family));
 #endif
             if ((pitch == 'm' && !family->fixedPitch)
@@ -1561,7 +1561,7 @@
     ::load(familyName);
 
     QtFontFamily *f = d->family(familyName);
-#if !defined(QWS) && defined(Q_OS_MAC)
+#if !defined(QWS) && defined(Q_WS_MAC)
     qt_mac_get_fixed_pitch(f);
 #endif
     return (f && f->fixedPitch);
--- qt-mac-opensource-src-4.2.2/src/opengl/qpaintengine_opengl.cpp	2006-11-27 12:37:42.000000000 -0500
+++ qt-mac-opensource-src-4.2.2-patched/src/opengl/qpaintengine_opengl.cpp	2007-01-29 13:40:55.000000000 -0500
@@ -50,7 +50,7 @@
 #include "qttessellator_p.h"
 #else
 #include <private/qstroker_p.h>
-# ifdef Q_OS_MAC
+# ifdef Q_WS_MAC
 #  include <OpenGL/glu.h>
 # else
 #  include <GL/glu.h>
@@ -1028,7 +1028,7 @@
     GLUtesselator *qgl_tess = tessHandler()->qgl_tess;
 
 // This removes warnings on OS X 10.4 and below.
-#if defined(Q_OS_MAC) && !defined(Q_CC_INTEL) && (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5)
+#if defined(Q_WS_MAC) && !defined(Q_CC_INTEL) && (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5)
     gluTessCallback(qgl_tess, GLU_TESS_BEGIN, reinterpret_cast<GLvoid (CALLBACK *)(...)>(&glBegin));
     gluTessCallback(qgl_tess, GLU_TESS_VERTEX,
                     reinterpret_cast<GLvoid (CALLBACK *)(...)>(&glVertex3dv));
--- qt-mac-opensource-src-4.2.2/src/qbase.pri	2006-11-27 12:37:32.000000000 -0500
+++ qt-mac-opensource-src-4.2.2-patched/src/qbase.pri	2007-01-29 13:40:55.000000000 -0500
@@ -65,7 +65,6 @@
 
 mac {
    CONFIG += explicitlib
-   QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.2 #enables weak linking for 10.2 (exported)
    macx-g++ {
        QMAKE_CFLAGS += -fconstant-cfstrings
        QMAKE_CXXFLAGS += -fconstant-cfstrings
--- qt-mac-opensource-src-4.2.2/src/qt3support/other/q3accel.cpp	2006-11-27 12:37:44.000000000 -0500
+++ qt-mac-opensource-src-4.2.2-patched/src/qt3support/other/q3accel.cpp	2007-01-29 13:40:55.000000000 -0500
@@ -215,7 +215,7 @@
     Returns true if the accel is in the current subwindow, else false.
 */
 bool Q3AccelManager::correctSubWindow(QWidget* w, Q3AccelPrivate* d) {
-#if !defined (Q_OS_MACX)
+#if !defined (Q_WS_MACX)
      if (!d->watch || !d->watch->isVisible() || !d->watch->isEnabled())
 #else
     if (!d->watch || (!d->watch->isVisible() && !d->watch->inherits("QMenuBar")) || !d->watch->isEnabled())
--- qt-mac-opensource-src-4.2.2/src/qt3support/other/q3polygonscanner.cpp	2006-11-27 12:37:44.000000000 -0500
+++ qt-mac-opensource-src-4.2.2-patched/src/qt3support/other/q3polygonscanner.cpp	2007-01-29 13:40:55.000000000 -0500
@@ -474,7 +474,7 @@
  */
 
 typedef struct {
-#if defined(Q_OS_MAC)
+#if defined(Q_WS_MAC)
     int y, x;
 #else
     int x, y;
--- qt-mac-opensource-src-4.2.2/src/qt3support/other/q3process_unix.cpp	2006-11-27 12:37:44.000000000 -0500
+++ qt-mac-opensource-src-4.2.2-patched/src/qt3support/other/q3process_unix.cpp	2007-01-29 13:40:55.000000000 -0500
@@ -748,7 +748,7 @@
 #endif
 	i++;
     }
-#ifdef Q_OS_MACX
+#ifdef Q_WS_MACX
     if(i) {
 	Q3CString arg_bundle = arglistQ[0];
 	QFileInfo fi(arg_bundle);
@@ -845,7 +845,7 @@
 		    QStringList pathList = QStringList::split( ':', getenv( "PATH" ) );
 		    for (QStringList::Iterator it = pathList.begin(); it != pathList.end(); ++it ) {
 			QString dir = *it;
-#if defined(Q_OS_MACX) //look in a bundle
+#if defined(Q_WS_MACX) //look in a bundle
 			if(!QFile::exists(dir + "/" + command) && QFile::exists(dir + "/" + command + ".app"))
 			    dir += "/" + command + ".app/Contents/MacOS";
 #endif
@@ -855,7 +855,7 @@
 			QFileInfo fileInfo( dir + "/" + command );
 #endif
 			if ( fileInfo.isExecutable() ) {
-#if defined(Q_OS_MACX)
+#if defined(Q_WS_MACX)
 			    arglistQ[0] = fileInfo.absFilePath().local8Bit();
 #else
 			    arglistQ[0] = fileInfo.filePath().local8Bit();
--- qt-mac-opensource-src-4.2.2/src/qt3support/text/q3textedit.cpp	2006-11-27 12:37:45.000000000 -0500
+++ qt-mac-opensource-src-4.2.2-patched/src/qt3support/text/q3textedit.cpp	2007-01-29 13:40:55.000000000 -0500
@@ -1357,7 +1357,7 @@
             unsigned char ascii = e->text().length() ? e->text().unicode()->latin1() : 0;
             if (e->text().length() &&
                 (!(e->state() & Qt::ControlButton) &&
-#ifndef Q_OS_MAC
+#ifndef Q_WS_MAC
                   !(e->state() & Qt::AltButton) &&
 #endif
                   !(e->state() & Qt::MetaButton) ||
@@ -2432,7 +2432,7 @@
     {
         Q3TextCursor c1 = *cursor;
         Q3TextCursor c2 = *cursor;
-#if defined(Q_OS_MAC)
+#if defined(Q_WS_MAC)
         Q3TextParagraph *para = cursor->paragraph();
         if (cursor->isValid()) {
             if (para->at(cursor->index())->c.isLetterOrNumber()) {
--- qt-mac-opensource-src-4.2.2/src/sql/drivers/odbc/qsql_odbc.h	2006-11-27 12:37:56.000000000 -0500
+++ qt-mac-opensource-src-4.2.2-patched/src/sql/drivers/odbc/qsql_odbc.h	2007-01-29 13:40:55.000000000 -0500
@@ -31,7 +31,7 @@
 #include <QtCore/qt_windows.h>
 #endif
 
-#if defined (Q_OS_MAC) && (MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_3)
+#if defined (Q_WS_MAC) && (MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_3)
 // assume we use iodbc on MACX
 // comment next line out if you use a
 // unicode compatible manager
--- qt-mac-opensource-src-4.2.2/src/tools/moc/moc.pro	2006-11-27 12:37:30.000000000 -0500
+++ qt-mac-opensource-src-4.2.2-patched/src/tools/moc/moc.pro	2007-01-29 13:40:55.000000000 -0500
@@ -63,11 +63,8 @@
 
 win32:SOURCES += ../../corelib/io/qfsfileengine_win.cpp
 
-macx: {
-   QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.2 #enables weak linking for 10.2 (exported)
    SOURCES += ../../corelib/kernel/qcore_mac.cpp
    LIBS += -framework CoreServices
-}
 
 target.path=$$[QT_INSTALL_BINS]
 INSTALLS += target
--- qt-mac-opensource-src-4.2.2/src/tools/rcc/rcc.pro	2006-11-27 12:37:30.000000000 -0500
+++ qt-mac-opensource-src-4.2.2-patched/src/tools/rcc/rcc.pro	2007-01-29 13:40:55.000000000 -0500
@@ -59,11 +59,8 @@
 
 win32:SOURCES += ../../corelib/io/qfsfileengine_win.cpp
 
-macx: {
-   QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.2 #enables weak linking for 10.2 (exported)
    SOURCES += ../../corelib/kernel/qcore_mac.cpp
    LIBS += -framework CoreServices
-}
 
 contains(QT_CONFIG, zlib) {
    INCLUDEPATH += ../../3rdparty/zlib
--- qt-mac-opensource-src-4.2.2/src/tools/uic/uic.pro	2006-11-27 12:37:30.000000000 -0500
+++ qt-mac-opensource-src-4.2.2-patched/src/tools/uic/uic.pro	2007-01-29 13:40:55.000000000 -0500
@@ -67,11 +67,8 @@
 
 win32:SOURCES += ../../corelib/io/qfsfileengine_win.cpp
 
-macx: {
-   QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.2 #enables weak linking for 10.2 (exported)
    SOURCES += ../../corelib/kernel/qcore_mac.cpp
    LIBS += -framework CoreServices
-}
 
 contains(QT_CONFIG, zlib) {
    INCLUDEPATH += ../../3rdparty/zlib
--- qt-mac-opensource-src-4.2.2/tools/assistant/lib/qassistantclient.cpp	2006-11-27 12:37:45.000000000 -0500
+++ qt-mac-opensource-src-4.2.2-patched/tools/assistant/lib/qassistantclient.cpp	2007-01-29 13:40:55.000000000 -0500
@@ -181,7 +181,7 @@
             assistantCommand = path;
     }
 
-#if defined(Q_OS_MAC)
+#if defined(Q_WS_MAC)
     assistantCommand += ".app/Contents/MacOS/assistant";
 #endif
 
--- qt-x11-opensource-src-4.2.2/tools/qdbus/src/qdbusthread.cpp	2006-11-27 12:26:17.000000000 -0500
+++ qt-x11-opensource-src-4.2.2-new/tools/qdbus/src/qdbusthread.cpp	2007-02-26 17:50:27.000000000 -0500
@@ -109,7 +109,7 @@
         0, 0, 0, 0, 0, 0, 0, 0
     };
 
-    dbus_threads_init(&fcn);
+    dbus_threads_init_default();
     return true;
 }
 
