summaryrefslogtreecommitdiffstats
path: root/src/widgets/accessible
diff options
context:
space:
mode:
authorStephan Binner <stephan.binner@basyskom.com>2017-07-27 22:09:05 +0200
committerStephan Binner <stephan.binner@basyskom.com>2017-08-10 05:37:08 +0000
commit0987bda99e3473186f61c11ca46be504534cedaf (patch)
treeaf03e35503b166729e50b7a5cdaf78c033be69de /src/widgets/accessible
parentfab326173000ef82ced76ed5b74d10988ddb3972 (diff)
Convert features.progressbar to QT_[REQUIRE_]CONFIG
Change-Id: I66d00d5bac98ff337ba5877e5f23be5e14a97551 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'src/widgets/accessible')
-rw-r--r--src/widgets/accessible/qaccessiblewidgetfactory.cpp2
-rw-r--r--src/widgets/accessible/simplewidgets.cpp8
-rw-r--r--src/widgets/accessible/simplewidgets_p.h2
3 files changed, 7 insertions, 5 deletions
diff --git a/src/widgets/accessible/qaccessiblewidgetfactory.cpp b/src/widgets/accessible/qaccessiblewidgetfactory.cpp
index 194b38461b..5ecb1cdf5f 100644
--- a/src/widgets/accessible/qaccessiblewidgetfactory.cpp
+++ b/src/widgets/accessible/qaccessiblewidgetfactory.cpp
@@ -130,7 +130,7 @@ QAccessibleInterface *qAccessibleFactory(const QString &classname, QObject *obje
#endif
} else if (classname == QLatin1String("QStatusBar")) {
iface = new QAccessibleDisplay(widget);
-#ifndef QT_NO_PROGRESSBAR
+#if QT_CONFIG(progressbar)
} else if (classname == QLatin1String("QProgressBar")) {
iface = new QAccessibleProgressBar(widget);
#endif
diff --git a/src/widgets/accessible/simplewidgets.cpp b/src/widgets/accessible/simplewidgets.cpp
index a09bb99bcb..e5ab85ebab 100644
--- a/src/widgets/accessible/simplewidgets.cpp
+++ b/src/widgets/accessible/simplewidgets.cpp
@@ -48,7 +48,9 @@
#if QT_CONFIG(pushbutton)
#include <qpushbutton.h>
#endif
+#if QT_CONFIG(progressbar)
#include <qprogressbar.h>
+#endif
#if QT_CONFIG(statusbar)
#include <qstatusbar.h>
#endif
@@ -430,7 +432,7 @@ QAccessible::Role QAccessibleDisplay::role() const
if (l->movie())
return QAccessible::Animation;
#endif
-#ifndef QT_NO_PROGRESSBAR
+#if QT_CONFIG(progressbar)
} else if (qobject_cast<QProgressBar*>(object())) {
return QAccessible::ProgressBar;
#endif
@@ -484,7 +486,7 @@ QString QAccessibleDisplay::text(QAccessible::Text t) const
}
break;
case QAccessible::Value:
-#ifndef QT_NO_PROGRESSBAR
+#if QT_CONFIG(progressbar)
if (qobject_cast<QProgressBar*>(object()))
str = QString::number(qobject_cast<QProgressBar*>(object())->value());
#endif
@@ -891,7 +893,7 @@ void QAccessibleLineEdit::replaceText(int startOffset, int endOffset, const QStr
#endif // QT_NO_LINEEDIT
-#ifndef QT_NO_PROGRESSBAR
+#if QT_CONFIG(progressbar)
QAccessibleProgressBar::QAccessibleProgressBar(QWidget *o)
: QAccessibleDisplay(o)
{
diff --git a/src/widgets/accessible/simplewidgets_p.h b/src/widgets/accessible/simplewidgets_p.h
index 1e4ae5ab67..d4a25b4b80 100644
--- a/src/widgets/accessible/simplewidgets_p.h
+++ b/src/widgets/accessible/simplewidgets_p.h
@@ -190,7 +190,7 @@ protected:
};
#endif // QT_NO_LINEEDIT
-#ifndef QT_NO_PROGRESSBAR
+#if QT_CONFIG(progressbar)
class QAccessibleProgressBar : public QAccessibleDisplay, public QAccessibleValueInterface
{
public: