Fix build with QT_NO_CLIPBOARD.

Change-Id: I82558e1e432934b98236d69106fb98e44e819095
Reviewed-by: Richard J. Moore <rich@kde.org>
bb10
Stephen Kelly 2012-04-17 17:47:03 +02:00 committed by Qt by Nokia
parent f13acef7ba
commit 3b1a52b573
1 changed files with 4 additions and 0 deletions

View File

@ -349,16 +349,20 @@ QGuiApplication::~QGuiApplication()
{
Q_D(QGuiApplication);
// flush clipboard contents
#ifndef QT_NO_CLIPBOARD
if (QGuiApplicationPrivate::qt_clipboard) {
QEvent event(QEvent::Clipboard);
QGuiApplication::sendEvent(QGuiApplicationPrivate::qt_clipboard, &event);
}
#endif
d->eventDispatcher->closingDown();
d->eventDispatcher = 0;
#ifndef QT_NO_CLIPBOARD
delete QGuiApplicationPrivate::qt_clipboard;
QGuiApplicationPrivate::qt_clipboard = 0;
#endif
clearPalette();