summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
Diffstat (limited to 'application')
-rw-r--r--application/MultiMC.cpp2
-rw-r--r--application/groupview/AccessibleGroupView.cpp4
-rw-r--r--application/groupview/AccessibleGroupView_p.h3
-rw-r--r--application/groupview/GroupView.cpp2
-rw-r--r--application/widgets/VersionListView.cpp2
5 files changed, 13 insertions, 0 deletions
diff --git a/application/MultiMC.cpp b/application/MultiMC.cpp
index c95d85be..a7b06ead 100644
--- a/application/MultiMC.cpp
+++ b/application/MultiMC.cpp
@@ -535,7 +535,9 @@ MultiMC::MultiMC(int &argc, char **argv) : QApplication(argc, argv)
qDebug() << "<> Settings loaded.";
}
+#ifndef QT_NO_ACCESSIBILITY
QAccessible::installFactory(groupViewAccessibleFactory);
+#endif /* !QT_NO_ACCESSIBILITY */
// load translations
{
diff --git a/application/groupview/AccessibleGroupView.cpp b/application/groupview/AccessibleGroupView.cpp
index 9a1bb821..c6541f18 100644
--- a/application/groupview/AccessibleGroupView.cpp
+++ b/application/groupview/AccessibleGroupView.cpp
@@ -6,6 +6,8 @@
#include <qaccessible.h>
#include <qheaderview.h>
+#ifndef QT_NO_ACCESSIBILITY
+
QAccessibleInterface *groupViewAccessibleFactory(const QString &classname, QObject *object)
{
QAccessibleInterface *iface = 0;
@@ -772,3 +774,5 @@ QAccessibleInterface *AccessibleGroupViewItem::child(int) const
{
return 0;
}
+
+#endif /* !QT_NO_ACCESSIBILITY */
diff --git a/application/groupview/AccessibleGroupView_p.h b/application/groupview/AccessibleGroupView_p.h
index cdec1c0a..361e95f0 100644
--- a/application/groupview/AccessibleGroupView_p.h
+++ b/application/groupview/AccessibleGroupView_p.h
@@ -1,5 +1,7 @@
#pragma once
+#include <qtguiglobal.h>
+#ifndef QT_NO_ACCESSIBILITY
#include "GroupView.h"
#include "QtCore/qpointer.h"
#include <QtGui/qaccessible.h>
@@ -114,3 +116,4 @@ private:
friend class AccessibleGroupView;
};
+#endif /* !QT_NO_ACCESSIBILITY */
diff --git a/application/groupview/GroupView.cpp b/application/groupview/GroupView.cpp
index ff0daee4..5ccbfd39 100644
--- a/application/groupview/GroupView.cpp
+++ b/application/groupview/GroupView.cpp
@@ -93,11 +93,13 @@ void GroupView::currentChanged(const QModelIndex& current, const QModelIndex& pr
{
QAbstractItemView::currentChanged(current, previous);
// TODO: for accessibility support, implement+register a factory, steal QAccessibleTable from Qt and return an instance of it for GroupView.
+#ifndef QT_NO_ACCESSIBILITY
if (QAccessible::isActive() && current.isValid()) {
QAccessibleEvent event(this, QAccessible::Focus);
event.setChild(current.row());
QAccessible::updateAccessibility(&event);
}
+#endif /* !QT_NO_ACCESSIBILITY */
}
diff --git a/application/widgets/VersionListView.cpp b/application/widgets/VersionListView.cpp
index 09df75b7..fdcb84e6 100644
--- a/application/widgets/VersionListView.cpp
+++ b/application/widgets/VersionListView.cpp
@@ -82,7 +82,9 @@ void VersionListView::setEmptyMode(VersionListView::EmptyMode mode)
void VersionListView::updateEmptyViewPort()
{
+#ifndef QT_NO_ACCESSIBILITY
setAccessibleDescription(currentEmptyString());
+#endif /* !QT_NO_ACCESSIBILITY */
if(!m_itemCount)
{