diff options
author | Morten Sørvig <msorvig@trolltech.com> | 2009-05-06 12:58:33 +0200 |
---|---|---|
committer | Morten Sørvig <msorvig@trolltech.com> | 2009-05-06 12:58:33 +0200 |
commit | b38874c55ec7d046c3ff3ba08599d52e004c0146 (patch) | |
tree | 65377f2ce9b54aa21360be424f1cd7cfe521eed3 /src/gui/kernel/qcocoaview_mac_p.h | |
parent | 6586200d3043ba7915bc60695e2a1436a5cadfa3 (diff) |
Optimize QCocoaView::registerDragTypes and mode switching in QtCreator.
We were registering the types each time drag and drop was enabled, which
caused slowdowns when for example switching between the Edit and Debug
modes in QtCreator.
Instead, register the types on first enable and also when the custom types
change. Add check to draggingEntered() that disables the drag if
WA_DropSiteRegistered is false.
Reviewed-by: nrc
Diffstat (limited to 'src/gui/kernel/qcocoaview_mac_p.h')
-rw-r--r-- | src/gui/kernel/qcocoaview_mac_p.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/kernel/qcocoaview_mac_p.h b/src/gui/kernel/qcocoaview_mac_p.h index 9de94d5fc7..983c762c86 100644 --- a/src/gui/kernel/qcocoaview_mac_p.h +++ b/src/gui/kernel/qcocoaview_mac_p.h @@ -83,6 +83,7 @@ Q_GUI_EXPORT bool composing; int composingLength; bool sendKeyEvents; + QStringList *currentCustomTypes; } - (id)initWithQWidget:(QWidget *)widget widgetPrivate:(QWidgetPrivate *)widgetprivate; - (void) finishInitWithQWidget:(QWidget *)widget widgetPrivate:(QWidgetPrivate *)widgetprivate; @@ -91,7 +92,7 @@ Q_GUI_EXPORT - (NSDragOperation)draggingUpdated:(id < NSDraggingInfo >)sender; - (void)draggingExited:(id < NSDraggingInfo >)sender; - (BOOL)performDragOperation:(id <NSDraggingInfo>)sender; -- (void)registerDragTypes:(bool)accept; +- (void)registerDragTypes; - (void)removeDropData; - (void)addDropData:(id <NSDraggingInfo>)sender; - (void)setSupportedActions:(NSDragOperation)actions; |