Merge lp:~stolowski/ubuntuone-credentials/get-consumer-key-15-04 into lp:ubuntuone-credentials/touch-15-04

Proposed by Paweł Stołowski
Status: Merged
Approved by: dobey
Approved revision: 198
Merged at revision: 194
Proposed branch: lp:~stolowski/ubuntuone-credentials/get-consumer-key-15-04
Merge into: lp:ubuntuone-credentials/touch-15-04
Diff against target: 97 lines (+34/-1)
6 files modified
CMakeLists.txt (+1/-1)
debian/changelog (+6/-0)
debian/libubuntuoneauth-2.0-0.symbols (+1/-0)
libubuntuoneauth/tests/test_token.cpp (+14/-0)
libubuntuoneauth/token.cpp (+10/-0)
libubuntuoneauth/token.h (+2/-0)
To merge this branch: bzr merge lp:~stolowski/ubuntuone-credentials/get-consumer-key-15-04
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
dobey (community) Approve
Review via email: mp+258787@code.launchpad.net

Commit message

Added Token::consumerKey() getter.

Description of the change

Added Token::consumerKey() getter.

To post a comment you must log in.
Revision history for this message
dobey (dobey) :
review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
199. By Paweł Stołowski

Updated changelog

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2015-03-06 13:32:36 +0000
3+++ CMakeLists.txt 2015-05-27 15:13:07 +0000
4@@ -2,7 +2,7 @@
5
6 # This is the name and release version of the project
7 PROJECT (ubuntuone-credentials)
8-SET (PROJECT_VERSION 14.04)
9+SET (PROJECT_VERSION 15.04)
10
11 include(GNUInstallDirs)
12
13
14=== modified file 'debian/changelog'
15--- debian/changelog 2015-04-01 17:53:57 +0000
16+++ debian/changelog 2015-05-27 15:13:07 +0000
17@@ -1,3 +1,9 @@
18+ubuntuone-credentials (15.04+15.04.20150527) UNRELEASED; urgency=medium
19+
20+ * Added Token::consumerKey() getter.
21+
22+ -- Pawel Stolowski <pawel.stolowski@canonical.com> Mon, 27 May 2015 16:38:11 +0200
23+
24 ubuntuone-credentials (14.04+15.04.20150401) vivid; urgency=medium
25
26 [ Alberto Mardegan ]
27
28=== modified file 'debian/libubuntuoneauth-2.0-0.symbols'
29--- debian/libubuntuoneauth-2.0-0.symbols 2015-01-20 15:34:22 +0000
30+++ debian/libubuntuoneauth-2.0-0.symbols 2015-05-27 15:13:07 +0000
31@@ -111,6 +111,7 @@
32 (c++)"UbuntuOne::Token::Token(QString, QString, QString, QString)@Base" 13.08
33 (c++)"UbuntuOne::Token::Token(QString, QString, QString, QString, QString, QString)@Base" 14.04+14.10.20140908
34 (c++)"UbuntuOne::Token::~Token()@Base" 13.08
35+ (c++)"UbuntuOne::Token::consumerKey() const@Base" 0replaceme
36 (c++)"UbuntuOne::Token::created() const@Base" 14.04+14.10.20140818
37 (c++)"UbuntuOne::Token::updated() const@Base" 14.04+14.10.20140818
38 (c++)"UbuntuOne::Keyring::storeToken(UbuntuOne::Token)@Base" 13.08
39
40=== modified file 'libubuntuoneauth/tests/test_token.cpp'
41--- libubuntuoneauth/tests/test_token.cpp 2014-09-09 13:53:07 +0000
42+++ libubuntuoneauth/tests/test_token.cpp 2015-05-27 15:13:07 +0000
43@@ -44,6 +44,20 @@
44 delete token;
45 }
46
47+void TestConsumerKey()
48+{
49+ Token token("a", "b", "c", "d");
50+ QString expected("c");
51+ QCOMPARE(token.consumerKey(), expected);
52+}
53+
54+void TestConsumerKeyOfEmptyToken()
55+{
56+ Token token;
57+ QVERIFY(!token.isValid());
58+ QCOMPARE(token.consumerKey(), QString(""));
59+}
60+
61 void TestToken::testTokenCopy()
62 {
63 Token *old_token = new Token("a", "b", "c", "d");
64
65=== modified file 'libubuntuoneauth/token.cpp'
66--- libubuntuoneauth/token.cpp 2014-09-09 13:53:07 +0000
67+++ libubuntuoneauth/token.cpp 2015-05-27 15:13:07 +0000
68@@ -87,6 +87,16 @@
69 }
70
71 /**
72+ * \fn QString Token::consumerKey()
73+ *
74+ * Retruns a consumer key for this token, or empty string if consumer key is not set.
75+ */
76+ QString Token::consumerKey() const
77+ {
78+ return _tokenHash.value(TOKEN_CONSUMER_KEY, "");
79+ }
80+
81+ /**
82 * \fn bool Token::isValid()
83 *
84 * Check that the token is valid.
85
86=== modified file 'libubuntuoneauth/token.h'
87--- libubuntuoneauth/token.h 2014-09-09 13:53:07 +0000
88+++ libubuntuoneauth/token.h 2015-05-27 15:13:07 +0000
89@@ -52,6 +52,8 @@
90
91 static QString dateStringToISO(const QString date);
92
93+ QString consumerKey() const;
94+
95 private:
96 QHash<QString, QString> _tokenHash;
97 };

Subscribers

People subscribed via source and target branches