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
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2015-03-06 13:32:36 +0000
+++ CMakeLists.txt 2015-05-27 15:13:07 +0000
@@ -2,7 +2,7 @@
22
3# This is the name and release version of the project3# This is the name and release version of the project
4PROJECT (ubuntuone-credentials)4PROJECT (ubuntuone-credentials)
5SET (PROJECT_VERSION 14.04)5SET (PROJECT_VERSION 15.04)
66
7include(GNUInstallDirs)7include(GNUInstallDirs)
88
99
=== modified file 'debian/changelog'
--- debian/changelog 2015-04-01 17:53:57 +0000
+++ debian/changelog 2015-05-27 15:13:07 +0000
@@ -1,3 +1,9 @@
1ubuntuone-credentials (15.04+15.04.20150527) UNRELEASED; urgency=medium
2
3 * Added Token::consumerKey() getter.
4
5 -- Pawel Stolowski <pawel.stolowski@canonical.com> Mon, 27 May 2015 16:38:11 +0200
6
1ubuntuone-credentials (14.04+15.04.20150401) vivid; urgency=medium7ubuntuone-credentials (14.04+15.04.20150401) vivid; urgency=medium
28
3 [ Alberto Mardegan ]9 [ Alberto Mardegan ]
410
=== modified file 'debian/libubuntuoneauth-2.0-0.symbols'
--- debian/libubuntuoneauth-2.0-0.symbols 2015-01-20 15:34:22 +0000
+++ debian/libubuntuoneauth-2.0-0.symbols 2015-05-27 15:13:07 +0000
@@ -111,6 +111,7 @@
111 (c++)"UbuntuOne::Token::Token(QString, QString, QString, QString)@Base" 13.08111 (c++)"UbuntuOne::Token::Token(QString, QString, QString, QString)@Base" 13.08
112 (c++)"UbuntuOne::Token::Token(QString, QString, QString, QString, QString, QString)@Base" 14.04+14.10.20140908112 (c++)"UbuntuOne::Token::Token(QString, QString, QString, QString, QString, QString)@Base" 14.04+14.10.20140908
113 (c++)"UbuntuOne::Token::~Token()@Base" 13.08113 (c++)"UbuntuOne::Token::~Token()@Base" 13.08
114 (c++)"UbuntuOne::Token::consumerKey() const@Base" 0replaceme
114 (c++)"UbuntuOne::Token::created() const@Base" 14.04+14.10.20140818115 (c++)"UbuntuOne::Token::created() const@Base" 14.04+14.10.20140818
115 (c++)"UbuntuOne::Token::updated() const@Base" 14.04+14.10.20140818116 (c++)"UbuntuOne::Token::updated() const@Base" 14.04+14.10.20140818
116 (c++)"UbuntuOne::Keyring::storeToken(UbuntuOne::Token)@Base" 13.08117 (c++)"UbuntuOne::Keyring::storeToken(UbuntuOne::Token)@Base" 13.08
117118
=== modified file 'libubuntuoneauth/tests/test_token.cpp'
--- libubuntuoneauth/tests/test_token.cpp 2014-09-09 13:53:07 +0000
+++ libubuntuoneauth/tests/test_token.cpp 2015-05-27 15:13:07 +0000
@@ -44,6 +44,20 @@
44 delete token;44 delete token;
45}45}
4646
47void TestConsumerKey()
48{
49 Token token("a", "b", "c", "d");
50 QString expected("c");
51 QCOMPARE(token.consumerKey(), expected);
52}
53
54void TestConsumerKeyOfEmptyToken()
55{
56 Token token;
57 QVERIFY(!token.isValid());
58 QCOMPARE(token.consumerKey(), QString(""));
59}
60
47void TestToken::testTokenCopy()61void TestToken::testTokenCopy()
48{62{
49 Token *old_token = new Token("a", "b", "c", "d");63 Token *old_token = new Token("a", "b", "c", "d");
5064
=== modified file 'libubuntuoneauth/token.cpp'
--- libubuntuoneauth/token.cpp 2014-09-09 13:53:07 +0000
+++ libubuntuoneauth/token.cpp 2015-05-27 15:13:07 +0000
@@ -87,6 +87,16 @@
87 }87 }
8888
89 /**89 /**
90 * \fn QString Token::consumerKey()
91 *
92 * Retruns a consumer key for this token, or empty string if consumer key is not set.
93 */
94 QString Token::consumerKey() const
95 {
96 return _tokenHash.value(TOKEN_CONSUMER_KEY, "");
97 }
98
99 /**
90 * \fn bool Token::isValid()100 * \fn bool Token::isValid()
91 *101 *
92 * Check that the token is valid.102 * Check that the token is valid.
93103
=== modified file 'libubuntuoneauth/token.h'
--- libubuntuoneauth/token.h 2014-09-09 13:53:07 +0000
+++ libubuntuoneauth/token.h 2015-05-27 15:13:07 +0000
@@ -52,6 +52,8 @@
5252
53 static QString dateStringToISO(const QString date);53 static QString dateStringToISO(const QString date);
5454
55 QString consumerKey() const;
56
55 private:57 private:
56 QHash<QString, QString> _tokenHash;58 QHash<QString, QString> _tokenHash;
57 };59 };

Subscribers

People subscribed via source and target branches