parent
6000424dca
commit
d26425516b
@ -1 +1,2 @@
|
|||||||
/libqaccessibilityclient-0.1.1.tar.bz2
|
/libqaccessibilityclient-0.1.1.tar.bz2
|
||||||
|
/libqaccessibilityclient-0.4.1.tar.xz
|
||||||
|
@ -1,36 +0,0 @@
|
|||||||
From c3e78300b1f6f460f6c9458c2d989a4498edc0fa Mon Sep 17 00:00:00 2001
|
|
||||||
From: Rex Dieter <rdieter@math.unl.edu>
|
|
||||||
Date: Thu, 27 Mar 2014 07:21:01 -0500
|
|
||||||
Subject: [PATCH 01/12] introduce QT4_BUILD option (default OFF)
|
|
||||||
|
|
||||||
Allows builders to control building against Qt4 or Qt5, similar to how
|
|
||||||
attica is handled.
|
|
||||||
---
|
|
||||||
CMakeLists.txt | 3 +++
|
|
||||||
1 file changed, 3 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
||||||
index 75c7b58..233a765 100644
|
|
||||||
--- a/CMakeLists.txt
|
|
||||||
+++ b/CMakeLists.txt
|
|
||||||
@@ -14,14 +14,17 @@ set(CMAKE_AUTOMOC TRUE)
|
|
||||||
|
|
||||||
# override the KDE defaults and build tests unless explicitly disabled
|
|
||||||
option(KDE4_BUILD_TESTS "Build the tests" ON)
|
|
||||||
+option(QT4_BUILD "Force building with Qt4 even if Qt5 is found")
|
|
||||||
|
|
||||||
include_directories(
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
|
|
||||||
${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR}
|
|
||||||
)
|
|
||||||
|
|
||||||
+if (NOT QT4_BUILD)
|
|
||||||
find_package(Qt5Widgets QUIET)
|
|
||||||
find_package(Qt5DBus QUIET)
|
|
||||||
+endif()
|
|
||||||
|
|
||||||
|
|
||||||
if (${Qt5Widgets_FOUND} AND ${Qt5DBus_FOUND})
|
|
||||||
--
|
|
||||||
2.9.4
|
|
||||||
|
|
@ -1,68 +0,0 @@
|
|||||||
From 32fc701e914cd7b4c90a9674ea86d0ca6b53e170 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Frederik Gladhorn <frederik.gladhorn@digia.com>
|
|
||||||
Date: Fri, 7 Feb 2014 17:19:24 +0100
|
|
||||||
Subject: [PATCH 02/12] Revert "NoInterface is the same as InvalidInterface,
|
|
||||||
remove the later"
|
|
||||||
|
|
||||||
This broke caching of interfaces resulting in no properties.
|
|
||||||
|
|
||||||
This reverts commit 2d2c968b5058edae3a0e3c9f29145702111ae990.
|
|
||||||
---
|
|
||||||
src/qaccessibilityclient/accessibleobject.h | 4 +++-
|
|
||||||
src/qaccessibilityclient/cachestrategy_p.h | 4 ++--
|
|
||||||
src/qaccessibilityclient/registry_p.cpp | 2 +-
|
|
||||||
3 files changed, 6 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/qaccessibilityclient/accessibleobject.h b/src/qaccessibilityclient/accessibleobject.h
|
|
||||||
index 7a13b8a..c4913fc 100644
|
|
||||||
--- a/src/qaccessibilityclient/accessibleobject.h
|
|
||||||
+++ b/src/qaccessibilityclient/accessibleobject.h
|
|
||||||
@@ -86,7 +86,9 @@ public:
|
|
||||||
ValueInterface = 0x20000,
|
|
||||||
SocketInterface = 0x40000,
|
|
||||||
EventWindowInterface = 0x80000,
|
|
||||||
- EventFocusInterface = 0x100000
|
|
||||||
+ EventFocusInterface = 0x100000,
|
|
||||||
+
|
|
||||||
+ InvalidInterface = 0x80000000
|
|
||||||
};
|
|
||||||
Q_DECLARE_FLAGS(Interfaces, Interface)
|
|
||||||
|
|
||||||
diff --git a/src/qaccessibilityclient/cachestrategy_p.h b/src/qaccessibilityclient/cachestrategy_p.h
|
|
||||||
index 1c339c5..33ba9ab 100644
|
|
||||||
--- a/src/qaccessibilityclient/cachestrategy_p.h
|
|
||||||
+++ b/src/qaccessibilityclient/cachestrategy_p.h
|
|
||||||
@@ -65,7 +65,7 @@ public:
|
|
||||||
virtual AccessibleObject::Interfaces interfaces(const AccessibleObject &object)
|
|
||||||
{
|
|
||||||
if (!interfaceHash.contains(object.d.data()))
|
|
||||||
- return AccessibleObject::NoInterface;
|
|
||||||
+ return AccessibleObject::InvalidInterface;
|
|
||||||
return interfaceHash.value(object.d.data());
|
|
||||||
}
|
|
||||||
void setInterfaces(const AccessibleObject &object, AccessibleObject::Interfaces interfaces)
|
|
||||||
@@ -106,7 +106,7 @@ public:
|
|
||||||
virtual AccessibleObject::Interfaces interfaces(const AccessibleObject &object)
|
|
||||||
{
|
|
||||||
if (!interfaceHash.contains(object.d.data()))
|
|
||||||
- return AccessibleObject::NoInterface;
|
|
||||||
+ return AccessibleObject::InvalidInterface;
|
|
||||||
return interfaceHash.value(object.d.data());
|
|
||||||
}
|
|
||||||
void setInterfaces(const AccessibleObject &object, AccessibleObject::Interfaces interfaces)
|
|
||||||
diff --git a/src/qaccessibilityclient/registry_p.cpp b/src/qaccessibilityclient/registry_p.cpp
|
|
||||||
index 6ea9c58..45e0834 100644
|
|
||||||
--- a/src/qaccessibilityclient/registry_p.cpp
|
|
||||||
+++ b/src/qaccessibilityclient/registry_p.cpp
|
|
||||||
@@ -835,7 +835,7 @@ AccessibleObject::Interfaces RegistryPrivate::supportedInterfaces(const Accessib
|
|
||||||
{
|
|
||||||
if (m_cache) {
|
|
||||||
AccessibleObject::Interfaces interfaces = m_cache->interfaces(object);
|
|
||||||
- if (!(interfaces & AccessibleObject::NoInterface))
|
|
||||||
+ if (!(interfaces & AccessibleObject::InvalidInterface))
|
|
||||||
return interfaces;
|
|
||||||
}
|
|
||||||
|
|
||||||
--
|
|
||||||
2.9.4
|
|
||||||
|
|
@ -1,163 +0,0 @@
|
|||||||
From 69c2384fd0a4dde9231c7e9453ec9c8f4c6fd11f Mon Sep 17 00:00:00 2001
|
|
||||||
From: Frederik Gladhorn <frederik.gladhorn@digia.com>
|
|
||||||
Date: Wed, 30 Apr 2014 22:25:49 +0200
|
|
||||||
Subject: [PATCH 03/12] Add textWithBoundaries
|
|
||||||
|
|
||||||
---
|
|
||||||
src/qaccessibilityclient/accessibleobject.cpp | 8 +++++++
|
|
||||||
src/qaccessibilityclient/accessibleobject.h | 31 +++++++++++++++++++++++++++
|
|
||||||
src/qaccessibilityclient/registry_p.cpp | 20 +++++++++++++++++
|
|
||||||
src/qaccessibilityclient/registry_p.h | 1 +
|
|
||||||
tests/auto/tst_accessibilityclient.cpp | 24 ++++++++++++++++++++-
|
|
||||||
5 files changed, 83 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/qaccessibilityclient/accessibleobject.cpp b/src/qaccessibilityclient/accessibleobject.cpp
|
|
||||||
index bf17ae3..21686bd 100644
|
|
||||||
--- a/src/qaccessibilityclient/accessibleobject.cpp
|
|
||||||
+++ b/src/qaccessibilityclient/accessibleobject.cpp
|
|
||||||
@@ -235,6 +235,14 @@ QString AccessibleObject::text(int startOffset, int endOffset) const
|
|
||||||
return QString();
|
|
||||||
}
|
|
||||||
|
|
||||||
+QString AccessibleObject::textWithBoundary(int offset, TextBoundary boundary, int *startOffset, int *endOffset) const
|
|
||||||
+{
|
|
||||||
+ if (supportedInterfaces() & AccessibleObject::TextInterface)
|
|
||||||
+ return d->registryPrivate->textWithBoundary(*this, offset, boundary, startOffset, endOffset);
|
|
||||||
+ qWarning() << "text called on accessible that does not implement text";
|
|
||||||
+ return QString();
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
bool AccessibleObject::setText(const QString &text)
|
|
||||||
{
|
|
||||||
if( supportedInterfaces() & AccessibleObject::EditableTextInterface )
|
|
||||||
diff --git a/src/qaccessibilityclient/accessibleobject.h b/src/qaccessibilityclient/accessibleobject.h
|
|
||||||
index c4913fc..a0d0db4 100644
|
|
||||||
--- a/src/qaccessibilityclient/accessibleobject.h
|
|
||||||
+++ b/src/qaccessibilityclient/accessibleobject.h
|
|
||||||
@@ -183,6 +183,20 @@ public:
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
+ \brief The TextBoundaries enum represents the different boundaries when
|
|
||||||
+ asking for text at a certain offset.
|
|
||||||
+ */
|
|
||||||
+ enum TextBoundary {
|
|
||||||
+ CharBoundary,
|
|
||||||
+ WordStartBoundary,
|
|
||||||
+ WordEndBoundary,
|
|
||||||
+ SentenceStartBoundary,
|
|
||||||
+ SentenceEndBoundary,
|
|
||||||
+ LineStartBoundary,
|
|
||||||
+ LineEndBoundary
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ /**
|
|
||||||
\brief Construct an invalid AccessibleObject.
|
|
||||||
*/
|
|
||||||
AccessibleObject();
|
|
||||||
@@ -434,6 +448,23 @@ public:
|
|
||||||
QString text(int startOffset = 0, int endOffset = -1) const;
|
|
||||||
|
|
||||||
/**
|
|
||||||
+ \brief Returns the text of the TextInterface by boundary.
|
|
||||||
+
|
|
||||||
+ Especially for larger text fields it may be more performant and easier to
|
|
||||||
+ query the text at a certain position instead of the full text.
|
|
||||||
+
|
|
||||||
+ For example the line where the cursor is currently can be retrieved with this function
|
|
||||||
+ in a convenient way.
|
|
||||||
+
|
|
||||||
+ \param offset is the position of the requested text.
|
|
||||||
+ \param startOffset returns the beginning of the offset, for example the start of the line when
|
|
||||||
+ asking for line boundaries.
|
|
||||||
+ \param endOffset returns the end of the text section
|
|
||||||
+ \return the text at the offset.
|
|
||||||
+ */
|
|
||||||
+ QString textWithBoundary(int offset, TextBoundary boundary, int *startOffset = 0, int *endOffset = 0) const;
|
|
||||||
+
|
|
||||||
+ /**
|
|
||||||
\brief Set the text of the EditableTextInterface.
|
|
||||||
|
|
||||||
\param text The text to set.
|
|
||||||
diff --git a/src/qaccessibilityclient/registry_p.cpp b/src/qaccessibilityclient/registry_p.cpp
|
|
||||||
index 45e0834..d28bfb0 100644
|
|
||||||
--- a/src/qaccessibilityclient/registry_p.cpp
|
|
||||||
+++ b/src/qaccessibilityclient/registry_p.cpp
|
|
||||||
@@ -958,6 +958,26 @@ QString RegistryPrivate::text(const AccessibleObject &object, int startOffset, i
|
|
||||||
return reply.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
+QString RegistryPrivate::textWithBoundary(const AccessibleObject &object, int offset, AccessibleObject::TextBoundary boundary, int *startOffset, int *endOffset) const
|
|
||||||
+{
|
|
||||||
+ QDBusMessage message = QDBusMessage::createMethodCall(object.d->service, object.d->path, QLatin1String("org.a11y.atspi.Text"), QLatin1String("GetTextAtOffset"));
|
|
||||||
+ message.setArguments(QVariantList() << offset << (AtspiTextBoundaryType) boundary);
|
|
||||||
+ QDBusMessage reply = conn.connection().call(message);
|
|
||||||
+ if (reply.type() != QDBusMessage::ReplyMessage || reply.signature() != QStringLiteral("sii")) {
|
|
||||||
+ qWarning() << "Could not access text." << reply.errorMessage();
|
|
||||||
+ if (startOffset)
|
|
||||||
+ *startOffset = 0;
|
|
||||||
+ if (endOffset)
|
|
||||||
+ *endOffset = 0;
|
|
||||||
+ return QString();
|
|
||||||
+ }
|
|
||||||
+ if (startOffset)
|
|
||||||
+ *startOffset = reply.arguments().at(1).toInt();
|
|
||||||
+ if (endOffset)
|
|
||||||
+ *endOffset = reply.arguments().at(2).toInt();
|
|
||||||
+ return reply.arguments().first().toString();;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
bool RegistryPrivate::setText(const AccessibleObject &object, const QString &text)
|
|
||||||
{
|
|
||||||
QDBusMessage message = QDBusMessage::createMethodCall(object.d->service, object.d->path, QLatin1String("org.a11y.atspi.EditableText"), QLatin1String("SetTextContents"));
|
|
||||||
diff --git a/src/qaccessibilityclient/registry_p.h b/src/qaccessibilityclient/registry_p.h
|
|
||||||
index b35de51..e28ecd4 100644
|
|
||||||
--- a/src/qaccessibilityclient/registry_p.h
|
|
||||||
+++ b/src/qaccessibilityclient/registry_p.h
|
|
||||||
@@ -81,6 +81,7 @@ public:
|
|
||||||
QList< QPair<int,int> > textSelections(const AccessibleObject &object) const;
|
|
||||||
void setTextSelections(const AccessibleObject &object, const QList< QPair<int,int> > &selections);
|
|
||||||
QString text(const AccessibleObject &object, int startOffset = 0, int endOffset = -1) const;
|
|
||||||
+ QString textWithBoundary(const AccessibleObject &object, int offset, AccessibleObject::TextBoundary boundary, int *startOffset, int *endOffset) const;
|
|
||||||
|
|
||||||
bool setText(const AccessibleObject &object, const QString &text);
|
|
||||||
bool insertText(const AccessibleObject &object, const QString &text, int position, int length = -1);
|
|
||||||
diff --git a/tests/auto/tst_accessibilityclient.cpp b/tests/auto/tst_accessibilityclient.cpp
|
|
||||||
index dc1eb69..2fcb856 100644
|
|
||||||
--- a/tests/auto/tst_accessibilityclient.cpp
|
|
||||||
+++ b/tests/auto/tst_accessibilityclient.cpp
|
|
||||||
@@ -467,8 +467,30 @@ void AccessibilityClientTest::tst_characterExtents()
|
|
||||||
AccessibleObject textArea = app.child(0).child(0);
|
|
||||||
QVERIFY(textArea.supportedInterfaces() & QAccessibleClient::AccessibleObject::TextInterface);
|
|
||||||
|
|
||||||
- QCOMPARE(textArea.characterRect(0), QRect(20,40,0,14));
|
|
||||||
textEdit->setText("This is useless text that is being used to test this text area.\n I \n hope \n this will get correct\n\t\t\tCharacterExtents!");
|
|
||||||
+ QPoint pos = w.pos();
|
|
||||||
+
|
|
||||||
+ int start;
|
|
||||||
+ int end;
|
|
||||||
+ QString textWord = textArea.textWithBoundary(0, AccessibleObject::WordStartBoundary, &start, &end);
|
|
||||||
+ QCOMPARE(textWord, QStringLiteral("This"));
|
|
||||||
+ QCOMPARE(start, 0);
|
|
||||||
+ QCOMPARE(end, 4);
|
|
||||||
+ textWord = textArea.textWithBoundary(6, AccessibleObject::WordStartBoundary, &start, &end);
|
|
||||||
+ QCOMPARE(textWord , QStringLiteral("is"));
|
|
||||||
+ QCOMPARE(start, 5);
|
|
||||||
+ QCOMPARE(end, 7);
|
|
||||||
+ textWord = textArea.textWithBoundary(3, AccessibleObject::WordEndBoundary);
|
|
||||||
+ QCOMPARE(textWord , QStringLiteral("This"));
|
|
||||||
+
|
|
||||||
+ QString textSentence = textArea.textWithBoundary(0, AccessibleObject::SentenceEndBoundary);
|
|
||||||
+ QCOMPARE(textSentence, QStringLiteral("This is useless text that is being used to test this text area."));
|
|
||||||
+ QString textLine = textArea.textWithBoundary(0, AccessibleObject::LineEndBoundary);
|
|
||||||
+ QCOMPARE(textLine, QStringLiteral("This is useless text that is being used to test this text area."));
|
|
||||||
+ textLine = textArea.textWithBoundary(0, AccessibleObject::LineEndBoundary);
|
|
||||||
+ QCOMPARE(textLine, QStringLiteral("This is useless text that is being used to test this text area."));
|
|
||||||
+
|
|
||||||
+ QCOMPARE(textArea.characterRect(0), QRect(20,40,7,14).translated(pos));
|
|
||||||
QCOMPARE(textArea.characterRect(1), QRect(20,40,7,14));
|
|
||||||
}
|
|
||||||
|
|
||||||
--
|
|
||||||
2.9.4
|
|
||||||
|
|
@ -1,63 +0,0 @@
|
|||||||
From 0bbc5b80cdfb56e693258c1eeccadaae9e3d6546 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Frederik Gladhorn <frederik.gladhorn@digia.com>
|
|
||||||
Date: Wed, 30 Apr 2014 22:30:12 +0200
|
|
||||||
Subject: [PATCH 04/12] Change dbus timeouts to return much faster
|
|
||||||
|
|
||||||
The sync usage of DBus is probably the worst design mistake in this
|
|
||||||
library, mititage it a bit.
|
|
||||||
---
|
|
||||||
src/qaccessibilityclient/registry_p.cpp | 10 +++++-----
|
|
||||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/qaccessibilityclient/registry_p.cpp b/src/qaccessibilityclient/registry_p.cpp
|
|
||||||
index d28bfb0..584685b 100644
|
|
||||||
--- a/src/qaccessibilityclient/registry_p.cpp
|
|
||||||
+++ b/src/qaccessibilityclient/registry_p.cpp
|
|
||||||
@@ -543,7 +543,7 @@ QList<AccessibleObject> RegistryPrivate::children(const AccessibleObject &object
|
|
||||||
QDBusMessage message = QDBusMessage::createMethodCall (
|
|
||||||
object.d->service, object.d->path, QLatin1String("org.a11y.atspi.Accessible"), QLatin1String("GetChildren"));
|
|
||||||
|
|
||||||
- QDBusReply<QSpiObjectReferenceList> reply = conn.connection().call(message);
|
|
||||||
+ QDBusReply<QSpiObjectReferenceList> reply = conn.connection().call(message, QDBus::Block, 500);
|
|
||||||
if (!reply.isValid()) {
|
|
||||||
qWarning() << "Could not access children." << reply.error().message();
|
|
||||||
return accs;
|
|
||||||
@@ -1163,7 +1163,7 @@ QString RegistryPrivate::imageDescription(const AccessibleObject &object) const
|
|
||||||
QString RegistryPrivate::imageLocale(const AccessibleObject &object) const
|
|
||||||
{
|
|
||||||
QDBusMessage message = QDBusMessage::createMethodCall(object.d->service, object.d->path, QLatin1String("org.a11y.atspi.Image"), QLatin1String("ImageLocale"));
|
|
||||||
- QDBusReply<QString> reply = conn.connection().call(message);
|
|
||||||
+ QDBusReply<QString> reply = conn.connection().call(message, QDBus::Block, 500);
|
|
||||||
if (!reply.isValid()) {
|
|
||||||
qWarning() << "Could not access imageLocale." << reply.error().message();
|
|
||||||
return QString();
|
|
||||||
@@ -1191,7 +1191,7 @@ QVector< QSharedPointer<QAction> > RegistryPrivate::actions(const AccessibleObje
|
|
||||||
QDBusMessage message = QDBusMessage::createMethodCall (
|
|
||||||
object.d->service, object.d->path, QLatin1String("org.a11y.atspi.Action"), QLatin1String("GetActions"));
|
|
||||||
|
|
||||||
- QDBusReply<QSpiActionArray> reply = conn.connection().call(message);
|
|
||||||
+ QDBusReply<QSpiActionArray> reply = conn.connection().call(message, QDBus::Block, 500);
|
|
||||||
if (!reply.isValid()) {
|
|
||||||
qWarning() << "Could not access actions." << reply.error().message();
|
|
||||||
return QVector< QSharedPointer<QAction> >();
|
|
||||||
@@ -1230,7 +1230,7 @@ void RegistryPrivate::actionTriggered(const QString &action)
|
|
||||||
args << index;
|
|
||||||
message.setArguments(args);
|
|
||||||
|
|
||||||
- QDBusReply<bool> reply = conn.connection().call(message);
|
|
||||||
+ QDBusReply<bool> reply = conn.connection().call(message, QDBus::Block, 500);
|
|
||||||
if (!reply.isValid()) {
|
|
||||||
qWarning() << "Could not execute action=" << action << reply.error().message();
|
|
||||||
return;
|
|
||||||
@@ -1253,7 +1253,7 @@ QVariant RegistryPrivate::getProperty(const QString &service, const QString &pat
|
|
||||||
service, path, QLatin1String("org.freedesktop.DBus.Properties"), QLatin1String("Get"));
|
|
||||||
|
|
||||||
message.setArguments(args);
|
|
||||||
- QDBusMessage reply = conn.connection().call(message);
|
|
||||||
+ QDBusMessage reply = conn.connection().call(message, QDBus::Block, 500);
|
|
||||||
if (reply.arguments().isEmpty())
|
|
||||||
return QVariant();
|
|
||||||
|
|
||||||
--
|
|
||||||
2.9.4
|
|
||||||
|
|
@ -1,39 +0,0 @@
|
|||||||
From a5ab9a3beacd981bdd3c8f84b0eab14e94beb228 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Frederik Gladhorn <frederik.gladhorn@digia.com>
|
|
||||||
Date: Wed, 30 Apr 2014 22:31:37 +0200
|
|
||||||
Subject: [PATCH 05/12] Improve test stability
|
|
||||||
|
|
||||||
---
|
|
||||||
tests/auto/tst_accessibilityclient.cpp | 4 ++++
|
|
||||||
1 file changed, 4 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/tests/auto/tst_accessibilityclient.cpp b/tests/auto/tst_accessibilityclient.cpp
|
|
||||||
index 2fcb856..3aaa892 100644
|
|
||||||
--- a/tests/auto/tst_accessibilityclient.cpp
|
|
||||||
+++ b/tests/auto/tst_accessibilityclient.cpp
|
|
||||||
@@ -178,10 +178,12 @@ void AccessibilityClientTest::tst_navigation()
|
|
||||||
QString desc = "This is a button...";
|
|
||||||
button->setAccessibleDescription(desc);
|
|
||||||
w.show();
|
|
||||||
+ w.activateWindow();
|
|
||||||
button->setFocus();
|
|
||||||
|
|
||||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
|
|
||||||
QTest::qWaitForWindowExposed(&w);
|
|
||||||
+ QTest::qWaitForWindowActive(&w);
|
|
||||||
#else
|
|
||||||
QTest::qWaitForWindowShown(&w);
|
|
||||||
#endif
|
|
||||||
@@ -253,7 +255,9 @@ void AccessibilityClientTest::tst_navigation()
|
|
||||||
QVERIFY(!accLabel.isChecked());
|
|
||||||
QVERIFY(!accLabel.isFocusable());
|
|
||||||
QVERIFY(!accLabel.isFocused());
|
|
||||||
+#if (QT_VERSION < QT_VERSION_CHECK(5, 2, 1))
|
|
||||||
QEXPECT_FAIL("", "Labels in Qt 4 report themselves as editable.", Continue);
|
|
||||||
+#endif
|
|
||||||
QVERIFY(!accLabel.isEditable());
|
|
||||||
|
|
||||||
AccessibleObject accLine = accW.child(2);
|
|
||||||
--
|
|
||||||
2.9.4
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
|||||||
From b3906b4b8660a4125916719f5016cd41c45d9cd3 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Frederik Gladhorn <frederik.gladhorn@digia.com>
|
|
||||||
Date: Wed, 30 Apr 2014 22:32:15 +0200
|
|
||||||
Subject: [PATCH 06/12] Remove debug output
|
|
||||||
|
|
||||||
---
|
|
||||||
src/qaccessibilityclient/registry_p.cpp | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/qaccessibilityclient/registry_p.cpp b/src/qaccessibilityclient/registry_p.cpp
|
|
||||||
index 584685b..c86eee8 100644
|
|
||||||
--- a/src/qaccessibilityclient/registry_p.cpp
|
|
||||||
+++ b/src/qaccessibilityclient/registry_p.cpp
|
|
||||||
@@ -1430,7 +1430,7 @@ bool RegistryPrivate::removeAccessibleObject(const QAccessibleClient::QSpiObject
|
|
||||||
|
|
||||||
void RegistryPrivate::slotChildrenChanged(const QString &state, int detail1, int detail2, const QDBusVariant &args, const QAccessibleClient::QSpiObjectReference &reference)
|
|
||||||
{
|
|
||||||
- qDebug() << Q_FUNC_INFO << state << detail1 << detail2 << args.variant() << reference.path.path();
|
|
||||||
+// qDebug() << Q_FUNC_INFO << state << detail1 << detail2 << args.variant() << reference.path.path();
|
|
||||||
QAccessibleClient::AccessibleObject parentAccessible = accessibleFromContext();
|
|
||||||
if (!parentAccessible.isValid()) {
|
|
||||||
qWarning() << Q_FUNC_INFO << "Children change with invalid parent." << reference.path.path();
|
|
||||||
--
|
|
||||||
2.9.4
|
|
||||||
|
|
@ -1,94 +0,0 @@
|
|||||||
From f98b97bc0add4552f1fb6f52092359f7a1b881fc Mon Sep 17 00:00:00 2001
|
|
||||||
From: Frederik Gladhorn <frederik.gladhorn@digia.com>
|
|
||||||
Date: Tue, 22 Apr 2014 12:48:33 +0200
|
|
||||||
Subject: [PATCH 07/12] Improve updating of the current object
|
|
||||||
|
|
||||||
---
|
|
||||||
examples/accessibleapps/accessibleproperties.cpp | 4 ++--
|
|
||||||
examples/accessibleapps/accessibletree.cpp | 2 +-
|
|
||||||
examples/accessibleapps/mainwindow.cpp | 7 +++++++
|
|
||||||
3 files changed, 10 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/examples/accessibleapps/accessibleproperties.cpp b/examples/accessibleapps/accessibleproperties.cpp
|
|
||||||
index 101c7e2..ab781b5 100644
|
|
||||||
--- a/examples/accessibleapps/accessibleproperties.cpp
|
|
||||||
+++ b/examples/accessibleapps/accessibleproperties.cpp
|
|
||||||
@@ -27,6 +27,8 @@ using namespace QAccessibleClient;
|
|
||||||
ObjectProperties::ObjectProperties(QObject *parent)
|
|
||||||
: QStandardItemModel(parent)
|
|
||||||
{
|
|
||||||
+ setColumnCount(2);
|
|
||||||
+ setHorizontalHeaderLabels( QStringList() << QString("Property") << QString("Value") );
|
|
||||||
}
|
|
||||||
|
|
||||||
ObjectProperties::~ObjectProperties()
|
|
||||||
@@ -47,8 +49,6 @@ void ObjectProperties::setAccessibleObject(const QAccessibleClient::AccessibleOb
|
|
||||||
m_acc = acc;
|
|
||||||
|
|
||||||
clear();
|
|
||||||
- setColumnCount(2);
|
|
||||||
- setHorizontalHeaderLabels( QStringList() << QString("Property") << QString("Value") );
|
|
||||||
|
|
||||||
if (!acc.isValid()) {
|
|
||||||
endResetModel();
|
|
||||||
diff --git a/examples/accessibleapps/accessibletree.cpp b/examples/accessibleapps/accessibletree.cpp
|
|
||||||
index 8ddcee6..b236025 100644
|
|
||||||
--- a/examples/accessibleapps/accessibletree.cpp
|
|
||||||
+++ b/examples/accessibleapps/accessibletree.cpp
|
|
||||||
@@ -226,7 +226,7 @@ QModelIndex AccessibleTree::indexForAccessible(const AccessibleObject& object)
|
|
||||||
if (parent.isValid()) {
|
|
||||||
QModelIndex parentIndex = indexForAccessible(parent);
|
|
||||||
if (!parentIndex.isValid()) {
|
|
||||||
- qWarning() << Q_FUNC_INFO << "Parent model index is invalid: " << object;
|
|
||||||
+ qWarning() << Q_FUNC_INFO << object.application().name() << object.name() << object.roleName() << "Parent model index is invalid: " << object;
|
|
||||||
return QModelIndex();
|
|
||||||
}
|
|
||||||
int indexInParent = object.indexInParent();
|
|
||||||
diff --git a/examples/accessibleapps/mainwindow.cpp b/examples/accessibleapps/mainwindow.cpp
|
|
||||||
index 136f828..a0d4e26 100644
|
|
||||||
--- a/examples/accessibleapps/mainwindow.cpp
|
|
||||||
+++ b/examples/accessibleapps/mainwindow.cpp
|
|
||||||
@@ -295,26 +295,31 @@ void MainWindow::stateChanged(const QAccessibleClient::AccessibleObject &object,
|
|
||||||
|
|
||||||
void MainWindow::childAdded(const QAccessibleClient::AccessibleObject &object, int childIndex)
|
|
||||||
{
|
|
||||||
+ updateDetails(object);
|
|
||||||
m_eventsWidget->addLog(object, EventsWidget::Object, QLatin1String("ChildAdded ") + QString::number(childIndex));
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::childRemoved(const QAccessibleClient::AccessibleObject &object, int childIndex)
|
|
||||||
{
|
|
||||||
+ updateDetails(object);
|
|
||||||
m_eventsWidget->addLog(object, EventsWidget::Object, QLatin1String("ChildRemoved ") + QString::number(childIndex));
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::visibleDataChanged(const QAccessibleClient::AccessibleObject &object)
|
|
||||||
{
|
|
||||||
+ updateDetails(object);
|
|
||||||
m_eventsWidget->addLog(object, EventsWidget::Object, "VisibleDataChanged");
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::selectionChanged(const QAccessibleClient::AccessibleObject &object)
|
|
||||||
{
|
|
||||||
+ updateDetails(object);
|
|
||||||
m_eventsWidget->addLog(object, EventsWidget::Table, "SelectionChanged");
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::modelChanged(const QAccessibleClient::AccessibleObject &object)
|
|
||||||
{
|
|
||||||
+ updateDetails(object);
|
|
||||||
m_eventsWidget->addLog(object, EventsWidget::Table, "ModelChanged");
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -460,6 +465,8 @@ void MainWindow::focusChanged(const QAccessibleClient::AccessibleObject &object)
|
|
||||||
setCurrentObject(object);
|
|
||||||
|
|
||||||
m_accessibleObjectTreeView->setFocusPolicy(prevFocusPolicy);
|
|
||||||
+ } else {
|
|
||||||
+ updateDetails(object);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
--
|
|
||||||
2.9.4
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
|||||||
From f66d84930ac94d248644da0bf12036783142b012 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
|
|
||||||
Date: Fri, 31 Jul 2015 10:41:41 +0200
|
|
||||||
Subject: [PATCH 08/12] Add name to object debug output
|
|
||||||
|
|
||||||
---
|
|
||||||
src/qaccessibilityclient/accessibleobject.cpp | 3 ++-
|
|
||||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/qaccessibilityclient/accessibleobject.cpp b/src/qaccessibilityclient/accessibleobject.cpp
|
|
||||||
index 21686bd..b2b005b 100644
|
|
||||||
--- a/src/qaccessibilityclient/accessibleobject.cpp
|
|
||||||
+++ b/src/qaccessibilityclient/accessibleobject.cpp
|
|
||||||
@@ -522,10 +522,11 @@ bool AccessibleObject::supportsAutocompletion() const
|
|
||||||
QACCESSIBILITYCLIENT_EXPORT QDebug QAccessibleClient::operator<<(QDebug d, const AccessibleObject &object)
|
|
||||||
{
|
|
||||||
d.nospace();
|
|
||||||
- d << "AccessibleObject("; //d:" << hex << (void *) object.d << dec;
|
|
||||||
+ d << "AccessibleObject(";
|
|
||||||
if (object.d) {
|
|
||||||
d << "service=" << object.d->service;
|
|
||||||
d << " path=" << object.d->path;
|
|
||||||
+ d << " name=" << object.name();
|
|
||||||
} else {
|
|
||||||
d << "invalid";
|
|
||||||
}
|
|
||||||
--
|
|
||||||
2.9.4
|
|
||||||
|
|
@ -1,57 +0,0 @@
|
|||||||
From 6bf48f3e54011b7c59c5e6502f91108cf02d6499 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Albert Astals Cid <aacid@kde.org>
|
|
||||||
Date: Tue, 29 Mar 2016 21:48:14 +0200
|
|
||||||
Subject: [PATCH 09/12] Fix Qt4 build
|
|
||||||
|
|
||||||
---
|
|
||||||
CMakeLists.txt | 2 +-
|
|
||||||
src/qaccessibilityclient/registry_p.cpp | 4 ++++
|
|
||||||
tests/auto/tst_accessibilityclient.cpp | 4 ++++
|
|
||||||
3 files changed, 9 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
||||||
index 233a765..76c92df 100644
|
|
||||||
--- a/CMakeLists.txt
|
|
||||||
+++ b/CMakeLists.txt
|
|
||||||
@@ -40,7 +40,7 @@ else (QT5_BUILD)
|
|
||||||
if (${QT4_FOUND})
|
|
||||||
message("Using Qt 4")
|
|
||||||
include(${QT_USE_FILE})
|
|
||||||
- add_definitions(${QT_DEFINITIONS})
|
|
||||||
+ add_definitions(${QT_DEFINITIONS} -DQT4_BUILD)
|
|
||||||
include_directories(${QT4_INCLUDES} ${QT_INCLUDE_DIR} ${QT_QT_INCLUDE_DIR} ${QT_QTDBUS_INCLUDE_DIR})
|
|
||||||
endif (${QT4_FOUND})
|
|
||||||
endif (QT5_BUILD)
|
|
||||||
diff --git a/src/qaccessibilityclient/registry_p.cpp b/src/qaccessibilityclient/registry_p.cpp
|
|
||||||
index c86eee8..7112d80 100644
|
|
||||||
--- a/src/qaccessibilityclient/registry_p.cpp
|
|
||||||
+++ b/src/qaccessibilityclient/registry_p.cpp
|
|
||||||
@@ -40,6 +40,10 @@
|
|
||||||
#include <qstring.h>
|
|
||||||
#include <qhash.h>
|
|
||||||
|
|
||||||
+#ifdef QT4_BUILD
|
|
||||||
+#define QStringLiteral(x) QLatin1String(x)
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
// interface names from at-spi2-core/atspi/atspi-misc-private.h
|
|
||||||
#define ATSPI_DBUS_NAME_REGISTRY "org.a11y.atspi.Registry"
|
|
||||||
#define ATSPI_DBUS_PATH_REGISTRY "/org/a11y/atspi/registry"
|
|
||||||
diff --git a/tests/auto/tst_accessibilityclient.cpp b/tests/auto/tst_accessibilityclient.cpp
|
|
||||||
index 3aaa892..8d7df13 100644
|
|
||||||
--- a/tests/auto/tst_accessibilityclient.cpp
|
|
||||||
+++ b/tests/auto/tst_accessibilityclient.cpp
|
|
||||||
@@ -37,6 +37,10 @@
|
|
||||||
|
|
||||||
#include "atspi/dbusconnection.h"
|
|
||||||
|
|
||||||
+#ifdef QT4_BUILD
|
|
||||||
+#define QStringLiteral(x) QLatin1String(x)
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
typedef QSharedPointer<QAccessibleInterface> QAIPointer;
|
|
||||||
|
|
||||||
using namespace QAccessibleClient;
|
|
||||||
--
|
|
||||||
2.9.4
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
|||||||
From 1e1c469597e0e692caea11c89f6da831ad2410b3 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Pino Toscano <pino@kde.org>
|
|
||||||
Date: Tue, 31 May 2016 07:34:05 +0200
|
|
||||||
Subject: [PATCH 10/12] qt4: link to QtGui
|
|
||||||
|
|
||||||
QAction and QKeySequence are used, and they are in QtGui
|
|
||||||
---
|
|
||||||
src/CMakeLists.txt | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
|
||||||
index ed8452a..ade53e0 100644
|
|
||||||
--- a/src/CMakeLists.txt
|
|
||||||
+++ b/src/CMakeLists.txt
|
|
||||||
@@ -24,7 +24,7 @@ add_library(qaccessibilityclient SHARED ${QAccessibilityClient_SRCS} ${QAccessib
|
|
||||||
if (QT5_BUILD)
|
|
||||||
target_link_libraries(qaccessibilityclient ${Qt5Core_LIBRARIES} ${Qt5Widgets_LIBRARIES} ${Qt5DBus_LIBRARIES})
|
|
||||||
else (QT5_BUILD)
|
|
||||||
- target_link_libraries(qaccessibilityclient ${QT_QTCORE_LIBRARY} ${QT_QTDBUS_LIBRARY})
|
|
||||||
+ target_link_libraries(qaccessibilityclient ${QT_QTCORE_LIBRARY} ${QT_QTDBUS_LIBRARY} ${QT_QTGUI_LIBRARY})
|
|
||||||
endif(QT5_BUILD)
|
|
||||||
|
|
||||||
set(QACCESSIBILITYCLIENT_SOVERSION ${QACCESSIBILITYCLIENT_VERSION_MAJOR})
|
|
||||||
--
|
|
||||||
2.9.4
|
|
||||||
|
|
@ -1,98 +0,0 @@
|
|||||||
From 3469e6e0859c47b1ae6ad4ec33b68d1141c67746 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Luigi Toscano <luigi.toscano@tiscali.it>
|
|
||||||
Date: Tue, 18 Apr 2017 22:29:33 +0200
|
|
||||||
Subject: [PATCH 11/12] Fix missing return values of methods
|
|
||||||
|
|
||||||
Summary:
|
|
||||||
Errors spotted by the recent compilers (or their settings, namely
|
|
||||||
-Werror=return-type).
|
|
||||||
Either add the return statement where it makes sense, or remove
|
|
||||||
the return value in a leaf application when it's not used.
|
|
||||||
|
|
||||||
Test Plan:
|
|
||||||
Now the module compiles (tested with Qt5) and the sample application
|
|
||||||
starts.
|
|
||||||
|
|
||||||
Reviewers: gladhorn, whiting
|
|
||||||
|
|
||||||
Reviewed By: gladhorn
|
|
||||||
|
|
||||||
Differential Revision: https://phabricator.kde.org/D5498
|
|
||||||
---
|
|
||||||
examples/accessibleapps/accessibletree.cpp | 6 +++++-
|
|
||||||
examples/accessibleapps/accessibletree.h | 2 +-
|
|
||||||
src/qaccessibilityclient/cachestrategy_p.h | 4 ++--
|
|
||||||
3 files changed, 8 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/examples/accessibleapps/accessibletree.cpp b/examples/accessibleapps/accessibletree.cpp
|
|
||||||
index b236025..4847144 100644
|
|
||||||
--- a/examples/accessibleapps/accessibletree.cpp
|
|
||||||
+++ b/examples/accessibleapps/accessibletree.cpp
|
|
||||||
@@ -315,11 +315,13 @@ bool AccessibleTree::removeAccessible(const QModelIndex &index)
|
|
||||||
Q_ASSERT(index.model() == this);
|
|
||||||
QModelIndex parent = index.parent();
|
|
||||||
int row = index.row();
|
|
||||||
+ bool removed = false;
|
|
||||||
beginRemoveRows(parent, row, row);
|
|
||||||
if (parent.isValid()) {
|
|
||||||
AccessibleWrapper *wraper = static_cast<AccessibleWrapper*>(parent.internalPointer());
|
|
||||||
Q_ASSERT(wraper);
|
|
||||||
delete wraper->m_children.takeAt(row);
|
|
||||||
+ removed = true;
|
|
||||||
} else {
|
|
||||||
AccessibleWrapper *wraper = static_cast<AccessibleWrapper*>(index.internalPointer());
|
|
||||||
Q_ASSERT(wraper);
|
|
||||||
@@ -327,12 +329,14 @@ bool AccessibleTree::removeAccessible(const QModelIndex &index)
|
|
||||||
if (m_apps[row] == wraper) {
|
|
||||||
qDebug() << Q_FUNC_INFO << "Delete application accessible object! indexRow=" << row;
|
|
||||||
delete m_apps.takeAt(row);
|
|
||||||
+ removed = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
endRemoveRows();
|
|
||||||
+ return removed;
|
|
||||||
}
|
|
||||||
|
|
||||||
-bool AccessibleTree::updateAccessible(const QAccessibleClient::AccessibleObject &object)
|
|
||||||
+void AccessibleTree::updateAccessible(const QAccessibleClient::AccessibleObject &object)
|
|
||||||
{
|
|
||||||
QModelIndex index = indexForAccessible(object);
|
|
||||||
emit dataChanged(index, index);
|
|
||||||
diff --git a/examples/accessibleapps/accessibletree.h b/examples/accessibleapps/accessibletree.h
|
|
||||||
index 66f3684..559fce2 100644
|
|
||||||
--- a/examples/accessibleapps/accessibletree.h
|
|
||||||
+++ b/examples/accessibleapps/accessibletree.h
|
|
||||||
@@ -64,7 +64,7 @@ public:
|
|
||||||
bool addAccessible(const QAccessibleClient::AccessibleObject &object);
|
|
||||||
bool removeAccessible(const QAccessibleClient::AccessibleObject &object);
|
|
||||||
bool removeAccessible(const QModelIndex &index);
|
|
||||||
- bool updateAccessible(const QAccessibleClient::AccessibleObject &object);
|
|
||||||
+ void updateAccessible(const QAccessibleClient::AccessibleObject &object);
|
|
||||||
|
|
||||||
QList<AccessibleWrapper*> apps() const { return m_apps; }
|
|
||||||
|
|
||||||
diff --git a/src/qaccessibilityclient/cachestrategy_p.h b/src/qaccessibilityclient/cachestrategy_p.h
|
|
||||||
index 33ba9ab..ed01298 100644
|
|
||||||
--- a/src/qaccessibilityclient/cachestrategy_p.h
|
|
||||||
+++ b/src/qaccessibilityclient/cachestrategy_p.h
|
|
||||||
@@ -55,7 +55,7 @@ public:
|
|
||||||
virtual bool remove(const QString &id)
|
|
||||||
{
|
|
||||||
QSharedPointer<AccessibleObjectPrivate> obj = accessibleObjectsHash.take(id);
|
|
||||||
- interfaceHash.remove(obj.data());
|
|
||||||
+ return (interfaceHash.remove(obj.data()) >= 1);
|
|
||||||
}
|
|
||||||
virtual void clear()
|
|
||||||
{
|
|
||||||
@@ -96,7 +96,7 @@ public:
|
|
||||||
virtual bool remove(const QString &id)
|
|
||||||
{
|
|
||||||
QSharedPointer<AccessibleObjectPrivate> obj = accessibleObjectsHash.take(id);
|
|
||||||
- interfaceHash.remove(obj.data());
|
|
||||||
+ return (interfaceHash.remove(obj.data()) >= 1);
|
|
||||||
}
|
|
||||||
virtual void clear()
|
|
||||||
{
|
|
||||||
--
|
|
||||||
2.9.4
|
|
||||||
|
|
@ -1,131 +0,0 @@
|
|||||||
From 7a59179efc11903ce1123726a96b5017d4f76f16 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Luigi Toscano <luigi.toscano@tiscali.it>
|
|
||||||
Date: Wed, 19 Apr 2017 01:44:05 +0200
|
|
||||||
Subject: [PATCH 12/12] Add suffix to the Qt5 build to allow co-installability
|
|
||||||
|
|
||||||
Summary: See for example qca or other libraries.
|
|
||||||
|
|
||||||
Test Plan: The qt5 version compiles with a different prefix
|
|
||||||
|
|
||||||
Reviewers: gladhorn, whiting
|
|
||||||
|
|
||||||
Reviewed By: gladhorn
|
|
||||||
|
|
||||||
Differential Revision: https://phabricator.kde.org/D5518
|
|
||||||
---
|
|
||||||
CMakeLists.txt | 2 ++
|
|
||||||
QAccessibilityClientConfig.cmake.in | 2 +-
|
|
||||||
examples/accessibleapps/CMakeLists.txt | 7 ++++++-
|
|
||||||
src/CMakeLists.txt | 10 +++++-----
|
|
||||||
tests/auto/CMakeLists.txt | 8 ++++----
|
|
||||||
5 files changed, 18 insertions(+), 11 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
||||||
index 76c92df..be18d4d 100644
|
|
||||||
--- a/CMakeLists.txt
|
|
||||||
+++ b/CMakeLists.txt
|
|
||||||
@@ -35,6 +35,7 @@ if (QT5_BUILD)
|
|
||||||
message("Using Qt 5")
|
|
||||||
add_definitions(${Qt5Core_DEFINITIONS} ${Qt5Widgets_DEFINITIONS} ${Qt5DBus_DEFINITIONS})
|
|
||||||
include_directories(${Qt5Core_INCLUDE_DIRS} ${Qt5Widgets_INCLUDE_DIRS} ${Qt5DBus_INCLUDE_DIRS})
|
|
||||||
+ set(LIBNAME_SUFFIX "-qt5")
|
|
||||||
else (QT5_BUILD)
|
|
||||||
find_package(Qt4 REQUIRED)
|
|
||||||
if (${QT4_FOUND})
|
|
||||||
@@ -45,6 +46,7 @@ else (QT5_BUILD)
|
|
||||||
endif (${QT4_FOUND})
|
|
||||||
endif (QT5_BUILD)
|
|
||||||
|
|
||||||
+set(QACCESSIBILITYCLIENT_LIB_NAME "qaccessibilityclient${LIBNAME_SUFFIX}")
|
|
||||||
|
|
||||||
set(CMAKE_INSTALL_NAME_DIR ${LIB_INSTALL_DIR})
|
|
||||||
|
|
||||||
diff --git a/QAccessibilityClientConfig.cmake.in b/QAccessibilityClientConfig.cmake.in
|
|
||||||
index 9634bff..47dc333 100644
|
|
||||||
--- a/QAccessibilityClientConfig.cmake.in
|
|
||||||
+++ b/QAccessibilityClientConfig.cmake.in
|
|
||||||
@@ -10,5 +10,5 @@ set(QACCESSIBILITYCLIENT_VERSION_PATCH @QACCESSIBILITYCLIENT_VERSION_PATCH@)
|
|
||||||
set(QACCESSIBILITYCLIENT_VERSION ${QACCESSIBILITYCLIENT_VERSION_MAJOR}.${QACCESSIBILITYCLIENT_VERSION_MINOR}.${QACCESSIBILITYCLIENT_VERSION_PATCH})
|
|
||||||
|
|
||||||
set(QACCESSIBILITYCLIENT_INCLUDE_DIR "@QACCESSIBILITYCLIENT_INCLUDE_DIR@")
|
|
||||||
-set(QACCESSIBILITYCLIENT_LIBRARY qaccessibilityclient)
|
|
||||||
+set(QACCESSIBILITYCLIENT_LIBRARY @QACCESSIBILITYCLIENT_LIB_NAME@)
|
|
||||||
|
|
||||||
diff --git a/examples/accessibleapps/CMakeLists.txt b/examples/accessibleapps/CMakeLists.txt
|
|
||||||
index ab9fb40..a6242f1 100644
|
|
||||||
--- a/examples/accessibleapps/CMakeLists.txt
|
|
||||||
+++ b/examples/accessibleapps/CMakeLists.txt
|
|
||||||
@@ -39,6 +39,11 @@ else (QT5_BUILD)
|
|
||||||
endif (QT5_BUILD)
|
|
||||||
|
|
||||||
add_executable(accessibleapps ${accessibleapps_SRCS} ${accessibleapps_MOC} ${accessibleapps_UI_HDRS})
|
|
||||||
-target_link_libraries(accessibleapps ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTTEST_LIBRARY} ${KDE4_KDEUI_LIBRARY} qaccessibilityclient)
|
|
||||||
+
|
|
||||||
+if (QT5_BUILD)
|
|
||||||
+ target_link_libraries(accessibleapps ${Qt5Widgets_LIBRARIES} ${Qt5Test_LIBRARIES} ${QACCESSIBILITYCLIENT_LIB_NAME})
|
|
||||||
+else ()
|
|
||||||
+ target_link_libraries(accessibleapps ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTTEST_LIBRARY} ${KDE4_KDEUI_LIBRARY} ${QACCESSIBILITYCLIENT_LIB_NAME})
|
|
||||||
+endif()
|
|
||||||
|
|
||||||
install(TARGETS accessibleapps DESTINATION bin)
|
|
||||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
|
||||||
index ade53e0..1d08854 100644
|
|
||||||
--- a/src/CMakeLists.txt
|
|
||||||
+++ b/src/CMakeLists.txt
|
|
||||||
@@ -19,22 +19,22 @@ set(QAccessibilityClientPrivate_SRCS
|
|
||||||
atspi/qt-atspi.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
-add_library(qaccessibilityclient SHARED ${QAccessibilityClient_SRCS} ${QAccessibilityClientPrivate_SRCS})
|
|
||||||
+add_library(${QACCESSIBILITYCLIENT_LIB_NAME} SHARED ${QAccessibilityClient_SRCS} ${QAccessibilityClientPrivate_SRCS})
|
|
||||||
|
|
||||||
if (QT5_BUILD)
|
|
||||||
- target_link_libraries(qaccessibilityclient ${Qt5Core_LIBRARIES} ${Qt5Widgets_LIBRARIES} ${Qt5DBus_LIBRARIES})
|
|
||||||
+ target_link_libraries(${QACCESSIBILITYCLIENT_LIB_NAME} ${Qt5Core_LIBRARIES} ${Qt5Widgets_LIBRARIES} ${Qt5DBus_LIBRARIES})
|
|
||||||
else (QT5_BUILD)
|
|
||||||
- target_link_libraries(qaccessibilityclient ${QT_QTCORE_LIBRARY} ${QT_QTDBUS_LIBRARY} ${QT_QTGUI_LIBRARY})
|
|
||||||
+ target_link_libraries(${QACCESSIBILITYCLIENT_LIB_NAME} ${QT_QTCORE_LIBRARY} ${QT_QTDBUS_LIBRARY} ${QT_QTGUI_LIBRARY})
|
|
||||||
endif(QT5_BUILD)
|
|
||||||
|
|
||||||
set(QACCESSIBILITYCLIENT_SOVERSION ${QACCESSIBILITYCLIENT_VERSION_MAJOR})
|
|
||||||
-set_target_properties(qaccessibilityclient
|
|
||||||
+set_target_properties(${QACCESSIBILITYCLIENT_LIB_NAME}
|
|
||||||
PROPERTIES VERSION ${QACCESSIBILITYCLIENT_VERSION}
|
|
||||||
SOVERSION ${QACCESSIBILITYCLIENT_SOVERSION}
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
-install(TARGETS qaccessibilityclient EXPORT QAccessibilityClient ${INSTALL_TARGETS_DEFAULT_ARGS})
|
|
||||||
+install(TARGETS ${QACCESSIBILITYCLIENT_LIB_NAME} EXPORT QAccessibilityClient ${INSTALL_TARGETS_DEFAULT_ARGS})
|
|
||||||
install(EXPORT QAccessibilityClient DESTINATION ${_QAccessibilityClient_CONFIG_DEST})
|
|
||||||
|
|
||||||
########### install files ###############
|
|
||||||
diff --git a/tests/auto/CMakeLists.txt b/tests/auto/CMakeLists.txt
|
|
||||||
index b02f41d..b417010 100644
|
|
||||||
--- a/tests/auto/CMakeLists.txt
|
|
||||||
+++ b/tests/auto/CMakeLists.txt
|
|
||||||
@@ -21,9 +21,9 @@ set(tst_accessibilityclient_SRCS
|
|
||||||
add_executable(tst_accessibilityclient ${tst_accessibilityclient_SRCS})
|
|
||||||
|
|
||||||
if (QT5_BUILD)
|
|
||||||
- target_link_libraries(tst_accessibilityclient ${Qt5Widgets_LIBRARIES} ${Qt5Test_LIBRARIES} qaccessibilityclient)
|
|
||||||
+ target_link_libraries(tst_accessibilityclient ${Qt5Widgets_LIBRARIES} ${Qt5Test_LIBRARIES} ${QACCESSIBILITYCLIENT_LIB_NAME})
|
|
||||||
else (QT5_BUILD)
|
|
||||||
- target_link_libraries(tst_accessibilityclient ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTTEST_LIBRARY} ${QT_QTDBUS_LIBRARY} qaccessibilityclient)
|
|
||||||
+ target_link_libraries(tst_accessibilityclient ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTTEST_LIBRARY} ${QT_QTDBUS_LIBRARY} ${QACCESSIBILITYCLIENT_LIB_NAME})
|
|
||||||
endif (QT5_BUILD)
|
|
||||||
|
|
||||||
add_test(libkdeaccessibilityclient-tst_accessibilityclient tst_accessibilityclient)
|
|
||||||
@@ -36,7 +36,7 @@ add_executable(simplewidgetapp ${simplewidgetapp_SRCS})
|
|
||||||
|
|
||||||
|
|
||||||
if (QT5_BUILD)
|
|
||||||
- target_link_libraries(simplewidgetapp ${Qt5Widgets_LIBRARIES} ${Qt5Test_LIBRARIES} qaccessibilityclient)
|
|
||||||
+ target_link_libraries(simplewidgetapp ${Qt5Widgets_LIBRARIES} ${Qt5Test_LIBRARIES} ${QACCESSIBILITYCLIENT_LIB_NAME})
|
|
||||||
else (QT5_BUILD)
|
|
||||||
- target_link_libraries(simplewidgetapp ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTTEST_LIBRARY} ${QT_QTDBUS_LIBRARY} qaccessibilityclient)
|
|
||||||
+ target_link_libraries(simplewidgetapp ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTTEST_LIBRARY} ${QT_QTDBUS_LIBRARY} ${QACCESSIBILITYCLIENT_LIB_NAME})
|
|
||||||
endif (QT5_BUILD)
|
|
||||||
--
|
|
||||||
2.9.4
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
|||||||
diff -up libqaccessibilityclient-0.1.1/src/qaccessibilityclient/accessibleobject.cpp.me libqaccessibilityclient-0.1.1/src/qaccessibilityclient/accessibleobject.cpp
|
|
||||||
diff -up libqaccessibilityclient-0.1.1/src/qaccessibilityclient/accessibleobject.h.me libqaccessibilityclient-0.1.1/src/qaccessibilityclient/accessibleobject.h
|
|
||||||
--- libqaccessibilityclient-0.1.1/src/qaccessibilityclient/accessibleobject.h.me 2018-02-16 19:04:19.323834631 +0100
|
|
||||||
+++ libqaccessibilityclient-0.1.1/src/qaccessibilityclient/accessibleobject.h 2018-02-16 19:40:17.604383933 +0100
|
|
||||||
@@ -39,6 +39,7 @@ namespace QAccessibleClient {
|
|
||||||
|
|
||||||
class AccessibleObjectPrivate;
|
|
||||||
class RegistryPrivate;
|
|
||||||
+QACCESSIBILITYCLIENT_EXPORT QDebug operator<<(QDebug, const AccessibleObject &);
|
|
||||||
|
|
||||||
/**
|
|
||||||
This class represents an accessible object.
|
|
@ -1,18 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
MODULE=libkdeaccessibilityclient
|
|
||||||
TARBALL=qaccessibilityclient
|
|
||||||
BRANCH=master
|
|
||||||
VERSION=0.1.0
|
|
||||||
DATE=$(date +%Y%m%d)
|
|
||||||
|
|
||||||
set -x
|
|
||||||
|
|
||||||
rm -rf $MODULE
|
|
||||||
|
|
||||||
git clone git://anongit.kde.org/$MODULE $MODULE
|
|
||||||
pushd $MODULE
|
|
||||||
git archive ${BRANCH} --format tar --prefix=${TARBALL}-${VERSION}/ | xz -9 > ../${TARBALL}-${VERSION}-${DATE}.tar.xz
|
|
||||||
popd
|
|
||||||
|
|
||||||
rm -rf $MODULE
|
|
@ -1 +1 @@
|
|||||||
SHA512 (libqaccessibilityclient-0.1.1.tar.bz2) = 2b596b269386c5f076509f0a8ebf330705d58f1f9adb29335509a01b4a4f9a91544cab0b6ba2ae1551316aa6abbf40f8f7e81da20ab1b2abf47a31dfbb4e78cd
|
SHA512 (libqaccessibilityclient-0.4.1.tar.xz) = d5c168ff39f4bb67f18120eea50f8e02a85d464a5bb6479c48dfdb02ea9bf0cc379cbed4da7d882b718a1e1723d3a00528fcb26903b617b43029fde25e82cb3c
|
||||||
|
Loading…
Reference in new issue