diff options
author | Liang Qi <liang.qi@qt.io> | 2017-09-20 11:37:26 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-09-20 11:58:32 +0200 |
commit | 01bc69f99f189b03d0b9cad77cc300798937cad1 (patch) | |
tree | 730f3b691cfc1830ec617b3c2ad8df16180de724 /src/widgets/accessible/simplewidgets.cpp | |
parent | c23c4a921d0e9e2d18a62af82d38ca27eac7bcb3 (diff) | |
parent | 6d699d08200b1fe3a616dfbc275d46c98b77fcbd (diff) |
Merge remote-tracking branch 'origin/5.9' into 5.10
Conflicts:
src/plugins/styles/mac/qmacstyle_mac.mm
src/widgets/util/qcompleter.cpp
src/widgets/widgets/qmainwindowlayout.cpp
src/widgets/widgets/qmdisubwindow.cpp
Change-Id: If0e96981af07ce36ac68f2e69211bc2120f93973
Diffstat (limited to 'src/widgets/accessible/simplewidgets.cpp')
-rw-r--r-- | src/widgets/accessible/simplewidgets.cpp | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/src/widgets/accessible/simplewidgets.cpp b/src/widgets/accessible/simplewidgets.cpp index b6fe003452..73de51ff45 100644 --- a/src/widgets/accessible/simplewidgets.cpp +++ b/src/widgets/accessible/simplewidgets.cpp @@ -60,7 +60,9 @@ #if QT_CONFIG(toolbutton) #include <qtoolbutton.h> #endif +#if QT_CONFIG(menu) #include <qmenu.h> +#endif #if QT_CONFIG(label) #include <qlabel.h> #endif @@ -70,14 +72,17 @@ #if QT_CONFIG(lcdnumber) #include <qlcdnumber.h> #endif +#if QT_CONFIG(lineedit) #include <qlineedit.h> #include <private/qlineedit_p.h> +#endif #include <qstyle.h> #include <qstyleoption.h> #include <qtextdocument.h> #include <qwindow.h> #include <private/qwindowcontainer_p.h> #include <QtCore/qvarlengtharray.h> +#include <QtGui/qvalidator.h> #ifdef Q_OS_MAC #include <qfocusframe.h> @@ -175,7 +180,7 @@ QAccessible::State QAccessibleButton::state() const if (pb) { if (pb->isDefault()) state.defaultButton = true; -#ifndef QT_NO_MENU +#if QT_CONFIG(menu) if (pb->menu()) state.hasPopup = true; #endif @@ -214,7 +219,7 @@ QAccessible::Role QAccessibleButton::role() const { QAbstractButton *ab = button(); -#ifndef QT_NO_MENU +#if QT_CONFIG(menu) if (QPushButton *pb = qobject_cast<QPushButton*>(ab)) { if (pb->menu()) return QAccessible::ButtonMenu; @@ -257,7 +262,7 @@ void QAccessibleButton::doAction(const QString &actionName) return; if (actionName == pressAction() || actionName == showMenuAction()) { -#ifndef QT_NO_MENU +#if QT_CONFIG(menu) QPushButton *pb = qobject_cast<QPushButton*>(object()); if (pb && pb->menu()) pb->showMenu(); @@ -311,7 +316,7 @@ QToolButton *QAccessibleToolButton::toolButton() const */ bool QAccessibleToolButton::isSplitButton() const { -#ifndef QT_NO_MENU +#if QT_CONFIG(menu) return toolButton()->menu() && toolButton()->popupMode() == QToolButton::MenuButtonPopup; #else return false; @@ -323,7 +328,7 @@ QAccessible::State QAccessibleToolButton::state() const QAccessible::State st = QAccessibleButton::state(); if (toolButton()->autoRaise()) st.hotTracked = true; -#ifndef QT_NO_MENU +#if QT_CONFIG(menu) if (toolButton()->menu()) st.hasPopup = true; #endif @@ -337,7 +342,7 @@ int QAccessibleToolButton::childCount() const QAccessible::Role QAccessibleToolButton::role() const { -#ifndef QT_NO_MENU +#if QT_CONFIG(menu) QAbstractButton *ab = button(); QToolButton *tb = qobject_cast<QToolButton*>(ab); if (!tb->menu()) @@ -351,7 +356,7 @@ QAccessible::Role QAccessibleToolButton::role() const QAccessibleInterface *QAccessibleToolButton::child(int index) const { -#ifndef QT_NO_MENU +#if QT_CONFIG(menu) if (index == 0 && toolButton()->menu()) { return QAccessible::queryAccessibleInterface(toolButton()->menu()); @@ -658,7 +663,7 @@ QStringList QAccessibleGroupBox::keyBindingsForAction(const QString &) const #endif -#ifndef QT_NO_LINEEDIT +#if QT_CONFIG(lineedit) /*! \class QAccessibleLineEdit \brief The QAccessibleLineEdit class implements the QAccessibleInterface for widgets with editable text @@ -895,7 +900,7 @@ void QAccessibleLineEdit::replaceText(int startOffset, int endOffset, const QStr lineEdit()->setText(lineEdit()->text().replace(startOffset, endOffset - startOffset, text)); } -#endif // QT_NO_LINEEDIT +#endif // QT_CONFIG(lineedit) #if QT_CONFIG(progressbar) QAccessibleProgressBar::QAccessibleProgressBar(QWidget *o) |