Merge lp:~mardy/libaccounts-qt/packaging into lp:libaccounts-qt

Proposed by Alberto Mardegan
Status: Merged
Merged at revision: 140
Proposed branch: lp:~mardy/libaccounts-qt/packaging
Merge into: lp:libaccounts-qt
Diff against target: 229 lines (+64/-13)
13 files modified
.gitignore (+2/-0)
Accounts/Accounts.pro (+10/-6)
Accounts/AccountsQt5Config.cmake.in (+5/-0)
Accounts/AccountsQt5ConfigVersion.cmake.in (+10/-0)
Accounts/provider.cpp (+14/-3)
Accounts/provider.h (+2/-1)
common-project-config.pri (+1/-1)
common-vars.pri (+1/-1)
debian/changelog (+15/-0)
debian/libaccounts-qt-dev.install (+1/-1)
debian/libaccounts-qt5-dev.install (+1/-0)
tests/MyProvider.provider (+1/-0)
tests/accountstest.cpp (+1/-0)
To merge this branch: bzr merge lp:~mardy/libaccounts-qt/packaging
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Renato Araujo Oliveira Filho (community) Approve
Alexandre Abreu (community) Approve
Review via email: mp+209903@code.launchpad.net

Commit message

Merge from upstream

This adds the Provider::domainsRegExp() method and fixes a bug when a NULL AgProvider pointer was getting unreferenced.

Description of the change

Merge from upstream

This adds the Provider::domainsRegExp() method and fixes a bug when a NULL AgProvider pointer was getting unreferenced.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Alexandre Abreu (abreu-alexandre) :
review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Renato Araujo Oliveira Filho (renatofilho) wrote :

works nice with contact sync.

review: Approve
lp:~mardy/libaccounts-qt/packaging updated
138. By Łukasz Zemczak

Fix file conflicts in the -dev packages. As recommended by upstream, we only ship the cmake files for the -qt-dev package, as soon they will add specific variants for every Qt version

139. By PS Jenkins bot

Releasing 1.11+14.04.20140410.1-0ubuntu1

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
lp:~mardy/libaccounts-qt/packaging updated
140. By Alberto Mardegan

Merge from upstream

This adds the Provider::domainsRegExp() method and fixes a bug when a NULL AgProvider pointer was getting unreferenced.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file '.gitignore'
2--- .gitignore 2013-02-20 07:24:12 +0000
3+++ .gitignore 2014-05-02 12:31:09 +0000
4@@ -3,6 +3,8 @@
5 .project
6 Makefile*
7 debian
8+/Accounts/AccountsQt*Config.cmake
9+/Accounts/AccountsQt*ConfigVersion.cmake
10 /coverage-html/
11 /coverage.info
12 /doc/accounts-qt.tags
13
14=== modified file 'Accounts/Accounts.pro'
15--- Accounts/Accounts.pro 2014-02-13 14:10:53 +0000
16+++ Accounts/Accounts.pro 2014-05-02 12:31:09 +0000
17@@ -44,8 +44,10 @@
18
19 greaterThan(QT_MAJOR_VERSION, 4) {
20 TARGET = accounts-qt5
21+ CMAKE_BASENAME = AccountsQt5
22 } else {
23 TARGET = accounts-qt
24+ CMAKE_BASENAME = AccountsQt
25 }
26
27 PKGCONFIG += \
28@@ -65,10 +67,12 @@
29 include($${TOP_SRC_DIR}/common-pkgconfig.pri)
30 INSTALLS += pkgconfig
31
32-QMAKE_SUBSTITUTES += AccountsQtConfig.cmake.in \
33- AccountsQtConfigVersion.cmake.in
34-cmake_modules.files = AccountsQtConfig.cmake \
35- AccountsQtConfigVersion.cmake
36-cmake_modules.path = $${CMAKE_CONFIG_PATH}
37+QMAKE_SUBSTITUTES += \
38+ $${CMAKE_BASENAME}Config.cmake.in \
39+ $${CMAKE_BASENAME}ConfigVersion.cmake.in
40+cmake_modules.files = \
41+ $${CMAKE_BASENAME}Config.cmake \
42+ $${CMAKE_BASENAME}ConfigVersion.cmake
43+cmake_modules.path = $${CMAKE_CONFIG_PATH}/$${CMAKE_BASENAME}
44
45-INSTALLS += cmake_modules
46\ No newline at end of file
47+INSTALLS += cmake_modules
48
49=== added file 'Accounts/AccountsQt5Config.cmake.in'
50--- Accounts/AccountsQt5Config.cmake.in 1970-01-01 00:00:00 +0000
51+++ Accounts/AccountsQt5Config.cmake.in 2014-05-02 12:31:09 +0000
52@@ -0,0 +1,5 @@
53+# ACCOUNTSQT_INCLUDE_DIRS - The libaccounts-qt include directories
54+# ACCOUNTSQT_LIBRARIES - The libraries needed to use libaccounts-qt
55+
56+set(ACCOUNTSQT_LIBRARIES $${INSTALL_LIBDIR}/lib$${TARGET}.so)
57+set(ACCOUNTSQT_INCLUDE_DIRS $${INSTALL_PREFIX}/include/$${TARGET}/)
58\ No newline at end of file
59
60=== added file 'Accounts/AccountsQt5ConfigVersion.cmake.in'
61--- Accounts/AccountsQt5ConfigVersion.cmake.in 1970-01-01 00:00:00 +0000
62+++ Accounts/AccountsQt5ConfigVersion.cmake.in 2014-05-02 12:31:09 +0000
63@@ -0,0 +1,10 @@
64+set(PACKAGE_VERSION $${PROJECT_VERSION})
65+
66+if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" )
67+ set(PACKAGE_VERSION_COMPATIBLE FALSE)
68+else("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" )
69+ set(PACKAGE_VERSION_COMPATIBLE TRUE)
70+ if( "${PACKAGE_FIND_VERSION}" STREQUAL "${PACKAGE_VERSION}")
71+ set(PACKAGE_VERSION_EXACT TRUE)
72+ endif( "${PACKAGE_FIND_VERSION}" STREQUAL "${PACKAGE_VERSION}")
73+endif("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" )
74\ No newline at end of file
75
76=== modified file 'Accounts/provider.cpp'
77--- Accounts/provider.cpp 2013-10-10 12:02:00 +0000
78+++ Accounts/provider.cpp 2014-05-02 12:31:09 +0000
79@@ -3,7 +3,7 @@
80 * This file is part of libaccounts-qt
81 *
82 * Copyright (C) 2009-2011 Nokia Corporation.
83- * Copyright (C) 2012 Canonical Ltd.
84+ * Copyright (C) 2012-2014 Canonical Ltd.
85 *
86 * Contact: Alberto Mardegan <alberto.mardegan@canonical.com>
87 *
88@@ -82,8 +82,10 @@
89
90 Provider::~Provider()
91 {
92- ag_provider_unref(m_provider);
93- m_provider = 0;
94+ if (m_provider != 0) {
95+ ag_provider_unref(m_provider);
96+ m_provider = 0;
97+ }
98 }
99
100 /*!
101@@ -153,6 +155,15 @@
102 }
103
104 /*!
105+ * @return A regular expression pattern which matches all the internet domains
106+ * in which this type of account can be used.
107+ */
108+QString Provider::domainsRegExp() const
109+{
110+ return UTF8(ag_provider_get_domains_regex(m_provider));
111+}
112+
113+/*!
114 * @return Whether the provider supports creating one account at most.
115 */
116 bool Provider::isSingleAccount() const
117
118=== modified file 'Accounts/provider.h'
119--- Accounts/provider.h 2013-10-10 12:02:00 +0000
120+++ Accounts/provider.h 2014-05-02 12:31:09 +0000
121@@ -3,7 +3,7 @@
122 * This file is part of libaccounts-qt
123 *
124 * Copyright (C) 2009-2011 Nokia Corporation.
125- * Copyright (C) 2012 Canonical Ltd.
126+ * Copyright (C) 2012-2014 Canonical Ltd.
127 *
128 * Contact: Alberto Mardegan <alberto.mardegan@canonical.com>
129 *
130@@ -61,6 +61,7 @@
131 QString pluginName() const;
132 QString trCatalog() const;
133 QString iconName() const;
134+ QString domainsRegExp() const;
135 bool isSingleAccount() const;
136 const QDomDocument domDocument() const;
137
138
139=== modified file 'common-project-config.pri'
140--- common-project-config.pri 2014-02-13 14:10:53 +0000
141+++ common-project-config.pri 2014-05-02 12:31:09 +0000
142@@ -62,7 +62,7 @@
143 }
144
145 isEmpty ( CMAKE_CONFIG_PATH ) {
146- CMAKE_CONFIG_PATH = $${INSTALL_LIBDIR}/cmake/AccountsQt/
147+ CMAKE_CONFIG_PATH = $${INSTALL_LIBDIR}/cmake
148 message("====")
149 message("==== NOTE: To override the cmake module installation path run: `qmake CMAKE_CONFIG_PATH=/custom/path'")
150 message("==== (current installation path is `$${CMAKE_CONFIG_PATH}')")
151
152=== modified file 'common-vars.pri'
153--- common-vars.pri 2014-02-13 14:54:00 +0000
154+++ common-vars.pri 2014-05-02 12:31:09 +0000
155@@ -13,7 +13,7 @@
156 #-----------------------------------------------------------------------------
157 # Project version
158 #-----------------------------------------------------------------------------
159-PROJECT_VERSION = 1.11
160+PROJECT_VERSION = 1.12
161
162 #-----------------------------------------------------------------------------
163 # Library version
164
165=== modified file 'debian/changelog'
166--- debian/changelog 2014-04-10 16:34:07 +0000
167+++ debian/changelog 2014-05-02 12:31:09 +0000
168@@ -1,3 +1,18 @@
169+libaccounts-qt (1.12-0ubuntu1) UNRELEASED; urgency=medium
170+
171+ * New upstream release.
172+ - Make the lib easier to use with CMake by adding a Config.cmake file
173+ This will allow CMake applications to use something like:
174+ find_package(AccountsQt REQUIRED CONFIG)
175+ - Application: add default constructor
176+ Fixes: http://code.google.com/p/accounts-sso/issues/detail?id=211
177+ * New upstream release.
178+ - Add CMake config files for the Qt5 build
179+ - Add Provider::domainsRegExp()
180+ - Provider: do not unreference a NULL AgProvider
181+
182+ -- Alberto Mardegan <alberto.mardegan@canonical.com> Fri, 14 Mar 2014 11:36:14 +0200
183+
184 libaccounts-qt (1.11+14.04.20140410.1-0ubuntu1) trusty; urgency=low
185
186 [ Łukasz 'sil2100' Zemczak ]
187
188=== modified file 'debian/libaccounts-qt-dev.install'
189--- debian/libaccounts-qt-dev.install 2014-02-13 15:05:29 +0000
190+++ debian/libaccounts-qt-dev.install 2014-05-02 12:31:09 +0000
191@@ -1,4 +1,4 @@
192 usr/include/accounts-qt
193-usr/lib/*/cmake
194+usr/lib/*/cmake/AccountsQt/*
195 usr/lib/*/libaccounts-qt.so
196 usr/lib/*/pkgconfig/accounts-qt.pc
197
198=== modified file 'debian/libaccounts-qt5-dev.install'
199--- debian/libaccounts-qt5-dev.install 2014-03-14 09:21:58 +0000
200+++ debian/libaccounts-qt5-dev.install 2014-05-02 12:31:09 +0000
201@@ -1,3 +1,4 @@
202 usr/include/accounts-qt5
203+usr/lib/*/cmake/AccountsQt5/*
204 usr/lib/*/libaccounts-qt5.so
205 usr/lib/*/pkgconfig/accounts-qt5.pc
206
207=== modified file 'tests/MyProvider.provider'
208--- tests/MyProvider.provider 2013-10-10 12:02:00 +0000
209+++ tests/MyProvider.provider 2014-05-02 12:31:09 +0000
210@@ -5,6 +5,7 @@
211 <description>fast &amp; furious</description>
212 <translations>accounts</translations>
213 <plugin>generic-oauth</plugin>
214+ <domains>.*example.net</domains>
215 <single-account>true</single-account>
216
217 <template>
218
219=== modified file 'tests/accountstest.cpp'
220--- tests/accountstest.cpp 2014-02-11 10:33:32 +0000
221+++ tests/accountstest.cpp 2014-05-02 12:31:09 +0000
222@@ -210,6 +210,7 @@
223 QCOMPARE(provider.description(), QString("fast & furious"));
224 QCOMPARE(provider.trCatalog(), QString("accounts"));
225 QCOMPARE(provider.pluginName(), QString("generic-oauth"));
226+ QCOMPARE(provider.domainsRegExp(), QString(".*example.net"));
227 QCOMPARE(provider.isSingleAccount(), true);
228
229 QDomDocument dom = provider.domDocument();

Subscribers

People subscribed via source and target branches

to all changes: