diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2011-09-27 14:48:51 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-09-28 03:18:16 +0200 |
commit | a85d343a39577cdf953d0759e356c59a77ae743f (patch) | |
tree | fdbd9229902d5efc0ca637dc79d6aa7cc5645635 /src/widgets/kernel/qwhatsthis.cpp | |
parent | 3b6bb13e6a197bb4ba85b397ae9d2b8c659d6b26 (diff) |
Widgets: Remove QT3_SUPPPORT.
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Change-Id: Ie884f0cc9b3970b01c3c0c26600b1bcd92548077
Reviewed-on: http://codereview.qt-project.org/5629
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src/widgets/kernel/qwhatsthis.cpp')
-rw-r--r-- | src/widgets/kernel/qwhatsthis.cpp | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/src/widgets/kernel/qwhatsthis.cpp b/src/widgets/kernel/qwhatsthis.cpp index 204a11a3eb..2032b4add7 100644 --- a/src/widgets/kernel/qwhatsthis.cpp +++ b/src/widgets/kernel/qwhatsthis.cpp @@ -390,9 +390,6 @@ class QWhatsThisPrivate : public QObject static QWhatsThisPrivate *instance; bool eventFilter(QObject *, QEvent *); QPointer<QAction> action; -#ifdef QT3_SUPPORT - QPointer<QToolButton> button; -#endif static void say(QWidget *, const QString &, int x = 0, int y = 0); static void notifyToplevels(QEvent *e); bool leaveOnMouseRelease; @@ -437,10 +434,6 @@ QWhatsThisPrivate::~QWhatsThisPrivate() { if (action) action->setChecked(false); -#ifdef QT3_SUPPORT - if (button) - button->setChecked(false); -#endif #ifndef QT_NO_CURSOR QApplication::restoreOverrideCursor(); #endif @@ -549,66 +542,6 @@ QWhatsThis::QWhatsThis() { } -#ifdef QT3_SUPPORT -/*! - \obsolete - - Sets the What's This text \a s for the widget \a w. - - Use QWidget::setWhatsThis() or QAction::setWhatsThis() instead. -*/ -void QWhatsThis::add(QWidget *w, const QString &s) -{ - w->setWhatsThis(s); -} - -/*! - \obsolete - - Remove's the What's This text for the widget \a w. - - Use QWidget::setWhatsThis() or QAction::setWhatsThis() instead. -*/ -void QWhatsThis::remove(QWidget *w) -{ - w->setWhatsThis(QString()); -} - -class QWhatsThisButton : public QToolButton -{ - Q_OBJECT -public: - QWhatsThisButton(QWidget *p) : QToolButton(p) { - setCheckable(true); - QPixmap pix( const_cast<const char**>(button_image) ); - setIcon( pix ); - QObject::connect(this, SIGNAL(toggled(bool)), this, SLOT(whatToggled(bool))); - setAutoRaise(true); - setFocusPolicy(Qt::NoFocus); - } - -public slots: - void whatToggled(bool b) { - if (b) { - QWhatsThis::enterWhatsThisMode(); - QWhatsThisPrivate::instance->button = this; - } - } -}; - -/*! - Returns a new "What's This?" QToolButton with the given \a - parent. To do this now, create your own QToolButton and a - QWhatsThis object and call the QWhatsThis object's showText() - function when the QToolButton is invoked. - - Use createAction() instead. -*/ -QToolButton * QWhatsThis::whatsThisButton(QWidget * parent) -{ - return new QWhatsThisButton(parent); -} -#endif /*! This function switches the user interface into "What's This?" |