forked from ondra/colnod-connector
fix build
This commit is contained in:
parent
f1f14bfd3e
commit
a8bcfc7f18
@ -254,7 +254,7 @@ bool DatabaseAPI::deleteItems(const QList<QString> &ids, const QString &tableNam
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<Token> DatabaseAPI::getToken(QString &id)
|
std::shared_ptr<Token> DatabaseAPI::getToken(const QString &id)
|
||||||
{
|
{
|
||||||
auto query = mDbMan->createQuery();
|
auto query = mDbMan->createQuery();
|
||||||
query.prepare("SELECT * FROM colnod_token WHERE d = :id");
|
query.prepare("SELECT * FROM colnod_token WHERE d = :id");
|
||||||
@ -262,7 +262,6 @@ std::shared_ptr<Token> DatabaseAPI::getToken(QString &id)
|
|||||||
if (!executeQuery(query)) {
|
if (!executeQuery(query)) {
|
||||||
qCritical(database) << "ERROR during accessing existing tokens. EXIT";
|
qCritical(database) << "ERROR during accessing existing tokens. EXIT";
|
||||||
emit error();
|
emit error();
|
||||||
id = QString();
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
auto list = utils->tableFromQuery<Token>(query);
|
auto list = utils->tableFromQuery<Token>(query);
|
||||||
@ -271,7 +270,7 @@ std::shared_ptr<Token> DatabaseAPI::getToken(QString &id)
|
|||||||
return list.at(0);
|
return list.at(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DatabaseAPI::isAlreadyDeleted(QString &id)
|
bool DatabaseAPI::isAlreadyDeleted(const QString &id)
|
||||||
{
|
{
|
||||||
auto token = getToken(id);
|
auto token = getToken(id);
|
||||||
if (!token) {
|
if (!token) {
|
||||||
|
|||||||
@ -37,9 +37,9 @@ public:
|
|||||||
bool uploadSubjects(const QHash<QString, std::shared_ptr<Subject> > &subjects);
|
bool uploadSubjects(const QHash<QString, std::shared_ptr<Subject> > &subjects);
|
||||||
bool deleteItems(const QList<QString> &ids, const QString &tableName);
|
bool deleteItems(const QList<QString> &ids, const QString &tableName);
|
||||||
|
|
||||||
std::shared_ptr<Token> getToken(QString &id);
|
std::shared_ptr<Token> getToken(const QString &id);
|
||||||
|
|
||||||
bool isAlreadyDeleted(QString &id);
|
bool isAlreadyDeleted(const QString &id);
|
||||||
|
|
||||||
bool isValid();
|
bool isValid();
|
||||||
|
|
||||||
|
|||||||
@ -9,7 +9,7 @@ class SyncManager : public QObject
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit SyncManager(bool dryMode, const std::function<void()> &onError = nullptr);
|
explicit SyncManager(bool dryMode);
|
||||||
|
|
||||||
bool init();
|
bool init();
|
||||||
bool run();
|
bool run();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user