Skip to content
Merged
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
6 changes: 3 additions & 3 deletions src/gui/folder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ Folder::Folder(const FolderDefinition &definition,
});

// Potentially upgrade suffix vfs to windows vfs
ENFORCE(_vfs);
Q_ASSERT(_vfs);
if (_definition.virtualFilesMode == Vfs::WithSuffix
&& _definition.upgradeVfsMode) {
if (isVfsPluginAvailable(Vfs::WindowsCfApi)) {
Expand Down Expand Up @@ -513,8 +513,8 @@ void Folder::createGuiLog(const QString &filename, LogStatus status, int count,

void Folder::startVfs()
{
ENFORCE(_vfs);
ENFORCE(_vfs->mode() == _definition.virtualFilesMode);
Q_ASSERT(_vfs);
Q_ASSERT(_vfs->mode() == _definition.virtualFilesMode);

const auto result = Vfs::checkAvailability(path(), _vfs->mode());
if (!result) {
Expand Down
2 changes: 1 addition & 1 deletion src/libsync/abstractnetworkjob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ QString networkReplyErrorString(const QNetworkReply &reply)

void AbstractNetworkJob::retry()
{
ENFORCE(_reply);
Q_ASSERT(_reply);
auto req = _reply->request();
QUrl requestedUrl = req.url();
QByteArray verb = HttpLogger::requestVerb(*_reply);
Expand Down
2 changes: 1 addition & 1 deletion src/libsync/discovery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,7 @@ void ProcessDirectoryJob::processFileAnalyzeRemoteInfo(const SyncFileItemPtr &it
item->_size = sizeOnServer;

if (serverEntry.isDirectory) {
ENFORCE(dbEntry.isDirectory());
Q_ASSERT(dbEntry.isDirectory());
item->_instruction = CSYNC_INSTRUCTION_UPDATE_METADATA;
} else if (!localEntry.isValid() && _queryLocal != ParentNotChanged) {
// Deleted locally, changed on server
Expand Down
4 changes: 2 additions & 2 deletions src/libsync/discoveryphase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,10 +249,10 @@ void DiscoveryPhase::markPermanentDeletionRequests()

void DiscoveryPhase::startJob(ProcessDirectoryJob *job)
{
ENFORCE(!_currentRootJob);
Q_ASSERT(!_currentRootJob);
connect(this, &DiscoveryPhase::itemDiscovered, this, &DiscoveryPhase::slotItemDiscovered, Qt::UniqueConnection);
connect(job, &ProcessDirectoryJob::finished, this, [this, job] {
ENFORCE(_currentRootJob == sender());
Q_ASSERT(_currentRootJob == sender());
_currentRootJob = nullptr;
if (job->_dirItem)
emit itemDiscovered(job->_dirItem);
Expand Down
4 changes: 2 additions & 2 deletions src/libsync/owncloudpropagator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ void blacklistUpdate(SyncJournalDb *journal, SyncFileItem &item)
void PropagateItemJob::done(const SyncFileItem::Status statusArg, const QString &errorString, const ErrorCategory category)
{
// Duplicate calls to done() are a logic error
ENFORCE(_state != Finished);
Q_ASSERT(_state != Finished);
_state = Finished;

_item->_status = statusArg;
Expand Down Expand Up @@ -1294,7 +1294,7 @@ void PropagatorCompositeJob::slotSubJobFinished(SyncFileItem::Status status)
// Delete the job and remove it from our list of jobs.
subJob->deleteLater();
int i = _runningJobs.indexOf(subJob);
ENFORCE(i >= 0); // should only happen if this function is called more than once
Q_ASSERT(i >= 0); // should only happen if this function is called more than once
_runningJobs.remove(i);

// Any sub job error will cause the whole composite to fail. This is important
Expand Down