summaryrefslogtreecommitdiffstats
path: root/src/platformsupport
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2020-03-31 15:56:40 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2020-06-02 23:32:36 +0200
commit93a04332eb477e013a417f383df496b9a333ca7e (patch)
treef5762e88a8521341715323fdef9c8fabbcceecf3 /src/platformsupport
parent33fc2ff6638c9a964f105ad50996ac7be057c8d6 (diff)
Move QtAccessibilitySupport into QtGui
Task-number: QTBUG-83255 Change-Id: Ibc1b38e77c3c90030a832c41f4de65c6c38bc91d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/platformsupport')
-rw-r--r--src/platformsupport/CMakeLists.txt3
-rw-r--r--src/platformsupport/accessibility/CMakeLists.txt20
-rw-r--r--src/platformsupport/accessibility/accessibility.pro15
-rw-r--r--src/platformsupport/accessibility/qaccessiblebridgeutils.cpp113
-rw-r--r--src/platformsupport/accessibility/qaccessiblebridgeutils_p.h70
-rw-r--r--src/platformsupport/linuxaccessibility/CMakeLists.txt1
-rw-r--r--src/platformsupport/linuxaccessibility/atspiadaptor.cpp2
-rw-r--r--src/platformsupport/linuxaccessibility/linuxaccessibility.pro2
-rw-r--r--src/platformsupport/platformsupport.pro2
9 files changed, 2 insertions, 226 deletions
diff --git a/src/platformsupport/CMakeLists.txt b/src/platformsupport/CMakeLists.txt
index b18b27f5fb..6132d305f4 100644
--- a/src/platformsupport/CMakeLists.txt
+++ b/src/platformsupport/CMakeLists.txt
@@ -28,9 +28,6 @@ endif()
if(QT_FEATURE_kms)
add_subdirectory(kmsconvenience)
endif()
-if(QT_FEATURE_accessibility)
- add_subdirectory(accessibility)
-endif()
if(QT_FEATURE_accessibility AND QT_FEATURE_accessibility_atspi_bridge)
add_subdirectory(linuxaccessibility)
endif()
diff --git a/src/platformsupport/accessibility/CMakeLists.txt b/src/platformsupport/accessibility/CMakeLists.txt
deleted file mode 100644
index 4757b123af..0000000000
--- a/src/platformsupport/accessibility/CMakeLists.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-# Generated from accessibility.pro.
-
-#####################################################################
-## AccessibilitySupport Module:
-#####################################################################
-
-qt_add_module(AccessibilitySupport
- STATIC
- INTERNAL_MODULE
- SOURCES
- qaccessiblebridgeutils.cpp qaccessiblebridgeutils_p.h
- DEFINES
- QT_NO_CAST_FROM_ASCII
- PUBLIC_LIBRARIES
- Qt::CorePrivate
- Qt::GuiPrivate
-)
-
-#### Keys ignored in scope 1:.:.:accessibility.pro:<TRUE>:
-# MODULE = "accessibility_support"
diff --git a/src/platformsupport/accessibility/accessibility.pro b/src/platformsupport/accessibility/accessibility.pro
deleted file mode 100644
index 1806d75630..0000000000
--- a/src/platformsupport/accessibility/accessibility.pro
+++ /dev/null
@@ -1,15 +0,0 @@
-TARGET = QtAccessibilitySupport
-MODULE = accessibility_support
-
-QT = core-private gui-private
-CONFIG += static internal_module
-
-DEFINES += QT_NO_CAST_FROM_ASCII
-
-HEADERS += \
- qaccessiblebridgeutils_p.h
-
-SOURCES += \
- qaccessiblebridgeutils.cpp
-
-load(qt_module)
diff --git a/src/platformsupport/accessibility/qaccessiblebridgeutils.cpp b/src/platformsupport/accessibility/qaccessiblebridgeutils.cpp
deleted file mode 100644
index a15b93e31e..0000000000
--- a/src/platformsupport/accessibility/qaccessiblebridgeutils.cpp
+++ /dev/null
@@ -1,113 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtGui module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#include "qaccessiblebridgeutils_p.h"
-#include <QtCore/qmath.h>
-
-QT_BEGIN_NAMESPACE
-
-namespace QAccessibleBridgeUtils {
-
-static bool performAction(QAccessibleInterface *iface, const QString &actionName)
-{
- if (QAccessibleActionInterface *actionIface = iface->actionInterface()) {
- if (actionIface->actionNames().contains(actionName)) {
- actionIface->doAction(actionName);
- return true;
- }
- }
- return false;
-}
-
-QStringList effectiveActionNames(QAccessibleInterface *iface)
-{
- QStringList actions;
- if (QAccessibleActionInterface *actionIface = iface->actionInterface())
- actions = actionIface->actionNames();
-
- if (iface->valueInterface()) {
- if (!actions.contains(QAccessibleActionInterface::increaseAction()))
- actions << QAccessibleActionInterface::increaseAction();
- if (!actions.contains(QAccessibleActionInterface::decreaseAction()))
- actions << QAccessibleActionInterface::decreaseAction();
- }
- return actions;
-}
-
-bool performEffectiveAction(QAccessibleInterface *iface, const QString &actionName)
-{
- if (!iface)
- return false;
- if (performAction(iface, actionName))
- return true;
- if (actionName != QAccessibleActionInterface::increaseAction()
- && actionName != QAccessibleActionInterface::decreaseAction())
- return false;
-
- QAccessibleValueInterface *valueIface = iface->valueInterface();
- if (!valueIface)
- return false;
- bool success;
- const QVariant currentVariant = valueIface->currentValue();
- double stepSize = valueIface->minimumStepSize().toDouble(&success);
- if (!success || qFuzzyIsNull(stepSize)) {
- const double min = valueIface->minimumValue().toDouble(&success);
- if (!success)
- return false;
- const double max = valueIface->maximumValue().toDouble(&success);
- if (!success)
- return false;
- stepSize = (max - min) / 10; // this is pretty arbitrary, we just need to provide something
- const int typ = currentVariant.userType();
- if (typ != QMetaType::Float && typ != QMetaType::Double) {
- // currentValue is an integer. Round it up to ensure stepping in case it was below 1
- stepSize = qCeil(stepSize);
- }
- }
- const double current = currentVariant.toDouble(&success);
- if (!success)
- return false;
- if (actionName == QAccessibleActionInterface::decreaseAction())
- stepSize = -stepSize;
- valueIface->setCurrentValue(current + stepSize);
- return true;
-}
-
-} //namespace
-
-QT_END_NAMESPACE
diff --git a/src/platformsupport/accessibility/qaccessiblebridgeutils_p.h b/src/platformsupport/accessibility/qaccessiblebridgeutils_p.h
deleted file mode 100644
index cf8e126894..0000000000
--- a/src/platformsupport/accessibility/qaccessiblebridgeutils_p.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtGui module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QACCESSIBLEBRIDGEUTILS_H
-#define QACCESSIBLEBRIDGEUTILS_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists for the convenience
-// of other Qt classes. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include <QtGui/private/qtguiglobal_p.h>
-
-#include <QtCore/qstringlist.h>
-#include <QtGui/qaccessible.h>
-
-QT_REQUIRE_CONFIG(accessibility);
-
-QT_BEGIN_NAMESPACE
-
-namespace QAccessibleBridgeUtils {
- QStringList effectiveActionNames(QAccessibleInterface *iface);
- bool performEffectiveAction(QAccessibleInterface *iface, const QString &actionName);
-}
-
-QT_END_NAMESPACE
-
-#endif //QACCESSIBLEBRIDGEUTILS_H
diff --git a/src/platformsupport/linuxaccessibility/CMakeLists.txt b/src/platformsupport/linuxaccessibility/CMakeLists.txt
index 35bfdabf5f..0e1a7a9d16 100644
--- a/src/platformsupport/linuxaccessibility/CMakeLists.txt
+++ b/src/platformsupport/linuxaccessibility/CMakeLists.txt
@@ -31,7 +31,6 @@ qt_add_module(LinuxAccessibilitySupport
QT_NO_CAST_FROM_ASCII
PUBLIC_LIBRARIES
PkgConfig::ATSPI2_nolink
- Qt::AccessibilitySupportPrivate
Qt::CorePrivate
Qt::DBus
Qt::GuiPrivate
diff --git a/src/platformsupport/linuxaccessibility/atspiadaptor.cpp b/src/platformsupport/linuxaccessibility/atspiadaptor.cpp
index 88539b7220..dca57372fc 100644
--- a/src/platformsupport/linuxaccessibility/atspiadaptor.cpp
+++ b/src/platformsupport/linuxaccessibility/atspiadaptor.cpp
@@ -50,7 +50,7 @@
#ifndef QT_NO_ACCESSIBILITY
#include "socket_interface.h"
#include "constant_mappings_p.h"
-#include <QtAccessibilitySupport/private/qaccessiblebridgeutils_p.h>
+#include <QtGui/private/qaccessiblebridgeutils_p.h>
#include "application_p.h"
/*!
diff --git a/src/platformsupport/linuxaccessibility/linuxaccessibility.pro b/src/platformsupport/linuxaccessibility/linuxaccessibility.pro
index d6689c0fa3..9ccb4893d2 100644
--- a/src/platformsupport/linuxaccessibility/linuxaccessibility.pro
+++ b/src/platformsupport/linuxaccessibility/linuxaccessibility.pro
@@ -1,7 +1,7 @@
TARGET = QtLinuxAccessibilitySupport
MODULE = linuxaccessibility_support
-QT = core-private dbus gui-private accessibility_support-private
+QT = core-private dbus gui-private
CONFIG += static internal_module
DEFINES += QT_NO_CAST_FROM_ASCII
diff --git a/src/platformsupport/platformsupport.pro b/src/platformsupport/platformsupport.pro
index f8f37b53a2..439685bfd8 100644
--- a/src/platformsupport/platformsupport.pro
+++ b/src/platformsupport/platformsupport.pro
@@ -27,10 +27,8 @@ qtConfig(kms): \
SUBDIRS += kmsconvenience
qtConfig(accessibility) {
- SUBDIRS += accessibility
qtConfig(accessibility-atspi-bridge) {
SUBDIRS += linuxaccessibility
- linuxaccessibility.depends += accessibility
}
}