mirror of
https://github.com/clementine-player/Clementine
synced 2025-02-03 12:47:31 +01:00
Parse out the Dropbox user's name.
This commit is contained in:
parent
4d1b6fc25d
commit
b955da5f28
@ -2,6 +2,8 @@
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#include <qjson/parser.h>
|
||||
|
||||
#include <QDesktopServices>
|
||||
#include <QStringList>
|
||||
#include <QTcpSocket>
|
||||
@ -189,5 +191,7 @@ void DropboxAuthenticator::RequestAccountInformation() {
|
||||
|
||||
void DropboxAuthenticator::RequestAccountInformationFinished(QNetworkReply* reply) {
|
||||
reply->deleteLater();
|
||||
qLog(Debug) << reply->readAll();
|
||||
QJson::Parser parser;
|
||||
QVariantMap response = parser.parse(reply).toMap();
|
||||
name_ = response["display_name"].toString();
|
||||
}
|
||||
|
@ -34,12 +34,14 @@ class DropboxAuthenticator : public QObject {
|
||||
QString token_;
|
||||
QString secret_;
|
||||
|
||||
// User's Dropbox uid.
|
||||
QString uid_;
|
||||
|
||||
// Permanent OAuth access tokens.
|
||||
QString access_token_;
|
||||
QString access_token_secret_;
|
||||
|
||||
// User's Dropbox uid & name.
|
||||
QString uid_;
|
||||
QString name_;
|
||||
};
|
||||
|
||||
#endif // DROPBOXAUTHENTICATOR_H
|
||||
|
Loading…
x
Reference in New Issue
Block a user