From 33d9b9f326449341d6a9afd55299e5e1ad7ad037 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Mon, 22 Oct 2012 08:20:23 +0200 Subject: Delete QWhatsThis() and QToolTip() These classes are not supposed to be instantiated. QToolTip() already was declared, but not implemented. This patch just adds Q_DECL_EQ_DELETE for better diagnostics on C++11. QWhatsThis() was implemented, but appears to be unused. Since it was private to begin with, successfully compiling QtWidgets is a sufficient test. Change-Id: I698ece8f0eebbcdac7be98456dd42197b758a825 Reviewed-by: Stephen Kelly --- src/widgets/kernel/qtooltip.h | 2 +- src/widgets/kernel/qwhatsthis.cpp | 5 ----- src/widgets/kernel/qwhatsthis.h | 2 +- 3 files changed, 2 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/widgets/kernel/qtooltip.h b/src/widgets/kernel/qtooltip.h index 2b73695a52..860a2ccab0 100644 --- a/src/widgets/kernel/qtooltip.h +++ b/src/widgets/kernel/qtooltip.h @@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE class Q_WIDGETS_EXPORT QToolTip { - QToolTip(); + QToolTip() Q_DECL_EQ_DELETE; public: static void showText(const QPoint &pos, const QString &text, QWidget *w = 0); static void showText(const QPoint &pos, const QString &text, QWidget *w, const QRect &rect); diff --git a/src/widgets/kernel/qwhatsthis.cpp b/src/widgets/kernel/qwhatsthis.cpp index 95e1683c26..ed2d77021c 100644 --- a/src/widgets/kernel/qwhatsthis.cpp +++ b/src/widgets/kernel/qwhatsthis.cpp @@ -521,11 +521,6 @@ void QWhatsThisAction::actionTriggered() } } -QWhatsThis::QWhatsThis() -{ -} - - /*! This function switches the user interface into "What's This?" mode. The user interface can be switched back into normal mode by diff --git a/src/widgets/kernel/qwhatsthis.h b/src/widgets/kernel/qwhatsthis.h index 2583e3bb62..e901b474fd 100644 --- a/src/widgets/kernel/qwhatsthis.h +++ b/src/widgets/kernel/qwhatsthis.h @@ -56,7 +56,7 @@ class QAction; class Q_WIDGETS_EXPORT QWhatsThis { - QWhatsThis(); + QWhatsThis() Q_DECL_EQ_DELETE; public: static void enterWhatsThisMode(); -- cgit v1.2.3