Skip to content

Commit

Permalink
Merge branch 'upstream-0.9.8' into 'master'
Browse files Browse the repository at this point in the history
[telepathy-qt] Update to v0.9.8, contributes MER#2066

See merge request mer-core/telepathy-qt!5
  • Loading branch information
pvuorela committed Dec 19, 2019
2 parents d4ffb88 + 5b9b1ec commit 62cd8ef
Show file tree
Hide file tree
Showing 1,056 changed files with 204 additions and 205,495 deletions.
6 changes: 3 additions & 3 deletions .gitmodules
@@ -1,3 +1,3 @@
[submodule "upstream"]
path = upstream
url = http://anongit.freedesktop.org/git/telepathy/telepathy-qt.git
[submodule "telepathy-qt"]
path = telepathy-qt
url = https://github.com/TelepathyIM/telepathy-qt.git
160 changes: 160 additions & 0 deletions rpm/0001-telepathy-qt-Install-tests.patch
@@ -0,0 +1,160 @@
From c62211b97821cae101ba54a70f1f28d527f95699 Mon Sep 17 00:00:00 2001
From: Robin Burchell <robin+git@viroteck.net>
Date: Wed, 28 Aug 2013 22:33:34 +0000
Subject: [PATCH 1/2] [telepathy-qt] Install tests.

---
cmake/modules/TpQtMacros.cmake | 1 +
tests/CMakeLists.txt | 22 +++++++++++++++++++
tests/dbus-1/CMakeLists.txt | 4 ++++
tests/dbus-1/services/CMakeLists.txt | 4 ++++
.../services/account-manager.service.in | 2 +-
tests/dbus-1/session.conf.in | 2 +-
tests/dbus/CMakeLists.txt | 6 +++++
tests/lib/CMakeLists.txt | 4 ++++
tests/lib/glib-helpers/CMakeLists.txt | 3 +++
tests/lib/glib/CMakeLists.txt | 3 +++
10 files changed, 49 insertions(+), 2 deletions(-)

diff --git a/cmake/modules/TpQtMacros.cmake b/cmake/modules/TpQtMacros.cmake
index e5583240..fc08f7fa 100644
--- a/cmake/modules/TpQtMacros.cmake
+++ b/cmake/modules/TpQtMacros.cmake
@@ -425,6 +425,7 @@ macro(tpqt_add_dbus_unit_test _fancyName _name)
set(with_session_bus ${CMAKE_CURRENT_BINARY_DIR}/runDbusTest.sh)
add_test(${_fancyName} ${SH} ${with_session_bus} ${CMAKE_CURRENT_BINARY_DIR}/test-${_name})
list(APPEND _telepathy_qt_test_cases test-${_name})
+ list(APPEND _telepathy_qt_test_cases_dbus test-${_name})

# Valgrind and Callgrind targets
_tpqt_add_check_targets(${_fancyName} ${_name} ${with_session_bus} ${CMAKE_CURRENT_BINARY_DIR}/test-${_name})
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 16d4cdcb..ee07cd04 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -42,6 +42,28 @@ tpqt_add_generic_unit_test(Ptr ptr)
tpqt_add_generic_unit_test(RCCSpec rccspec)
tpqt_add_generic_unit_test(FileTransferChannelCreationProperties file-transfer-channel-creation-properties)

+# Add Nemo install targets
+if (NOT "${Qt5Core_VERSION_MAJOR}" STREQUAL "")
+ set(NEMO_TESTS_DIR "/opt/tests/telepathy-qt${Qt5Core_VERSION_MAJOR}")
+else()
+ set(NEMO_TESTS_DIR "/opt/tests/telepathy-qt${QT_VERSION_MAJOR}")
+endif()
+
+set(NEMO_TESTS_DIR_BIN "${NEMO_TESTS_DIR}/bin")
+set(NEMO_TESTS_DIR_LIB "${NEMO_TESTS_DIR}/lib")
+set(NEMO_TESTS_DIR_DATA "${NEMO_TESTS_DIR}/data")
+set(NEMO_TESTS_DIR_DBUS "${NEMO_TESTS_DIR}/dbus-1")
+configure_file(mktests.sh.in ${CMAKE_CURRENT_SOURCE_DIR}/mktests.sh)
+configure_file(runDbusTest.sh.in ${CMAKE_CURRENT_SOURCE_DIR}/runDbusTest.sh)
+configure_file(runTest.sh.in ${CMAKE_CURRENT_SOURCE_DIR}/runTest.sh)
+file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/unit-tests.list "${_telepathy_qt_test_cases}")
+INSTALL(TARGETS ${_telepathy_qt_test_cases} RUNTIME DESTINATION ${NEMO_TESTS_DIR_BIN})
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/runTest.sh ${CMAKE_CURRENT_SOURCE_DIR}/runDbusTest.sh DESTINATION ${NEMO_TESTS_DIR_BIN} PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/INSIGNIFICANT ${CMAKE_CURRENT_SOURCE_DIR}/tests.xml DESTINATION ${NEMO_TESTS_DIR})
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/unit-tests.list DESTINATION ${NEMO_TESTS_DIR})
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/test-key-file-format-error.ini ${CMAKE_CURRENT_SOURCE_DIR}/test-key-file.ini DESTINATION ${NEMO_TESTS_DIR_DATA}/tests)
+INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/telepathy DESTINATION ${NEMO_TESTS_DIR_DATA}/tests)
+
add_subdirectory(dbus-1)
add_subdirectory(dbus)
add_subdirectory(lib)
diff --git a/tests/dbus-1/CMakeLists.txt b/tests/dbus-1/CMakeLists.txt
index a8b067f8..53d313b0 100644
--- a/tests/dbus-1/CMakeLists.txt
+++ b/tests/dbus-1/CMakeLists.txt
@@ -2,3 +2,7 @@ set(abs_top_builddir ${CMAKE_BINARY_DIR})
configure_file(session.conf.in ${CMAKE_CURRENT_BINARY_DIR}/session.conf)

add_subdirectory(services)
+
+# Add Nemo install target
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/session.conf DESTINATION ${NEMO_TESTS_DIR_DBUS})
+
diff --git a/tests/dbus-1/services/CMakeLists.txt b/tests/dbus-1/services/CMakeLists.txt
index 00e0b299..6d8abba4 100644
--- a/tests/dbus-1/services/CMakeLists.txt
+++ b/tests/dbus-1/services/CMakeLists.txt
@@ -2,3 +2,7 @@ set(TEST_PYTHON ${PYTHON_EXECUTABLE})
set(abs_top_srcdir ${CMAKE_SOURCE_DIR})
configure_file(account-manager.service.in ${CMAKE_CURRENT_BINARY_DIR}/account-manager.service)
configure_file(spurious.service.in ${CMAKE_CURRENT_BINARY_DIR}/spurious.service)
+
+# Add Nemo install target
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/spurious.service ${CMAKE_CURRENT_BINARY_DIR}/account-manager.service DESTINATION ${NEMO_TESTS_DIR_DBUS}/services/)
+
diff --git a/tests/dbus-1/services/account-manager.service.in b/tests/dbus-1/services/account-manager.service.in
index bccad616..832e982d 100644
--- a/tests/dbus-1/services/account-manager.service.in
+++ b/tests/dbus-1/services/account-manager.service.in
@@ -1,3 +1,3 @@
[D-BUS Service]
Name=org.freedesktop.Telepathy.AccountManager
-Exec=@TEST_PYTHON@ @abs_top_srcdir@/tests/lib/python/account-manager.py
+Exec=@TEST_PYTHON@ @NEMO_TESTS_DIR_BIN@/account-manager.py
diff --git a/tests/dbus-1/session.conf.in b/tests/dbus-1/session.conf.in
index 6babc161..6587e558 100644
--- a/tests/dbus-1/session.conf.in
+++ b/tests/dbus-1/session.conf.in
@@ -12,7 +12,7 @@

<listen>unix:tmpdir=/tmp</listen>

- <servicedir>@abs_top_builddir@/tests/dbus-1/services/</servicedir>
+ <servicedir>@NEMO_TESTS_DIR_DBUS@/services/</servicedir>

<policy context="default">
<!-- Allow everything to be sent -->
diff --git a/tests/dbus/CMakeLists.txt b/tests/dbus/CMakeLists.txt
index 2365e969..534e7037 100644
--- a/tests/dbus/CMakeLists.txt
+++ b/tests/dbus/CMakeLists.txt
@@ -83,3 +83,9 @@ endif()
add_custom_target(check ctest --output-on-failure -O test.log
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/tests)
add_dependencies(check check-local ${_telepathy_qt_test_cases})
+
+# Add Nemo install target for tests
+INSTALL(TARGETS ${_telepathy_qt_test_cases_dbus} RUNTIME DESTINATION ${NEMO_TESTS_DIR_BIN})
+file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/dbus-tests.list "${_telepathy_qt_test_cases_dbus}")
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/dbus-tests.list DESTINATION ${NEMO_TESTS_DIR})
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/tools/with-session-bus.sh DESTINATION ${NEMO_TESTS_DIR_BIN} PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
diff --git a/tests/lib/CMakeLists.txt b/tests/lib/CMakeLists.txt
index 5749d42e..12e8941b 100644
--- a/tests/lib/CMakeLists.txt
+++ b/tests/lib/CMakeLists.txt
@@ -33,3 +33,7 @@ if(ENABLE_TP_GLIB_TESTS)
add_subdirectory(glib)
add_subdirectory(glib-helpers)
endif()
+
+# Add Nemo install target
+INSTALL(TARGETS tp-qt-tests LIBRARY DESTINATION ${NEMO_TESTS_DIR_LIB})
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/python/account-manager.py DESTINATION ${NEMO_TESTS_DIR_BIN} PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
diff --git a/tests/lib/glib-helpers/CMakeLists.txt b/tests/lib/glib-helpers/CMakeLists.txt
index b200f4a3..d02253d0 100644
--- a/tests/lib/glib-helpers/CMakeLists.txt
+++ b/tests/lib/glib-helpers/CMakeLists.txt
@@ -21,3 +21,6 @@ if(ENABLE_TP_GLIB_TESTS)
Qt5::Test
telepathy-qt${QT_VERSION_MAJOR})
endif()
+
+# Add Nemo install target
+INSTALL(TARGETS tp-qt-tests-glib-helpers LIBRARY DESTINATION ${NEMO_TESTS_DIR_LIB})
diff --git a/tests/lib/glib/CMakeLists.txt b/tests/lib/glib/CMakeLists.txt
index 73ff4000..2077e301 100644
--- a/tests/lib/glib/CMakeLists.txt
+++ b/tests/lib/glib/CMakeLists.txt
@@ -77,3 +77,6 @@ if(ENABLE_TP_GLIB_TESTS)
tp-glib-tests-future-extensions)

endif()
+
+# Add Nemo install target
+INSTALL(TARGETS tp-glib-tests LIBRARY DESTINATION ${NEMO_TESTS_DIR_LIB})
--
2.20.1

@@ -0,0 +1,28 @@
From 7af81a3bafd595072a685301e76a3651d429b9f9 Mon Sep 17 00:00:00 2001
From: Martin Jones <martin.jones@jollamobile.com>
Date: Fri, 22 Apr 2016 11:40:39 +0000
Subject: [PATCH 2/2] Remove assert which appears invalid for conference call.
Contributes to JB#4743

---
TelepathyQt/channel.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/TelepathyQt/channel.cpp b/TelepathyQt/channel.cpp
index 2b7cde55..3a4d349a 100644
--- a/TelepathyQt/channel.cpp
+++ b/TelepathyQt/channel.cpp
@@ -3491,8 +3491,8 @@ void Channel::gotConferenceChannelRemovedActorContact(PendingOperation *op)
PendingContacts *pc = qobject_cast<PendingContacts *>(op);

if (pc->isValid()) {
- Q_ASSERT(pc->contacts().size() == 1);
- actorContact = pc->contacts().first();
+ if (pc->contacts().size() > 0)
+ actorContact = pc->contacts().first();
} else {
warning().nospace() << "Getting conference channel removed actor "
"failed with " << pc->errorName() << ":" <<
--
2.20.1

19 changes: 12 additions & 7 deletions rpm/telepathy-qt5.spec
@@ -1,6 +1,6 @@
Name: telepathy-qt5
Summary: Qt 5 Telepathy library
Version: 0.9.7
Version: 0.9.8
Release: 1
Group: System/Libraries
License: GPLv2
Expand All @@ -10,21 +10,24 @@ Source1: INSIGNIFICANT
Source2: mktests.sh.in
Source3: runDbusTest.sh.in
Source4: runTest.sh.in

Patch0: 0001-telepathy-qt-Install-tests.patch
Patch1: 0002-Remove-assert-which-appears-invalid-for-conference-c.patch

Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5DBus)
BuildRequires: pkgconfig(Qt5Gui)
BuildRequires: pkgconfig(Qt5Network)
BuildRequires: pkgconfig(Qt5Test)
BuildRequires: pkgconfig(Qt5Xml)
BuildRequires: pkgconfig(farstream-0.2)
BuildRequires: pkgconfig(telepathy-glib) >= 0.17.5
BuildRequires: pkgconfig(telepathy-glib) >= 0.18.0
BuildRequires: pkgconfig(telepathy-farstream) >= 0.4.0
BuildRequires: pkgconfig(gstreamer-1.0)
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: python
BuildRequires: dbus-python
BuildRequires: python3-base
BuildRequires: dbus-python3
BuildRequires: doxygen
BuildRequires: cmake

Expand Down Expand Up @@ -83,6 +86,8 @@ This package contains automated tests and tests.xml

%prep
%setup -q -n %{name}-%{version}/telepathy-qt
%patch0 -p1
%patch1 -p1

%build
%__cp $RPM_SOURCE_DIR/INSIGNIFICANT tests/
Expand All @@ -94,8 +99,8 @@ This package contains automated tests and tests.xml
%__chmod 0755 tests/runDbusTest.sh.in
%__chmod 0755 tests/runTest.sh.in

export QT_SELECT=5
%cmake -DENABLE_TESTS=TRUE -DENABLE_FARSIGHT=FALSE -DENABLE_FARSTREAM=TRUE -DENABLE_EXAMPLES=FALSE

%cmake -DENABLE_TESTS=TRUE -DENABLE_FARSTREAM=TRUE -DENABLE_EXAMPLES=FALSE


make %{?_smp_mflags}
Expand Down
1 change: 1 addition & 0 deletions telepathy-qt
Submodule telepathy-qt added at 6ccb59
10 changes: 0 additions & 10 deletions telepathy-qt/.gitignore

This file was deleted.

3 changes: 0 additions & 3 deletions telepathy-qt/AUTHORS

This file was deleted.

0 comments on commit 62cd8ef

Please sign in to comment.