Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 14 additions & 9 deletions src/common/syncjournaldb.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
/*
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
* SPDX-FileCopyrightText: 2014 ownCloud GmbH
* SPDX-License-Identifier: LGPL-2.1-or-later
*/


#include "syncjournaldb.h"

#include "version.h"
#include "filesystembase.h"
#include "common/asserts.h"
#include "common/checksums.h"
#include "common/preparedsqlquerymanager.h"
#include "common/c_jhash.h"

#include <QCryptographicHash>
#include <QFile>
#include <QJsonArray>
Expand All @@ -13,17 +23,10 @@
#include <QElapsedTimer>
#include <QUrl>
#include <QDir>
#include <sqlite3.h>
#include <cstring>

#include "common/syncjournaldb.h"
#include "version.h"
#include "filesystembase.h"
#include "common/asserts.h"
#include "common/checksums.h"
#include "common/preparedsqlquerymanager.h"
#include <sqlite3.h>

#include "common/c_jhash.h"
#include <cstring>

// SQL expression to check whether path.startswith(prefix + '/')
// Note: '/' + 1 == '0'
Expand Down Expand Up @@ -3311,3 +3314,5 @@
}

} // namespace OCC

#include "moc_syncjournaldb.cpp"

Check warning on line 3318 in src/common/syncjournaldb.cpp

View workflow job for this annotation

GitHub Actions / build

src/common/syncjournaldb.cpp:3318:11 [bugprone-suspicious-include]

suspicious #include of file with '.cpp' extension
1 change: 1 addition & 0 deletions src/gui/socketapi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
target_sources(nextcloudCore PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/socketapi.h
${CMAKE_CURRENT_SOURCE_DIR}/socketapi.cpp
${CMAKE_CURRENT_SOURCE_DIR}/socketapi_p.h
)

if( APPLE )
Expand Down
1 change: 1 addition & 0 deletions src/gui/socketapi/socketapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1766,3 +1766,4 @@
} // namespace OCC

#include "socketapi.moc"
#include "moc_socketapi_p.cpp"

Check warning on line 1769 in src/gui/socketapi/socketapi.cpp

View workflow job for this annotation

GitHub Actions / build

src/gui/socketapi/socketapi.cpp:1769:11 [bugprone-suspicious-include]

suspicious #include of file with '.cpp' extension
6 changes: 3 additions & 3 deletions src/gui/socketapi/socketapi_p.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@
#ifndef SOCKETAPI_P_H
#define SOCKETAPI_P_H

#include <functional>
#include <QBitArray>

Check failure on line 10 in src/gui/socketapi/socketapi_p.h

View workflow job for this annotation

GitHub Actions / build

src/gui/socketapi/socketapi_p.h:10:10 [clang-diagnostic-error]

'QBitArray' file not found
#include <QIODevice>
#include <QPointer>

#include <QJsonDocument>
#include <QJsonObject>
#include <QTimer>
#include <QLoggingCategory>

#include <functional>
#include <memory>
#include <QTimer>

namespace OCC {

Expand Down
2 changes: 2 additions & 0 deletions src/libsync/basepropagateremotedeleteencrypted.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: GPL-2.0-or-later
*/

#include <QFileInfo>

Check failure on line 6 in src/libsync/basepropagateremotedeleteencrypted.cpp

View workflow job for this annotation

GitHub Actions / build

src/libsync/basepropagateremotedeleteencrypted.cpp:6:10 [clang-diagnostic-error]

'QFileInfo' file not found
#include <QLoggingCategory>
#include "foldermetadata.h"
#include "basepropagateremotedeleteencrypted.h"
Expand Down Expand Up @@ -197,3 +197,5 @@
}

} // namespace OCC

#include "moc_basepropagateremotedeleteencrypted.cpp"

Check warning on line 201 in src/libsync/basepropagateremotedeleteencrypted.cpp

View workflow job for this annotation

GitHub Actions / build

src/libsync/basepropagateremotedeleteencrypted.cpp:201:11 [bugprone-suspicious-include]

suspicious #include of file with '.cpp' extension
2 changes: 2 additions & 0 deletions src/libsync/bulkpropagatordownloadjob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,3 +165,5 @@
}

}

#include "moc_bulkpropagatordownloadjob.cpp"

Check warning on line 169 in src/libsync/bulkpropagatordownloadjob.cpp

View workflow job for this annotation

GitHub Actions / build

src/libsync/bulkpropagatordownloadjob.cpp:169:11 [bugprone-suspicious-include]

suspicious #include of file with '.cpp' extension
2 changes: 2 additions & 0 deletions src/libsync/bulkpropagatorjob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -819,3 +819,5 @@
}

}

#include "moc_bulkpropagatorjob.cpp"

Check warning on line 823 in src/libsync/bulkpropagatorjob.cpp

View workflow job for this annotation

GitHub Actions / build

src/libsync/bulkpropagatorjob.cpp:823:11 [bugprone-suspicious-include]

suspicious #include of file with '.cpp' extension
5 changes: 4 additions & 1 deletion src/libsync/creds/abstractcredentials.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@
* SPDX-License-Identifier: GPL-2.0-or-later
*/

#include "abstractcredentials.h"

#include <QLoggingCategory>
#include <QString>
#include <QCoreApplication>

#include "common/asserts.h"
#include "creds/abstractcredentials.h"

namespace OCC {

Expand Down Expand Up @@ -59,3 +60,5 @@
return key;
}
} // namespace OCC

#include "moc_abstractcredentials.cpp"

Check warning on line 64 in src/libsync/creds/abstractcredentials.cpp

View workflow job for this annotation

GitHub Actions / build

src/libsync/creds/abstractcredentials.cpp:64:11 [bugprone-suspicious-include]

suspicious #include of file with '.cpp' extension
2 changes: 2 additions & 0 deletions src/libsync/creds/dummycredentials.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-or-later
*/

#include "creds/dummycredentials.h"

Check failure on line 7 in src/libsync/creds/dummycredentials.cpp

View workflow job for this annotation

GitHub Actions / build

src/libsync/creds/dummycredentials.cpp:7:10 [clang-diagnostic-error]

'creds/dummycredentials.h' file not found
#include "accessmanager.h"

namespace OCC {
Expand Down Expand Up @@ -58,3 +58,5 @@
}

} // namespace OCC

#include "moc_dummycredentials.cpp"

Check warning on line 62 in src/libsync/creds/dummycredentials.cpp

View workflow job for this annotation

GitHub Actions / build

src/libsync/creds/dummycredentials.cpp:62:11 [bugprone-suspicious-include]

suspicious #include of file with '.cpp' extension
2 changes: 2 additions & 0 deletions src/libsync/creds/httpcredentials.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-or-later
*/

#include <QLoggingCategory>

Check failure on line 7 in src/libsync/creds/httpcredentials.cpp

View workflow job for this annotation

GitHub Actions / build

src/libsync/creds/httpcredentials.cpp:7:10 [clang-diagnostic-error]

'QLoggingCategory' file not found
#include <QMutex>
#include <QNetworkReply>
#include <QSettings>
Expand Down Expand Up @@ -555,3 +555,5 @@
}

} // namespace OCC

#include "moc_httpcredentials.cpp"

Check warning on line 559 in src/libsync/creds/httpcredentials.cpp

View workflow job for this annotation

GitHub Actions / build

src/libsync/creds/httpcredentials.cpp:559:11 [bugprone-suspicious-include]

suspicious #include of file with '.cpp' extension
2 changes: 2 additions & 0 deletions src/libsync/discovery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2549,3 +2549,5 @@
}

}

#include "moc_discovery.cpp"

Check warning on line 2553 in src/libsync/discovery.cpp

View workflow job for this annotation

GitHub Actions / build

src/libsync/discovery.cpp:2553:11 [bugprone-suspicious-include]

suspicious #include of file with '.cpp' extension
2 changes: 2 additions & 0 deletions src/libsync/encryptedfoldermetadatahandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -394,3 +394,5 @@
}

}

#include "moc_encryptedfoldermetadatahandler.cpp"

Check warning on line 398 in src/libsync/encryptedfoldermetadatahandler.cpp

View workflow job for this annotation

GitHub Actions / build

src/libsync/encryptedfoldermetadatahandler.cpp:398:11 [bugprone-suspicious-include]

suspicious #include of file with '.cpp' extension
2 changes: 2 additions & 0 deletions src/libsync/encryptfolderjob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,3 +148,5 @@ void EncryptFolderJob::slotUploadMetadataFinished(int statusCode, const QString
}

}

#include "moc_encryptfolderjob.cpp"
2 changes: 2 additions & 0 deletions src/libsync/foldermetadata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1270,3 +1270,5 @@ bool FolderMetadata::verifyMetadataKey(const QByteArray &metadataKey) const
return _keyChecksums.contains(calcSha256(metadataKeyLimitedLength)) || _keyChecksums.isEmpty();
}
}

#include "moc_foldermetadata.cpp"
2 changes: 2 additions & 0 deletions src/libsync/owncloudpropagator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1835,3 +1835,5 @@ void PropagateVfsUpdateMetadataJob::start()
}

}

#include "moc_owncloudpropagator.cpp"
2 changes: 2 additions & 0 deletions src/libsync/propagatedownload.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-or-later
*/

#include "config.h"

Check failure on line 7 in src/libsync/propagatedownload.cpp

View workflow job for this annotation

GitHub Actions / build

src/libsync/propagatedownload.cpp:7:10 [clang-diagnostic-error]

'config.h' file not found
#include "libsync/creds/abstractcredentials.h"
#include "owncloudpropagator_p.h"
#include "propagatedownload.h"
Expand Down Expand Up @@ -1394,3 +1394,5 @@
}
}
}

#include "moc_propagatedownload.cpp"
2 changes: 2 additions & 0 deletions src/libsync/propagatedownloadencrypted.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,3 +119,5 @@ QString PropagateDownloadEncrypted::errorString() const
}

}

#include "moc_propagatedownloadencrypted.cpp"
2 changes: 2 additions & 0 deletions src/libsync/propagateremotedelete.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,5 @@ void PropagateRemoteDelete::slotDeleteJobFinished()
done(SyncFileItem::Success, {}, ErrorCategory::NoError);
}
}

#include "moc_propagateremotedelete.cpp"
2 changes: 2 additions & 0 deletions src/libsync/propagateremotedeleteencrypted.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,5 @@ void PropagateRemoteDeleteEncrypted::slotUpdateMetadataJobFinished(int statusCod
Q_UNUSED(message);
deleteRemoteItem(_item->_encryptedFileName);
}

#include "moc_propagateremotedeleteencrypted.cpp"
2 changes: 2 additions & 0 deletions src/libsync/propagateremotedeleteencryptedrootfolder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* - 7th step is to decrypt and delete the root folder, because it is now possible as it has become empty
*/

#include <QFileInfo>

Check failure on line 17 in src/libsync/propagateremotedeleteencryptedrootfolder.cpp

View workflow job for this annotation

GitHub Actions / build

src/libsync/propagateremotedeleteencryptedrootfolder.cpp:17:10 [clang-diagnostic-error]

'QFileInfo' file not found
#include <QLoggingCategory>

#include "deletejob.h"
Expand Down Expand Up @@ -196,3 +196,5 @@
});
job->start();
}

#include "moc_propagateremotedeleteencryptedrootfolder.cpp"
2 changes: 2 additions & 0 deletions src/libsync/propagateremotemkdir.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -285,3 +285,5 @@ void PropagateRemoteMkdir::success()
done(SyncFileItem::Success, {}, ErrorCategory::NoError);
}
}

#include "moc_propagateremotemkdir.cpp"
2 changes: 2 additions & 0 deletions src/libsync/propagateremotemove.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -341,3 +341,5 @@ bool PropagateRemoteMove::adjustSelectiveSync(SyncJournalDb *journal, const QStr
return true;
}
}

#include "moc_propagateremotemove.cpp"
2 changes: 2 additions & 0 deletions src/libsync/propagateupload.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-or-later
*/

#include "config.h"

Check failure on line 7 in src/libsync/propagateupload.cpp

View workflow job for this annotation

GitHub Actions / build

src/libsync/propagateupload.cpp:7:10 [clang-diagnostic-error]

'config.h' file not found
#include "propagateupload.h"
#include "propagateuploadencrypted.h"
#include "owncloudpropagator_p.h"
Expand Down Expand Up @@ -925,3 +925,5 @@
emit abortFinished();
}
}

#include "moc_propagateupload.cpp"
2 changes: 2 additions & 0 deletions src/libsync/propagateuploadencrypted.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,3 +195,5 @@ void PropagateUploadEncrypted::slotUploadMetadataFinished(int statusCode, const
}

} // namespace OCC

#include "moc_propagateuploadencrypted.cpp"
2 changes: 2 additions & 0 deletions src/libsync/propagatorjobs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -590,3 +590,5 @@ bool PropagateLocalRename::deleteOldDbRecord(const QString &fileName)
return true;
}
}

#include "moc_propagatorjobs.cpp"
2 changes: 2 additions & 0 deletions src/libsync/putmultifilejob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,5 @@ std::chrono::milliseconds PutMultiFileJob::msSinceStart() const
}

}

#include "moc_putmultifilejob.cpp"
2 changes: 2 additions & 0 deletions src/libsync/updatee2eefoldermetadatajob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,3 +167,5 @@ void UpdateE2eeFolderMetadataJob::unlockFolder(const EncryptedFolderMetadataHand
}

}

#include "moc_updatee2eefoldermetadatajob.cpp"
2 changes: 2 additions & 0 deletions src/libsync/updatee2eefolderusersmetadatajob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -365,3 +365,5 @@ const QByteArray UpdateE2eeFolderUsersMetadataJob::folderToken() const
}

}

#include "moc_updatee2eefolderusersmetadatajob.cpp"
2 changes: 2 additions & 0 deletions src/libsync/updatemigratede2eemetadatajob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,5 @@ void UpdateMigratedE2eeMetadataJob::addSubJobItem(const QString &key, const Sync
}

}

#include "moc_updatemigratede2eemetadatajob.cpp"
Loading