Move KeychainChunk class from gui to libsync

Signed-off-by: default avatarMichael Schuster <michael@schuster.ms>
(cherry picked from commit 2a3ef044be79b90f479ea24e49bbd3ebf48583e5)
Signed-off-by: default avatarMichael Schuster <michael@schuster.ms>
parent 7f41805b
......@@ -111,7 +111,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
......
#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;
......
......@@ -58,6 +58,7 @@ set(libsync_SRCS
creds/dummycredentials.cpp
creds/abstractcredentials.cpp
creds/credentialscommon.cpp
creds/keychainchunk.cpp
)
if(TOKEN_AUTH_ONLY)
......
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment