macOS: Remove unused QNSView member 'currentCustomDragTypes'
Change-Id: Id2e37cc81c24edce37cac2bfa843ee669fd13d98 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
This commit is contained in:
parent
573c81da9b
commit
012af8abf8
@ -123,7 +123,6 @@
|
|||||||
QString m_composingText;
|
QString m_composingText;
|
||||||
QPointer<QObject> m_composingFocusObject;
|
QPointer<QObject> m_composingFocusObject;
|
||||||
bool m_sendKeyEvent;
|
bool m_sendKeyEvent;
|
||||||
QStringList *currentCustomDragTypes;
|
|
||||||
bool m_dontOverrideCtrlLMB;
|
bool m_dontOverrideCtrlLMB;
|
||||||
bool m_sendUpAsRightButton;
|
bool m_sendUpAsRightButton;
|
||||||
Qt::KeyboardModifiers currentWheelModifiers;
|
Qt::KeyboardModifiers currentWheelModifiers;
|
||||||
@ -153,7 +152,6 @@
|
|||||||
m_glContext = nullptr;
|
m_glContext = nullptr;
|
||||||
m_shouldSetGLContextinDrawRect = false;
|
m_shouldSetGLContextinDrawRect = false;
|
||||||
#endif
|
#endif
|
||||||
currentCustomDragTypes = nullptr;
|
|
||||||
m_sendUpAsRightButton = false;
|
m_sendUpAsRightButton = false;
|
||||||
m_inputSource = nil;
|
m_inputSource = nil;
|
||||||
m_mouseMoveHelper = [[QT_MANGLE_NAMESPACE(QNSViewMouseMoveHelper) alloc] initWithView:self];
|
m_mouseMoveHelper = [[QT_MANGLE_NAMESPACE(QNSViewMouseMoveHelper) alloc] initWithView:self];
|
||||||
@ -216,8 +214,6 @@
|
|||||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||||
[m_mouseMoveHelper release];
|
[m_mouseMoveHelper release];
|
||||||
|
|
||||||
delete currentCustomDragTypes;
|
|
||||||
|
|
||||||
[super dealloc];
|
[super dealloc];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,28 +44,24 @@
|
|||||||
-(void)registerDragTypes
|
-(void)registerDragTypes
|
||||||
{
|
{
|
||||||
QMacAutoReleasePool pool;
|
QMacAutoReleasePool pool;
|
||||||
QStringList customTypes = qt_mac_enabledDraggedTypes();
|
|
||||||
if (currentCustomDragTypes == 0 || *currentCustomDragTypes != customTypes) {
|
NSString * const mimeTypeGeneric = @"com.trolltech.qt.MimeTypeName";
|
||||||
if (currentCustomDragTypes == 0)
|
NSMutableArray<NSString *> *supportedTypes = [NSMutableArray<NSString *> arrayWithArray:@[
|
||||||
currentCustomDragTypes = new QStringList();
|
NSColorPboardType,
|
||||||
*currentCustomDragTypes = customTypes;
|
NSFilenamesPboardType, NSStringPboardType,
|
||||||
NSString * const mimeTypeGeneric = @"com.trolltech.qt.MimeTypeName";
|
NSFilenamesPboardType, NSPostScriptPboardType, NSTIFFPboardType,
|
||||||
NSMutableArray<NSString *> *supportedTypes = [NSMutableArray<NSString *> arrayWithArray:@[
|
NSRTFPboardType, NSTabularTextPboardType, NSFontPboardType,
|
||||||
NSColorPboardType,
|
NSRulerPboardType, NSFileContentsPboardType, NSColorPboardType,
|
||||||
NSFilenamesPboardType, NSStringPboardType,
|
NSRTFDPboardType, NSHTMLPboardType,
|
||||||
NSFilenamesPboardType, NSPostScriptPboardType, NSTIFFPboardType,
|
NSURLPboardType, NSPDFPboardType, NSVCardPboardType,
|
||||||
NSRTFPboardType, NSTabularTextPboardType, NSFontPboardType,
|
NSFilesPromisePboardType, NSInkTextPboardType,
|
||||||
NSRulerPboardType, NSFileContentsPboardType, NSColorPboardType,
|
NSMultipleTextSelectionPboardType, mimeTypeGeneric]];
|
||||||
NSRTFDPboardType, NSHTMLPboardType,
|
|
||||||
NSURLPboardType, NSPDFPboardType, NSVCardPboardType,
|
// Add custom types supported by the application.
|
||||||
NSFilesPromisePboardType, NSInkTextPboardType,
|
for (const QString &customType : qt_mac_enabledDraggedTypes())
|
||||||
NSMultipleTextSelectionPboardType, mimeTypeGeneric]];
|
[supportedTypes addObject:customType.toNSString()];
|
||||||
// Add custom types supported by the application.
|
|
||||||
for (int i = 0; i < customTypes.size(); i++) {
|
[self registerForDraggedTypes:supportedTypes];
|
||||||
[supportedTypes addObject:customTypes[i].toNSString()];
|
|
||||||
}
|
|
||||||
[self registerForDraggedTypes:supportedTypes];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static QWindow *findEventTargetWindow(QWindow *candidate)
|
static QWindow *findEventTargetWindow(QWindow *candidate)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user