Merge lp:~unity-api-team/indicator-network/connectivity-service-bindings into lp:indicator-network/14.10
- connectivity-service-bindings
- Merge into trunk.14.10
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Antti Kaijanmäki | ||||
Approved revision: | 406 | ||||
Merged at revision: | 405 | ||||
Proposed branch: | lp:~unity-api-team/indicator-network/connectivity-service-bindings | ||||
Merge into: | lp:indicator-network/14.10 | ||||
Prerequisite: | lp:~unity-api-team/indicator-network/connectivity-service | ||||
Diff against target: |
2036 lines (+1283/-110) 61 files modified
.bzrignore (+9/-2) CMakeLists.txt (+32/-9) cmake/Coverage.cmake (+0/-37) cmake/EnableCoverageReport.cmake (+153/-0) cmake/FindLcov.cmake (+29/-0) cmake/Findgcovr.cmake (+31/-0) cmake/ParseArguments.cmake (+52/-0) debian/connectivity-doc.install (+1/-0) debian/control (+53/-0) debian/libconnectivity-qt1-dev.install (+3/-0) debian/libconnectivity-qt1.install (+1/-0) debian/qtdeclarative5-connectivity-plugin.install (+1/-0) src/CMakeLists.txt (+1/-0) src/dbus-cpp/services/ofono.h (+4/-4) src/indicator/connectivity-service/connectivity-service.cpp (+22/-20) src/indicator/indicator-menu.h (+2/-2) src/indicator/indicator-network-service.cpp (+3/-3) src/indicator/menuitems/access-point-item.h (+1/-1) src/indicator/menuitems/switch-item.h (+1/-0) src/indicator/menuitems/text-item.h (+1/-0) src/indicator/modem.h (+1/-1) src/indicator/root-state.cpp (+1/-1) src/indicator/wifi-link-item.h (+1/-0) src/indicator/wifi-section.h (+2/-2) src/indicator/wwan-link-item.h (+1/-1) src/indicator/wwan-section.cpp (+1/-1) src/indicator/wwan-section.h (+2/-2) src/menumodel-cpp/action-group-merger.h (+1/-1) src/menumodel-cpp/gio-helpers/util.h (+9/-9) src/menumodel-cpp/gio-helpers/variant.h (+1/-1) src/menumodel-cpp/menu-item.h (+3/-3) src/notify-cpp/notification.cpp (+3/-3) src/notify-cpp/snapdecision/sim-unlock.h (+1/-1) src/qt/CMakeLists.txt (+8/-0) src/qt/include/ubuntu/connectivity/NetworkingStatus (+1/-0) src/qt/include/ubuntu/connectivity/networking-status.h (+79/-0) src/qt/qml/CMakeLists.txt (+1/-0) src/qt/qml/Ubuntu/CMakeLists.txt (+1/-0) src/qt/qml/Ubuntu/Connectivity/CMakeLists.txt (+38/-0) src/qt/qml/Ubuntu/Connectivity/networking-status.cpp (+43/-0) src/qt/qml/Ubuntu/Connectivity/networking-status.h (+52/-0) src/qt/qml/Ubuntu/Connectivity/plugin.cpp (+40/-0) src/qt/qml/Ubuntu/Connectivity/plugin.h (+36/-0) src/qt/qml/Ubuntu/Connectivity/qmldir (+2/-0) src/qt/src/CMakeLists.txt (+48/-0) src/qt/src/connectivity-qt.pc.in (+10/-0) src/qt/src/dbus-properties-interface.cpp (+34/-0) src/qt/src/dbus-properties-interface.h (+53/-0) src/qt/src/networking-status.cpp (+188/-0) src/secret-agent/CMakeLists.txt (+1/-0) src/secret-agent/PasswordMenu.cpp (+4/-4) tests/CMakeLists.txt (+0/-2) tests/integration/CMakeLists.txt (+1/-0) tests/integration/qt/CMakeLists.txt (+4/-0) tests/integration/qt/cpp/CMakeLists.txt (+16/-0) tests/integration/qt/cpp/main.cpp (+33/-0) tests/integration/qt/cpp/tst_networking.cpp (+51/-0) tests/integration/qt/cpp/tst_networking.h (+39/-0) tests/integration/qt/qml/CMakeLists.txt (+19/-0) tests/integration/qt/qml/tst_api.qml (+53/-0) tests/unit/secret-agent/CMakeLists.txt (+1/-0) |
||||
To merge this branch: | bzr merge lp:~unity-api-team/indicator-network/connectivity-service-bindings | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Antti Kaijanmäki (community) | Approve | ||
PS Jenkins bot (community) | continuous-integration | Approve | |
Jussi Pakkanen (community) | Approve | ||
Review via email: mp+230902@code.launchpad.net |
Commit message
Connectivity Service Qt and QML bindings.
Description of the change
PS Jenkins bot (ps-jenkins) wrote : | # |
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:401
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
Jussi Pakkanen (jpakkane) wrote : | # |
This branch has a bug which is not in trunk. I don't know at which point it was introduced but let's fix it here. In wwan-section.cpp there is this:
m_items.
--iter;
Erase invalidates the iterator it points to so this is undefined behaviour. What is probably meant here is this:
iter = m_items.
--iter;
One more thing in inline comments.
Antti Kaijanmäki (kaijanmaki) wrote : | # |
Will leave the q-pointer as is.
Antti Kaijanmäki (kaijanmaki) wrote : | # |
> This branch has a bug which is not in trunk. I don't know at which point it
> was introduced but let's fix it here. In wwan-section.cpp there is this:
>
> m_items.
> --iter;
>
> Erase invalidates the iterator it points to so this is undefined behaviour.
> What is probably meant here is this:
>
> iter = m_items.
> --iter;
Good catch! Fix is on it's way.
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:403
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
Antti Kaijanmäki (kaijanmaki) wrote : | # |
Merged cleanups from jussi.
Preview Diff
1 | === modified file '.bzrignore' | |||
2 | --- .bzrignore 2014-03-25 23:22:16 +0000 | |||
3 | +++ .bzrignore 2014-08-15 11:57:07 +0000 | |||
4 | @@ -1,3 +1,10 @@ | |||
5 | 1 | *.autosave | 1 | *.autosave |
8 | 2 | CMakeLists.txt.user | 2 | CMakeLists.txt.user* |
9 | 3 | CMakeLists.txt.user.3.0-pre1 | 3 | *~ |
10 | 4 | /.cproject | ||
11 | 5 | /.project | ||
12 | 6 | /.pydevproject | ||
13 | 7 | /.settings | ||
14 | 8 | /build | ||
15 | 9 | /buildclang | ||
16 | 10 | |||
17 | 4 | 11 | ||
18 | === modified file 'CMakeLists.txt' | |||
19 | --- CMakeLists.txt 2014-08-15 11:57:07 +0000 | |||
20 | +++ CMakeLists.txt 2014-08-15 11:57:07 +0000 | |||
21 | @@ -4,8 +4,8 @@ | |||
22 | 4 | set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake" "${CMAKE_MODULE_PATH}") | 4 | set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake" "${CMAKE_MODULE_PATH}") |
23 | 5 | 5 | ||
24 | 6 | find_package(PkgConfig REQUIRED) | 6 | find_package(PkgConfig REQUIRED) |
25 | 7 | include(EnableCoverageReport) | ||
26 | 7 | include(GNUInstallDirs) | 8 | include(GNUInstallDirs) |
27 | 8 | include(Coverage) | ||
28 | 9 | include(UseGSettings) | 9 | include(UseGSettings) |
29 | 10 | 10 | ||
30 | 11 | set(GETTEXT_PACKAGE indicator-network) | 11 | set(GETTEXT_PACKAGE indicator-network) |
31 | @@ -82,28 +82,49 @@ | |||
32 | 82 | pkg_check_modules(GIO REQUIRED gio-2.0>=${GLIB_REQUIRED_VERSION}) | 82 | pkg_check_modules(GIO REQUIRED gio-2.0>=${GLIB_REQUIRED_VERSION}) |
33 | 83 | include_directories(${GIO_INCLUDE_DIRS}) | 83 | include_directories(${GIO_INCLUDE_DIRS}) |
34 | 84 | 84 | ||
35 | 85 | set(CMAKE_AUTOMOC ON) | ||
36 | 86 | set(CMAKE_INCLUDE_CURRENT_DIR ON) | 85 | set(CMAKE_INCLUDE_CURRENT_DIR ON) |
37 | 87 | 86 | ||
38 | 88 | find_package(GObjectIntrospection 0.9.12) | 87 | find_package(GObjectIntrospection 0.9.12) |
39 | 89 | 88 | ||
40 | 90 | include_directories(${CMAKE_BINARY_DIR}) | 89 | include_directories(${CMAKE_BINARY_DIR}) |
41 | 91 | 90 | ||
44 | 92 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11") | 91 | set(COMMON_FLAGS "-Wall -Wextra -Wpedantic -fno-permissive") |
45 | 93 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") | 92 | string(TOLOWER "${CMAKE_BUILD_TYPE}" BUILD_TYPE) |
46 | 93 | if(NOT BUILD_TYPE MATCHES debug) | ||
47 | 94 | set(COMMON_FLAGS "${COMMON_FLAGS} -Werror") | ||
48 | 95 | endif() | ||
49 | 94 | 96 | ||
55 | 95 | add_definitions( | 97 | # "nice bug" in cmake... http://www.cmake.org/Bug/view.php?id=15058 |
56 | 96 | -Wall | 98 | # let's not set C_FLAGS as it will break pthreads detection \o/ |
57 | 97 | -Wextra | 99 | #set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11 ${COMMON_FLAGS}") |
58 | 98 | -Wpedantic | 100 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 ${COMMON_FLAGS}") |
54 | 99 | ) | ||
59 | 100 | 101 | ||
60 | 101 | configure_file( | 102 | configure_file( |
61 | 102 | "config.h.in" | 103 | "config.h.in" |
62 | 103 | "config.h" | 104 | "config.h" |
63 | 104 | ) | 105 | ) |
64 | 105 | 106 | ||
65 | 107 | ##################################################################### | ||
66 | 108 | # Enable code coverage calculation with gcov/gcovr/lcov | ||
67 | 109 | # Usage: | ||
68 | 110 | # * Switch build type to coverage (use ccmake or cmake-gui) | ||
69 | 111 | # * Invoke make, make test, make coverage | ||
70 | 112 | # * Find html report in subdir coveragereport | ||
71 | 113 | # * Find xml report feasible for jenkins in coverage.xml | ||
72 | 114 | ##################################################################### | ||
73 | 115 | IF(BUILD_TYPE MATCHES coverage) | ||
74 | 116 | SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftest-coverage -fprofile-arcs" ) | ||
75 | 117 | SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ftest-coverage -fprofile-arcs" ) | ||
76 | 118 | SET(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -ftest-coverage -fprofile-arcs" ) | ||
77 | 119 | SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -ftest-coverage -fprofile-arcs" ) | ||
78 | 120 | ENDIF() | ||
79 | 121 | |||
80 | 122 | |||
81 | 123 | set(CONNECTIVITY_QT_VERSION_MAJOR 1) | ||
82 | 124 | set(CONNECTIVITY_QT_VERSION_MINOR 0) | ||
83 | 125 | set(CONNECTIVITY_QT_LIB_TARGET connectivity-qt${CONNECTIVITY_QT_VERSION_MAJOR}) | ||
84 | 106 | add_subdirectory(data) | 126 | add_subdirectory(data) |
85 | 127 | #add_subdirectory(doc) | ||
86 | 107 | add_subdirectory(src) | 128 | add_subdirectory(src) |
87 | 108 | add_subdirectory(po) | 129 | add_subdirectory(po) |
88 | 109 | 130 | ||
89 | @@ -115,3 +136,5 @@ | |||
90 | 115 | ${CMAKE_CTEST_COMMAND} --force-new-ctest-process --output-on-failure | 136 | ${CMAKE_CTEST_COMMAND} --force-new-ctest-process --output-on-failure |
91 | 116 | ) | 137 | ) |
92 | 117 | 138 | ||
93 | 139 | enable_coverage_report(TARGETS connectivity-qt1 menumodel_cpp indicator-secret-agent | ||
94 | 140 | FILTER ${CMAKE_SOURCE_DIR}/tests/* ${CMAKE_BINARY_DIR}/*) | ||
95 | 118 | 141 | ||
96 | === removed file 'cmake/Coverage.cmake' | |||
97 | --- cmake/Coverage.cmake 2013-08-27 13:48:41 +0000 | |||
98 | +++ cmake/Coverage.cmake 1970-01-01 00:00:00 +0000 | |||
99 | @@ -1,37 +0,0 @@ | |||
100 | 1 | if (CMAKE_BUILD_TYPE MATCHES coverage) | ||
101 | 2 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage") | ||
102 | 3 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --coverage") | ||
103 | 4 | set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} --coverage") | ||
104 | 5 | set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} --coverage") | ||
105 | 6 | |||
106 | 7 | find_program(GCOVR_EXECUTABLE gcovr HINTS ${GCOVR_ROOT} "${GCOVR_ROOT}/bin") | ||
107 | 8 | if (NOT GCOVR_EXECUTABLE) | ||
108 | 9 | message(STATUS "Gcovr binary was not found, can not generate XML coverage info.") | ||
109 | 10 | else () | ||
110 | 11 | message(STATUS "Gcovr found, can generate XML coverage info.") | ||
111 | 12 | add_custom_target (coverage-xml | ||
112 | 13 | WORKING_DIRECTORY ${CMAKE_BINARY_DIR} | ||
113 | 14 | COMMAND "${GCOVR_EXECUTABLE}" --exclude="test.*" --exclude="obj.*" -x -r "${CMAKE_SOURCE_DIR}" | ||
114 | 15 | --object-directory=${CMAKE_BINARY_DIR} -o coverage.xml) | ||
115 | 16 | endif() | ||
116 | 17 | |||
117 | 18 | find_program(LCOV_EXECUTABLE lcov HINTS ${LCOV_ROOT} "${GCOVR_ROOT}/bin") | ||
118 | 19 | find_program(GENHTML_EXECUTABLE genhtml HINTS ${GENHTML_ROOT}) | ||
119 | 20 | if (NOT LCOV_EXECUTABLE) | ||
120 | 21 | message(STATUS "Lcov binary was not found, can not generate HTML coverage info.") | ||
121 | 22 | else () | ||
122 | 23 | if(NOT GENHTML_EXECUTABLE) | ||
123 | 24 | message(STATUS "Genthml binary not found, can not generate HTML coverage info.") | ||
124 | 25 | else() | ||
125 | 26 | message(STATUS "Lcov and genhtml found, can generate HTML coverage info.") | ||
126 | 27 | add_custom_target (coverage-html | ||
127 | 28 | WORKING_DIRECTORY ${CMAKE_BINARY_DIR} | ||
128 | 29 | COMMAND "${LCOV_EXECUTABLE}" --capture --output-file "${CMAKE_BINARY_DIR}/coverage.info" --no-checksum --directory "${CMAKE_BINARY_DIR}" | ||
129 | 30 | COMMAND "${LCOV_EXECUTABLE}" --remove "${CMAKE_BINARY_DIR}/coverage.info" '/usr/*' --output-file "${CMAKE_BINARY_DIR}/coverage.info" | ||
130 | 31 | COMMAND "${LCOV_EXECUTABLE}" --remove "${CMAKE_BINARY_DIR}/coverage.info" '${CMAKE_BINARY_DIR}/*' --output-file "${CMAKE_BINARY_DIR}/coverage.info" | ||
131 | 32 | COMMAND "${LCOV_EXECUTABLE}" --remove "${CMAKE_BINARY_DIR}/coverage.info" '${CMAKE_SOURCE_DIR}/tests/*' --output-file "${CMAKE_BINARY_DIR}/coverage.info" | ||
132 | 33 | COMMAND "${GENHTML_EXECUTABLE}" --prefix "${CMAKE_BINARY_DIR}" --output-directory coveragereport --title "Code Coverage" --legend --show-details coverage.info | ||
133 | 34 | ) | ||
134 | 35 | endif() | ||
135 | 36 | endif() | ||
136 | 37 | endif() | ||
137 | 38 | 0 | ||
138 | === added file 'cmake/EnableCoverageReport.cmake' | |||
139 | --- cmake/EnableCoverageReport.cmake 1970-01-01 00:00:00 +0000 | |||
140 | +++ cmake/EnableCoverageReport.cmake 2014-08-15 11:57:07 +0000 | |||
141 | @@ -0,0 +1,153 @@ | |||
142 | 1 | # - Creates a special coverage build type and target on GCC. | ||
143 | 2 | # | ||
144 | 3 | # Defines a function ENABLE_COVERAGE_REPORT which generates the coverage target | ||
145 | 4 | # for selected targets. Optional arguments to this function are used to filter | ||
146 | 5 | # unwanted results using globbing expressions. Moreover targets with tests for | ||
147 | 6 | # the source code can be specified to trigger regenerating the report if the | ||
148 | 7 | # test has changed | ||
149 | 8 | # | ||
150 | 9 | # ENABLE_COVERAGE_REPORT(TARGETS target... [FILTER filter...] [TESTS test targets...]) | ||
151 | 10 | # | ||
152 | 11 | # To generate a coverage report first build the project with | ||
153 | 12 | # CMAKE_BUILD_TYPE=coverage, then call make test and afterwards make coverage. | ||
154 | 13 | # | ||
155 | 14 | # The coverage report is based on gcov. Depending on the availability of lcov | ||
156 | 15 | # a HTML report will be generated and/or an XML report of gcovr is found. | ||
157 | 16 | # The generated coverage target executes all found solutions. Special targets | ||
158 | 17 | # exist to create e.g. only the xml report: coverage-xml. | ||
159 | 18 | # | ||
160 | 19 | # Copyright (C) 2010 by Johannes Wienke <jwienke at techfak dot uni-bielefeld dot de> | ||
161 | 20 | # | ||
162 | 21 | # This program is free software; you can redistribute it | ||
163 | 22 | # and/or modify it under the terms of the GNU General | ||
164 | 23 | # Public License as published by the Free Software Foundation; | ||
165 | 24 | # either version 2, or (at your option) | ||
166 | 25 | # any later version. | ||
167 | 26 | # | ||
168 | 27 | # This program is distributed in the hope that it will be useful, | ||
169 | 28 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
170 | 29 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
171 | 30 | # GNU General Public License for more details. | ||
172 | 31 | # | ||
173 | 32 | |||
174 | 33 | INCLUDE(ParseArguments) | ||
175 | 34 | |||
176 | 35 | FIND_PACKAGE(Lcov) | ||
177 | 36 | FIND_PACKAGE(gcovr) | ||
178 | 37 | |||
179 | 38 | FUNCTION(ENABLE_COVERAGE_REPORT) | ||
180 | 39 | |||
181 | 40 | # argument parsing | ||
182 | 41 | PARSE_ARGUMENTS(ARG "FILTER;TARGETS;TESTS" "" ${ARGN}) | ||
183 | 42 | |||
184 | 43 | SET(COVERAGE_RAW_FILE "${CMAKE_BINARY_DIR}/coverage.raw.info") | ||
185 | 44 | SET(COVERAGE_FILTERED_FILE "${CMAKE_BINARY_DIR}/coverage.info") | ||
186 | 45 | SET(COVERAGE_REPORT_DIR "${CMAKE_BINARY_DIR}/coveragereport") | ||
187 | 46 | SET(COVERAGE_XML_FILE "${CMAKE_BINARY_DIR}/coverage.xml") | ||
188 | 47 | SET(COVERAGE_XML_COMMAND_FILE "${CMAKE_BINARY_DIR}/coverage-xml.cmake") | ||
189 | 48 | |||
190 | 49 | # decide if there is any tool to create coverage data | ||
191 | 50 | SET(TOOL_FOUND FALSE) | ||
192 | 51 | IF(LCOV_FOUND OR GCOVR_FOUND) | ||
193 | 52 | SET(TOOL_FOUND TRUE) | ||
194 | 53 | ENDIF() | ||
195 | 54 | IF(NOT TOOL_FOUND) | ||
196 | 55 | MESSAGE(STATUS "Cannot enable coverage targets because neither lcov nor gcovr are found.") | ||
197 | 56 | ENDIF() | ||
198 | 57 | |||
199 | 58 | STRING(TOLOWER "${CMAKE_BUILD_TYPE}" COVERAGE_BUILD_TYPE) | ||
200 | 59 | IF(CMAKE_COMPILER_IS_GNUCXX AND TOOL_FOUND AND "${COVERAGE_BUILD_TYPE}" MATCHES "coverage") | ||
201 | 60 | |||
202 | 61 | MESSAGE(STATUS "Coverage support enabled for targets: ${ARG_TARGETS}") | ||
203 | 62 | |||
204 | 63 | # create coverage build type | ||
205 | 64 | SET(CMAKE_CXX_FLAGS_COVERAGE ${CMAKE_CXX_FLAGS_DEBUG} PARENT_SCOPE) | ||
206 | 65 | SET(CMAKE_C_FLAGS_COVERAGE ${CMAKE_C_FLAGS_DEBUG} PARENT_SCOPE) | ||
207 | 66 | SET(CMAKE_CONFIGURATION_TYPES ${CMAKE_CONFIGURATION_TYPES} coverage PARENT_SCOPE) | ||
208 | 67 | |||
209 | 68 | # instrument targets | ||
210 | 69 | SET_TARGET_PROPERTIES(${ARG_TARGETS} PROPERTIES COMPILE_FLAGS --coverage | ||
211 | 70 | LINK_FLAGS --coverage) | ||
212 | 71 | |||
213 | 72 | # html report | ||
214 | 73 | IF (LCOV_FOUND) | ||
215 | 74 | |||
216 | 75 | MESSAGE(STATUS "Enabling HTML coverage report") | ||
217 | 76 | |||
218 | 77 | # set up coverage target | ||
219 | 78 | |||
220 | 79 | ADD_CUSTOM_COMMAND(OUTPUT ${COVERAGE_RAW_FILE} | ||
221 | 80 | COMMAND ${LCOV_EXECUTABLE} -c -d ${CMAKE_BINARY_DIR} -o ${COVERAGE_RAW_FILE} | ||
222 | 81 | WORKING_DIRECTORY ${CMAKE_BINARY_DIR} | ||
223 | 82 | COMMENT "Collecting coverage data" | ||
224 | 83 | DEPENDS ${ARG_TARGETS} ${ARG_TESTS} | ||
225 | 84 | VERBATIM) | ||
226 | 85 | |||
227 | 86 | # filter unwanted stuff | ||
228 | 87 | LIST(LENGTH ARG_FILTER FILTER_LENGTH) | ||
229 | 88 | IF(${FILTER_LENGTH} GREATER 0) | ||
230 | 89 | SET(FILTER COMMAND ${LCOV_EXECUTABLE}) | ||
231 | 90 | FOREACH(F ${ARG_FILTER}) | ||
232 | 91 | SET(FILTER ${FILTER} -r ${COVERAGE_FILTERED_FILE} ${F}) | ||
233 | 92 | ENDFOREACH() | ||
234 | 93 | SET(FILTER ${FILTER} -o ${COVERAGE_FILTERED_FILE}) | ||
235 | 94 | ELSE() | ||
236 | 95 | SET(FILTER "") | ||
237 | 96 | ENDIF() | ||
238 | 97 | |||
239 | 98 | ADD_CUSTOM_COMMAND(OUTPUT ${COVERAGE_FILTERED_FILE} | ||
240 | 99 | COMMAND ${LCOV_EXECUTABLE} -e ${COVERAGE_RAW_FILE} "${CMAKE_SOURCE_DIR}*" -o ${COVERAGE_FILTERED_FILE} | ||
241 | 100 | ${FILTER} | ||
242 | 101 | DEPENDS ${COVERAGE_RAW_FILE} | ||
243 | 102 | COMMENT "Filtering recorded coverage data for project-relevant entries" | ||
244 | 103 | VERBATIM) | ||
245 | 104 | ADD_CUSTOM_COMMAND(OUTPUT ${COVERAGE_REPORT_DIR} | ||
246 | 105 | COMMAND ${CMAKE_COMMAND} -E make_directory ${COVERAGE_REPORT_DIR} | ||
247 | 106 | COMMAND ${GENHTML_EXECUTABLE} --legend --show-details -t "${PROJECT_NAME} test coverage" -o ${COVERAGE_REPORT_DIR} ${COVERAGE_FILTERED_FILE} | ||
248 | 107 | DEPENDS ${COVERAGE_FILTERED_FILE} | ||
249 | 108 | COMMENT "Generating HTML coverage report in ${COVERAGE_REPORT_DIR}" | ||
250 | 109 | VERBATIM) | ||
251 | 110 | |||
252 | 111 | ADD_CUSTOM_TARGET(coverage-html | ||
253 | 112 | DEPENDS ${COVERAGE_REPORT_DIR}) | ||
254 | 113 | |||
255 | 114 | ENDIF() | ||
256 | 115 | |||
257 | 116 | # xml coverage report | ||
258 | 117 | IF(GCOVR_FOUND) | ||
259 | 118 | |||
260 | 119 | MESSAGE(STATUS "Enabling XML coverage report") | ||
261 | 120 | |||
262 | 121 | # gcovr cannot write directly to a file so the execution needs to | ||
263 | 122 | # be wrapped in a cmake file that generates the file output | ||
264 | 123 | FILE(WRITE ${COVERAGE_XML_COMMAND_FILE} | ||
265 | 124 | "SET(ENV{LANG} en)\n") | ||
266 | 125 | FILE(APPEND ${COVERAGE_XML_COMMAND_FILE} | ||
267 | 126 | "EXECUTE_PROCESS(COMMAND \"${GCOVR_EXECUTABLE}\" --exclude=tests.* --exclude=obj-.* --exclude=cmake.* -x -r \"${CMAKE_SOURCE_DIR}\" OUTPUT_FILE \"${COVERAGE_XML_FILE}\" WORKING_DIRECTORY \"${CMAKE_BINARY_DIR}\")\n") | ||
268 | 127 | |||
269 | 128 | ADD_CUSTOM_COMMAND(OUTPUT ${COVERAGE_XML_FILE} | ||
270 | 129 | COMMAND ${CMAKE_COMMAND} ARGS -P ${COVERAGE_XML_COMMAND_FILE} | ||
271 | 130 | COMMENT "Generating coverage XML report" | ||
272 | 131 | VERBATIM) | ||
273 | 132 | |||
274 | 133 | ADD_CUSTOM_TARGET(coverage-xml | ||
275 | 134 | DEPENDS ${COVERAGE_XML_FILE}) | ||
276 | 135 | |||
277 | 136 | ENDIF() | ||
278 | 137 | |||
279 | 138 | # provide a global coverage target executing both steps if available | ||
280 | 139 | SET(GLOBAL_DEPENDS "") | ||
281 | 140 | IF(LCOV_FOUND) | ||
282 | 141 | LIST(APPEND GLOBAL_DEPENDS ${COVERAGE_REPORT_DIR}) | ||
283 | 142 | ENDIF() | ||
284 | 143 | IF(GCOVR_FOUND) | ||
285 | 144 | LIST(APPEND GLOBAL_DEPENDS ${COVERAGE_XML_FILE}) | ||
286 | 145 | ENDIF() | ||
287 | 146 | IF(LCOV_FOUND OR GCOVR_FOUND) | ||
288 | 147 | ADD_CUSTOM_TARGET(coverage | ||
289 | 148 | DEPENDS ${GLOBAL_DEPENDS}) | ||
290 | 149 | ENDIF() | ||
291 | 150 | |||
292 | 151 | ENDIF() | ||
293 | 152 | |||
294 | 153 | ENDFUNCTION() | ||
295 | 0 | 154 | ||
296 | === added file 'cmake/FindLcov.cmake' | |||
297 | --- cmake/FindLcov.cmake 1970-01-01 00:00:00 +0000 | |||
298 | +++ cmake/FindLcov.cmake 2014-08-15 11:57:07 +0000 | |||
299 | @@ -0,0 +1,29 @@ | |||
300 | 1 | # - Find lcov | ||
301 | 2 | # Will define: | ||
302 | 3 | # | ||
303 | 4 | # LCOV_EXECUTABLE - the lcov binary | ||
304 | 5 | # GENHTML_EXECUTABLE - the genhtml executable | ||
305 | 6 | # | ||
306 | 7 | # Copyright (C) 2010 by Johannes Wienke <jwienke at techfak dot uni-bielefeld dot de> | ||
307 | 8 | # | ||
308 | 9 | # This program is free software; you can redistribute it | ||
309 | 10 | # and/or modify it under the terms of the GNU General | ||
310 | 11 | # Public License as published by the Free Software Foundation; | ||
311 | 12 | # either version 2, or (at your option) | ||
312 | 13 | # any later version. | ||
313 | 14 | # | ||
314 | 15 | # This program is distributed in the hope that it will be useful, | ||
315 | 16 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
316 | 17 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
317 | 18 | # GNU General Public License for more details. | ||
318 | 19 | # | ||
319 | 20 | |||
320 | 21 | INCLUDE(FindPackageHandleStandardArgs) | ||
321 | 22 | |||
322 | 23 | FIND_PROGRAM(LCOV_EXECUTABLE lcov) | ||
323 | 24 | FIND_PROGRAM(GENHTML_EXECUTABLE genhtml) | ||
324 | 25 | |||
325 | 26 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(Lcov DEFAULT_MSG LCOV_EXECUTABLE GENHTML_EXECUTABLE) | ||
326 | 27 | |||
327 | 28 | # only visible in advanced view | ||
328 | 29 | MARK_AS_ADVANCED(LCOV_EXECUTABLE GENHTML_EXECUTABLE) | ||
329 | 0 | 30 | ||
330 | === added file 'cmake/Findgcovr.cmake' | |||
331 | --- cmake/Findgcovr.cmake 1970-01-01 00:00:00 +0000 | |||
332 | +++ cmake/Findgcovr.cmake 2014-08-15 11:57:07 +0000 | |||
333 | @@ -0,0 +1,31 @@ | |||
334 | 1 | # - Find gcovr scrip | ||
335 | 2 | # Will define: | ||
336 | 3 | # | ||
337 | 4 | # GCOVR_EXECUTABLE - the gcovr script | ||
338 | 5 | # | ||
339 | 6 | # Uses: | ||
340 | 7 | # | ||
341 | 8 | # GCOVR_ROOT - root to search for the script | ||
342 | 9 | # | ||
343 | 10 | # Copyright (C) 2011 by Johannes Wienke <jwienke at techfak dot uni-bielefeld dot de> | ||
344 | 11 | # | ||
345 | 12 | # This program is free software; you can redistribute it | ||
346 | 13 | # and/or modify it under the terms of the GNU General | ||
347 | 14 | # Public License as published by the Free Software Foundation; | ||
348 | 15 | # either version 2, or (at your option) | ||
349 | 16 | # any later version. | ||
350 | 17 | # | ||
351 | 18 | # This program is distributed in the hope that it will be useful, | ||
352 | 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
353 | 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
354 | 21 | # GNU General Public License for more details. | ||
355 | 22 | # | ||
356 | 23 | |||
357 | 24 | INCLUDE(FindPackageHandleStandardArgs) | ||
358 | 25 | |||
359 | 26 | FIND_PROGRAM(GCOVR_EXECUTABLE gcovr HINTS ${GCOVR_ROOT} "${GCOVR_ROOT}/bin") | ||
360 | 27 | |||
361 | 28 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(gcovr DEFAULT_MSG GCOVR_EXECUTABLE) | ||
362 | 29 | |||
363 | 30 | # only visible in advanced view | ||
364 | 31 | MARK_AS_ADVANCED(GCOVR_EXECUTABLE) | ||
365 | 0 | 32 | ||
366 | === added file 'cmake/ParseArguments.cmake' | |||
367 | --- cmake/ParseArguments.cmake 1970-01-01 00:00:00 +0000 | |||
368 | +++ cmake/ParseArguments.cmake 2014-08-15 11:57:07 +0000 | |||
369 | @@ -0,0 +1,52 @@ | |||
370 | 1 | # Parse arguments passed to a function into several lists separated by | ||
371 | 2 | # upper-case identifiers and options that do not have an associated list e.g.: | ||
372 | 3 | # | ||
373 | 4 | # SET(arguments | ||
374 | 5 | # hello OPTION3 world | ||
375 | 6 | # LIST3 foo bar | ||
376 | 7 | # OPTION2 | ||
377 | 8 | # LIST1 fuz baz | ||
378 | 9 | # ) | ||
379 | 10 | # PARSE_ARGUMENTS(ARG "LIST1;LIST2;LIST3" "OPTION1;OPTION2;OPTION3" ${arguments}) | ||
380 | 11 | # | ||
381 | 12 | # results in 7 distinct variables: | ||
382 | 13 | # * ARG_DEFAULT_ARGS: hello;world | ||
383 | 14 | # * ARG_LIST1: fuz;baz | ||
384 | 15 | # * ARG_LIST2: | ||
385 | 16 | # * ARG_LIST3: foo;bar | ||
386 | 17 | # * ARG_OPTION1: FALSE | ||
387 | 18 | # * ARG_OPTION2: TRUE | ||
388 | 19 | # * ARG_OPTION3: TRUE | ||
389 | 20 | # | ||
390 | 21 | # taken from http://www.cmake.org/Wiki/CMakeMacroParseArguments | ||
391 | 22 | |||
392 | 23 | MACRO(PARSE_ARGUMENTS prefix arg_names option_names) | ||
393 | 24 | SET(DEFAULT_ARGS) | ||
394 | 25 | FOREACH(arg_name ${arg_names}) | ||
395 | 26 | SET(${prefix}_${arg_name}) | ||
396 | 27 | ENDFOREACH(arg_name) | ||
397 | 28 | FOREACH(option ${option_names}) | ||
398 | 29 | SET(${prefix}_${option} FALSE) | ||
399 | 30 | ENDFOREACH(option) | ||
400 | 31 | |||
401 | 32 | SET(current_arg_name DEFAULT_ARGS) | ||
402 | 33 | SET(current_arg_list) | ||
403 | 34 | FOREACH(arg ${ARGN}) | ||
404 | 35 | SET(larg_names ${arg_names}) | ||
405 | 36 | LIST(FIND larg_names "${arg}" is_arg_name) | ||
406 | 37 | IF (is_arg_name GREATER -1) | ||
407 | 38 | SET(${prefix}_${current_arg_name} ${current_arg_list}) | ||
408 | 39 | SET(current_arg_name ${arg}) | ||
409 | 40 | SET(current_arg_list) | ||
410 | 41 | ELSE (is_arg_name GREATER -1) | ||
411 | 42 | SET(loption_names ${option_names}) | ||
412 | 43 | LIST(FIND loption_names "${arg}" is_option) | ||
413 | 44 | IF (is_option GREATER -1) | ||
414 | 45 | SET(${prefix}_${arg} TRUE) | ||
415 | 46 | ELSE (is_option GREATER -1) | ||
416 | 47 | SET(current_arg_list ${current_arg_list} ${arg}) | ||
417 | 48 | ENDIF (is_option GREATER -1) | ||
418 | 49 | ENDIF (is_arg_name GREATER -1) | ||
419 | 50 | ENDFOREACH(arg) | ||
420 | 51 | SET(${prefix}_${current_arg_name} ${current_arg_list}) | ||
421 | 52 | ENDMACRO(PARSE_ARGUMENTS) | ||
422 | 0 | 53 | ||
423 | === added file 'debian/connectivity-doc.install' | |||
424 | --- debian/connectivity-doc.install 1970-01-01 00:00:00 +0000 | |||
425 | +++ debian/connectivity-doc.install 2014-08-15 11:57:07 +0000 | |||
426 | @@ -0,0 +1,1 @@ | |||
427 | 1 | usr/share/doc/libconnectivity/* | ||
428 | 0 | 2 | ||
429 | === modified file 'debian/control' | |||
430 | --- debian/control 2014-08-06 12:22:27 +0000 | |||
431 | +++ debian/control 2014-08-15 11:57:07 +0000 | |||
432 | @@ -9,6 +9,7 @@ | |||
433 | 9 | g++-4.9, | 9 | g++-4.9, |
434 | 10 | debhelper (>= 9.0.0), | 10 | debhelper (>= 9.0.0), |
435 | 11 | google-mock (>= 1.6.0+svn437), | 11 | google-mock (>= 1.6.0+svn437), |
436 | 12 | dbus-test-runner, | ||
437 | 12 | libconnectivity-cpp-dev (>=0.0.1+14.10.20140709), | 13 | libconnectivity-cpp-dev (>=0.0.1+14.10.20140709), |
438 | 13 | libdbus-cpp-dev (>= 4.0.0), | 14 | libdbus-cpp-dev (>= 4.0.0), |
439 | 14 | libglib2.0-dev, | 15 | libglib2.0-dev, |
440 | @@ -24,7 +25,13 @@ | |||
441 | 24 | pkg-config, | 25 | pkg-config, |
442 | 25 | python3-dbusmock, | 26 | python3-dbusmock, |
443 | 26 | python3-setuptools, | 27 | python3-setuptools, |
444 | 28 | qt5-default, | ||
445 | 27 | qtbase5-dev, | 29 | qtbase5-dev, |
446 | 30 | qtbase5-dev-tools, | ||
447 | 31 | qtdeclarative5-dev, | ||
448 | 32 | qtdeclarative5-dev-tools, | ||
449 | 33 | qtdeclarative5-qtquick2-plugin, | ||
450 | 34 | qtdeclarative5-test-plugin, | ||
451 | 28 | valgrind [amd64 armhf i386 powerpc], | 35 | valgrind [amd64 armhf i386 powerpc], |
452 | 29 | Standards-Version: 3.9.3 | 36 | Standards-Version: 3.9.3 |
453 | 30 | # If you aren't a member of ~indicator-applet-developers but need to upload | 37 | # If you aren't a member of ~indicator-applet-developers but need to upload |
454 | @@ -60,3 +67,49 @@ | |||
455 | 60 | Description: Autopilot tests for the network indicator for Ubuntu | 67 | Description: Autopilot tests for the network indicator for Ubuntu |
456 | 61 | The Indicator-network service is responsible for exporting the system settings | 68 | The Indicator-network service is responsible for exporting the system settings |
457 | 62 | menu through dbus. This package contains its autopilot tests. | 69 | menu through dbus. This package contains its autopilot tests. |
458 | 70 | |||
459 | 71 | Package: libconnectivity-qt1 | ||
460 | 72 | Architecture: any | ||
461 | 73 | Pre-Depends: ${misc:Pre-Depends} | ||
462 | 74 | Multi-Arch: same | ||
463 | 75 | Depends: ${misc:Depends}, | ||
464 | 76 | ${shlibs:Depends}, | ||
465 | 77 | Description: Unity Action Qt API | ||
466 | 78 | Ubuntu Connectivity API - Qt bindings | ||
467 | 79 | |||
468 | 80 | Package: libconnectivity-qt1-dev | ||
469 | 81 | Section: libdevel | ||
470 | 82 | Architecture: any | ||
471 | 83 | Pre-Depends: ${misc:Pre-Depends} | ||
472 | 84 | Multi-Arch: same | ||
473 | 85 | Depends: ${misc:Depends}, | ||
474 | 86 | ${shlibs:Depends}, | ||
475 | 87 | libconnectivity-qt1 (= ${binary:Version}), | ||
476 | 88 | qtbase5-dev | ||
477 | 89 | Suggests: unity-action-doc, | ||
478 | 90 | Description: Unity Action Qt API - development files | ||
479 | 91 | Ubuntu Connectivity API - Qt bindings | ||
480 | 92 | . | ||
481 | 93 | This package contains development files to develop against the Qt library. | ||
482 | 94 | |||
483 | 95 | Package: qtdeclarative5-connectivity-plugin | ||
484 | 96 | Architecture: any | ||
485 | 97 | Pre-Depends: ${misc:Pre-Depends} | ||
486 | 98 | Multi-Arch: same | ||
487 | 99 | Depends: ${misc:Depends}, | ||
488 | 100 | ${shlibs:Depends}, | ||
489 | 101 | libconnectivity-qt1 (= ${binary:Version}), | ||
490 | 102 | Description: Unity Action QML Components | ||
491 | 103 | Ubuntu Connectivity API - QML bindings | ||
492 | 104 | . | ||
493 | 105 | This package contains the qtdeclarative bindings for Ubuntu connectivity API. | ||
494 | 106 | |||
495 | 107 | #Package: connectivity-doc | ||
496 | 108 | #Section: doc | ||
497 | 109 | #Architecture: all | ||
498 | 110 | #Depends: ${misc:Depends}, | ||
499 | 111 | # ${shlibs:Depends}, | ||
500 | 112 | #Description: Unity Action API - documentation | ||
501 | 113 | # Ubuntu Connectivity API | ||
502 | 114 | # . | ||
503 | 115 | # This package contains developer documentation. | ||
504 | 63 | 116 | ||
505 | === added file 'debian/libconnectivity-qt1-dev.install' | |||
506 | --- debian/libconnectivity-qt1-dev.install 1970-01-01 00:00:00 +0000 | |||
507 | +++ debian/libconnectivity-qt1-dev.install 2014-08-15 11:57:07 +0000 | |||
508 | @@ -0,0 +1,3 @@ | |||
509 | 1 | usr/lib/*/libconnectivity-qt1.so | ||
510 | 2 | usr/include/* | ||
511 | 3 | usr/lib/*/pkgconfig/* | ||
512 | 0 | 4 | ||
513 | === added file 'debian/libconnectivity-qt1.install' | |||
514 | --- debian/libconnectivity-qt1.install 1970-01-01 00:00:00 +0000 | |||
515 | +++ debian/libconnectivity-qt1.install 2014-08-15 11:57:07 +0000 | |||
516 | @@ -0,0 +1,1 @@ | |||
517 | 1 | usr/lib/*/libconnectivity-qt1.so.* | ||
518 | 0 | 2 | ||
519 | === added file 'debian/qtdeclarative5-connectivity-plugin.install' | |||
520 | --- debian/qtdeclarative5-connectivity-plugin.install 1970-01-01 00:00:00 +0000 | |||
521 | +++ debian/qtdeclarative5-connectivity-plugin.install 2014-08-15 11:57:07 +0000 | |||
522 | @@ -0,0 +1,1 @@ | |||
523 | 1 | usr/lib/*/qt5/qml | ||
524 | 0 | 2 | ||
525 | === modified file 'src/CMakeLists.txt' | |||
526 | --- src/CMakeLists.txt 2014-08-15 11:57:07 +0000 | |||
527 | +++ src/CMakeLists.txt 2014-08-15 11:57:07 +0000 | |||
528 | @@ -2,5 +2,6 @@ | |||
529 | 2 | add_subdirectory(indicator) | 2 | add_subdirectory(indicator) |
530 | 3 | add_subdirectory(menumodel-cpp) | 3 | add_subdirectory(menumodel-cpp) |
531 | 4 | add_subdirectory(notify-cpp) | 4 | add_subdirectory(notify-cpp) |
532 | 5 | add_subdirectory(qt) | ||
533 | 5 | add_subdirectory(secret-agent) | 6 | add_subdirectory(secret-agent) |
534 | 6 | add_subdirectory(url-dispatcher-cpp) | 7 | add_subdirectory(url-dispatcher-cpp) |
535 | 7 | 8 | ||
536 | === modified file 'src/dbus-cpp/services/ofono.h' | |||
537 | --- src/dbus-cpp/services/ofono.h 2014-08-05 17:02:58 +0000 | |||
538 | +++ src/dbus-cpp/services/ofono.h 2014-08-15 11:57:07 +0000 | |||
539 | @@ -198,7 +198,7 @@ | |||
540 | 198 | } | 198 | } |
541 | 199 | 199 | ||
542 | 200 | typedef std::shared_ptr<NetworkRegistration> Ptr; | 200 | typedef std::shared_ptr<NetworkRegistration> Ptr; |
544 | 201 | NetworkRegistration(const std::shared_ptr<core::dbus::Object>& object) | 201 | explicit NetworkRegistration(const std::shared_ptr<core::dbus::Object>& object) |
545 | 202 | : object(object), | 202 | : object(object), |
546 | 203 | propertyChanged(object->get_signal<Signal::PropertyChanged>()) | 203 | propertyChanged(object->get_signal<Signal::PropertyChanged>()) |
547 | 204 | { | 204 | { |
548 | @@ -722,7 +722,7 @@ | |||
549 | 722 | } | 722 | } |
550 | 723 | 723 | ||
551 | 724 | typedef std::shared_ptr<SimManager> Ptr; | 724 | typedef std::shared_ptr<SimManager> Ptr; |
553 | 725 | SimManager(const std::shared_ptr<core::dbus::Object>& object) | 725 | explicit SimManager(const std::shared_ptr<core::dbus::Object>& object) |
554 | 726 | : object(object), | 726 | : object(object), |
555 | 727 | propertyChanged(object->get_signal<Signal::PropertyChanged>()) | 727 | propertyChanged(object->get_signal<Signal::PropertyChanged>()) |
556 | 728 | { | 728 | { |
557 | @@ -1296,7 +1296,7 @@ | |||
558 | 1296 | } | 1296 | } |
559 | 1297 | 1297 | ||
560 | 1298 | 1298 | ||
562 | 1299 | Service(const core::dbus::Bus::Ptr& bus) | 1299 | explicit Service(const core::dbus::Bus::Ptr& bus) |
563 | 1300 | { | 1300 | { |
564 | 1301 | auto service = core::dbus::Service::use_service<Service>(bus); | 1301 | auto service = core::dbus::Service::use_service<Service>(bus); |
565 | 1302 | auto object = service->object_for_path(core::dbus::types::ObjectPath(OFONO_MANAGER_PATH)); | 1302 | auto object = service->object_for_path(core::dbus::types::ObjectPath(OFONO_MANAGER_PATH)); |
566 | @@ -1307,7 +1307,7 @@ | |||
567 | 1307 | { | 1307 | { |
568 | 1308 | std::shared_ptr<Interface::Manager> manager; | 1308 | std::shared_ptr<Interface::Manager> manager; |
569 | 1309 | 1309 | ||
571 | 1310 | Mock(const core::dbus::Bus::Ptr& bus) | 1310 | explicit Mock(const core::dbus::Bus::Ptr& bus) |
572 | 1311 | { | 1311 | { |
573 | 1312 | auto service = core::dbus::Service::add_service<Service>(bus); | 1312 | auto service = core::dbus::Service::add_service<Service>(bus); |
574 | 1313 | auto object = service->add_object_for_path(core::dbus::types::ObjectPath(OFONO_MANAGER_PATH)); | 1313 | auto object = service->add_object_for_path(core::dbus::types::ObjectPath(OFONO_MANAGER_PATH)); |
575 | 1314 | 1314 | ||
576 | === modified file 'src/indicator/connectivity-service/connectivity-service.cpp' | |||
577 | --- src/indicator/connectivity-service/connectivity-service.cpp 2014-08-15 11:57:07 +0000 | |||
578 | +++ src/indicator/connectivity-service/connectivity-service.cpp 2014-08-15 11:57:07 +0000 | |||
579 | @@ -32,7 +32,7 @@ | |||
580 | 32 | { | 32 | { |
581 | 33 | std::ostringstream output; | 33 | std::ostringstream output; |
582 | 34 | 34 | ||
584 | 35 | output << "<property "; | 35 | output << " <property "; |
585 | 36 | output << "name=\"" << T::name() << "\" "; | 36 | output << "name=\"" << T::name() << "\" "; |
586 | 37 | output << "type=\"" << core::dbus::helper::TypeMapper<typename T::ValueType>::signature() << "\" "; | 37 | output << "type=\"" << core::dbus::helper::TypeMapper<typename T::ValueType>::signature() << "\" "; |
587 | 38 | 38 | ||
588 | @@ -252,46 +252,48 @@ | |||
589 | 252 | std::ostringstream output; | 252 | std::ostringstream output; |
590 | 253 | 253 | ||
591 | 254 | static const std::string header( | 254 | static const std::string header( |
595 | 255 | "<!DOCTYPE node PUBLIC \"-//freedesktop//DTD D-BUS Object Introspection 1.0//EN\n" | 255 | "<!DOCTYPE node PUBLIC \"-//freedesktop//DTD D-BUS Object Introspection 1.0//EN\"\n" |
596 | 256 | "\"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd\">\n" | 256 | "\"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd\">\n"); |
597 | 257 | "<node>\n" | 257 | |
598 | 258 | static const std::string introspectable_interface( | ||
599 | 258 | " <interface name=\"org.freedesktop.DBus.Introspectable\">\n" | 259 | " <interface name=\"org.freedesktop.DBus.Introspectable\">\n" |
600 | 259 | " <method name=\"Introspect\">\n" | 260 | " <method name=\"Introspect\">\n" |
602 | 260 | " <arg name=\"data\" direction=\"out\" type=\"s\"/>\n" | 261 | " <arg name=\"xml_data\" direction=\"out\" type=\"s\"/>\n" |
603 | 261 | " </method>\n" | 262 | " </method>\n" |
605 | 262 | " </interface>\n" | 263 | " </interface>\n"); |
606 | 264 | |||
607 | 265 | static const std::string dbus_properties_interface( | ||
608 | 263 | " <interface name=\"org.freedesktop.DBus.Properties\">\n" | 266 | " <interface name=\"org.freedesktop.DBus.Properties\">\n" |
609 | 264 | " <method name=\"Get\">\n" | 267 | " <method name=\"Get\">\n" |
612 | 265 | " <arg name=\"interface\" direction=\"in\" type=\"s\"/>\n" | 268 | " <arg name=\"interface_name\" direction=\"in\" type=\"s\"/>\n" |
613 | 266 | " <arg name=\"propname\" direction=\"in\" type=\"s\"/>\n" | 269 | " <arg name=\"property_name\" direction=\"in\" type=\"s\"/>\n" |
614 | 267 | " <arg name=\"value\" direction=\"out\" type=\"v\"/>\n" | 270 | " <arg name=\"value\" direction=\"out\" type=\"v\"/>\n" |
615 | 268 | " </method>\n" | 271 | " </method>\n" |
616 | 269 | " <method name=\"Set\">\n" | 272 | " <method name=\"Set\">\n" |
619 | 270 | " <arg name=\"interface\" direction=\"in\" type=\"s\"/>\n" | 273 | " <arg name=\"interface_name\" direction=\"in\" type=\"s\"/>\n" |
620 | 271 | " <arg name=\"propname\" direction=\"in\" type=\"s\"/>\n" | 274 | " <arg name=\"property_name\" direction=\"in\" type=\"s\"/>\n" |
621 | 272 | " <arg name=\"value\" direction=\"in\" type=\"v\"/>\n" | 275 | " <arg name=\"value\" direction=\"in\" type=\"v\"/>\n" |
622 | 273 | " </method>\n" | 276 | " </method>\n" |
623 | 274 | " <method name=\"GetAll\">\n" | 277 | " <method name=\"GetAll\">\n" |
625 | 275 | " <arg name=\"interface\" direction=\"in\" type=\"s\"/>\n" | 278 | " <arg name=\"interface_name\" direction=\"in\" type=\"s\"/>\n" |
626 | 276 | " <arg name=\"props\" direction=\"out\" type=\"a{sv}\"/>\n" | 279 | " <arg name=\"props\" direction=\"out\" type=\"a{sv}\"/>\n" |
627 | 277 | " </method>\n" | 280 | " </method>\n" |
629 | 278 | " <signal name=\"PropertiesChanged\"\n>" | 281 | " <signal name=\"PropertiesChanged\">\n" |
630 | 279 | " <arg type=\"s\" name=\"interface_name\"/>\n" | 282 | " <arg type=\"s\" name=\"interface_name\"/>\n" |
631 | 280 | " <arg type=\"a{sv}\" name=\"changed_properties\"/>\n" | 283 | " <arg type=\"a{sv}\" name=\"changed_properties\"/>\n" |
632 | 281 | " <arg type=\"as\" name=\"invalidated_properties\"/>\n" | 284 | " <arg type=\"as\" name=\"invalidated_properties\"/>\n" |
634 | 282 | " </signal>\n" | 285 | " </signal>\n" |
635 | 283 | " </interface>\n"); | 286 | " </interface>\n"); |
636 | 284 | 287 | ||
637 | 285 | static const std::string footer("</node>\n"); | ||
638 | 286 | |||
639 | 287 | output << header; | 288 | output << header; |
642 | 288 | 289 | output << "<node name=\"" << com::ubuntu::connectivity::Interface::NetworkingStatus::path() << "\">\n"; | |
643 | 289 | output << "<interface name=\"" << com::ubuntu::connectivity::Interface::NetworkingStatus::name() << "\">\n"; | 290 | output << introspectable_interface; |
644 | 291 | output << dbus_properties_interface; | ||
645 | 292 | output << " <interface name=\"" << com::ubuntu::connectivity::Interface::NetworkingStatus::name() << "\">\n"; | ||
646 | 290 | output << generatePropertyIntrospectionXml<com::ubuntu::connectivity::Interface::NetworkingStatus::Property::Limitations>() << std::endl; | 293 | output << generatePropertyIntrospectionXml<com::ubuntu::connectivity::Interface::NetworkingStatus::Property::Limitations>() << std::endl; |
647 | 291 | output << generatePropertyIntrospectionXml<com::ubuntu::connectivity::Interface::NetworkingStatus::Property::Status>() << std::endl; | 294 | output << generatePropertyIntrospectionXml<com::ubuntu::connectivity::Interface::NetworkingStatus::Property::Status>() << std::endl; |
651 | 292 | output << "</interface>\n"; | 295 | output << " </interface>\n"; |
652 | 293 | 296 | output << "</node>\n"; | |
650 | 294 | output << footer; | ||
653 | 295 | 297 | ||
654 | 296 | return output.str(); | 298 | return output.str(); |
655 | 297 | } | 299 | } |
656 | 298 | 300 | ||
657 | === modified file 'src/indicator/indicator-menu.h' | |||
658 | --- src/indicator/indicator-menu.h 2014-06-05 14:12:19 +0000 | |||
659 | +++ src/indicator/indicator-menu.h 2014-08-15 11:57:07 +0000 | |||
660 | @@ -33,6 +33,8 @@ | |||
661 | 33 | typedef std::shared_ptr<IndicatorMenu> Ptr; | 33 | typedef std::shared_ptr<IndicatorMenu> Ptr; |
662 | 34 | 34 | ||
663 | 35 | IndicatorMenu() = delete; | 35 | IndicatorMenu() = delete; |
664 | 36 | virtual ~IndicatorMenu() = default; | ||
665 | 37 | |||
666 | 36 | IndicatorMenu(RootState::Ptr rootState, const std::string &prefix) | 38 | IndicatorMenu(RootState::Ptr rootState, const std::string &prefix) |
667 | 37 | : m_rootState{rootState}, | 39 | : m_rootState{rootState}, |
668 | 38 | m_prefix{prefix} | 40 | m_prefix{prefix} |
669 | @@ -60,8 +62,6 @@ | |||
670 | 60 | m_rootMenu->append(m_rootItem); | 62 | m_rootMenu->append(m_rootItem); |
671 | 61 | } | 63 | } |
672 | 62 | 64 | ||
673 | 63 | virtual ~IndicatorMenu() {} | ||
674 | 64 | |||
675 | 65 | virtual void | 65 | virtual void |
676 | 66 | addSection(Section::Ptr section) | 66 | addSection(Section::Ptr section) |
677 | 67 | { | 67 | { |
678 | 68 | 68 | ||
679 | === modified file 'src/indicator/indicator-network-service.cpp' | |||
680 | --- src/indicator/indicator-network-service.cpp 2014-08-15 11:57:07 +0000 | |||
681 | +++ src/indicator/indicator-network-service.cpp 2014-08-15 11:57:07 +0000 | |||
682 | @@ -35,7 +35,7 @@ | |||
683 | 35 | { | 35 | { |
684 | 36 | GMainLoop *ptr; | 36 | GMainLoop *ptr; |
685 | 37 | public: | 37 | public: |
687 | 38 | MainLoop() { ptr = g_main_loop_new(NULL, FALSE); } | 38 | MainLoop() { ptr = g_main_loop_new(nullptr, FALSE); } |
688 | 39 | ~MainLoop() { g_main_loop_unref(ptr); } | 39 | ~MainLoop() { g_main_loop_unref(ptr); } |
689 | 40 | 40 | ||
690 | 41 | void run() { g_main_loop_run(ptr); } | 41 | void run() { g_main_loop_run(ptr); } |
691 | @@ -89,12 +89,12 @@ | |||
692 | 89 | connectivityService->unlockAllModems().connect([menu](){ menu->unlockAllModems(); }); | 89 | connectivityService->unlockAllModems().connect([menu](){ menu->unlockAllModems(); }); |
693 | 90 | 90 | ||
694 | 91 | if (getenv("VALGRIND") != 0) { | 91 | if (getenv("VALGRIND") != 0) { |
696 | 92 | g_timeout_add(1000, (GSourceFunc)stop_main_loop, NULL); | 92 | g_timeout_add(1000, (GSourceFunc)stop_main_loop, nullptr); |
697 | 93 | mainloop.run(); | 93 | mainloop.run(); |
698 | 94 | 94 | ||
699 | 95 | menu.reset(); | 95 | menu.reset(); |
700 | 96 | // give gio time to do cleanup. | 96 | // give gio time to do cleanup. |
702 | 97 | g_timeout_add(500, (GSourceFunc)stop_main_loop, NULL); | 97 | g_timeout_add(500, (GSourceFunc)stop_main_loop, nullptr); |
703 | 98 | mainloop.run(); | 98 | mainloop.run(); |
704 | 99 | } else { | 99 | } else { |
705 | 100 | mainloop.run(); | 100 | mainloop.run(); |
706 | 101 | 101 | ||
707 | === modified file 'src/indicator/menuitems/access-point-item.h' | |||
708 | --- src/indicator/menuitems/access-point-item.h 2014-05-12 18:25:45 +0000 | |||
709 | +++ src/indicator/menuitems/access-point-item.h 2014-08-15 11:57:07 +0000 | |||
710 | @@ -40,7 +40,7 @@ | |||
711 | 40 | typedef std::shared_ptr<AccessPointItem> Ptr; | 40 | typedef std::shared_ptr<AccessPointItem> Ptr; |
712 | 41 | 41 | ||
713 | 42 | AccessPointItem() = delete; | 42 | AccessPointItem() = delete; |
715 | 43 | AccessPointItem(networking::wifi::AccessPoint::Ptr accessPoint, bool isActive = false) | 43 | explicit AccessPointItem(networking::wifi::AccessPoint::Ptr accessPoint, bool isActive = false) |
716 | 44 | : m_accessPoint{accessPoint}, | 44 | : m_accessPoint{accessPoint}, |
717 | 45 | m_isActive{isActive} | 45 | m_isActive{isActive} |
718 | 46 | { | 46 | { |
719 | 47 | 47 | ||
720 | === modified file 'src/indicator/menuitems/switch-item.h' | |||
721 | --- src/indicator/menuitems/switch-item.h 2014-05-27 16:06:14 +0000 | |||
722 | +++ src/indicator/menuitems/switch-item.h 2014-08-15 11:57:07 +0000 | |||
723 | @@ -31,6 +31,7 @@ | |||
724 | 31 | typedef std::shared_ptr<SwitchItem> Ptr; | 31 | typedef std::shared_ptr<SwitchItem> Ptr; |
725 | 32 | 32 | ||
726 | 33 | SwitchItem() = delete; | 33 | SwitchItem() = delete; |
727 | 34 | virtual ~SwitchItem() = default; | ||
728 | 34 | SwitchItem(const std::string &label, const std::string &prefix, const std::string &name) | 35 | SwitchItem(const std::string &label, const std::string &prefix, const std::string &name) |
729 | 35 | { | 36 | { |
730 | 36 | m_state.changed().connect([this](bool value){ | 37 | m_state.changed().connect([this](bool value){ |
731 | 37 | 38 | ||
732 | === modified file 'src/indicator/menuitems/text-item.h' | |||
733 | --- src/indicator/menuitems/text-item.h 2014-05-12 11:36:59 +0000 | |||
734 | +++ src/indicator/menuitems/text-item.h 2014-08-15 11:57:07 +0000 | |||
735 | @@ -33,6 +33,7 @@ | |||
736 | 33 | typedef std::shared_ptr<TextItem> Ptr; | 33 | typedef std::shared_ptr<TextItem> Ptr; |
737 | 34 | 34 | ||
738 | 35 | TextItem() = delete; | 35 | TextItem() = delete; |
739 | 36 | virtual ~TextItem() = default; | ||
740 | 36 | TextItem(const std::string &label, const std::string &prefix, const std::string &name) | 37 | TextItem(const std::string &label, const std::string &prefix, const std::string &name) |
741 | 37 | { | 38 | { |
742 | 38 | std::string action_name = prefix + "." + name; | 39 | std::string action_name = prefix + "." + name; |
743 | 39 | 40 | ||
744 | === modified file 'src/indicator/modem.h' | |||
745 | --- src/indicator/modem.h 2014-08-15 11:57:07 +0000 | |||
746 | +++ src/indicator/modem.h 2014-08-15 11:57:07 +0000 | |||
747 | @@ -67,7 +67,7 @@ | |||
748 | 67 | }; | 67 | }; |
749 | 68 | 68 | ||
750 | 69 | Modem() = delete; | 69 | Modem() = delete; |
752 | 70 | Modem(org::ofono::Interface::Modem::Ptr ofonoModem); | 70 | explicit Modem(org::ofono::Interface::Modem::Ptr ofonoModem); |
753 | 71 | virtual ~Modem(); | 71 | virtual ~Modem(); |
754 | 72 | 72 | ||
755 | 73 | org::ofono::Interface::Modem::Ptr ofonoModem() const; | 73 | org::ofono::Interface::Modem::Ptr ofonoModem() const; |
756 | 74 | 74 | ||
757 | === modified file 'src/indicator/root-state.cpp' | |||
758 | --- src/indicator/root-state.cpp 2014-08-15 11:57:07 +0000 | |||
759 | +++ src/indicator/root-state.cpp 2014-08-15 11:57:07 +0000 | |||
760 | @@ -232,7 +232,7 @@ | |||
761 | 232 | Variant | 232 | Variant |
762 | 233 | RootState::Private::createIcon(const std::string name) | 233 | RootState::Private::createIcon(const std::string name) |
763 | 234 | { | 234 | { |
765 | 235 | GError *error = NULL; | 235 | GError *error = nullptr; |
766 | 236 | auto gicon = g_icon_new_for_string(name.c_str(), &error); | 236 | auto gicon = g_icon_new_for_string(name.c_str(), &error); |
767 | 237 | if (error) { | 237 | if (error) { |
768 | 238 | g_error_free(error); | 238 | g_error_free(error); |
769 | 239 | 239 | ||
770 | === modified file 'src/indicator/wifi-link-item.h' | |||
771 | --- src/indicator/wifi-link-item.h 2014-05-27 16:06:14 +0000 | |||
772 | +++ src/indicator/wifi-link-item.h 2014-08-15 11:57:07 +0000 | |||
773 | @@ -71,6 +71,7 @@ | |||
774 | 71 | typedef std::shared_ptr<WifiLinkItem> Ptr; | 71 | typedef std::shared_ptr<WifiLinkItem> Ptr; |
775 | 72 | 72 | ||
776 | 73 | WifiLinkItem() = delete; | 73 | WifiLinkItem() = delete; |
777 | 74 | virtual ~WifiLinkItem() = default; | ||
778 | 74 | WifiLinkItem(networking::wifi::Link::Ptr link) | 75 | WifiLinkItem(networking::wifi::Link::Ptr link) |
779 | 75 | : m_link {link} | 76 | : m_link {link} |
780 | 76 | { | 77 | { |
781 | 77 | 78 | ||
782 | === modified file 'src/indicator/wifi-section.h' | |||
783 | --- src/indicator/wifi-section.h 2014-05-12 11:36:59 +0000 | |||
784 | +++ src/indicator/wifi-section.h 2014-08-15 11:57:07 +0000 | |||
785 | @@ -32,8 +32,8 @@ | |||
786 | 32 | public: | 32 | public: |
787 | 33 | typedef std::shared_ptr<WifiSection> Ptr; | 33 | typedef std::shared_ptr<WifiSection> Ptr; |
788 | 34 | WifiSection() = delete; | 34 | WifiSection() = delete; |
791 | 35 | WifiSection(std::shared_ptr<connectivity::networking::Manager> manager); | 35 | explicit WifiSection(std::shared_ptr<connectivity::networking::Manager> manager); |
792 | 36 | ~WifiSection(); | 36 | virtual ~WifiSection(); |
793 | 37 | 37 | ||
794 | 38 | // from Section | 38 | // from Section |
795 | 39 | virtual ActionGroup::Ptr actionGroup(); | 39 | virtual ActionGroup::Ptr actionGroup(); |
796 | 40 | 40 | ||
797 | === modified file 'src/indicator/wwan-link-item.h' | |||
798 | --- src/indicator/wwan-link-item.h 2014-08-07 00:19:35 +0000 | |||
799 | +++ src/indicator/wwan-link-item.h 2014-08-15 11:57:07 +0000 | |||
800 | @@ -32,7 +32,7 @@ | |||
801 | 32 | typedef std::shared_ptr<WwanLinkItem> Ptr; | 32 | typedef std::shared_ptr<WwanLinkItem> Ptr; |
802 | 33 | WwanLinkItem() = delete; | 33 | WwanLinkItem() = delete; |
803 | 34 | WwanLinkItem(Modem::Ptr, ModemManager::Ptr modemManager); | 34 | WwanLinkItem(Modem::Ptr, ModemManager::Ptr modemManager); |
805 | 35 | ~WwanLinkItem(); | 35 | virtual ~WwanLinkItem(); |
806 | 36 | 36 | ||
807 | 37 | // from Section | 37 | // from Section |
808 | 38 | virtual ActionGroup::Ptr actionGroup(); | 38 | virtual ActionGroup::Ptr actionGroup(); |
809 | 39 | 39 | ||
810 | === modified file 'src/indicator/wwan-section.cpp' | |||
811 | --- src/indicator/wwan-section.cpp 2014-08-15 11:57:07 +0000 | |||
812 | +++ src/indicator/wwan-section.cpp 2014-08-15 11:57:07 +0000 | |||
813 | @@ -109,7 +109,7 @@ | |||
814 | 109 | for (auto iter = m_items.begin(); iter != m_items.end(); ++iter) { | 109 | for (auto iter = m_items.begin(); iter != m_items.end(); ++iter) { |
815 | 110 | m_linkMenuMerger->remove(*(*iter).second); | 110 | m_linkMenuMerger->remove(*(*iter).second); |
816 | 111 | m_actionGroupMerger->remove(*(*iter).second); | 111 | m_actionGroupMerger->remove(*(*iter).second); |
818 | 112 | m_items.erase(iter); | 112 | iter = m_items.erase(iter); |
819 | 113 | --iter; | 113 | --iter; |
820 | 114 | } | 114 | } |
821 | 115 | } | 115 | } |
822 | 116 | 116 | ||
823 | === modified file 'src/indicator/wwan-section.h' | |||
824 | --- src/indicator/wwan-section.h 2014-08-15 11:57:07 +0000 | |||
825 | +++ src/indicator/wwan-section.h 2014-08-15 11:57:07 +0000 | |||
826 | @@ -31,8 +31,8 @@ | |||
827 | 31 | public: | 31 | public: |
828 | 32 | typedef std::shared_ptr<WwanSection> Ptr; | 32 | typedef std::shared_ptr<WwanSection> Ptr; |
829 | 33 | WwanSection() = delete; | 33 | WwanSection() = delete; |
832 | 34 | WwanSection(ModemManager::Ptr modemManager); | 34 | explicit WwanSection(ModemManager::Ptr modemManager); |
833 | 35 | ~WwanSection(); | 35 | virtual ~WwanSection(); |
834 | 36 | 36 | ||
835 | 37 | virtual ActionGroup::Ptr actionGroup(); | 37 | virtual ActionGroup::Ptr actionGroup(); |
836 | 38 | virtual MenuModel::Ptr menuModel(); | 38 | virtual MenuModel::Ptr menuModel(); |
837 | 39 | 39 | ||
838 | === modified file 'src/menumodel-cpp/action-group-merger.h' | |||
839 | --- src/menumodel-cpp/action-group-merger.h 2014-08-15 11:57:07 +0000 | |||
840 | +++ src/menumodel-cpp/action-group-merger.h 2014-08-15 11:57:07 +0000 | |||
841 | @@ -96,7 +96,7 @@ | |||
842 | 96 | public: | 96 | public: |
843 | 97 | typedef std::shared_ptr<ActionGroupMerger> Ptr; | 97 | typedef std::shared_ptr<ActionGroupMerger> Ptr; |
844 | 98 | 98 | ||
846 | 99 | ActionGroupMerger(const std::string &prefix = "") | 99 | explicit ActionGroupMerger(const std::string &prefix = "") |
847 | 100 | : m_prefix {prefix} | 100 | : m_prefix {prefix} |
848 | 101 | { | 101 | { |
849 | 102 | m_actionGroup = std::make_shared<ActionGroup>(m_prefix); | 102 | m_actionGroup = std::make_shared<ActionGroup>(m_prefix); |
850 | 103 | 103 | ||
851 | === modified file 'src/menumodel-cpp/gio-helpers/util.h' | |||
852 | --- src/menumodel-cpp/gio-helpers/util.h 2014-05-12 11:36:59 +0000 | |||
853 | +++ src/menumodel-cpp/gio-helpers/util.h 2014-08-15 11:57:07 +0000 | |||
854 | @@ -56,7 +56,7 @@ | |||
855 | 56 | g_idle_add_full(G_PRIORITY_HIGH, | 56 | g_idle_add_full(G_PRIORITY_HIGH, |
856 | 57 | GSourceFunc(GMainLoopSync::dispatch_cb), | 57 | GSourceFunc(GMainLoopSync::dispatch_cb), |
857 | 58 | this, | 58 | this, |
859 | 59 | NULL); | 59 | nullptr); |
860 | 60 | if (m_cv.wait_for(lk, std::chrono::seconds(3)) == std::cv_status::timeout) { | 60 | if (m_cv.wait_for(lk, std::chrono::seconds(3)) == std::cv_status::timeout) { |
861 | 61 | std::cerr << "Timeout when waiting for GMainLoop sync." << std::endl; | 61 | std::cerr << "Timeout when waiting for GMainLoop sync." << std::endl; |
862 | 62 | } | 62 | } |
863 | @@ -143,13 +143,13 @@ | |||
864 | 143 | 143 | ||
865 | 144 | SessionBus() | 144 | SessionBus() |
866 | 145 | { | 145 | { |
868 | 146 | GError *error = NULL; | 146 | GError *error = nullptr; |
869 | 147 | 147 | ||
870 | 148 | gchar *address = g_dbus_address_get_for_bus_sync(G_BUS_TYPE_SESSION, | 148 | gchar *address = g_dbus_address_get_for_bus_sync(G_BUS_TYPE_SESSION, |
872 | 149 | NULL, &error); | 149 | nullptr, &error); |
873 | 150 | if (!address) | 150 | if (!address) |
874 | 151 | { | 151 | { |
876 | 152 | g_assert(error != NULL); | 152 | g_assert(error != nullptr); |
877 | 153 | if (error->domain != G_IO_ERROR | 153 | if (error->domain != G_IO_ERROR |
878 | 154 | || error->code != G_IO_ERROR_CANCELLED) | 154 | || error->code != G_IO_ERROR_CANCELLED) |
879 | 155 | { | 155 | { |
880 | @@ -160,20 +160,20 @@ | |||
881 | 160 | return; | 160 | return; |
882 | 161 | } | 161 | } |
883 | 162 | 162 | ||
885 | 163 | error = NULL; | 163 | error = nullptr; |
886 | 164 | m_bus.reset( | 164 | m_bus.reset( |
887 | 165 | g_dbus_connection_new_for_address_sync( | 165 | g_dbus_connection_new_for_address_sync( |
888 | 166 | address, | 166 | address, |
889 | 167 | (GDBusConnectionFlags) (G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT | 167 | (GDBusConnectionFlags) (G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT |
890 | 168 | | G_DBUS_CONNECTION_FLAGS_MESSAGE_BUS_CONNECTION), | 168 | | G_DBUS_CONNECTION_FLAGS_MESSAGE_BUS_CONNECTION), |
893 | 169 | NULL, | 169 | nullptr, |
894 | 170 | NULL, | 170 | nullptr, |
895 | 171 | &error), | 171 | &error), |
896 | 172 | GObjectDeleter()); | 172 | GObjectDeleter()); |
897 | 173 | g_free(address); | 173 | g_free(address); |
898 | 174 | 174 | ||
899 | 175 | if (!m_bus) { | 175 | if (!m_bus) { |
901 | 176 | g_assert(error != NULL); | 176 | g_assert(error != nullptr); |
902 | 177 | if (error->domain != G_IO_ERROR || error->code != G_IO_ERROR_CANCELLED) { | 177 | if (error->domain != G_IO_ERROR || error->code != G_IO_ERROR_CANCELLED) { |
903 | 178 | std::cerr << "Error getting the bus: " << error->message; | 178 | std::cerr << "Error getting the bus: " << error->message; |
904 | 179 | } | 179 | } |
905 | @@ -236,7 +236,7 @@ | |||
906 | 236 | (GBusNameAcquiredCallback)nameAcquired, | 236 | (GBusNameAcquiredCallback)nameAcquired, |
907 | 237 | (GBusNameLostCallback)nameLost, | 237 | (GBusNameLostCallback)nameLost, |
908 | 238 | this, | 238 | this, |
910 | 239 | NULL); | 239 | nullptr); |
911 | 240 | 240 | ||
912 | 241 | } | 241 | } |
913 | 242 | ~BusName() | 242 | ~BusName() |
914 | 243 | 243 | ||
915 | === modified file 'src/menumodel-cpp/gio-helpers/variant.h' | |||
916 | --- src/menumodel-cpp/gio-helpers/variant.h 2014-04-24 13:24:05 +0000 | |||
917 | +++ src/menumodel-cpp/gio-helpers/variant.h 2014-08-15 11:57:07 +0000 | |||
918 | @@ -140,7 +140,7 @@ | |||
919 | 140 | { | 140 | { |
920 | 141 | assert(variant); | 141 | assert(variant); |
921 | 142 | assert(g_variant_is_of_type(variant, G_VARIANT_TYPE_STRING)); | 142 | assert(g_variant_is_of_type(variant, G_VARIANT_TYPE_STRING)); |
923 | 143 | value = g_variant_get_string(variant, NULL); | 143 | value = g_variant_get_string(variant, nullptr); |
924 | 144 | } | 144 | } |
925 | 145 | }; | 145 | }; |
926 | 146 | 146 | ||
927 | 147 | 147 | ||
928 | === modified file 'src/menumodel-cpp/menu-item.h' | |||
929 | --- src/menumodel-cpp/menu-item.h 2014-04-02 23:12:55 +0000 | |||
930 | +++ src/menumodel-cpp/menu-item.h 2014-08-15 11:57:07 +0000 | |||
931 | @@ -64,13 +64,13 @@ | |||
932 | 64 | return menu; | 64 | return menu; |
933 | 65 | } | 65 | } |
934 | 66 | 66 | ||
936 | 67 | MenuItem(const std::string &label = "", | 67 | explicit MenuItem(const std::string &label = "", |
937 | 68 | const std::string &action = "") | 68 | const std::string &action = "") |
938 | 69 | : m_label{label}, | 69 | : m_label{label}, |
939 | 70 | m_action{action} | 70 | m_action{action} |
940 | 71 | { | 71 | { |
941 | 72 | /// @todo validate that action is valid | 72 | /// @todo validate that action is valid |
943 | 73 | m_gmenuitem = make_gmenuitem_ptr(g_menu_item_new(NULL, NULL)); | 73 | m_gmenuitem = make_gmenuitem_ptr(g_menu_item_new(nullptr, nullptr)); |
944 | 74 | if (!label.empty()) { | 74 | if (!label.empty()) { |
945 | 75 | g_menu_item_set_label(m_gmenuitem.get(), label.c_str()); | 75 | g_menu_item_set_label(m_gmenuitem.get(), label.c_str()); |
946 | 76 | } | 76 | } |
947 | @@ -136,7 +136,7 @@ | |||
948 | 136 | assert(!attribute.empty()); | 136 | assert(!attribute.empty()); |
949 | 137 | std::lock_guard<std::recursive_mutex> lg(m_mutex); | 137 | std::lock_guard<std::recursive_mutex> lg(m_mutex); |
950 | 138 | m_attributes.erase(attribute); | 138 | m_attributes.erase(attribute); |
952 | 139 | g_menu_item_set_attribute(m_gmenuitem.get(), attribute.c_str(), NULL); | 139 | g_menu_item_set_attribute(m_gmenuitem.get(), attribute.c_str(), nullptr); |
953 | 140 | m_changed(); | 140 | m_changed(); |
954 | 141 | } | 141 | } |
955 | 142 | 142 | ||
956 | 143 | 143 | ||
957 | === modified file 'src/notify-cpp/notification.cpp' | |||
958 | --- src/notify-cpp/notification.cpp 2014-03-25 23:22:16 +0000 | |||
959 | +++ src/notify-cpp/notification.cpp 2014-08-15 11:57:07 +0000 | |||
960 | @@ -57,13 +57,13 @@ | |||
961 | 57 | d->disconnectId = g_signal_connect(d->notification.get(), "closed", G_CALLBACK(Private::closed_cb), d.get()); | 57 | d->disconnectId = g_signal_connect(d->notification.get(), "closed", G_CALLBACK(Private::closed_cb), d.get()); |
962 | 58 | 58 | ||
963 | 59 | d->summary.changed().connect([this](const std::string &value){ | 59 | d->summary.changed().connect([this](const std::string &value){ |
965 | 60 | g_object_set(d->notification.get(), "summary", value.c_str(), NULL); | 60 | g_object_set(d->notification.get(), "summary", value.c_str(), nullptr); |
966 | 61 | }); | 61 | }); |
967 | 62 | d->body.changed().connect([this](const std::string &value){ | 62 | d->body.changed().connect([this](const std::string &value){ |
969 | 63 | g_object_set(d->notification.get(), "body", value.c_str(), NULL); | 63 | g_object_set(d->notification.get(), "body", value.c_str(), nullptr); |
970 | 64 | }); | 64 | }); |
971 | 65 | d->icon.changed().connect([this](const std::string &value){ | 65 | d->icon.changed().connect([this](const std::string &value){ |
973 | 66 | g_object_set(d->notification.get(), "icon", value.c_str(), NULL); | 66 | g_object_set(d->notification.get(), "icon", value.c_str(), nullptr); |
974 | 67 | }); | 67 | }); |
975 | 68 | 68 | ||
976 | 69 | } | 69 | } |
977 | 70 | 70 | ||
978 | === modified file 'src/notify-cpp/snapdecision/sim-unlock.h' | |||
979 | --- src/notify-cpp/snapdecision/sim-unlock.h 2014-04-23 13:18:25 +0000 | |||
980 | +++ src/notify-cpp/snapdecision/sim-unlock.h 2014-08-15 11:57:07 +0000 | |||
981 | @@ -36,7 +36,7 @@ | |||
982 | 36 | 36 | ||
983 | 37 | typedef std::shared_ptr<SimUnlock> Ptr; | 37 | typedef std::shared_ptr<SimUnlock> Ptr; |
984 | 38 | 38 | ||
986 | 39 | SimUnlock(const std::string &title = "", | 39 | explicit SimUnlock(const std::string &title = "", |
987 | 40 | const std::string &body = "", | 40 | const std::string &body = "", |
988 | 41 | std::pair<std::uint8_t, std::uint8_t> pinMinMax = {0, -0}); | 41 | std::pair<std::uint8_t, std::uint8_t> pinMinMax = {0, -0}); |
989 | 42 | ~SimUnlock(); | 42 | ~SimUnlock(); |
990 | 43 | 43 | ||
991 | === added directory 'src/qt' | |||
992 | === added file 'src/qt/CMakeLists.txt' | |||
993 | --- src/qt/CMakeLists.txt 1970-01-01 00:00:00 +0000 | |||
994 | +++ src/qt/CMakeLists.txt 2014-08-15 11:57:07 +0000 | |||
995 | @@ -0,0 +1,8 @@ | |||
996 | 1 | set(CMAKE_AUTOMOC ON) | ||
997 | 2 | add_definitions(-DQT_NO_KEYWORDS) | ||
998 | 3 | |||
999 | 4 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden") | ||
1000 | 5 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden") | ||
1001 | 6 | |||
1002 | 7 | add_subdirectory(src) | ||
1003 | 8 | add_subdirectory(qml) | ||
1004 | 0 | 9 | ||
1005 | === added directory 'src/qt/include' | |||
1006 | === added directory 'src/qt/include/ubuntu' | |||
1007 | === added directory 'src/qt/include/ubuntu/connectivity' | |||
1008 | === added file 'src/qt/include/ubuntu/connectivity/NetworkingStatus' | |||
1009 | --- src/qt/include/ubuntu/connectivity/NetworkingStatus 1970-01-01 00:00:00 +0000 | |||
1010 | +++ src/qt/include/ubuntu/connectivity/NetworkingStatus 2014-08-15 11:57:07 +0000 | |||
1011 | @@ -0,0 +1,1 @@ | |||
1012 | 1 | #include <ubuntu/connectivity/networking-status.h> | ||
1013 | 0 | 2 | ||
1014 | === added file 'src/qt/include/ubuntu/connectivity/networking-status.h' | |||
1015 | --- src/qt/include/ubuntu/connectivity/networking-status.h 1970-01-01 00:00:00 +0000 | |||
1016 | +++ src/qt/include/ubuntu/connectivity/networking-status.h 2014-08-15 11:57:07 +0000 | |||
1017 | @@ -0,0 +1,79 @@ | |||
1018 | 1 | /* | ||
1019 | 2 | * Copyright © 2014 Canonical Ltd. | ||
1020 | 3 | * | ||
1021 | 4 | * This program is free software: you can redistribute it and/or modify it | ||
1022 | 5 | * under the terms of the GNU Lesser General Public License version 3, | ||
1023 | 6 | * as published by the Free Software Foundation. | ||
1024 | 7 | * | ||
1025 | 8 | * This program is distributed in the hope that it will be useful, | ||
1026 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1027 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1028 | 11 | * GNU Lesser General Public License for more details. | ||
1029 | 12 | * | ||
1030 | 13 | * You should have received a copy of the GNU Lesser General Public License | ||
1031 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1032 | 15 | * | ||
1033 | 16 | * Authors: | ||
1034 | 17 | * Antti Kaijanmäki <antti.kaijanmaki@canonical.com> | ||
1035 | 18 | */ | ||
1036 | 19 | |||
1037 | 20 | #ifndef CONNECTIVITY_NETWORKING_STATUS_H | ||
1038 | 21 | #define CONNECTIVITY_NETWORKING_STATUS_H | ||
1039 | 22 | |||
1040 | 23 | #include <QObject> | ||
1041 | 24 | #include <QScopedPointer> | ||
1042 | 25 | #include <QVector> | ||
1043 | 26 | |||
1044 | 27 | namespace ubuntu { | ||
1045 | 28 | namespace connectivity { | ||
1046 | 29 | |||
1047 | 30 | |||
1048 | 31 | class Q_DECL_EXPORT NetworkingStatus : public QObject | ||
1049 | 32 | { | ||
1050 | 33 | Q_OBJECT | ||
1051 | 34 | Q_DISABLE_COPY(NetworkingStatus) | ||
1052 | 35 | |||
1053 | 36 | Q_ENUMS(Limitations) | ||
1054 | 37 | Q_ENUMS(Status) | ||
1055 | 38 | |||
1056 | 39 | Q_PROPERTY(QVector<Limitations> limitations | ||
1057 | 40 | READ limitations | ||
1058 | 41 | NOTIFY limitationsChanged) | ||
1059 | 42 | Q_PROPERTY(Status status | ||
1060 | 43 | READ status | ||
1061 | 44 | NOTIFY statusChanged) | ||
1062 | 45 | |||
1063 | 46 | public: | ||
1064 | 47 | explicit NetworkingStatus(QObject *parent = 0); | ||
1065 | 48 | virtual ~NetworkingStatus(); | ||
1066 | 49 | |||
1067 | 50 | enum Limitations { | ||
1068 | 51 | Bandwith | ||
1069 | 52 | }; | ||
1070 | 53 | |||
1071 | 54 | enum Status { | ||
1072 | 55 | Offline, | ||
1073 | 56 | Connecting, | ||
1074 | 57 | Online | ||
1075 | 58 | }; | ||
1076 | 59 | |||
1077 | 60 | QVector<Limitations> limitations() const; | ||
1078 | 61 | Status status() const; | ||
1079 | 62 | |||
1080 | 63 | Q_SIGNALS: | ||
1081 | 64 | void limitationsChanged(); | ||
1082 | 65 | void statusChanged(Status value); | ||
1083 | 66 | |||
1084 | 67 | private: | ||
1085 | 68 | class Private; | ||
1086 | 69 | QScopedPointer<Private> d; | ||
1087 | 70 | }; | ||
1088 | 71 | |||
1089 | 72 | } | ||
1090 | 73 | } | ||
1091 | 74 | |||
1092 | 75 | Q_DECLARE_METATYPE(ubuntu::connectivity::NetworkingStatus::Limitations) | ||
1093 | 76 | Q_DECLARE_METATYPE(QVector<ubuntu::connectivity::NetworkingStatus::Limitations>) | ||
1094 | 77 | Q_DECLARE_METATYPE(ubuntu::connectivity::NetworkingStatus::Status) | ||
1095 | 78 | |||
1096 | 79 | #endif // CONNECTIVITY_NETWORKING_STATUS_H | ||
1097 | 0 | 80 | ||
1098 | === added directory 'src/qt/qml' | |||
1099 | === added file 'src/qt/qml/CMakeLists.txt' | |||
1100 | --- src/qt/qml/CMakeLists.txt 1970-01-01 00:00:00 +0000 | |||
1101 | +++ src/qt/qml/CMakeLists.txt 2014-08-15 11:57:07 +0000 | |||
1102 | @@ -0,0 +1,1 @@ | |||
1103 | 1 | add_subdirectory(Ubuntu) | ||
1104 | 0 | 2 | ||
1105 | === added directory 'src/qt/qml/Ubuntu' | |||
1106 | === added file 'src/qt/qml/Ubuntu/CMakeLists.txt' | |||
1107 | --- src/qt/qml/Ubuntu/CMakeLists.txt 1970-01-01 00:00:00 +0000 | |||
1108 | +++ src/qt/qml/Ubuntu/CMakeLists.txt 2014-08-15 11:57:07 +0000 | |||
1109 | @@ -0,0 +1,1 @@ | |||
1110 | 1 | add_subdirectory(Connectivity) | ||
1111 | 0 | 2 | ||
1112 | === added directory 'src/qt/qml/Ubuntu/Connectivity' | |||
1113 | === added file 'src/qt/qml/Ubuntu/Connectivity/CMakeLists.txt' | |||
1114 | --- src/qt/qml/Ubuntu/Connectivity/CMakeLists.txt 1970-01-01 00:00:00 +0000 | |||
1115 | +++ src/qt/qml/Ubuntu/Connectivity/CMakeLists.txt 2014-08-15 11:57:07 +0000 | |||
1116 | @@ -0,0 +1,38 @@ | |||
1117 | 1 | # Find includes in corresponding build directories | ||
1118 | 2 | set(CMAKE_INCLUDE_CURRENT_DIR ON) | ||
1119 | 3 | |||
1120 | 4 | find_package(Qt5Quick REQUIRED) | ||
1121 | 5 | |||
1122 | 6 | set(CORE_SRCS | ||
1123 | 7 | networking-status.cpp | ||
1124 | 8 | plugin.cpp | ||
1125 | 9 | ) | ||
1126 | 10 | include_directories(${CMAKE_SOURCE_DIR}/src/qt/include) | ||
1127 | 11 | |||
1128 | 12 | add_library(connectivity-qml SHARED | ||
1129 | 13 | ${CORE_SRCS} | ||
1130 | 14 | ) | ||
1131 | 15 | target_link_libraries(connectivity-qml ${CONNECTIVITY_QT_LIB_TARGET}) | ||
1132 | 16 | |||
1133 | 17 | qt5_use_modules(connectivity-qml Qml) | ||
1134 | 18 | |||
1135 | 19 | get_target_property(QMAKE_EXECUTABLE Qt5::qmake LOCATION) | ||
1136 | 20 | exec_program(${QMAKE_EXECUTABLE} ARGS "-query QT_INSTALL_QML" OUTPUT_VARIABLE QT_IMPORTS_DIR) | ||
1137 | 21 | file(TO_CMAKE_PATH "${QT_IMPORTS_DIR}" QT_IMPORTS_DIR) | ||
1138 | 22 | |||
1139 | 23 | install( | ||
1140 | 24 | TARGETS connectivity-qml | ||
1141 | 25 | ARCHIVE DESTINATION ${QT_IMPORTS_DIR}/Ubuntu/Connectivity | ||
1142 | 26 | RUNTIME DESTINATION bin | ||
1143 | 27 | LIBRARY DESTINATION ${QT_IMPORTS_DIR}/Ubuntu/Connectivity | ||
1144 | 28 | ) | ||
1145 | 29 | |||
1146 | 30 | install( | ||
1147 | 31 | FILES qmldir | ||
1148 | 32 | DESTINATION ${QT_IMPORTS_DIR}/Ubuntu/Connectivity | ||
1149 | 33 | ) | ||
1150 | 34 | |||
1151 | 35 | # copy qmldir file into build directory for shadow builds | ||
1152 | 36 | file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/qmldir" | ||
1153 | 37 | DESTINATION ${CMAKE_CURRENT_BINARY_DIR} | ||
1154 | 38 | ) | ||
1155 | 0 | 39 | ||
1156 | === added file 'src/qt/qml/Ubuntu/Connectivity/networking-status.cpp' | |||
1157 | --- src/qt/qml/Ubuntu/Connectivity/networking-status.cpp 1970-01-01 00:00:00 +0000 | |||
1158 | +++ src/qt/qml/Ubuntu/Connectivity/networking-status.cpp 2014-08-15 11:57:07 +0000 | |||
1159 | @@ -0,0 +1,43 @@ | |||
1160 | 1 | /* | ||
1161 | 2 | * Copyright © 2013 Canonical Ltd. | ||
1162 | 3 | * | ||
1163 | 4 | * This program is free software: you can redistribute it and/or modify it | ||
1164 | 5 | * under the terms of the GNU Lesser General Public License version 3, | ||
1165 | 6 | * as published by the Free Software Foundation. | ||
1166 | 7 | * | ||
1167 | 8 | * This program is distributed in the hope that it will be useful, | ||
1168 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1169 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1170 | 11 | * GNU Lesser General Public License for more details. | ||
1171 | 12 | * | ||
1172 | 13 | * You should have received a copy of the GNU Lesser General Public License | ||
1173 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1174 | 15 | * | ||
1175 | 16 | * Authors: | ||
1176 | 17 | * Antti Kaijanmäki <antti.kaijanmaki@canonical.com> | ||
1177 | 18 | */ | ||
1178 | 19 | |||
1179 | 20 | #include "networking-status.h" | ||
1180 | 21 | |||
1181 | 22 | NetworkingStatus::NetworkingStatus(QObject *parent) | ||
1182 | 23 | : ubuntu::connectivity::NetworkingStatus(parent) | ||
1183 | 24 | { | ||
1184 | 25 | connect(this, &NetworkingStatus::statusChanged, [this](Status value){ | ||
1185 | 26 | value == Status::Online ? Q_EMIT onlineChanged(true) : Q_EMIT onlineChanged(false); | ||
1186 | 27 | }); | ||
1187 | 28 | } | ||
1188 | 29 | |||
1189 | 30 | NetworkingStatus::~NetworkingStatus() | ||
1190 | 31 | {} | ||
1191 | 32 | |||
1192 | 33 | bool | ||
1193 | 34 | NetworkingStatus::online() const | ||
1194 | 35 | { | ||
1195 | 36 | return status() == Status::Online; | ||
1196 | 37 | } | ||
1197 | 38 | |||
1198 | 39 | bool | ||
1199 | 40 | NetworkingStatus::limitedBandwith() const | ||
1200 | 41 | { | ||
1201 | 42 | return limitations().contains(Limitations::Bandwith); | ||
1202 | 43 | } | ||
1203 | 0 | 44 | ||
1204 | === added file 'src/qt/qml/Ubuntu/Connectivity/networking-status.h' | |||
1205 | --- src/qt/qml/Ubuntu/Connectivity/networking-status.h 1970-01-01 00:00:00 +0000 | |||
1206 | +++ src/qt/qml/Ubuntu/Connectivity/networking-status.h 2014-08-15 11:57:07 +0000 | |||
1207 | @@ -0,0 +1,52 @@ | |||
1208 | 1 | /* | ||
1209 | 2 | * Copyright © 2014 Canonical Ltd. | ||
1210 | 3 | * | ||
1211 | 4 | * This program is free software: you can redistribute it and/or modify it | ||
1212 | 5 | * under the terms of the GNU Lesser General Public License version 3, | ||
1213 | 6 | * as published by the Free Software Foundation. | ||
1214 | 7 | * | ||
1215 | 8 | * This program is distributed in the hope that it will be useful, | ||
1216 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1217 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1218 | 11 | * GNU Lesser General Public License for more details. | ||
1219 | 12 | * | ||
1220 | 13 | * You should have received a copy of the GNU Lesser General Public License | ||
1221 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1222 | 15 | * | ||
1223 | 16 | * Authors: | ||
1224 | 17 | * Antti Kaijanmäki <antti.kaijanmaki@canonical.com> | ||
1225 | 18 | */ | ||
1226 | 19 | |||
1227 | 20 | #ifndef QML_CONNECTIVITY_NETWORKING_STATUS_H | ||
1228 | 21 | #define QML_CONNECTIVITY_NETWORKING_STATUS_H | ||
1229 | 22 | |||
1230 | 23 | #include <QObject> | ||
1231 | 24 | #include <QThread> | ||
1232 | 25 | |||
1233 | 26 | #include <ubuntu/connectivity/NetworkingStatus> | ||
1234 | 27 | |||
1235 | 28 | class Q_DECL_EXPORT NetworkingStatus : public ubuntu::connectivity::NetworkingStatus | ||
1236 | 29 | { | ||
1237 | 30 | Q_OBJECT | ||
1238 | 31 | |||
1239 | 32 | Q_PROPERTY(bool online | ||
1240 | 33 | READ online | ||
1241 | 34 | NOTIFY onlineChanged) | ||
1242 | 35 | |||
1243 | 36 | Q_PROPERTY(bool limitedBandwith | ||
1244 | 37 | READ limitedBandwith | ||
1245 | 38 | NOTIFY limitedBandwithChanged) | ||
1246 | 39 | |||
1247 | 40 | public: | ||
1248 | 41 | explicit NetworkingStatus(QObject *parent = 0); | ||
1249 | 42 | virtual ~NetworkingStatus(); | ||
1250 | 43 | |||
1251 | 44 | bool online() const; | ||
1252 | 45 | bool limitedBandwith() const; | ||
1253 | 46 | |||
1254 | 47 | Q_SIGNALS: | ||
1255 | 48 | void onlineChanged(bool value); | ||
1256 | 49 | void limitedBandwithChanged(bool value); | ||
1257 | 50 | }; | ||
1258 | 51 | |||
1259 | 52 | #endif // QML_CONNECTIVITY_NETWORKING_STATUS_H | ||
1260 | 0 | 53 | ||
1261 | === added file 'src/qt/qml/Ubuntu/Connectivity/plugin.cpp' | |||
1262 | --- src/qt/qml/Ubuntu/Connectivity/plugin.cpp 1970-01-01 00:00:00 +0000 | |||
1263 | +++ src/qt/qml/Ubuntu/Connectivity/plugin.cpp 2014-08-15 11:57:07 +0000 | |||
1264 | @@ -0,0 +1,40 @@ | |||
1265 | 1 | /* | ||
1266 | 2 | * Copyright © 2014 Canonical Ltd. | ||
1267 | 3 | * | ||
1268 | 4 | * This program is free software: you can redistribute it and/or modify it | ||
1269 | 5 | * under the terms of the GNU Lesser General Public License version 3, | ||
1270 | 6 | * as published by the Free Software Foundation. | ||
1271 | 7 | * | ||
1272 | 8 | * This program is distributed in the hope that it will be useful, | ||
1273 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1274 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1275 | 11 | * GNU Lesser General Public License for more details. | ||
1276 | 12 | * | ||
1277 | 13 | * You should have received a copy of the GNU Lesser General Public License | ||
1278 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1279 | 15 | * | ||
1280 | 16 | * Authors: | ||
1281 | 17 | * Antti Kaijanmäki <antti.kaijanmaki@canonical.com> | ||
1282 | 18 | */ | ||
1283 | 19 | |||
1284 | 20 | #include "plugin.h" | ||
1285 | 21 | |||
1286 | 22 | #include <QtQml> | ||
1287 | 23 | |||
1288 | 24 | #include "networking-status.h" | ||
1289 | 25 | |||
1290 | 26 | void | ||
1291 | 27 | QmlConnectivityNetworkingPlugin::registerTypes(const char *uri) | ||
1292 | 28 | { | ||
1293 | 29 | // @uri Ubuntu.Connectivity | ||
1294 | 30 | qmlRegisterType<NetworkingStatus> (uri, 1, 0, "NetworkingStatus"); | ||
1295 | 31 | } | ||
1296 | 32 | |||
1297 | 33 | void | ||
1298 | 34 | QmlConnectivityNetworkingPlugin::initializeEngine(QQmlEngine *engine, const char *uri) | ||
1299 | 35 | { | ||
1300 | 36 | Q_UNUSED(uri); | ||
1301 | 37 | Q_UNUSED(engine); | ||
1302 | 38 | } | ||
1303 | 39 | |||
1304 | 40 | |||
1305 | 0 | 41 | ||
1306 | === added file 'src/qt/qml/Ubuntu/Connectivity/plugin.h' | |||
1307 | --- src/qt/qml/Ubuntu/Connectivity/plugin.h 1970-01-01 00:00:00 +0000 | |||
1308 | +++ src/qt/qml/Ubuntu/Connectivity/plugin.h 2014-08-15 11:57:07 +0000 | |||
1309 | @@ -0,0 +1,36 @@ | |||
1310 | 1 | /* | ||
1311 | 2 | * Copyright © 2014 Canonical Ltd. | ||
1312 | 3 | * | ||
1313 | 4 | * This program is free software: you can redistribute it and/or modify it | ||
1314 | 5 | * under the terms of the GNU Lesser General Public License version 3, | ||
1315 | 6 | * as published by the Free Software Foundation. | ||
1316 | 7 | * | ||
1317 | 8 | * This program is distributed in the hope that it will be useful, | ||
1318 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1319 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1320 | 11 | * GNU Lesser General Public License for more details. | ||
1321 | 12 | * | ||
1322 | 13 | * You should have received a copy of the GNU Lesser General Public License | ||
1323 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1324 | 15 | * | ||
1325 | 16 | * Authors: | ||
1326 | 17 | * Antti Kaijanmäki <antti.kaijanmaki@canonical.com> | ||
1327 | 18 | */ | ||
1328 | 19 | |||
1329 | 20 | #ifndef QML_CONNECTIVITY_PLUGIN_H | ||
1330 | 21 | #define QML_CONNECTIVITY_PLUGIN_H | ||
1331 | 22 | |||
1332 | 23 | #include <QQmlExtensionPlugin> | ||
1333 | 24 | |||
1334 | 25 | class QmlConnectivityNetworkingPlugin : public QQmlExtensionPlugin { | ||
1335 | 26 | Q_OBJECT | ||
1336 | 27 | Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") | ||
1337 | 28 | Q_INTERFACES(QQmlExtensionInterface) | ||
1338 | 29 | |||
1339 | 30 | public: | ||
1340 | 31 | void registerTypes(const char *uri); | ||
1341 | 32 | void initializeEngine(QQmlEngine *engine, const char *uri); | ||
1342 | 33 | }; | ||
1343 | 34 | |||
1344 | 35 | #endif // QML_CONNECTIVITY_PLUGIN_H | ||
1345 | 36 | |||
1346 | 0 | 37 | ||
1347 | === added file 'src/qt/qml/Ubuntu/Connectivity/qmldir' | |||
1348 | --- src/qt/qml/Ubuntu/Connectivity/qmldir 1970-01-01 00:00:00 +0000 | |||
1349 | +++ src/qt/qml/Ubuntu/Connectivity/qmldir 2014-08-15 11:57:07 +0000 | |||
1350 | @@ -0,0 +1,2 @@ | |||
1351 | 1 | module Ubuntu.Connectivity | ||
1352 | 2 | plugin connectivity-qml | ||
1353 | 0 | 3 | ||
1354 | === added directory 'src/qt/src' | |||
1355 | === added file 'src/qt/src/CMakeLists.txt' | |||
1356 | --- src/qt/src/CMakeLists.txt 1970-01-01 00:00:00 +0000 | |||
1357 | +++ src/qt/src/CMakeLists.txt 2014-08-15 11:57:07 +0000 | |||
1358 | @@ -0,0 +1,48 @@ | |||
1359 | 1 | |||
1360 | 2 | set(CONNECTIVITY_QT_INCLUDE_DIR "${CMAKE_INSTALL_FULL_INCLUDEDIR}/connectivity-api/qt${CONNECTIVITY_QT_VERSION_MAJOR}") | ||
1361 | 3 | |||
1362 | 4 | set(PUBLIC_HEADER_DIR "${CMAKE_SOURCE_DIR}/src/qt/include/ubuntu/connectivity") | ||
1363 | 5 | set(PUBLIC_HEADERS | ||
1364 | 6 | ${PUBLIC_HEADER_DIR}/NetworkingStatus | ||
1365 | 7 | ${PUBLIC_HEADER_DIR}/networking-status.h | ||
1366 | 8 | ) | ||
1367 | 9 | |||
1368 | 10 | #install the headers | ||
1369 | 11 | install(FILES ${PUBLIC_HEADERS} | ||
1370 | 12 | DESTINATION "${CONNECTIVITY_QT_INCLUDE_DIR}/ubuntu/connectivity") | ||
1371 | 13 | |||
1372 | 14 | include_directories(../include) | ||
1373 | 15 | set(CORE_SRCS | ||
1374 | 16 | networking-status.cpp | ||
1375 | 17 | dbus-properties-interface.cpp | ||
1376 | 18 | ) | ||
1377 | 19 | |||
1378 | 20 | add_library(${CONNECTIVITY_QT_LIB_TARGET} SHARED | ||
1379 | 21 | ${CORE_SRCS} | ||
1380 | 22 | ${PUBLIC_HEADERS} # public headers have to be included here for Q_DECL_EXPORT to work properly | ||
1381 | 23 | ) | ||
1382 | 24 | |||
1383 | 25 | qt5_use_modules(${CONNECTIVITY_QT_LIB_TARGET} Core DBus) | ||
1384 | 26 | |||
1385 | 27 | install( | ||
1386 | 28 | TARGETS ${CONNECTIVITY_QT_LIB_TARGET} | ||
1387 | 29 | ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
1388 | 30 | RUNTIME DESTINATION bin | ||
1389 | 31 | LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
1390 | 32 | ) | ||
1391 | 33 | |||
1392 | 34 | set(SO_VERSION ${CONNECTIVITY_QT_VERSION_MAJOR}) | ||
1393 | 35 | |||
1394 | 36 | set_target_properties(${CONNECTIVITY_QT_LIB_TARGET} PROPERTIES | ||
1395 | 37 | SOVERSION ${SO_VERSION} | ||
1396 | 38 | ) | ||
1397 | 39 | |||
1398 | 40 | set(PC_FILE_TARGET "${CMAKE_CURRENT_BINARY_DIR}/${CONNECTIVITY_QT_LIB_TARGET}.pc") | ||
1399 | 41 | set(libdir "${CMAKE_INSTALL_FULL_LIBDIR}") | ||
1400 | 42 | set(includedir "${CCONNECTIVITY_QT_INCLUDE_DIR}") | ||
1401 | 43 | set(ABSOLUTE_SO_FILE "${CMAKE_INSTALL_FULL_LIBDIR}/${CONNECTIVITY_QT_LIB_TARGET}.so.${SO_VERSION}") | ||
1402 | 44 | configure_file("connectivity-qt.pc.in" ${PC_FILE_TARGET} @ONLY) | ||
1403 | 45 | install( | ||
1404 | 46 | FILES ${PC_FILE_TARGET} | ||
1405 | 47 | DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig" | ||
1406 | 48 | ) | ||
1407 | 0 | 49 | ||
1408 | === added file 'src/qt/src/connectivity-qt.pc.in' | |||
1409 | --- src/qt/src/connectivity-qt.pc.in 1970-01-01 00:00:00 +0000 | |||
1410 | +++ src/qt/src/connectivity-qt.pc.in 2014-08-15 11:57:07 +0000 | |||
1411 | @@ -0,0 +1,10 @@ | |||
1412 | 1 | libdir=@libdir@ | ||
1413 | 2 | includedir=@includedir@ | ||
1414 | 3 | |||
1415 | 4 | Cflags: -I${includedir}/ | ||
1416 | 5 | Requires: Qt5DBus | ||
1417 | 6 | Libs: @ABSOLUTE_SO_FILE@ | ||
1418 | 7 | |||
1419 | 8 | Name: connectivity-qt1 | ||
1420 | 9 | Description: Ubuntu Connectivity API | ||
1421 | 10 | Version: @CONNECTIVITY_QT_VERSION_MAJOR@.@CONNECTIVITY_QT_VERSION_MINOR@ | ||
1422 | 0 | 11 | ||
1423 | === added file 'src/qt/src/dbus-properties-interface.cpp' | |||
1424 | --- src/qt/src/dbus-properties-interface.cpp 1970-01-01 00:00:00 +0000 | |||
1425 | +++ src/qt/src/dbus-properties-interface.cpp 2014-08-15 11:57:07 +0000 | |||
1426 | @@ -0,0 +1,34 @@ | |||
1427 | 1 | /* | ||
1428 | 2 | * Copyright © 2014 Canonical Ltd. | ||
1429 | 3 | * | ||
1430 | 4 | * This program is free software: you can redistribute it and/or modify it | ||
1431 | 5 | * under the terms of the GNU Lesser General Public License version 3, | ||
1432 | 6 | * as published by the Free Software Foundation. | ||
1433 | 7 | * | ||
1434 | 8 | * This program is distributed in the hope that it will be useful, | ||
1435 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1436 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1437 | 11 | * GNU Lesser General Public License for more details. | ||
1438 | 12 | * | ||
1439 | 13 | * You should have received a copy of the GNU Lesser General Public License | ||
1440 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1441 | 15 | * | ||
1442 | 16 | * Authors: | ||
1443 | 17 | * Antti Kaijanmäki <antti.kaijanmaki@canonical.com> | ||
1444 | 18 | */ | ||
1445 | 19 | |||
1446 | 20 | #include "dbus-properties-interface.h" | ||
1447 | 21 | |||
1448 | 22 | DBusPropertiesInterface::DBusPropertiesInterface(const QString &service, | ||
1449 | 23 | const QString &path, | ||
1450 | 24 | const QDBusConnection &connection, | ||
1451 | 25 | QObject *parent) | ||
1452 | 26 | : QDBusAbstractInterface(service, | ||
1453 | 27 | path, | ||
1454 | 28 | staticInterfaceName(), | ||
1455 | 29 | connection, | ||
1456 | 30 | parent) | ||
1457 | 31 | {} | ||
1458 | 32 | |||
1459 | 33 | DBusPropertiesInterface::~DBusPropertiesInterface() | ||
1460 | 34 | {} | ||
1461 | 0 | 35 | ||
1462 | === added file 'src/qt/src/dbus-properties-interface.h' | |||
1463 | --- src/qt/src/dbus-properties-interface.h 1970-01-01 00:00:00 +0000 | |||
1464 | +++ src/qt/src/dbus-properties-interface.h 2014-08-15 11:57:07 +0000 | |||
1465 | @@ -0,0 +1,53 @@ | |||
1466 | 1 | /* | ||
1467 | 2 | * Copyright © 2014 Canonical Ltd. | ||
1468 | 3 | * | ||
1469 | 4 | * This program is free software: you can redistribute it and/or modify it | ||
1470 | 5 | * under the terms of the GNU Lesser General Public License version 3, | ||
1471 | 6 | * as published by the Free Software Foundation. | ||
1472 | 7 | * | ||
1473 | 8 | * This program is distributed in the hope that it will be useful, | ||
1474 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1475 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1476 | 11 | * GNU Lesser General Public License for more details. | ||
1477 | 12 | * | ||
1478 | 13 | * You should have received a copy of the GNU Lesser General Public License | ||
1479 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1480 | 15 | * | ||
1481 | 16 | * Authors: | ||
1482 | 17 | * Antti Kaijanmäki <antti.kaijanmaki@canonical.com> | ||
1483 | 18 | */ | ||
1484 | 19 | |||
1485 | 20 | #ifndef DBUSPROPERTIES_H | ||
1486 | 21 | #define DBUSPROPERTIES_H | ||
1487 | 22 | |||
1488 | 23 | #include <QtCore/QObject> | ||
1489 | 24 | #include <QtCore/QByteArray> | ||
1490 | 25 | #include <QtCore/QList> | ||
1491 | 26 | #include <QtCore/QMap> | ||
1492 | 27 | #include <QtCore/QString> | ||
1493 | 28 | #include <QtCore/QStringList> | ||
1494 | 29 | #include <QtCore/QVariant> | ||
1495 | 30 | #include <QtDBus/QtDBus> | ||
1496 | 31 | |||
1497 | 32 | class DBusPropertiesInterface: public QDBusAbstractInterface | ||
1498 | 33 | { | ||
1499 | 34 | Q_OBJECT | ||
1500 | 35 | public: | ||
1501 | 36 | static inline const char *staticInterfaceName() | ||
1502 | 37 | { return "org.freedesktop.DBus.Properties"; } | ||
1503 | 38 | |||
1504 | 39 | public: | ||
1505 | 40 | DBusPropertiesInterface(const QString &service, | ||
1506 | 41 | const QString &path, | ||
1507 | 42 | const QDBusConnection &connection, | ||
1508 | 43 | QObject *parent = 0); | ||
1509 | 44 | |||
1510 | 45 | ~DBusPropertiesInterface(); | ||
1511 | 46 | |||
1512 | 47 | Q_SIGNALS: | ||
1513 | 48 | void PropertiesChanged(const QString interface_name, | ||
1514 | 49 | const QVariantMap &changed_properties, | ||
1515 | 50 | const QStringList &invalidated_properties); | ||
1516 | 51 | }; | ||
1517 | 52 | |||
1518 | 53 | #endif | ||
1519 | 0 | 54 | ||
1520 | === added file 'src/qt/src/networking-status.cpp' | |||
1521 | --- src/qt/src/networking-status.cpp 1970-01-01 00:00:00 +0000 | |||
1522 | +++ src/qt/src/networking-status.cpp 2014-08-15 11:57:07 +0000 | |||
1523 | @@ -0,0 +1,188 @@ | |||
1524 | 1 | /* | ||
1525 | 2 | * Copyright © 2014 Canonical Ltd. | ||
1526 | 3 | * | ||
1527 | 4 | * This program is free software: you can redistribute it and/or modify it | ||
1528 | 5 | * under the terms of the GNU Lesser General Public License version 3, | ||
1529 | 6 | * as published by the Free Software Foundation. | ||
1530 | 7 | * | ||
1531 | 8 | * This program is distributed in the hope that it will be useful, | ||
1532 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1533 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1534 | 11 | * GNU Lesser General Public License for more details. | ||
1535 | 12 | * | ||
1536 | 13 | * You should have received a copy of the GNU Lesser General Public License | ||
1537 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1538 | 15 | * | ||
1539 | 16 | * Authors: | ||
1540 | 17 | * Antti Kaijanmäki <antti.kaijanmaki@canonical.com> | ||
1541 | 18 | */ | ||
1542 | 19 | |||
1543 | 20 | #include <ubuntu/connectivity/NetworkingStatus> | ||
1544 | 21 | #include "dbus-properties-interface.h" | ||
1545 | 22 | |||
1546 | 23 | #include <QDBusConnection> | ||
1547 | 24 | #include <QDBusConnectionInterface> | ||
1548 | 25 | #include <QDBusInterface> | ||
1549 | 26 | #include <QDBusServiceWatcher> | ||
1550 | 27 | #include <QDBusMetaType> | ||
1551 | 28 | |||
1552 | 29 | #include <QDebug> | ||
1553 | 30 | |||
1554 | 31 | using namespace ubuntu::connectivity; | ||
1555 | 32 | |||
1556 | 33 | #define SERVICE_NAME "com.ubuntu.connectivity1" | ||
1557 | 34 | #define SERVICE_INTERFACE "com.ubuntu.connectivity1.NetworkingStatus" | ||
1558 | 35 | #define SERVICE_PATH "/com/ubuntu/connectivity1/NetworkingStatus" | ||
1559 | 36 | |||
1560 | 37 | |||
1561 | 38 | class Q_DECL_HIDDEN NetworkingStatus::Private : public QObject | ||
1562 | 39 | { | ||
1563 | 40 | Q_OBJECT | ||
1564 | 41 | |||
1565 | 42 | public: | ||
1566 | 43 | // Yes, it's raw. | ||
1567 | 44 | NetworkingStatus *q; | ||
1568 | 45 | |||
1569 | 46 | QDBusConnection m_bus; | ||
1570 | 47 | |||
1571 | 48 | QVector<NetworkingStatus::Limitations> m_limitations; | ||
1572 | 49 | NetworkingStatus::Status m_status; | ||
1573 | 50 | |||
1574 | 51 | QScopedPointer<QDBusServiceWatcher> m_watch; | ||
1575 | 52 | QScopedPointer<QDBusInterface> m_interface; | ||
1576 | 53 | QScopedPointer<DBusPropertiesInterface> m_properties_interface; | ||
1577 | 54 | |||
1578 | 55 | Private() = delete; | ||
1579 | 56 | Private(NetworkingStatus *q) | ||
1580 | 57 | : q{q}, | ||
1581 | 58 | m_bus{QDBusConnection::sessionBus()} | ||
1582 | 59 | { | ||
1583 | 60 | m_limitations = {}; | ||
1584 | 61 | m_status = Status::Online; | ||
1585 | 62 | |||
1586 | 63 | m_interface.reset(new QDBusInterface(SERVICE_NAME, | ||
1587 | 64 | SERVICE_PATH, | ||
1588 | 65 | SERVICE_INTERFACE, | ||
1589 | 66 | m_bus)); | ||
1590 | 67 | m_properties_interface.reset(new DBusPropertiesInterface(SERVICE_NAME, | ||
1591 | 68 | SERVICE_PATH, | ||
1592 | 69 | m_bus)); | ||
1593 | 70 | connect(m_properties_interface.data(), | ||
1594 | 71 | SIGNAL(PropertiesChanged(QString,QVariantMap,QStringList)), | ||
1595 | 72 | this, | ||
1596 | 73 | SLOT(propertiesChanged(QString,QVariantMap,QStringList))); | ||
1597 | 74 | |||
1598 | 75 | m_watch.reset(new QDBusServiceWatcher(SERVICE_NAME, | ||
1599 | 76 | m_bus, | ||
1600 | 77 | QDBusServiceWatcher::WatchForOwnerChange)); | ||
1601 | 78 | connect(m_watch.data(), &QDBusServiceWatcher::serviceOwnerChanged, this, &Private::serviceOwnerChanged); | ||
1602 | 79 | if (m_bus.interface()->isServiceRegistered(SERVICE_NAME)) { | ||
1603 | 80 | serviceOwnerChanged(SERVICE_NAME, | ||
1604 | 81 | "", | ||
1605 | 82 | m_bus.interface()->serviceOwner(SERVICE_NAME).value()); | ||
1606 | 83 | } else { | ||
1607 | 84 | serviceOwnerChanged(SERVICE_NAME, "", ""); | ||
1608 | 85 | } | ||
1609 | 86 | } | ||
1610 | 87 | |||
1611 | 88 | void updateLimitations(QStringList values) | ||
1612 | 89 | { | ||
1613 | 90 | QVector<NetworkingStatus::Limitations> tmp; | ||
1614 | 91 | for (auto str : values) { | ||
1615 | 92 | if (str == "bandwith") | ||
1616 | 93 | tmp << NetworkingStatus::Limitations::Bandwith; | ||
1617 | 94 | else | ||
1618 | 95 | qWarning() << __PRETTY_FUNCTION__ << ": Invalid limitation: " << str; | ||
1619 | 96 | } | ||
1620 | 97 | if (m_limitations == tmp) | ||
1621 | 98 | return; | ||
1622 | 99 | m_limitations = tmp; | ||
1623 | 100 | Q_EMIT q->limitationsChanged(); | ||
1624 | 101 | } | ||
1625 | 102 | |||
1626 | 103 | void updateStatus(QString value) | ||
1627 | 104 | { | ||
1628 | 105 | NetworkingStatus::Status tmp; | ||
1629 | 106 | if (value == "offline") | ||
1630 | 107 | tmp = NetworkingStatus::Status::Offline; | ||
1631 | 108 | else if (value == "connecting") | ||
1632 | 109 | tmp = NetworkingStatus::Status::Connecting; | ||
1633 | 110 | else if (value == "online") | ||
1634 | 111 | tmp = NetworkingStatus::Status::Online; | ||
1635 | 112 | else { | ||
1636 | 113 | qWarning() << __PRETTY_FUNCTION__ << ": Invalid status: " << value; | ||
1637 | 114 | return; | ||
1638 | 115 | } | ||
1639 | 116 | |||
1640 | 117 | if (m_status == tmp) | ||
1641 | 118 | return; | ||
1642 | 119 | m_status = tmp; | ||
1643 | 120 | Q_EMIT q->statusChanged(m_status); | ||
1644 | 121 | } | ||
1645 | 122 | |||
1646 | 123 | void reset() | ||
1647 | 124 | { | ||
1648 | 125 | updateLimitations({}); | ||
1649 | 126 | updateStatus("online"); | ||
1650 | 127 | } | ||
1651 | 128 | |||
1652 | 129 | public Q_SLOTS: | ||
1653 | 130 | void serviceOwnerChanged(const QString &serviceName, | ||
1654 | 131 | const QString &oldOwner, | ||
1655 | 132 | const QString &newOwner) | ||
1656 | 133 | { | ||
1657 | 134 | Q_UNUSED(serviceName); | ||
1658 | 135 | Q_UNUSED(oldOwner); | ||
1659 | 136 | if (newOwner.isEmpty()) { | ||
1660 | 137 | // disappeared | ||
1661 | 138 | reset(); | ||
1662 | 139 | } else { | ||
1663 | 140 | // appeared | ||
1664 | 141 | updateLimitations(m_interface->property("Limitations").toStringList()); | ||
1665 | 142 | updateStatus(m_interface->property("Status").toString()); | ||
1666 | 143 | } | ||
1667 | 144 | } | ||
1668 | 145 | |||
1669 | 146 | void propertiesChanged(const QString &interface_name, | ||
1670 | 147 | const QVariantMap &changed_properties, | ||
1671 | 148 | const QStringList &invalidated_properties) | ||
1672 | 149 | { | ||
1673 | 150 | Q_UNUSED(interface_name); | ||
1674 | 151 | Q_UNUSED(invalidated_properties); | ||
1675 | 152 | |||
1676 | 153 | if (changed_properties.contains("Limitations")) { | ||
1677 | 154 | updateLimitations(changed_properties["Limitations"].toStringList()); | ||
1678 | 155 | } | ||
1679 | 156 | |||
1680 | 157 | if (changed_properties.contains("Status")) { | ||
1681 | 158 | updateStatus(changed_properties["Status"].toString()); | ||
1682 | 159 | } | ||
1683 | 160 | } | ||
1684 | 161 | }; | ||
1685 | 162 | |||
1686 | 163 | NetworkingStatus::NetworkingStatus(QObject *parent) | ||
1687 | 164 | : QObject(parent), | ||
1688 | 165 | d{new Private(this)} | ||
1689 | 166 | { | ||
1690 | 167 | |||
1691 | 168 | qRegisterMetaType<ubuntu::connectivity::NetworkingStatus::Limitations>(); | ||
1692 | 169 | qRegisterMetaType<QVector<ubuntu::connectivity::NetworkingStatus::Limitations>>(); | ||
1693 | 170 | qRegisterMetaType<ubuntu::connectivity::NetworkingStatus::Status>(); | ||
1694 | 171 | } | ||
1695 | 172 | |||
1696 | 173 | NetworkingStatus::~NetworkingStatus() | ||
1697 | 174 | {} | ||
1698 | 175 | |||
1699 | 176 | QVector<NetworkingStatus::Limitations> | ||
1700 | 177 | NetworkingStatus::limitations() const | ||
1701 | 178 | { | ||
1702 | 179 | return d->m_limitations; | ||
1703 | 180 | } | ||
1704 | 181 | |||
1705 | 182 | NetworkingStatus::Status | ||
1706 | 183 | NetworkingStatus::status() const | ||
1707 | 184 | { | ||
1708 | 185 | return d->m_status; | ||
1709 | 186 | } | ||
1710 | 187 | |||
1711 | 188 | #include "networking-status.moc" | ||
1712 | 0 | 189 | ||
1713 | === modified file 'src/secret-agent/CMakeLists.txt' | |||
1714 | --- src/secret-agent/CMakeLists.txt 2013-10-14 21:00:54 +0000 | |||
1715 | +++ src/secret-agent/CMakeLists.txt 2014-08-15 11:57:07 +0000 | |||
1716 | @@ -1,3 +1,4 @@ | |||
1717 | 1 | set(CMAKE_AUTOMOC ON) | ||
1718 | 1 | 2 | ||
1719 | 2 | set( | 3 | set( |
1720 | 3 | INDICATOR_SECRET_AGENT_SOURCES | 4 | INDICATOR_SECRET_AGENT_SOURCES |
1721 | 4 | 5 | ||
1722 | === modified file 'src/secret-agent/PasswordMenu.cpp' | |||
1723 | --- src/secret-agent/PasswordMenu.cpp 2014-03-28 15:47:23 +0000 | |||
1724 | +++ src/secret-agent/PasswordMenu.cpp 2014-08-15 11:57:07 +0000 | |||
1725 | @@ -28,8 +28,8 @@ | |||
1726 | 28 | class PasswordMenuPriv { | 28 | class PasswordMenuPriv { |
1727 | 29 | public: | 29 | public: |
1728 | 30 | PasswordMenuPriv() : | 30 | PasswordMenuPriv() : |
1731 | 31 | m_connection(g_bus_get_sync(G_BUS_TYPE_SESSION, NULL, | 31 | m_connection(g_bus_get_sync(G_BUS_TYPE_SESSION, nullptr, |
1732 | 32 | NULL)), m_exportedActionGroupId(0), m_exportedMenuModelId(0) { | 32 | nullptr)), m_exportedActionGroupId(0), m_exportedMenuModelId(0) { |
1733 | 33 | } | 33 | } |
1734 | 34 | 34 | ||
1735 | 35 | ~PasswordMenuPriv() { | 35 | ~PasswordMenuPriv() { |
1736 | @@ -104,7 +104,7 @@ | |||
1737 | 104 | exportrev++; | 104 | exportrev++; |
1738 | 105 | p->m_actionPath = PASSWORD_ACTION_PATH.arg(exportrev); | 105 | p->m_actionPath = PASSWORD_ACTION_PATH.arg(exportrev); |
1739 | 106 | p->m_exportedActionGroupId = g_dbus_connection_export_action_group( | 106 | p->m_exportedActionGroupId = g_dbus_connection_export_action_group( |
1741 | 107 | p->m_connection, p->m_actionPath.toUtf8().data(), actions, NULL); | 107 | p->m_connection, p->m_actionPath.toUtf8().data(), actions, nullptr); |
1742 | 108 | } while (p->m_exportedActionGroupId == 0 && exportrev < 128); | 108 | } while (p->m_exportedActionGroupId == 0 && exportrev < 128); |
1743 | 109 | 109 | ||
1744 | 110 | /* Export the menu. If we can't get a name, keep trying to | 110 | /* Export the menu. If we can't get a name, keep trying to |
1745 | @@ -116,7 +116,7 @@ | |||
1746 | 116 | p->m_menuPath = PASSWORD_MENU_PATH.arg(exportrev); | 116 | p->m_menuPath = PASSWORD_MENU_PATH.arg(exportrev); |
1747 | 117 | p->m_exportedMenuModelId = g_dbus_connection_export_menu_model( | 117 | p->m_exportedMenuModelId = g_dbus_connection_export_menu_model( |
1748 | 118 | p->m_connection, p->m_menuPath.toUtf8().data(), | 118 | p->m_connection, p->m_menuPath.toUtf8().data(), |
1750 | 119 | G_MENU_MODEL(menu), NULL); | 119 | G_MENU_MODEL(menu), nullptr); |
1751 | 120 | } while (p->m_exportedMenuModelId == 0 && exportrev < 128); | 120 | } while (p->m_exportedMenuModelId == 0 && exportrev < 128); |
1752 | 121 | 121 | ||
1753 | 122 | /* Unref the objects as a reference is maintained by the fact that they're | 122 | /* Unref the objects as a reference is maintained by the fact that they're |
1754 | 123 | 123 | ||
1755 | === modified file 'tests/CMakeLists.txt' | |||
1756 | --- tests/CMakeLists.txt 2014-05-02 08:44:47 +0000 | |||
1757 | +++ tests/CMakeLists.txt 2014-08-15 11:57:07 +0000 | |||
1758 | @@ -1,7 +1,5 @@ | |||
1759 | 1 | 1 | ||
1760 | 2 | set(CMAKE_AUTOMOC OFF) | ||
1761 | 3 | include(FindGMock) | 2 | include(FindGMock) |
1762 | 4 | set(CMAKE_AUTOMOC ON) | ||
1763 | 5 | 3 | ||
1764 | 6 | find_package("Valgrind" REQUIRED) | 4 | find_package("Valgrind" REQUIRED) |
1765 | 7 | 5 | ||
1766 | 8 | 6 | ||
1767 | === modified file 'tests/integration/CMakeLists.txt' | |||
1768 | --- tests/integration/CMakeLists.txt 2014-04-01 16:12:16 +0000 | |||
1769 | +++ tests/integration/CMakeLists.txt 2014-08-15 11:57:07 +0000 | |||
1770 | @@ -1,3 +1,4 @@ | |||
1771 | 1 | add_subdirectory(qt) | ||
1772 | 1 | 2 | ||
1773 | 2 | add_definitions(-DNETWORK_SERVICE_BIN="${CMAKE_BINARY_DIR}/network/indicator-network-service") | 3 | add_definitions(-DNETWORK_SERVICE_BIN="${CMAKE_BINARY_DIR}/network/indicator-network-service") |
1774 | 3 | 4 | ||
1775 | 4 | 5 | ||
1776 | === added directory 'tests/integration/qt' | |||
1777 | === added file 'tests/integration/qt/CMakeLists.txt' | |||
1778 | --- tests/integration/qt/CMakeLists.txt 1970-01-01 00:00:00 +0000 | |||
1779 | +++ tests/integration/qt/CMakeLists.txt 2014-08-15 11:57:07 +0000 | |||
1780 | @@ -0,0 +1,4 @@ | |||
1781 | 1 | set(CMAKE_AUTOMOC ON) | ||
1782 | 2 | |||
1783 | 3 | add_subdirectory(cpp) | ||
1784 | 4 | add_subdirectory(qml) | ||
1785 | 0 | 5 | ||
1786 | === added directory 'tests/integration/qt/cpp' | |||
1787 | === added file 'tests/integration/qt/cpp/CMakeLists.txt' | |||
1788 | --- tests/integration/qt/cpp/CMakeLists.txt 1970-01-01 00:00:00 +0000 | |||
1789 | +++ tests/integration/qt/cpp/CMakeLists.txt 2014-08-15 11:57:07 +0000 | |||
1790 | @@ -0,0 +1,16 @@ | |||
1791 | 1 | |||
1792 | 2 | include_directories(${CMAKE_SOURCE_DIR}/src/qt/include) | ||
1793 | 3 | set(TEST_SRCS | ||
1794 | 4 | main.cpp | ||
1795 | 5 | tst_networking.cpp | ||
1796 | 6 | ) | ||
1797 | 7 | |||
1798 | 8 | set(testCommand dbus-test-runner -t ${CMAKE_CURRENT_BINARY_DIR}/cpptest | ||
1799 | 9 | -p -o -p ${CMAKE_BINARY_DIR}/cpptest.xml,xunitxml | ||
1800 | 10 | -p -o -p -,txt) | ||
1801 | 11 | |||
1802 | 12 | add_executable(cpptest ${TEST_SRCS}) | ||
1803 | 13 | target_link_libraries(cpptest ${CONNECTIVITY_QT_LIB_TARGET}) | ||
1804 | 14 | qt5_use_modules(cpptest Core Test) | ||
1805 | 15 | |||
1806 | 16 | add_test(qtcpptests ${testCommand}) | ||
1807 | 0 | 17 | ||
1808 | === added file 'tests/integration/qt/cpp/main.cpp' | |||
1809 | --- tests/integration/qt/cpp/main.cpp 1970-01-01 00:00:00 +0000 | |||
1810 | +++ tests/integration/qt/cpp/main.cpp 2014-08-15 11:57:07 +0000 | |||
1811 | @@ -0,0 +1,33 @@ | |||
1812 | 1 | /* This file is part of unity-action-api | ||
1813 | 2 | * Copyright 2013 Canonical Ltd. | ||
1814 | 3 | * | ||
1815 | 4 | * unity-action-api is free software: you can redistribute it and/or modify it | ||
1816 | 5 | * under the terms of the GNU Lesser General Public License version 3, | ||
1817 | 6 | * as published by the Free Software Foundation. | ||
1818 | 7 | * | ||
1819 | 8 | * unity-action-api is distributed in the hope that it will be useful, but | ||
1820 | 9 | * WITHOUT ANY WARRANTY; without even the implied warranties of | ||
1821 | 10 | * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR | ||
1822 | 11 | * PURPOSE. See the GNU Lesser General Public License for more details. | ||
1823 | 12 | * | ||
1824 | 13 | * You should have received a copy of the GNU Lesser General Public License | ||
1825 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1826 | 15 | */ | ||
1827 | 16 | |||
1828 | 17 | #include <QtTest/QtTest> | ||
1829 | 18 | #include <QCoreApplication> | ||
1830 | 19 | |||
1831 | 20 | #include "tst_networking.h" | ||
1832 | 21 | |||
1833 | 22 | int main(int argc, char *argv[]) | ||
1834 | 23 | { | ||
1835 | 24 | // needed for QTest::qWait | ||
1836 | 25 | QCoreApplication app(argc, argv); | ||
1837 | 26 | |||
1838 | 27 | TestNetworking tst_networking; | ||
1839 | 28 | |||
1840 | 29 | if (QTest::qExec(&tst_networking, argc, argv) != 0) | ||
1841 | 30 | return 1; | ||
1842 | 31 | |||
1843 | 32 | return 0; | ||
1844 | 33 | } | ||
1845 | 0 | 34 | ||
1846 | === added file 'tests/integration/qt/cpp/tst_networking.cpp' | |||
1847 | --- tests/integration/qt/cpp/tst_networking.cpp 1970-01-01 00:00:00 +0000 | |||
1848 | +++ tests/integration/qt/cpp/tst_networking.cpp 2014-08-15 11:57:07 +0000 | |||
1849 | @@ -0,0 +1,51 @@ | |||
1850 | 1 | /* | ||
1851 | 2 | * Copyright © 2014 Canonical Ltd. | ||
1852 | 3 | * | ||
1853 | 4 | * This program is free software: you can redistribute it and/or modify it | ||
1854 | 5 | * under the terms of the GNU Lesser General Public License version 3, | ||
1855 | 6 | * as published by the Free Software Foundation. | ||
1856 | 7 | * | ||
1857 | 8 | * This program is distributed in the hope that it will be useful, | ||
1858 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1859 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1860 | 11 | * GNU Lesser General Public License for more details. | ||
1861 | 12 | * | ||
1862 | 13 | * You should have received a copy of the GNU Lesser General Public License | ||
1863 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1864 | 15 | * | ||
1865 | 16 | * Authors: | ||
1866 | 17 | * Antti Kaijanmäki <antti.kaijanmaki@canonical.com> | ||
1867 | 18 | */ | ||
1868 | 19 | |||
1869 | 20 | #include "tst_networking.h" | ||
1870 | 21 | |||
1871 | 22 | #include <ubuntu/connectivity/NetworkingStatus> | ||
1872 | 23 | |||
1873 | 24 | #include <QtTest/QtTest> | ||
1874 | 25 | |||
1875 | 26 | void | ||
1876 | 27 | TestNetworking::initTestCase() | ||
1877 | 28 | {} | ||
1878 | 29 | |||
1879 | 30 | void | ||
1880 | 31 | TestNetworking::cleanupTestCase() | ||
1881 | 32 | {} | ||
1882 | 33 | |||
1883 | 34 | void | ||
1884 | 35 | TestNetworking::cleanup() | ||
1885 | 36 | {} | ||
1886 | 37 | |||
1887 | 38 | |||
1888 | 39 | void | ||
1889 | 40 | TestNetworking::testApi() | ||
1890 | 41 | { | ||
1891 | 42 | using namespace ubuntu::connectivity; | ||
1892 | 43 | |||
1893 | 44 | auto ns = new NetworkingStatus(); | ||
1894 | 45 | |||
1895 | 46 | QVERIFY(ns->metaObject()->indexOfProperty("limitations") != -1); | ||
1896 | 47 | QVERIFY(ns->metaObject()->indexOfProperty("status") != -1); | ||
1897 | 48 | |||
1898 | 49 | QVERIFY(ns->limitations() == QVector<NetworkingStatus::Limitations>()); | ||
1899 | 50 | QVERIFY(ns->status() == NetworkingStatus::Online); | ||
1900 | 51 | } | ||
1901 | 0 | 52 | ||
1902 | === added file 'tests/integration/qt/cpp/tst_networking.h' | |||
1903 | --- tests/integration/qt/cpp/tst_networking.h 1970-01-01 00:00:00 +0000 | |||
1904 | +++ tests/integration/qt/cpp/tst_networking.h 2014-08-15 11:57:07 +0000 | |||
1905 | @@ -0,0 +1,39 @@ | |||
1906 | 1 | /* | ||
1907 | 2 | * Copyright © 2014 Canonical Ltd. | ||
1908 | 3 | * | ||
1909 | 4 | * This program is free software: you can redistribute it and/or modify it | ||
1910 | 5 | * under the terms of the GNU Lesser General Public License version 3, | ||
1911 | 6 | * as published by the Free Software Foundation. | ||
1912 | 7 | * | ||
1913 | 8 | * This program is distributed in the hope that it will be useful, | ||
1914 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1915 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1916 | 11 | * GNU Lesser General Public License for more details. | ||
1917 | 12 | * | ||
1918 | 13 | * You should have received a copy of the GNU Lesser General Public License | ||
1919 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1920 | 15 | * | ||
1921 | 16 | * Authors: | ||
1922 | 17 | * Antti Kaijanmäki <antti.kaijanmaki@canonical.com> | ||
1923 | 18 | */ | ||
1924 | 19 | |||
1925 | 20 | #include <QObject> | ||
1926 | 21 | |||
1927 | 22 | #include <ubuntu/connectivity/NetworkingStatus> | ||
1928 | 23 | |||
1929 | 24 | |||
1930 | 25 | class TestNetworking : public QObject | ||
1931 | 26 | { | ||
1932 | 27 | Q_OBJECT | ||
1933 | 28 | |||
1934 | 29 | private slots: | ||
1935 | 30 | void initTestCase(); | ||
1936 | 31 | void cleanupTestCase(); | ||
1937 | 32 | |||
1938 | 33 | void cleanup(); | ||
1939 | 34 | |||
1940 | 35 | void testApi(); | ||
1941 | 36 | |||
1942 | 37 | private: | ||
1943 | 38 | }; | ||
1944 | 39 | |||
1945 | 0 | 40 | ||
1946 | === added directory 'tests/integration/qt/qml' | |||
1947 | === added file 'tests/integration/qt/qml/CMakeLists.txt' | |||
1948 | --- tests/integration/qt/qml/CMakeLists.txt 1970-01-01 00:00:00 +0000 | |||
1949 | +++ tests/integration/qt/qml/CMakeLists.txt 2014-08-15 11:57:07 +0000 | |||
1950 | @@ -0,0 +1,19 @@ | |||
1951 | 1 | add_custom_target(qmltests) | ||
1952 | 2 | |||
1953 | 3 | find_program(qmltestrunner_exe qmltestrunner) | ||
1954 | 4 | |||
1955 | 5 | if(NOT qmltestrunner_exe) | ||
1956 | 6 | msg(FATAL_ERROR "Could not locate qmltestrunner.") | ||
1957 | 7 | endif() | ||
1958 | 8 | |||
1959 | 9 | set(qmltest_command | ||
1960 | 10 | dbus-test-runner -t env -p "QT_QPA_PLATFORM=minimal" | ||
1961 | 11 | -p ${qmltestrunner_exe} -p -input -p ${CMAKE_CURRENT_SOURCE_DIR}/tst_api.qml | ||
1962 | 12 | -p -import -p ${CMAKE_BINARY_DIR}/src/qt/qml | ||
1963 | 13 | -p -o -p ${CMAKE_BINARY_DIR}/testapi.xml,xunitxml | ||
1964 | 14 | -p -o -p -,txt | ||
1965 | 15 | ) | ||
1966 | 16 | |||
1967 | 17 | add_custom_target(qmltest_api ${qmltest_command}) | ||
1968 | 18 | add_dependencies(qmltests qmltest_api) | ||
1969 | 19 | add_test(qmltests ${qmltest_command}) | ||
1970 | 0 | 20 | ||
1971 | === added file 'tests/integration/qt/qml/tst_api.qml' | |||
1972 | --- tests/integration/qt/qml/tst_api.qml 1970-01-01 00:00:00 +0000 | |||
1973 | +++ tests/integration/qt/qml/tst_api.qml 2014-08-15 11:57:07 +0000 | |||
1974 | @@ -0,0 +1,53 @@ | |||
1975 | 1 | /* | ||
1976 | 2 | * Copyright © 2014 Canonical Ltd. | ||
1977 | 3 | * | ||
1978 | 4 | * This program is free software: you can redistribute it and/or modify it | ||
1979 | 5 | * under the terms of the GNU Lesser General Public License version 3, | ||
1980 | 6 | * as published by the Free Software Foundation. | ||
1981 | 7 | * | ||
1982 | 8 | * This program is distributed in the hope that it will be useful, | ||
1983 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1984 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1985 | 11 | * GNU Lesser General Public License for more details. | ||
1986 | 12 | * | ||
1987 | 13 | * You should have received a copy of the GNU Lesser General Public License | ||
1988 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1989 | 15 | * | ||
1990 | 16 | * Authors: | ||
1991 | 17 | * Antti Kaijanmäki <antti.kaijanmaki@canonical.com> | ||
1992 | 18 | */ | ||
1993 | 19 | |||
1994 | 20 | import Ubuntu.Connectivity 1.0 | ||
1995 | 21 | import QtQuick 2.0 | ||
1996 | 22 | import QtTest 1.0 | ||
1997 | 23 | |||
1998 | 24 | /* This test will make sure there are no unintentional changes to the | ||
1999 | 25 | * schemantics of the API (default properties work as expected, etc) | ||
2000 | 26 | * so that any files written to the prior release of the library | ||
2001 | 27 | * will not bail out when loaded resulting in client applications failing | ||
2002 | 28 | * to start. | ||
2003 | 29 | */ | ||
2004 | 30 | Item { | ||
2005 | 31 | |||
2006 | 32 | NetworkingStatus { | ||
2007 | 33 | id: networkingStatus | ||
2008 | 34 | onStatusChanged: {} | ||
2009 | 35 | onLimitationsChanged: {} | ||
2010 | 36 | onOnlineChanged: {} | ||
2011 | 37 | onLimitedBandwithChanged: {} | ||
2012 | 38 | } | ||
2013 | 39 | |||
2014 | 40 | TestCase { | ||
2015 | 41 | name: "API Test" | ||
2016 | 42 | id: test_api | ||
2017 | 43 | |||
2018 | 44 | property int status : networkingStatus.status | ||
2019 | 45 | property int online : networkingStatus.online | ||
2020 | 46 | property int limitedBandwith : networkingStatus.limitedBandwith | ||
2021 | 47 | |||
2022 | 48 | function test_api() { | ||
2023 | 49 | // just make sure this file can be loaded properly by the QmlEngine. | ||
2024 | 50 | verify(1) | ||
2025 | 51 | } | ||
2026 | 52 | } | ||
2027 | 53 | } | ||
2028 | 0 | 54 | ||
2029 | === modified file 'tests/unit/secret-agent/CMakeLists.txt' | |||
2030 | --- tests/unit/secret-agent/CMakeLists.txt 2014-08-15 11:57:07 +0000 | |||
2031 | +++ tests/unit/secret-agent/CMakeLists.txt 2014-08-15 11:57:07 +0000 | |||
2032 | @@ -1,3 +1,4 @@ | |||
2033 | 1 | set(CMAKE_AUTOMOC ON) | ||
2034 | 1 | 2 | ||
2035 | 2 | include_directories("${CMAKE_SOURCE_DIR}/src/secret-agent") | 3 | include_directories("${CMAKE_SOURCE_DIR}/src/secret-agent") |
2036 | 3 | include_directories("${CMAKE_BINARY_DIR}/src/secret-agent") | 4 | include_directories("${CMAKE_BINARY_DIR}/src/secret-agent") |
FAILED: Continuous integration, rev:400 jenkins. qa.ubuntu. com/job/ indicator- network- ci/158/ jenkins. qa.ubuntu. com/job/ indicator- network- utopic- amd64-ci/ 32/console jenkins. qa.ubuntu. com/job/ indicator- network- utopic- armhf-ci/ 32/console
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/indicator- network- ci/158/ rebuild
http://