Delete QWhatsThis() and QToolTip()
authorMarc Mutz <marc.mutz@kdab.com>
Mon, 22 Oct 2012 06:20:23 +0000 (08:20 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Mon, 22 Oct 2012 17:36:43 +0000 (19:36 +0200)
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 <stephen.kelly@kdab.com>
src/widgets/kernel/qtooltip.h
src/widgets/kernel/qwhatsthis.cpp
src/widgets/kernel/qwhatsthis.h

index 2b73695..860a2cc 100644 (file)
@@ -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);
index 95e1683..ed2d770 100644 (file)
@@ -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
index 2583e3b..e901b47 100644 (file)
@@ -56,7 +56,7 @@ class QAction;
 
 class Q_WIDGETS_EXPORT QWhatsThis
 {
-    QWhatsThis();
+    QWhatsThis() Q_DECL_EQ_DELETE;
 
 public:
     static void enterWhatsThisMode();