summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qcocoaview_mac_p.h
diff options
context:
space:
mode:
authorMorten Sørvig <msorvig@trolltech.com>2009-05-06 10:58:33 (GMT)
committerMorten Sørvig <msorvig@trolltech.com>2009-05-06 10:58:33 (GMT)
commitb38874c55ec7d046c3ff3ba08599d52e004c0146 (patch)
tree65377f2ce9b54aa21360be424f1cd7cfe521eed3 /src/gui/kernel/qcocoaview_mac_p.h
parent6586200d3043ba7915bc60695e2a1436a5cadfa3 (diff)
downloadQt-b38874c55ec7d046c3ff3ba08599d52e004c0146.zip
Qt-b38874c55ec7d046c3ff3ba08599d52e004c0146.tar.gz
Qt-b38874c55ec7d046c3ff3ba08599d52e004c0146.tar.bz2
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.h3
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 9de94d5..983c762 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;