mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-22 21:15:55 +03:00
fix compilation with TOKEN_AUTH_ONLY
This commit is contained in:
parent
b0acc475b0
commit
54a278edb9
5 changed files with 15 additions and 8 deletions
|
@ -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
|
||||
|
|
|
@ -24,10 +24,6 @@
|
|||
#include "accessmanager.h"
|
||||
#include "utility.h"
|
||||
|
||||
#include <QInputDialog>
|
||||
#include <QMutexLocker>
|
||||
#include <QApplication>
|
||||
|
||||
namespace OCC
|
||||
{
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
#include <QDebug>
|
||||
#include <QNetworkReply>
|
||||
#include <QSettings>
|
||||
#include <QInputDialog>
|
||||
|
||||
#include <keychain.h>
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue