[Pkg-owncloud-commits] [owncloud-client] 156/171: fix compilation with TOKEN_AUTH_ONLY
Sandro Knauß
hefee-guest at moszumanska.debian.org
Wed Feb 17 09:37:02 UTC 2016
This is an automated email from the git hooks/post-receive script.
hefee-guest pushed a commit to annotated tag upstream/2.1.1+dfsg
in repository owncloud-client.
commit 54a278edb9c8108f72187cafd4c7ea1675698817
Author: Olivier Goffart <ogoffart at woboq.com>
Date: Fri Feb 5 15:30:29 2016 +0100
fix compilation with TOKEN_AUTH_ONLY
---
src/libsync/CMakeLists.txt | 7 ++++++-
src/libsync/accessmanager.cpp | 4 ----
src/libsync/creds/httpcredentials.cpp | 1 -
src/libsync/creds/tokencredentials.cpp | 8 +++++++-
src/libsync/creds/tokencredentials.h | 3 ++-
5 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/src/libsync/CMakeLists.txt b/src/libsync/CMakeLists.txt
index 52360e1..ca56c3e 100644
--- a/src/libsync/CMakeLists.txt
+++ b/src/libsync/CMakeLists.txt
@@ -67,11 +67,16 @@ set(libsync_SRCS
creds/dummycredentials.cpp
creds/abstractcredentials.cpp
creds/credentialscommon.cpp
- creds/httpcredentials.cpp
../3rdparty/qjson/json.cpp
../3rdparty/certificates/p12topem.cpp
)
+if(TOKEN_AUTH_ONLY)
+ set (libsync_SRCS ${libsync_SRCS} creds/tokencredentials.cpp)
+else()
+ set (libsync_SRCS ${libsync_SRCS} creds/httpcredentials.cpp)
+endif()
+
# These headers are installed for libowncloudsync to be used by 3rd party apps
set(owncloudsync_HEADERS
account.h
diff --git a/src/libsync/accessmanager.cpp b/src/libsync/accessmanager.cpp
index 822f5ba..a0541c5 100644
--- a/src/libsync/accessmanager.cpp
+++ b/src/libsync/accessmanager.cpp
@@ -24,10 +24,6 @@
#include "accessmanager.h"
#include "utility.h"
-#include <QInputDialog>
-#include <QMutexLocker>
-#include <QApplication>
-
namespace OCC
{
diff --git a/src/libsync/creds/httpcredentials.cpp b/src/libsync/creds/httpcredentials.cpp
index fbe78fa..0530a52 100644
--- a/src/libsync/creds/httpcredentials.cpp
+++ b/src/libsync/creds/httpcredentials.cpp
@@ -17,7 +17,6 @@
#include <QDebug>
#include <QNetworkReply>
#include <QSettings>
-#include <QInputDialog>
#include <keychain.h>
diff --git a/src/libsync/creds/tokencredentials.cpp b/src/libsync/creds/tokencredentials.cpp
index 217e0f8..97b6be5 100644
--- a/src/libsync/creds/tokencredentials.cpp
+++ b/src/libsync/creds/tokencredentials.cpp
@@ -121,11 +121,17 @@ bool TokenCredentials::ready() const
return _ready;
}
-void TokenCredentials::fetch()
+void TokenCredentials::fetchFromKeychain()
{
Q_EMIT fetched();
}
+void TokenCredentials::askFromUser()
+{
+ emit asked();
+}
+
+
bool TokenCredentials::stillValid(QNetworkReply *reply)
{
return ((reply->error() != QNetworkReply::AuthenticationRequiredError)
diff --git a/src/libsync/creds/tokencredentials.h b/src/libsync/creds/tokencredentials.h
index adcf328..cf42a4b 100644
--- a/src/libsync/creds/tokencredentials.h
+++ b/src/libsync/creds/tokencredentials.h
@@ -44,7 +44,8 @@ public:
QString authType() const Q_DECL_OVERRIDE;
QNetworkAccessManager* getQNAM() const Q_DECL_OVERRIDE;
bool ready() const Q_DECL_OVERRIDE;
- void fetch() Q_DECL_OVERRIDE;
+ void askFromUser() Q_DECL_OVERRIDE;
+ void fetchFromKeychain() Q_DECL_OVERRIDE;
bool stillValid(QNetworkReply *reply) Q_DECL_OVERRIDE;
void persist() Q_DECL_OVERRIDE;
QString user() const Q_DECL_OVERRIDE;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git
More information about the Pkg-owncloud-commits
mailing list