Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHannah von Reth <hannah.vonreth@owncloud.com>2021-01-27 16:15:38 +0300
committerHannah von Reth <vonreth@kde.org>2021-02-11 17:32:28 +0300
commit8e824073f93c592b058dafa42c7c92c2a4d26f8c (patch)
treedd2de81a830250ac06c7b2811d9eb5c772ebac81 /src/common
parentf5ae5eb5feff05f1227ad365919b1068aecc3b2b (diff)
Remove PollJob support
Diffstat (limited to 'src/common')
-rw-r--r--src/common/syncjournaldb.cpp57
-rw-r--r--src/common/syncjournaldb.h10
2 files changed, 0 insertions, 67 deletions
diff --git a/src/common/syncjournaldb.cpp b/src/common/syncjournaldb.cpp
index 70028f7a3..7cbfc55e2 100644
--- a/src/common/syncjournaldb.cpp
+++ b/src/common/syncjournaldb.cpp
@@ -458,15 +458,6 @@ bool SyncJournalDb::checkConnect()
return sqlFail(QStringLiteral("Create table blacklist"), createQuery);
}
- createQuery.prepare("CREATE TABLE IF NOT EXISTS async_poll("
- "path VARCHAR(4096),"
- "modtime INTEGER(8),"
- "filesize BIGINT,"
- "pollpath VARCHAR(4096));");
- if (!createQuery.exec()) {
- return sqlFail(QStringLiteral("Create table async_poll"), createQuery);
- }
-
// create the selectivesync table.
createQuery.prepare("CREATE TABLE IF NOT EXISTS selectivesync ("
"path VARCHAR(4096),"
@@ -1719,54 +1710,6 @@ void SyncJournalDb::setErrorBlacklistEntry(const SyncJournalErrorBlacklistRecord
query->exec();
}
-QVector<SyncJournalDb::PollInfo> SyncJournalDb::getPollInfos()
-{
- QMutexLocker locker(&_mutex);
-
- QVector<SyncJournalDb::PollInfo> res;
-
- if (!checkConnect())
- return res;
-
- SqlQuery query("SELECT path, modtime, filesize, pollpath FROM async_poll", _db);
-
- if (!query.exec()) {
- return res;
- }
-
- while (query.next().hasData) {
- PollInfo info;
- info._file = query.stringValue(0);
- info._modtime = query.int64Value(1);
- info._fileSize = query.int64Value(2);
- info._url = query.stringValue(3);
- res.append(info);
- }
- return res;
-}
-
-void SyncJournalDb::setPollInfo(const SyncJournalDb::PollInfo &info)
-{
- QMutexLocker locker(&_mutex);
- if (!checkConnect()) {
- return;
- }
-
- if (info._url.isEmpty()) {
- qCDebug(lcDb) << "Deleting Poll job" << info._file;
- SqlQuery query("DELETE FROM async_poll WHERE path=?", _db);
- query.bindValue(1, info._file);
- query.exec();
- } else {
- SqlQuery query("INSERT OR REPLACE INTO async_poll (path, modtime, filesize, pollpath) VALUES( ? , ? , ? , ? )", _db);
- query.bindValue(1, info._file);
- query.bindValue(2, info._modtime);
- query.bindValue(3, info._fileSize);
- query.bindValue(4, info._url);
- query.exec();
- }
-}
-
QStringList SyncJournalDb::getSelectiveSyncList(SyncJournalDb::SelectiveSyncListType type, bool *ok)
{
QStringList result;
diff --git a/src/common/syncjournaldb.h b/src/common/syncjournaldb.h
index 55b356bf2..26e12c83c 100644
--- a/src/common/syncjournaldb.h
+++ b/src/common/syncjournaldb.h
@@ -133,14 +133,6 @@ public:
bool isChunked() const { return _transferid != 0; }
};
- struct PollInfo
- {
- QString _file; // The relative path of a file
- QString _url; // the poll url. (This pollinfo is invalid if _url is empty)
- qint64 _modtime; // The modtime of the file being uploaded
- qint64 _fileSize;
- };
-
DownloadInfo getDownloadInfo(const QString &file);
void setDownloadInfo(const QString &file, const DownloadInfo &i);
QVector<DownloadInfo> getAndDeleteStaleDownloadInfos(const QSet<QString> &keep);
@@ -159,8 +151,6 @@ public:
void avoidRenamesOnNextSync(const QString &path) { avoidRenamesOnNextSync(path.toUtf8()); }
void avoidRenamesOnNextSync(const QByteArray &path);
- void setPollInfo(const PollInfo &);
- QVector<PollInfo> getPollInfos();
enum SelectiveSyncListType {
/** The black list is the list of folders that are unselected in the selective sync dialog.