diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/dialogs/qmessagebox.cpp | 2 | ||||
-rw-r--r-- | src/gui/kernel/qsoftkeymanager.cpp | 6 | ||||
-rw-r--r-- | src/gui/kernel/qsoftkeymanager_common_p.h | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/dialogs/qmessagebox.cpp b/src/gui/dialogs/qmessagebox.cpp index a2f086b..66e7216 100644 --- a/src/gui/dialogs/qmessagebox.cpp +++ b/src/gui/dialogs/qmessagebox.cpp @@ -2486,7 +2486,7 @@ void QMessageBox::setInformativeText(const QString &text) } if (!d->informativeLabel) { - QLabel *label = new QLabel; + QLabel *label = new QLabel(this); label->setObjectName(QLatin1String("qt_msgbox_informativelabel")); label->setTextInteractionFlags(Qt::TextInteractionFlags(style()->styleHint(QStyle::SH_MessageBox_TextInteractionFlags, 0, this))); label->setAlignment(Qt::AlignTop | Qt::AlignLeft); diff --git a/src/gui/kernel/qsoftkeymanager.cpp b/src/gui/kernel/qsoftkeymanager.cpp index a866da3..500bcff 100644 --- a/src/gui/kernel/qsoftkeymanager.cpp +++ b/src/gui/kernel/qsoftkeymanager.cpp @@ -54,7 +54,7 @@ #ifndef QT_NO_SOFTKEYMANAGER QT_BEGIN_NAMESPACE -QSoftKeyManager *QSoftKeyManagerPrivate::self = 0; +QScopedPointer<QSoftKeyManager> QSoftKeyManagerPrivate::self(0); QString QSoftKeyManager::standardSoftKeyText(StandardSoftKey standardKey) { @@ -85,9 +85,9 @@ QString QSoftKeyManager::standardSoftKeyText(StandardSoftKey standardKey) QSoftKeyManager *QSoftKeyManager::instance() { if (!QSoftKeyManagerPrivate::self) - QSoftKeyManagerPrivate::self = new QSoftKeyManager; + QSoftKeyManagerPrivate::self.reset(new QSoftKeyManager); - return QSoftKeyManagerPrivate::self; + return QSoftKeyManagerPrivate::self.data(); } QSoftKeyManager::QSoftKeyManager() : diff --git a/src/gui/kernel/qsoftkeymanager_common_p.h b/src/gui/kernel/qsoftkeymanager_common_p.h index 5b76e60..e9cbd7d 100644 --- a/src/gui/kernel/qsoftkeymanager_common_p.h +++ b/src/gui/kernel/qsoftkeymanager_common_p.h @@ -67,7 +67,7 @@ public: virtual void updateSoftKeys_sys() {}; protected: - static QSoftKeyManager *self; + static QScopedPointer<QSoftKeyManager> self; QHash<QAction*, Qt::Key> keyedActions; QMultiHash<int, QAction*> requestedSoftKeyActions; QWidget *initialSoftKeySource; |