Cocoa: fix crash when using QPrintDialog
The contextInfo passed to printPanelDidEnd should be a QPrintDialog*, not a QPrintDialogPrivate*. Change-Id: I8f9aae2f27b483b4669f9d39cdafd0ddeb37fd22 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
This commit is contained in:
parent
b936b95965
commit
83a6435595
@ -206,7 +206,7 @@ void QPrintDialogPrivate::openCocoaPrintPanel(Qt::WindowModality modality)
|
||||
QT_MANGLE_NAMESPACE(QCocoaPrintPanelDelegate) *delegate = [[QT_MANGLE_NAMESPACE(QCocoaPrintPanelDelegate) alloc] init];
|
||||
if (modality == Qt::ApplicationModal) {
|
||||
int rval = [printPanel runModalWithPrintInfo:printInfo];
|
||||
[delegate printPanelDidEnd:printPanel returnCode:rval contextInfo:this];
|
||||
[delegate printPanelDidEnd:printPanel returnCode:rval contextInfo:q];
|
||||
} else {
|
||||
Q_ASSERT(q->parentWidget());
|
||||
QWindow *parentWindow = q->parentWidget()->windowHandle();
|
||||
@ -215,7 +215,7 @@ void QPrintDialogPrivate::openCocoaPrintPanel(Qt::WindowModality modality)
|
||||
modalForWindow:window
|
||||
delegate:delegate
|
||||
didEndSelector:@selector(printPanelDidEnd:returnCode:contextInfo:)
|
||||
contextInfo:this];
|
||||
contextInfo:q];
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user