Move QMacInternalPasteboardMime to QtGui

Task-number: QTBUG-83255
Change-Id: I00fda24479ad2c04781c5fefaa15fac1118033a8
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
Tor Arne Vestbø 2020-03-31 12:25:11 +02:00
parent 9bad3508fc
commit 42024666a3
19 changed files with 30 additions and 64 deletions

View File

@ -760,6 +760,14 @@ qt_extend_target(Gui CONDITION WASM
platform/wasm/qwasmlocalfileaccess.cpp platform/wasm/qwasmlocalfileaccess_p.h
)
qt_extend_target(Gui CONDITION IOS OR MACOS
SOURCES
platform/darwin/qmacmime.mm
platform/darwin/qmacmime_p.h
PUBLIC_LIBRARIES
${FWImageIO}
)
qt_extend_target(Gui CONDITION IOS OR MACOS
SOURCES
rhi/qrhimetal.mm rhi/qrhimetal_p.h

View File

@ -0,0 +1,4 @@
HEADERS += $$PWD/qmacmime_p.h
SOURCES += $$PWD/qmacmime.mm
LIBS += -framework ImageIO
macos: LIBS_PRIVATE += -framework AppKit

View File

@ -40,7 +40,10 @@
#include <ImageIO/ImageIO.h>
#include <QtCore/qsystemdetection.h>
#include <QtCore/qurl.h>
#include <QtGui/qimage.h>
#include <QtCore/qmimedata.h>
#include <QtCore/qstringconverter.h>
#if defined(Q_OS_MACOS)
#import <AppKit/AppKit.h>

View File

@ -51,14 +51,15 @@
// We mean it.
//
#include <QtCore>
#include <QtGui/private/qtguiglobal_p.h>
#include <CoreFoundation/CoreFoundation.h>
QT_BEGIN_NAMESPACE
// Duplicate of QMacPasteboardMime in QtMacExtras. Keep in sync!
class QMacInternalPasteboardMime {
class Q_GUI_EXPORT QMacInternalPasteboardMime {
char type;
public:
enum QMacPasteboardMimeType { MIME_DND=0x01,
@ -87,10 +88,10 @@ public:
virtual int count(QMimeData *mimeData);
};
void qt_mac_addToGlobalMimeList(QMacInternalPasteboardMime *macMime);
void qt_mac_removeFromGlobalMimeList(QMacInternalPasteboardMime *macMime);
void qt_mac_registerDraggedTypes(const QStringList &types);
const QStringList& qt_mac_enabledDraggedTypes();
Q_GUI_EXPORT void qt_mac_addToGlobalMimeList(QMacInternalPasteboardMime *macMime);
Q_GUI_EXPORT void qt_mac_removeFromGlobalMimeList(QMacInternalPasteboardMime *macMime);
Q_GUI_EXPORT void qt_mac_registerDraggedTypes(const QStringList &types);
Q_GUI_EXPORT const QStringList& qt_mac_enabledDraggedTypes();
QT_END_NAMESPACE

View File

@ -1 +1,2 @@
wasm:include(wasm/wasm.pri)
darwin:include(darwin/darwin.pri)

View File

@ -41,7 +41,6 @@ if(QT_FEATURE_accessibility AND WIN32 AND NOT WINRT)
add_subdirectory(windowsuiautomation)
endif()
if(APPLE)
add_subdirectory(clipboard)
add_subdirectory(graphics)
endif()
if(QT_FEATURE_vulkan)

View File

@ -1,29 +0,0 @@
# Generated from clipboard.pro.
#####################################################################
## ClipboardSupport Module:
#####################################################################
qt_add_module(ClipboardSupport
STATIC
INTERNAL_MODULE
SOURCES
qmacmime.mm qmacmime_p.h
DEFINES
QT_NO_CAST_FROM_ASCII
PUBLIC_LIBRARIES
${FWImageIO}
Qt::CorePrivate
Qt::Gui
)
#### Keys ignored in scope 1:.:.:clipboard.pro:<TRUE>:
# MODULE = "clipboard_support"
## Scopes:
#####################################################################
qt_extend_target(ClipboardSupport CONDITION MACOS
LIBRARIES
${FWAppKit}
)

View File

@ -1,15 +0,0 @@
TARGET = QtClipboardSupport
MODULE = clipboard_support
QT = core-private gui
CONFIG += static internal_module
DEFINES += QT_NO_CAST_FROM_ASCII
HEADERS += qmacmime_p.h
SOURCES += qmacmime.mm
LIBS += -framework ImageIO
macos: LIBS_PRIVATE += -framework AppKit
load(qt_module)

View File

@ -39,7 +39,6 @@ qtConfig(accessibility) {
darwin {
SUBDIRS += \
clipboard \
graphics
}

View File

@ -56,7 +56,6 @@ qt_internal_add_plugin(QCocoaIntegrationPlugin
${FWMetal}
${FWQuartzCore}
Cups::Cups
Qt::ClipboardSupportPrivate
Qt::Core
Qt::CorePrivate
Qt::FontDatabaseSupportPrivate

View File

@ -96,7 +96,7 @@ DEFINES += QT_NO_FOREACH
QT += \
core-private gui-private \
clipboard_support-private theme_support-private \
theme_support-private \
fontdatabase_support-private graphics_support-private
qtConfig(vulkan): QT += vulkan_support-private

View File

@ -38,7 +38,7 @@
****************************************************************************/
#include "qcocoamimetypes.h"
#include <QtClipboardSupport/private/qmacmime_p.h>
#include <QtGui/private/qmacmime_p.h>
#include "qcocoahelpers.h"
#include <QtGui/private/qcoregraphics_p.h>

View File

@ -41,7 +41,7 @@
#define QMACCLIPBOARD_H
#include <QtGui>
#include <QtClipboardSupport/private/qmacmime_p.h>
#include <QtGui/private/qmacmime_p.h>
#import <AppKit/AppKit.h>

View File

@ -31,7 +31,6 @@ add_qt_plugin(QIOSIntegrationPlugin
${FWFoundation}
${FWQuartzCore}
${FWUIKit}
Qt::ClipboardSupportPrivate
Qt::Core
Qt::CorePrivate
Qt::FontDatabaseSupportPrivate

View File

@ -7,7 +7,7 @@ qtConfig(shared): CONFIG += static
QT += \
core-private gui-private \
clipboard_support-private fontdatabase_support-private graphics_support-private
fontdatabase_support-private graphics_support-private
qtHaveModule(platformcompositor_support-private): QT += platformcompositor_support-private

View File

@ -41,7 +41,8 @@
#ifndef QT_NO_CLIPBOARD
#include <QtClipboardSupport/private/qmacmime_p.h>
#include <QtCore/qurl.h>
#include <QtGui/private/qmacmime_p.h>
#include <QtCore/QMimeData>
#include <QtGui/QGuiApplication>

View File

@ -60,7 +60,7 @@
#include <qpa/qplatformoffscreensurface.h>
#include <QtFontDatabaseSupport/private/qcoretextfontdatabase_p.h>
#include <QtClipboardSupport/private/qmacmime_p.h>
#include <QtGui/private/qmacmime_p.h>
#include <QDir>
#include <QOperatingSystemVersion>

View File

@ -14,7 +14,6 @@
"QtAccessibilitySupport" => "$basedir/src/platformsupport/accessibility",
"QtWindowsUIAutomationSupport" => "$basedir/src/platformsupport/windowsuiautomation",
"QtLinuxAccessibilitySupport" => "$basedir/src/platformsupport/linuxaccessibility",
"QtClipboardSupport" => "$basedir/src/platformsupport/clipboard",
"QtDeviceDiscoverySupport" => "$basedir/src/platformsupport/devicediscovery",
"QtEventDispatcherSupport" => "$basedir/src/platformsupport/eventdispatchers",
"QtFontDatabaseSupport" => "$basedir/src/platformsupport/fontdatabases",

View File

@ -96,9 +96,6 @@ _qt_library_map = [
LibraryMapping("bootstrap", "Qt6", "Qt::Bootstrap", extra=["COMPONENTS", "Bootstrap"]),
# bootstrap-dbus: Not needed in Qt6!
LibraryMapping("client", "Qt6", "Qt::WaylandClient", extra=["COMPONENTS", "WaylandClient"]),
LibraryMapping(
"clipboard_support", "Qt6", "Qt::ClipboardSupport", extra=["COMPONENTS", "ClipboardSupport"]
),
LibraryMapping("coap", "Qt6", "Qt::Coap", extra=["COMPONENTS", "Coap"]),
LibraryMapping("common-lib", "Qt6", "Qt::AppManCommon", extra=["COMPONENTS", "AppManCommon"]),
LibraryMapping(