Link to AppKit instead of Cocoa.

Cocoa is basically just AppKit + CoreData. Since we do not use CoreData
in Qt, there is no reason to link to it or (transitively) import its
headers.

This is just a mechanical replacement of -framework Cocoa with
-framework AppKit and <Cocoa/Cocoa.h> with <AppKit/AppKit.h>

Change-Id: Ibcfc8a03c0ddff27a67fbc87dd7bd58a4b648956
Reviewed-by: Mika Lindqvist <postmaster@raasu.org>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
This commit is contained in:
Jake Petroules 2015-08-26 01:48:34 -07:00 committed by Mika Lindqvist
parent 76cf88157f
commit 353b160a4a
54 changed files with 63 additions and 61 deletions

View File

@ -31,7 +31,7 @@
**
****************************************************************************/
#include <Cocoa/Cocoa.h>
#include <AppKit/AppKit.h>
#include <QtWidgets>
#include <QMacCocoaViewContainer>

View File

@ -1,7 +1,7 @@
TEMPLATE = app
OBJECTIVE_SOURCES += main.mm
LIBS += -framework Cocoa
LIBS += -framework AppKit
QT += widgets

View File

@ -31,7 +31,7 @@
**
****************************************************************************/
#import <Cocoa/Cocoa.h>
#import <AppKit/AppKit.h>
#include <QApplication>
#include <QDebug>

View File

@ -1,7 +1,7 @@
TEMPLATE = app
OBJECTIVE_SOURCES += main.mm
LIBS += -framework Cocoa
LIBS += -framework AppKit
QT += widgets
#QT += widgets-private gui-private core-private

View File

@ -33,7 +33,7 @@ testcocoon {
load(testcocoon)
}
mac:!ios: LIBS_PRIVATE += -framework Cocoa
osx: LIBS_PRIVATE += -framework AppKit
CONFIG += simd optimize_full

View File

@ -34,7 +34,7 @@
#include "cglconvenience_p.h"
#include <QtCore/qglobal.h>
#include <QtCore/private/qcore_mac_p.h>
#include <Cocoa/Cocoa.h>
#include <AppKit/AppKit.h>
#include <QVector>
void (*qcgl_getProcAddress(const QByteArray &procName))()

View File

@ -1,4 +1,4 @@
mac:!ios {
osx {
INCLUDEPATH += $$PWD
HEADERS += \
@ -7,5 +7,5 @@ mac:!ios {
OBJECTIVE_SOURCES += \
$$PWD/cglconvenience.mm
LIBS_PRIVATE += -framework Cocoa -framework OpenGL
LIBS_PRIVATE += -framework AppKit -framework OpenGL
}

View File

@ -32,10 +32,13 @@
****************************************************************************/
#include <QtCore/qsystemdetection.h>
#if defined(Q_OS_OSX)
#import <AppKit/AppKit.h>
#endif
#if defined(Q_OS_IOS)
#import <UIKit/UIKit.h>
#elif defined(Q_OS_OSX)
#import <Cocoa/Cocoa.h>
#endif
#include "qmacmime_p.h"

View File

@ -35,8 +35,8 @@
#include <sys/param.h>
#if defined(Q_OS_MACX)
#import <Cocoa/Cocoa.h>
#if defined(Q_OS_OSX)
#import <AppKit/AppKit.h>
#import <IOKit/graphics/IOGraphicsLib.h>
#elif defined(Q_OS_IOS)
#import <UIKit/UIFont.h>

View File

@ -84,7 +84,7 @@ contains(QT_CONFIG, opengl.*) {
RESOURCES += qcocoaresources.qrc
LIBS += -framework Cocoa -framework Carbon -framework IOKit -lcups
LIBS += -framework AppKit -framework Carbon -framework IOKit -lcups
QT += core-private gui-private platformsupport-private

View File

@ -31,7 +31,7 @@
**
****************************************************************************/
#include <Cocoa/Cocoa.h>
#include <AppKit/AppKit.h>
#include <qpa/qplatformintegrationplugin.h>
#include <qpa/qplatformthemeplugin.h>

View File

@ -33,7 +33,7 @@
#ifndef QCOCOAACCESIBILITY_H
#define QCOCOAACCESIBILITY_H
#include <Cocoa/Cocoa.h>
#include <AppKit/AppKit.h>
#include <QtGui>
#include <qpa/qplatformaccessibility.h>

View File

@ -37,8 +37,7 @@
#include "qt_mac_p.h"
#import <Cocoa/Cocoa.h>
#import <AppKit/NSAccessibility.h>
#import <AppKit/AppKit.h>
#import <qaccessible.h>

View File

@ -79,7 +79,7 @@
//
#import <Cocoa/Cocoa.h>
#import <AppKit/AppKit.h>
#include <qglobal.h>
#include <private/qcore_mac_p.h>

View File

@ -34,7 +34,7 @@
#ifndef QBACKINGSTORE_COCOA_H
#define QBACKINGSTORE_COCOA_H
#include <Cocoa/Cocoa.h>
#include <AppKit/AppKit.h>
#include "qcocoawindow.h"
#include "qnsview.h"

View File

@ -34,7 +34,7 @@
#ifndef QWINDOWSCURSOR_H
#define QWINDOWSCURSOR_H
#include <Cocoa/Cocoa.h>
#include <AppKit/AppKit.h>
#include <QtCore>
#include <qpa/qplatformcursor.h>

View File

@ -34,7 +34,7 @@
#ifndef QCOCOADRAG_H
#define QCOCOADRAG_H
#include <Cocoa/Cocoa.h>
#include <AppKit/AppKit.h>
#include <QtGui>
#include <qpa/qplatformdrag.h>
#include <private/qsimpledrag_p.h>

View File

@ -80,7 +80,7 @@
#include <qdebug.h>
#undef slots
#include <Cocoa/Cocoa.h>
#include <AppKit/AppKit.h>
#include <Carbon/Carbon.h>
QT_BEGIN_NAMESPACE

View File

@ -40,7 +40,7 @@
#include <QtGui/QWindow>
#undef slots
#include <Cocoa/Cocoa.h>
#include <AppKit/AppKit.h>
QT_BEGIN_NAMESPACE

View File

@ -39,7 +39,7 @@
#include <QtPlatformSupport/private/cglconvenience_p.h>
#include <QtPlatformHeaders/qcocoanativecontext.h>
#import <Cocoa/Cocoa.h>
#import <AppKit/AppKit.h>
QT_BEGIN_NAMESPACE

View File

@ -34,7 +34,7 @@
#ifndef QPLATFORMINTEGRATION_COCOA_H
#define QPLATFORMINTEGRATION_COCOA_H
#include <Cocoa/Cocoa.h>
#include <AppKit/AppKit.h>
#include "qcocoacursor.h"
#include "qcocoawindow.h"

View File

@ -36,7 +36,7 @@
#include <qcocoahelpers.h>
#include <Cocoa/Cocoa.h>
#include <AppKit/AppKit.h>
#include <Carbon/Carbon.h>
#include <QtCore/QList>

View File

@ -31,7 +31,7 @@
**
****************************************************************************/
#include <Cocoa/Cocoa.h>
#include <AppKit/AppKit.h>
#include "qcocoamenubar.h"
#include "qcocoawindow.h"

View File

@ -45,7 +45,7 @@
// We mean it.
//
#import <Cocoa/Cocoa.h>
#import <AppKit/AppKit.h>
#include <QtCore/private/qcore_mac_p.h>
@interface QT_MANGLE_NAMESPACE(QCocoaMenuLoader) : NSResponder

View File

@ -60,7 +60,7 @@
#include <QtPlatformHeaders/qcocoawindowfunctions.h>
#include <Cocoa/Cocoa.h>
#include <AppKit/AppKit.h>
QT_BEGIN_NAMESPACE

View File

@ -31,7 +31,7 @@
**
****************************************************************************/
#import <Cocoa/Cocoa.h>
#import <AppKit/AppKit.h>
#include "qcocoatheme.h"
#include "messages.h"

View File

@ -34,7 +34,7 @@
#ifndef QCOCOAWINDOW_H
#define QCOCOAWINDOW_H
#include <Cocoa/Cocoa.h>
#include <AppKit/AppKit.h>
#include <qpa/qplatformwindow.h>
#include <QRect>

View File

@ -47,7 +47,7 @@
#include <qpa/qwindowsysteminterface.h>
#include <qpa/qplatformscreen.h>
#include <Cocoa/Cocoa.h>
#include <AppKit/AppKit.h>
#include <Carbon/Carbon.h>
#include <QDebug>

View File

@ -39,7 +39,7 @@
#undef slots
#import <Cocoa/Cocoa.h>
#import <AppKit/AppKit.h>
QT_BEGIN_NAMESPACE

View File

@ -92,7 +92,7 @@ typedef signed long OSStatus;
# define old_slots slots
# undef slots
# endif
#include <Cocoa/Cocoa.h>
#include <AppKit/AppKit.h>
# ifdef old_slots
# undef slots
# define slots

View File

@ -47,7 +47,7 @@
#include <QtCore/qglobal.h>
#import <Cocoa/Cocoa.h>
#import <AppKit/AppKit.h>
#include <qpa/qwindowsysteminterface.h>
#include <qhash.h>

View File

@ -34,7 +34,7 @@
#ifndef QNSVIEW_H
#define QNSVIEW_H
#include <Cocoa/Cocoa.h>
#include <AppKit/AppKit.h>
#include <QtCore/QPointer>
#include <QtGui/QImage>

View File

@ -34,7 +34,7 @@
#ifndef QNSWINDOWDELEGATE_H
#define QNSWINDOWDELEGATE_H
#include <Cocoa/Cocoa.h>
#include <AppKit/AppKit.h>
#include "qcocoawindow.h"

View File

@ -48,7 +48,7 @@
#include "qmacdefines_mac.h"
#ifdef __OBJC__
#include <Cocoa/Cocoa.h>
#include <AppKit/AppKit.h>
#include <objc/runtime.h>
#endif

View File

@ -5,7 +5,7 @@ PLUGIN_CLASS_NAME = QCocoaPrinterSupportPlugin
load(qt_plugin)
QT += gui-private printsupport-private
LIBS += -framework Cocoa
LIBS += -framework AppKit
SOURCES += main.cpp

View File

@ -8,10 +8,10 @@ HEADERS += \
dialogs/qprintdialog.h \
dialogs/qprintpreviewdialog.h
mac:!ios {
osx {
OBJECTIVE_SOURCES += dialogs/qpagesetupdialog_mac.mm \
dialogs/qprintdialog_mac.mm
LIBS_PRIVATE += -framework Cocoa
LIBS_PRIVATE += -framework AppKit
}
win32 {

View File

@ -32,7 +32,7 @@
****************************************************************************/
#include <Cocoa/Cocoa.h>
#include <AppKit/AppKit.h>
#include "qpagesetupdialog.h"

View File

@ -31,7 +31,7 @@
**
****************************************************************************/
#include <Cocoa/Cocoa.h>
#include <AppKit/AppKit.h>
#include "qprintdialog.h"
#include "qabstractprintdialog_p.h"

View File

@ -31,7 +31,7 @@
**
****************************************************************************/
#include "macmainwindow.h"
#import <Cocoa/Cocoa.h>
#import <AppKit/AppKit.h>
#include <QtGui>

View File

@ -40,7 +40,7 @@
#include <QtGui/QtGui>
#include <QtGui/qmacnativewidget_mac.h>
#import <Cocoa/Cocoa.h>
#import <AppKit/AppKit.h>
int main(int argc, char **argv)
{

View File

@ -1,4 +1,4 @@
!x11:mac:!ios {
LIBS_PRIVATE += -framework Carbon -framework Cocoa -lz
!x11:osx {
LIBS_PRIVATE += -framework Carbon -framework AppKit -lz
*-mwerks:INCLUDEPATH += compat
}

View File

@ -36,7 +36,7 @@
.../doc/src/qstyles.qdoc.
*/
#include <Cocoa/Cocoa.h>
#include <AppKit/AppKit.h>
#include "qmacstyle_mac_p.h"
#include "qmacstyle_mac_p_p.h"

View File

@ -35,7 +35,7 @@
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
#import <Cocoa/Cocoa.h>
#import <AppKit/AppKit.h>
#include "qscroller_p.h"

View File

@ -31,7 +31,7 @@
**
****************************************************************************/
#import <Cocoa/Cocoa.h>
#import <AppKit/AppKit.h>
#include "qmaccocoaviewcontainer_mac.h"
#include <QtCore/QDebug>

View File

@ -31,7 +31,7 @@
**
****************************************************************************/
#import <Cocoa/Cocoa.h>
#import <AppKit/AppKit.h>
#include "qmacnativewidget_mac.h"
#include <QtCore/qdebug.h>

View File

@ -32,7 +32,7 @@
****************************************************************************/
#import <Foundation/Foundation.h>
#import <Cocoa/Cocoa.h>
#import <AppKit/AppKit.h>
#include "qmenu.h"
#include "qmenubar.h"

View File

@ -42,7 +42,7 @@
#include <QtTest>
#include <unistd.h>
#import <Cocoa/Cocoa.h>
#import <AppKit/AppKit.h>
#import <ApplicationServices/ApplicationServices.h>
QT_USE_NAMESPACE

View File

@ -8,9 +8,9 @@ SOURCES += tst_qfontdialog.cpp
RESOURCES += testfonts.qrc
mac {
osx {
# ### fixme
# OBJECTIVE_SOURCES += tst_qfontdialog_mac_helpers.mm
# LIBS += -framework Cocoa
# LIBS += -framework AppKit
}

View File

@ -39,7 +39,7 @@
#include <qpa/qplatformnativeinterface.h>
#include <private/qcore_mac_p.h>
#include <Cocoa/Cocoa.h>
#include <AppKit/AppKit.h>
QString nativeWindowTitle(QWidget *window, Qt::WindowState state)
{

View File

@ -31,7 +31,7 @@
**
****************************************************************************/
#import <Cocoa/Cocoa.h>
#import <AppKit/AppKit.h>
#include <QMenu>
#include <QTest>

View File

@ -31,7 +31,7 @@
**
****************************************************************************/
#import <Cocoa/Cocoa.h>
#import <AppKit/AppKit.h>
@interface TestMouseMovedNSView : NSView {
NSPoint mouseMovedPoint_;

View File

@ -2,7 +2,7 @@ TEMPLATE = app
TARGET = qmaccocoaviewcontainer
INCLUDEPATH += .
QT += widgets
LIBS += -framework Cocoa
LIBS += -framework AppKit
# Input
OBJECTIVE_SOURCES += main.mm TestMouseMovedNSView.m
HEADERS += TestMouseMovedNSView.h

View File

@ -36,7 +36,7 @@
#include <QtGui>
#include <QtWidgets/QtWidgets>
#include <Cocoa/Cocoa.h>
#include <AppKit/AppKit.h>
@interface AppDelegate : NSObject <NSApplicationDelegate> {
QGuiApplication *m_app;

View File

@ -3,7 +3,7 @@ TEMPLATE = app
OBJECTIVE_SOURCES += main.mm
HEADERS += rasterwindow.h
SOURCES += rasterwindow.cpp
LIBS += -framework Cocoa
LIBS += -framework AppKit
QT += gui widgets quick