Move KeychainChunk class from gui to libsync

Signed-off-by: Michael Schuster <michael@schuster.ms>
This commit is contained in:
Michael Schuster 2020-06-25 01:08:59 +02:00
parent 203a2ce003
commit 2a3ef044be
No known key found for this signature in database
GPG Key ID: 00819E3BF4177B28
5 changed files with 8 additions and 6 deletions

View File

@ -112,7 +112,6 @@ set(client_SRCS
creds/httpcredentialsgui.cpp
creds/oauth.cpp
creds/flow2auth.cpp
creds/keychainchunk.cpp
creds/webflowcredentials.cpp
creds/webflowcredentialsdialog.cpp
wizard/postfixlineedit.cpp

View File

@ -1,13 +1,13 @@
#include "webflowcredentials.h"
#include "creds/httpcredentials.h"
#include "creds/keychainchunk.h"
#include <QAuthenticator>
#include <QNetworkAccessManager>
#include <QNetworkReply>
#include <QPointer>
#include <QTimer>
#include <keychain.h>
#include <QDialog>
#include <QVBoxLayout>
#include <QLabel>
@ -18,7 +18,6 @@
#include "theme.h"
#include "wizard/webview.h"
#include "webflowcredentialsdialog.h"
#include "keychainchunk.h"
using namespace QKeychain;

View File

@ -59,6 +59,7 @@ set(libsync_SRCS
creds/dummycredentials.cpp
creds/abstractcredentials.cpp
creds/credentialscommon.cpp
creds/keychainchunk.cpp
)
if(TOKEN_AUTH_ONLY)

View File

@ -39,7 +39,8 @@ static constexpr int MaxChunks = 10;
/*
* @brief: Abstract base class for KeychainChunk jobs.
*/
class Job : public QObject {
class Job : public QObject
{
Q_OBJECT
public:
Job(QObject *parent = nullptr);
@ -84,7 +85,8 @@ protected:
/*
* @brief: Simple wrapper class for QKeychain::WritePasswordJob, splits too large keychain entry's data into chunks on Windows
*/
class WriteJob : public KeychainChunk::Job {
class OWNCLOUDSYNC_EXPORT WriteJob : public KeychainChunk::Job
{
Q_OBJECT
public:
WriteJob(Account *account, const QString &key, const QByteArray &data, QObject *parent = nullptr);
@ -100,7 +102,8 @@ private slots:
/*
* @brief: Simple wrapper class for QKeychain::ReadPasswordJob, splits too large keychain entry's data into chunks on Windows
*/
class ReadJob : public KeychainChunk::Job {
class OWNCLOUDSYNC_EXPORT ReadJob : public KeychainChunk::Job
{
Q_OBJECT
public:
ReadJob(Account *account, const QString &key, const bool &keychainMigration, QObject *parent = nullptr);