summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qcocoapanel_mac_p.h
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@nokia.com>2009-12-04 09:53:51 (GMT)
committerRichard Moe Gustavsen <richard.gustavsen@nokia.com>2009-12-04 10:06:05 (GMT)
commit067cab5af9172335c07b48c42e6a665d5da9b54d (patch)
tree064f03066bc2e5740adda826c2db6b9d1eedeb4d /src/gui/kernel/qcocoapanel_mac_p.h
parent7c5d48e84159abd0a72eadb2e14e4c3b1441fdfb (diff)
downloadQt-067cab5af9172335c07b48c42e6a665d5da9b54d.zip
Qt-067cab5af9172335c07b48c42e6a665d5da9b54d.tar.gz
Qt-067cab5af9172335c07b48c42e6a665d5da9b54d.tar.bz2
Cocoa: impl. performance boost for dnd
It turns out that registering drag types for each NSView that can receive drop events is _really_ slow. And many widget in Qt subscribe for DnD (QTextEdit, QScrollArea, etc), so the result is an application that will spend startup time preparing for DnD. For some edge cases, we're talking several seconds! This patch removes this overhead by moving drag type registering out of NSView, and into NSWindow (that is, QCocoaWindow and QCocoaPanel). Task-number: QT-1586 Reviewed-by: Prasanth
Diffstat (limited to 'src/gui/kernel/qcocoapanel_mac_p.h')
-rw-r--r--src/gui/kernel/qcocoapanel_mac_p.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/kernel/qcocoapanel_mac_p.h b/src/gui/kernel/qcocoapanel_mac_p.h
index 69dca1e..f35d9fb 100644
--- a/src/gui/kernel/qcocoapanel_mac_p.h
+++ b/src/gui/kernel/qcocoapanel_mac_p.h
@@ -54,10 +54,16 @@
#ifdef QT_MAC_USE_COCOA
#import <Cocoa/Cocoa.h>
+QT_FORWARD_DECLARE_CLASS(QStringList);
+
@interface QT_MANGLE_NAMESPACE(QCocoaPanel) : NSPanel {
bool leftButtonIsRightButton;
+ QStringList *currentCustomDragTypes;
}
+ (Class)frameViewClassForStyleMask:(NSUInteger)styleMask;
+- (void)registerDragTypes;
+
@end
#endif
+