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;
|
||||
QPointer<QObject> m_composingFocusObject;
|
||||
bool m_sendKeyEvent;
|
||||
QStringList *currentCustomDragTypes;
|
||||
bool m_dontOverrideCtrlLMB;
|
||||
bool m_sendUpAsRightButton;
|
||||
Qt::KeyboardModifiers currentWheelModifiers;
|
||||
@ -153,7 +152,6 @@
|
||||
m_glContext = nullptr;
|
||||
m_shouldSetGLContextinDrawRect = false;
|
||||
#endif
|
||||
currentCustomDragTypes = nullptr;
|
||||
m_sendUpAsRightButton = false;
|
||||
m_inputSource = nil;
|
||||
m_mouseMoveHelper = [[QT_MANGLE_NAMESPACE(QNSViewMouseMoveHelper) alloc] initWithView:self];
|
||||
@ -216,8 +214,6 @@
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
[m_mouseMoveHelper release];
|
||||
|
||||
delete currentCustomDragTypes;
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
@ -44,28 +44,24 @@
|
||||
-(void)registerDragTypes
|
||||
{
|
||||
QMacAutoReleasePool pool;
|
||||
QStringList customTypes = qt_mac_enabledDraggedTypes();
|
||||
if (currentCustomDragTypes == 0 || *currentCustomDragTypes != customTypes) {
|
||||
if (currentCustomDragTypes == 0)
|
||||
currentCustomDragTypes = new QStringList();
|
||||
*currentCustomDragTypes = customTypes;
|
||||
NSString * const mimeTypeGeneric = @"com.trolltech.qt.MimeTypeName";
|
||||
NSMutableArray<NSString *> *supportedTypes = [NSMutableArray<NSString *> arrayWithArray:@[
|
||||
NSColorPboardType,
|
||||
NSFilenamesPboardType, NSStringPboardType,
|
||||
NSFilenamesPboardType, NSPostScriptPboardType, NSTIFFPboardType,
|
||||
NSRTFPboardType, NSTabularTextPboardType, NSFontPboardType,
|
||||
NSRulerPboardType, NSFileContentsPboardType, NSColorPboardType,
|
||||
NSRTFDPboardType, NSHTMLPboardType,
|
||||
NSURLPboardType, NSPDFPboardType, NSVCardPboardType,
|
||||
NSFilesPromisePboardType, NSInkTextPboardType,
|
||||
NSMultipleTextSelectionPboardType, mimeTypeGeneric]];
|
||||
// Add custom types supported by the application.
|
||||
for (int i = 0; i < customTypes.size(); i++) {
|
||||
[supportedTypes addObject:customTypes[i].toNSString()];
|
||||
}
|
||||
[self registerForDraggedTypes:supportedTypes];
|
||||
}
|
||||
|
||||
NSString * const mimeTypeGeneric = @"com.trolltech.qt.MimeTypeName";
|
||||
NSMutableArray<NSString *> *supportedTypes = [NSMutableArray<NSString *> arrayWithArray:@[
|
||||
NSColorPboardType,
|
||||
NSFilenamesPboardType, NSStringPboardType,
|
||||
NSFilenamesPboardType, NSPostScriptPboardType, NSTIFFPboardType,
|
||||
NSRTFPboardType, NSTabularTextPboardType, NSFontPboardType,
|
||||
NSRulerPboardType, NSFileContentsPboardType, NSColorPboardType,
|
||||
NSRTFDPboardType, NSHTMLPboardType,
|
||||
NSURLPboardType, NSPDFPboardType, NSVCardPboardType,
|
||||
NSFilesPromisePboardType, NSInkTextPboardType,
|
||||
NSMultipleTextSelectionPboardType, mimeTypeGeneric]];
|
||||
|
||||
// Add custom types supported by the application.
|
||||
for (const QString &customType : qt_mac_enabledDraggedTypes())
|
||||
[supportedTypes addObject:customType.toNSString()];
|
||||
|
||||
[self registerForDraggedTypes:supportedTypes];
|
||||
}
|
||||
|
||||
static QWindow *findEventTargetWindow(QWindow *candidate)
|
||||
|
Loading…
Reference in New Issue
Block a user