summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config.tests/mac/coreservices/coreservices.mm48
-rw-r--r--config.tests/mac/coreservices/coreservices.pro3
-rwxr-xr-xconfigure6
-rw-r--r--src/corelib/corelib.pro9
-rw-r--r--src/corelib/global/qfeatures.h10
-rw-r--r--src/corelib/global/qfeatures.txt2
-rw-r--r--src/corelib/global/qglobal.cpp9
-rw-r--r--src/corelib/io/qfilesystemwatcher_fsevents.cpp3
-rw-r--r--src/corelib/io/qfilesystemwatcher_fsevents_p.h4
-rw-r--r--src/corelib/io/qfilesystemwatcher_kqueue.cpp4
-rw-r--r--src/corelib/io/qfilesystemwatcher_kqueue_p.h2
-rw-r--r--src/corelib/io/qfsfileengine.cpp2
-rw-r--r--src/corelib/io/qfsfileengine_unix.cpp8
-rw-r--r--src/corelib/kernel/qcore_mac_p.h8
-rw-r--r--src/corelib/thread/qthread_unix.cpp4
-rw-r--r--src/gui/kernel/mac.pri2
-rw-r--r--src/script/script.pro10
-rw-r--r--src/testlib/testlib.pro10
18 files changed, 125 insertions, 19 deletions
diff --git a/config.tests/mac/coreservices/coreservices.mm b/config.tests/mac/coreservices/coreservices.mm
new file mode 100644
index 0000000..0091e49
--- /dev/null
+++ b/config.tests/mac/coreservices/coreservices.mm
@@ -0,0 +1,48 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <CoreServices/CoreServices.h>
+
+int main()
+{
+ FSRef ref;
+ return 0;
+}
diff --git a/config.tests/mac/coreservices/coreservices.pro b/config.tests/mac/coreservices/coreservices.pro
new file mode 100644
index 0000000..c9bf8ec
--- /dev/null
+++ b/config.tests/mac/coreservices/coreservices.pro
@@ -0,0 +1,3 @@
+SOURCES = coreservices.mm
+LIBS += -framework CoreServices
+CONFIG -= app_bundle qt
diff --git a/configure b/configure
index b771562..a79efef 100755
--- a/configure
+++ b/configure
@@ -6139,6 +6139,12 @@ if [ "$PLATFORM_QPA" = "yes" ]; then
fi
fi
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/mac/coreservices "CoreServices" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
+ QT_CONFIG="$QT_CONFIG coreservices"
+ else
+ QMakeVar add DEFINES QT_NO_CORESERVICES
+ fi
+
fi
diff --git a/src/corelib/corelib.pro b/src/corelib/corelib.pro
index 88b9252..349b3d4 100644
--- a/src/corelib/corelib.pro
+++ b/src/corelib/corelib.pro
@@ -19,7 +19,14 @@ include(codecs/codecs.pri)
include(statemachine/statemachine.pri)
include(xml/xml.pri)
-!nacl:mac|darwin:LIBS_PRIVATE += -framework ApplicationServices
+!qpa:mac|darwin:LIBS_PRIVATE += -framework ApplicationServices
+qpa:mac|darwin {
+ contains(QT_CONFIG, coreservices) {
+ LIBS_PRIVATE += -framework CoreServices
+ } else {
+ LIBS_PRIVATE += -framework CoreFoundation
+ }
+}
mac:lib_bundle:DEFINES += QT_NO_DEBUG_PLUGIN_CHECK
win32:DEFINES-=QT_NO_CAST_TO_ASCII
diff --git a/src/corelib/global/qfeatures.h b/src/corelib/global/qfeatures.h
index b606843..9710079 100644
--- a/src/corelib/global/qfeatures.h
+++ b/src/corelib/global/qfeatures.h
@@ -523,11 +523,6 @@
#define QT_NO_FTP
#endif
-// Hyper Text Transfer Protocol
-#if !defined(QT_NO_HTTP) && (defined(QT_NO_HOSTINFO))
-#define QT_NO_HTTP
-#endif
-
// QInputContext
#if !defined(QT_NO_IM) && (defined(QT_NO_LIBRARY))
#define QT_NO_IM
@@ -583,6 +578,11 @@
#define QT_NO_GRAPHICSVIEW
#endif
+// Hyper Text Transfer Protocol
+#if !defined(QT_NO_HTTP) && (defined(QT_NO_HOSTINFO) || defined(QT_NO_NETWORKPROXY))
+#define QT_NO_HTTP
+#endif
+
// QMdiArea
#if !defined(QT_NO_MDIAREA) && (defined(QT_NO_SCROLLAREA))
#define QT_NO_MDIAREA
diff --git a/src/corelib/global/qfeatures.txt b/src/corelib/global/qfeatures.txt
index 4d938a9..f07fbd5 100644
--- a/src/corelib/global/qfeatures.txt
+++ b/src/corelib/global/qfeatures.txt
@@ -1050,7 +1050,7 @@ SeeAlso: ???
Feature: HTTP
Description: Supports HTTP file access.
Section: Networking
-Requires: HOSTINFO
+Requires: HOSTINFO NETWORKPROXY
Name: Hyper Text Transfer Protocol
SeeAlso: ???
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index a160010..eeeccd3 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -74,7 +74,7 @@
# include <envLib.h>
#endif
-#if defined(Q_CC_MWERKS) && defined(Q_OS_MACX)
+#if defined(Q_OS_MACX) && !defined(QT_NO_CORESERVICES)
#include <CoreServices/CoreServices.h>
#endif
@@ -1643,7 +1643,7 @@ static const unsigned int qt_one = 1;
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_QPA) && defined(Q_OS_MAC)
QT_BEGIN_INCLUDE_NAMESPACE
#include "private/qcore_mac_p.h"
@@ -1697,15 +1697,18 @@ Q_CORE_EXPORT void qt_mac_to_pascal_string(QString s, Str255 str, TextEncoding e
Q_CORE_EXPORT QString qt_mac_from_pascal_string(const Str255 pstr) {
return QCFString(CFStringCreateWithPascalString(0, pstr, CFStringGetSystemEncoding()));
}
+#endif //!defined(QWS) && !defined(Q_WS_QPA) && defined(Q_OS_MAC)
-
+#if !defined(QWS) && defined(Q_OS_MAC)
static QSysInfo::MacVersion macVersion()
{
+#ifndef QT_NO_CORESERVICES
SInt32 gestalt_version;
if (Gestalt(gestaltSystemVersion, &gestalt_version) == noErr) {
return QSysInfo::MacVersion(((gestalt_version & 0x00F0) >> 4) + 2);
}
+#endif
return QSysInfo::MV_Unknown;
}
const QSysInfo::MacVersion QSysInfo::MacintoshVersion = macVersion();
diff --git a/src/corelib/io/qfilesystemwatcher_fsevents.cpp b/src/corelib/io/qfilesystemwatcher_fsevents.cpp
index d3276bd..0f96792 100644
--- a/src/corelib/io/qfilesystemwatcher_fsevents.cpp
+++ b/src/corelib/io/qfilesystemwatcher_fsevents.cpp
@@ -45,6 +45,8 @@
#include "qfilesystemwatcher.h"
#include "qfilesystemwatcher_fsevents_p.h"
+#ifndef QT_NO_FILESYSTEMWATCHER
+
#include <qdebug.h>
#include <qfile.h>
#include <qdatetime.h>
@@ -487,3 +489,4 @@ void QFSEventsFileSystemWatcherEngine::run()
}
QT_END_NAMESPACE
+#endif //QT_NO_FILESYSTEMWATCHER
diff --git a/src/corelib/io/qfilesystemwatcher_fsevents_p.h b/src/corelib/io/qfilesystemwatcher_fsevents_p.h
index b0462b6..c888c61 100644
--- a/src/corelib/io/qfilesystemwatcher_fsevents_p.h
+++ b/src/corelib/io/qfilesystemwatcher_fsevents_p.h
@@ -56,6 +56,8 @@
#include "qfilesystemwatcher_p.h"
+#ifndef QT_NO_FILESYSTEMWATCHER
+
#include <QtCore/qmutex.h>
#include <QtCore/qwaitcondition.h>
#include <QtCore/qthread.h>
@@ -123,6 +125,8 @@ private:
#endif
};
+#endif //QT_NO_FILESYSTEMWATCHER
+
#endif
QT_END_NAMESPACE
diff --git a/src/corelib/io/qfilesystemwatcher_kqueue.cpp b/src/corelib/io/qfilesystemwatcher_kqueue.cpp
index 378ad20..7960792 100644
--- a/src/corelib/io/qfilesystemwatcher_kqueue.cpp
+++ b/src/corelib/io/qfilesystemwatcher_kqueue.cpp
@@ -45,6 +45,8 @@
#include "qfilesystemwatcher_kqueue_p.h"
#include "private/qcore_unix_p.h"
+#ifndef QT_NO_FILESYSTEMWATCHER
+
#include <qdebug.h>
#include <qfile.h>
#include <qsocketnotifier.h>
@@ -343,4 +345,6 @@ process_next_event:
}
}
+#endif //QT_NO_FILESYSTEMWATCHER
+
QT_END_NAMESPACE
diff --git a/src/corelib/io/qfilesystemwatcher_kqueue_p.h b/src/corelib/io/qfilesystemwatcher_kqueue_p.h
index eda646b..edc20ae 100644
--- a/src/corelib/io/qfilesystemwatcher_kqueue_p.h
+++ b/src/corelib/io/qfilesystemwatcher_kqueue_p.h
@@ -60,6 +60,7 @@
#include <QtCore/qthread.h>
#include <QtCore/qvector.h>
+#ifndef QT_NO_FILESYSTEMWATCHER
struct kevent;
QT_BEGIN_NAMESPACE
@@ -92,4 +93,5 @@ private:
QT_END_NAMESPACE
+#endif //QT_NO_FILESYSTEMWATCHER
#endif // FILEWATCHER_KQUEUE_P_H
diff --git a/src/corelib/io/qfsfileengine.cpp b/src/corelib/io/qfsfileengine.cpp
index a1ffb81..90c6ea8 100644
--- a/src/corelib/io/qfsfileengine.cpp
+++ b/src/corelib/io/qfsfileengine.cpp
@@ -152,7 +152,7 @@ QString QFSFileEnginePrivate::canonicalized(const QString &path)
// ... but Linux with uClibc does not have it
#if !defined(__UCLIBC__)
char *ret = 0;
-#if defined(Q_OS_MAC)
+#if defined(Q_OS_MAC) && !defined(QT_NO_CORESERVICES)
// Mac OS X 10.5.x doesn't support the realpath(X,0) extension we use here.
if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_6) {
ret = realpath(path.toLocal8Bit().constData(), (char*)0);
diff --git a/src/corelib/io/qfsfileengine_unix.cpp b/src/corelib/io/qfsfileengine_unix.cpp
index d83f7ee..67bcf45 100644
--- a/src/corelib/io/qfsfileengine_unix.cpp
+++ b/src/corelib/io/qfsfileengine_unix.cpp
@@ -739,7 +739,7 @@ static bool _q_isSymbianHidden(const QString &path, bool isDir)
}
#endif
-#if !defined(QWS) && defined(Q_OS_MAC)
+#if !defined(QWS) && !defined(Q_WS_QPA) && defined(Q_OS_MAC)
static bool _q_isMacHidden(const QString &path)
{
OSErr err = noErr;
@@ -824,7 +824,7 @@ QAbstractFileEngine::FileFlags QFSFileEngine::fileFlags(FileFlags type) const
if (exists && (type & PermsMask))
ret |= d->getPermissions(type);
if (type & TypesMask) {
-#if !defined(QWS) && defined(Q_OS_MAC)
+#if !defined(QWS) && !defined(Q_WS_QPA) && defined(Q_OS_MAC)
bool foundAlias = false;
{
FSRef fref;
@@ -878,7 +878,7 @@ QAbstractFileEngine::FileFlags QFSFileEngine::fileFlags(FileFlags type) const
} else {
QString baseName = fileName(BaseName);
if ((baseName.size() > 0 && baseName.at(0) == QLatin1Char('.'))
-# if !defined(QWS) && defined(Q_OS_MAC)
+# if !defined(QWS) && !defined(Q_WS_QPA) && defined(Q_OS_MAC)
|| _q_isMacHidden(d->filePath)
# endif
) {
@@ -1133,7 +1133,7 @@ QString QFSFileEngine::fileName(FileName file) const
return ret;
}
}
-#if !defined(QWS) && defined(Q_OS_MAC)
+#if !defined(QWS) && !defined(Q_WS_QPA) && defined(Q_OS_MAC)
{
FSRef fref;
if (FSPathMakeRef((const UInt8 *)QFile::encodeName(QDir::cleanPath(d->filePath)).data(), &fref, 0) == noErr) {
diff --git a/src/corelib/kernel/qcore_mac_p.h b/src/corelib/kernel/qcore_mac_p.h
index 9591f08..22b6a36 100644
--- a/src/corelib/kernel/qcore_mac_p.h
+++ b/src/corelib/kernel/qcore_mac_p.h
@@ -68,7 +68,15 @@
# undef qDebug
#endif
+#if defined(QT_BUILD_QMAKE) || defined(QT_BOOTSTRAPPED)
#include <ApplicationServices/ApplicationServices.h>
+#else
+#include <CoreFoundation/CoreFoundation.h>
+#endif
+
+#ifndef QT_NO_CORESERVICES
+#include <CoreServices/CoreServices.h>
+#endif
#undef DEBUG
#ifdef OLD_DEBUG
diff --git a/src/corelib/thread/qthread_unix.cpp b/src/corelib/thread/qthread_unix.cpp
index 20c6fb7..5eba09c 100644
--- a/src/corelib/thread/qthread_unix.cpp
+++ b/src/corelib/thread/qthread_unix.cpp
@@ -83,7 +83,9 @@
# define old_qDebug qDebug
# undef qDebug
# endif
+#ifndef QT_NO_CORESERVICES
# include <CoreServices/CoreServices.h>
+#endif //QT_NO_CORESERVICES
# ifdef old_qDebug
# undef qDebug
@@ -358,7 +360,7 @@ int QThread::idealThreadCount()
{
int cores = -1;
-#if defined(Q_OS_MAC)
+#if defined(Q_OS_MAC) && !defined(Q_WS_QPA)
// Mac OS X
cores = MPProcessorsScheduled();
#elif defined(Q_OS_HPUX)
diff --git a/src/gui/kernel/mac.pri b/src/gui/kernel/mac.pri
index eb47ce9..21acd06 100644
--- a/src/gui/kernel/mac.pri
+++ b/src/gui/kernel/mac.pri
@@ -1,4 +1,4 @@
-!x11:!embedded:!nacl:mac {
+!x11:!embedded:!qpa:mac {
LIBS_PRIVATE += -framework Carbon -lz
*-mwerks:INCLUDEPATH += compat
}
diff --git a/src/script/script.pro b/src/script/script.pro
index 4ee86d7..56d3f7a 100644
--- a/src/script/script.pro
+++ b/src/script/script.pro
@@ -39,10 +39,18 @@ wince* {
LIBS += -lmmtimer
}
-mac {
+!qpa:mac {
DEFINES += ENABLE_JSC_MULTIPLE_THREADS=0
LIBS_PRIVATE += -framework AppKit
}
+qpa:mac {
+ DEFINES += ENABLE_JSC_MULTIPLE_THREADS=0
+ contains(QT_CONFIG, coreservices) {
+ LIBS_PRIVATE += -framework CoreServices
+ } else {
+ LIBS_PRIVATE += -framework CoreFoundation
+ }
+}
include($$WEBKITDIR/JavaScriptCore/JavaScriptCore.pri)
diff --git a/src/testlib/testlib.pro b/src/testlib/testlib.pro
index a8186d8..c25d23d 100644
--- a/src/testlib/testlib.pro
+++ b/src/testlib/testlib.pro
@@ -70,8 +70,16 @@ wince*::LIBS += libcmt.lib \
coredll.lib \
winsock.lib
mac:LIBS += -framework IOKit \
- -framework ApplicationServices \
-framework Security
+!qpa:mac: LIBS += -framework ApplicationServices
+qpa:mac: {
+ contains(QT_CONFIG, coreservices) {
+ LIBS_PRIVATE += -framework CoreServices
+ } else {
+ LIBS_PRIVATE += -framework CoreFoundation
+ }
+}
+
include(../qbase.pri)
QMAKE_TARGET_PRODUCT = QTestLib
QMAKE_TARGET_DESCRIPTION = Qt \