diff options
Diffstat (limited to 'src/widgets/kernel')
-rw-r--r-- | src/widgets/kernel/kernel.pri | 7 | ||||
-rw-r--r-- | src/widgets/kernel/qapplication.cpp | 8 | ||||
-rw-r--r-- | src/widgets/kernel/qshortcut.cpp | 4 | ||||
-rw-r--r-- | src/widgets/kernel/qwhatsthis.cpp | 4 | ||||
-rw-r--r-- | src/widgets/kernel/qwhatsthis.h | 7 | ||||
-rw-r--r-- | src/widgets/kernel/qwidget.cpp | 10 | ||||
-rw-r--r-- | src/widgets/kernel/qwidget.h | 4 | ||||
-rw-r--r-- | src/widgets/kernel/qwidget_p.h | 2 |
8 files changed, 23 insertions, 23 deletions
diff --git a/src/widgets/kernel/kernel.pri b/src/widgets/kernel/kernel.pri index c91be918b6..3e3c795839 100644 --- a/src/widgets/kernel/kernel.pri +++ b/src/widgets/kernel/kernel.pri @@ -24,7 +24,6 @@ HEADERS += \ kernel/qsizepolicy.h \ kernel/qstackedlayout.h \ kernel/qtooltip.h \ - kernel/qwhatsthis.h \ kernel/qwidget.h \ kernel/qwidget_p.h \ kernel/qwidgetaction.h \ @@ -52,7 +51,6 @@ SOURCES += \ kernel/qsizepolicy.cpp \ kernel/qstackedlayout.cpp \ kernel/qtooltip.cpp \ - kernel/qwhatsthis.cpp \ kernel/qwidget.cpp \ kernel/qwidgetaction.cpp \ kernel/qgesture.cpp \ @@ -87,3 +85,8 @@ qtConfig(formlayout) { HEADERS += kernel/qformlayout.h SOURCES += kernel/qformlayout.cpp } + +qtConfig(whatsthis) { + HEADERS += kernel/qwhatsthis.h + SOURCES += kernel/qwhatsthis.cpp +} diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp index fe7a9c2500..01bd1c5033 100644 --- a/src/widgets/kernel/qapplication.cpp +++ b/src/widgets/kernel/qapplication.cpp @@ -73,7 +73,7 @@ #include <QtGui/private/qwindow_p.h> #include <QtGui/qtouchdevice.h> #include <qpa/qplatformtheme.h> -#ifndef QT_NO_WHATSTHIS +#if QT_CONFIG(whatsthis) #include <QtWidgets/QWhatsThis> #endif @@ -1999,7 +1999,7 @@ bool QApplication::event(QEvent *e) } else if (te->timerId() == d->toolTipFallAsleep.timerId()) { d->toolTipFallAsleep.stop(); } -#ifndef QT_NO_WHATSTHIS +#if QT_CONFIG(whatsthis) } else if (e->type() == QEvent::EnterWhatsThisMode) { QWhatsThis::enterWhatsThisMode(); return true; @@ -3381,7 +3381,7 @@ bool QApplication::notify(QObject *receiver, QEvent *e) break; #endif // QT_CONFIG(tabletevent) -#if !defined(QT_NO_TOOLTIP) || !defined(QT_NO_WHATSTHIS) +#if !defined(QT_NO_TOOLTIP) || QT_CONFIG(whatsthis) case QEvent::ToolTip: case QEvent::WhatsThis: case QEvent::QueryWhatsThis: @@ -3406,7 +3406,7 @@ bool QApplication::notify(QObject *receiver, QEvent *e) } break; #endif -#if !defined(QT_NO_STATUSTIP) || !defined(QT_NO_WHATSTHIS) +#if !defined(QT_NO_STATUSTIP) || QT_CONFIG(whatsthis) case QEvent::StatusTip: case QEvent::WhatsThisClicked: { diff --git a/src/widgets/kernel/qshortcut.cpp b/src/widgets/kernel/qshortcut.cpp index be5788274e..a09cba0ddc 100644 --- a/src/widgets/kernel/qshortcut.cpp +++ b/src/widgets/kernel/qshortcut.cpp @@ -42,7 +42,9 @@ #ifndef QT_NO_SHORTCUT #include <qevent.h> +#if QT_CONFIG(whatsthis) #include <qwhatsthis.h> +#endif #include <qmenu.h> #include <qmenubar.h> #include <qapplication.h> @@ -641,7 +643,7 @@ bool QShortcut::event(QEvent *e) if (d->sc_enabled && e->type() == QEvent::Shortcut) { QShortcutEvent *se = static_cast<QShortcutEvent *>(e); if (se->shortcutId() == d->sc_id && se->key() == d->sc_sequence){ -#ifndef QT_NO_WHATSTHIS +#if QT_CONFIG(whatsthis) if (QWhatsThis::inWhatsThisMode()) { QWhatsThis::showText(QCursor::pos(), d->sc_whatsthis); handled = true; diff --git a/src/widgets/kernel/qwhatsthis.cpp b/src/widgets/kernel/qwhatsthis.cpp index 4286019717..e2cfebb8a1 100644 --- a/src/widgets/kernel/qwhatsthis.cpp +++ b/src/widgets/kernel/qwhatsthis.cpp @@ -38,7 +38,6 @@ ****************************************************************************/ #include "qwhatsthis.h" -#ifndef QT_NO_WHATSTHIS #include "qpointer.h" #include "qapplication.h" #include <private/qguiapplication_p.h> @@ -54,7 +53,6 @@ #include "qtextdocument.h" #include <qpa/qplatformtheme.h> #include "private/qtextdocumentlayout_p.h" -#include "qtoolbutton.h" #include "qdebug.h" #ifndef QT_NO_ACCESSIBILITY #include "qaccessible.h" @@ -681,5 +679,3 @@ QAction *QWhatsThis::createAction(QObject *parent) QT_END_NAMESPACE #include "qwhatsthis.moc" - -#endif // QT_NO_WHATSTHIS diff --git a/src/widgets/kernel/qwhatsthis.h b/src/widgets/kernel/qwhatsthis.h index 746fd3ff22..3211796d3e 100644 --- a/src/widgets/kernel/qwhatsthis.h +++ b/src/widgets/kernel/qwhatsthis.h @@ -44,10 +44,9 @@ #include <QtCore/qobject.h> #include <QtGui/qcursor.h> -QT_BEGIN_NAMESPACE - +QT_REQUIRE_CONFIG(whatsthis); -#ifndef QT_NO_WHATSTHIS +QT_BEGIN_NAMESPACE class QAction; @@ -67,8 +66,6 @@ public: }; -#endif // QT_NO_WHATSTHIS - QT_END_NAMESPACE #endif // QWHATSTHIS_H diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index deb638f410..3104f72e82 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -71,7 +71,9 @@ #include "private/qwidgetwindow_p.h" #include "qpainter.h" #include "qtooltip.h" +#if QT_CONFIG(whatsthis) #include "qwhatsthis.h" +#endif #include "qdebug.h" #include "private/qstylesheetstyle_p.h" #include "private/qstyle_p.h" @@ -8853,7 +8855,7 @@ bool QWidget::event(QEvent *event) } } #endif -#ifndef QT_NO_WHATSTHIS +#if QT_CONFIG(whatsthis) if (!k->isAccepted() && k->modifiers() & Qt::ShiftModifier && k->key() == Qt::Key_F1 && d->whatsThis.size()) { @@ -9152,7 +9154,7 @@ bool QWidget::event(QEvent *event) event->ignore(); break; #endif -#ifndef QT_NO_WHATSTHIS +#if QT_CONFIG(whatsthis) case QEvent::WhatsThis: if (d->whatsThis.size()) QWhatsThis::showText(static_cast<QHelpEvent *>(event)->globalPos(), d->whatsThis, this); @@ -11579,7 +11581,7 @@ QString QWidget::statusTip() const } #endif // QT_NO_STATUSTIP -#ifndef QT_NO_WHATSTHIS +#if QT_CONFIG(whatsthis) /*! \property QWidget::whatsThis @@ -11600,7 +11602,7 @@ QString QWidget::whatsThis() const Q_D(const QWidget); return d->whatsThis; } -#endif // QT_NO_WHATSTHIS +#endif // QT_CONFIG(whatsthis) #ifndef QT_NO_ACCESSIBILITY /*! diff --git a/src/widgets/kernel/qwidget.h b/src/widgets/kernel/qwidget.h index 59e2ddd24d..48bc120324 100644 --- a/src/widgets/kernel/qwidget.h +++ b/src/widgets/kernel/qwidget.h @@ -186,7 +186,7 @@ class Q_WIDGETS_EXPORT QWidget : public QObject, public QPaintDevice #ifndef QT_NO_STATUSTIP Q_PROPERTY(QString statusTip READ statusTip WRITE setStatusTip) #endif -#ifndef QT_NO_WHATSTHIS +#if QT_CONFIG(whatsthis) Q_PROPERTY(QString whatsThis READ whatsThis WRITE setWhatsThis) #endif #ifndef QT_NO_ACCESSIBILITY @@ -390,7 +390,7 @@ public: void setStatusTip(const QString &); QString statusTip() const; #endif -#ifndef QT_NO_WHATSTHIS +#if QT_CONFIG(whatsthis) void setWhatsThis(const QString &); QString whatsThis() const; #endif diff --git a/src/widgets/kernel/qwidget_p.h b/src/widgets/kernel/qwidget_p.h index 68e063c25a..cc0940fc08 100644 --- a/src/widgets/kernel/qwidget_p.h +++ b/src/widgets/kernel/qwidget_p.h @@ -697,7 +697,7 @@ public: #ifndef QT_NO_STATUSTIP QString statusTip; #endif -#ifndef QT_NO_WHATSTHIS +#if QT_CONFIG(whatsthis) QString whatsThis; #endif #ifndef QT_NO_ACCESSIBILITY |