Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
990d87a
example cases for enhancing handling of previous "assert" conditions
modSpike Feb 25, 2025
a5efbe2
started collecting migration related code to a single function in Fol…
modSpike Mar 4, 2025
4b957cb
Merge branch 'master' into work/improveEfficiency
modSpike Mar 4, 2025
441252f
fix for failing unit tests. Hopefully fixes squish tests too.
modSpike Mar 5, 2025
6e2b383
Merge branch 'master' into work/improveEfficiency
modSpike Mar 5, 2025
76c1189
Merge branch 'master' into work/improveEfficiency
modSpike Mar 11, 2025
d77f830
many changes to give FolderDefinition a clear public interface with a…
modSpike Mar 11, 2025
d8ec4db
Merge branch 'work/improveEfficiency' of github.com:owncloud/client i…
modSpike Mar 11, 2025
cecdfb6
Merge branch 'master' into work/improveEfficiency
modSpike Mar 12, 2025
7ebda15
BAH! I didn't commit these = failing build :(
modSpike Mar 12, 2025
ce44a84
Merge branch 'work/improveEfficiency' of github.com:owncloud/client i…
modSpike Mar 12, 2025
549008f
first stab at consolidating all code paths to use addFolder
modSpike Mar 12, 2025
424f641
woops - missed this small but important change before last merge
modSpike Mar 14, 2025
946ceb6
Merge branch 'master' into work/improveEfficiency
modSpike Mar 19, 2025
8e4aac7
Merge branch 'master' into work/improveEfficiency
modSpike Mar 19, 2025
bd91285
Merge branch 'master' into work/improveEfficiency
modSpike Mar 20, 2025
1b18622
corrected "ok" param logic for SyncJournalDb::getSelectiveSyncList
modSpike Mar 21, 2025
ad7eb08
added many Refactoring todo's
modSpike Mar 31, 2025
abe673d
Merge branch 'master' into work/improveEfficiency
modSpike Mar 31, 2025
49ec940
Merge branch 'master' into work/improveEfficiency
modSpike Apr 1, 2025
c1cc581
fixed the saving on adding folders - finally!
modSpike Apr 1, 2025
f3c8eb2
saves are now updated - all folder persistence is managed by FolderMa…
modSpike Apr 2, 2025
9e030ef
Merge branch 'master' into work/improveEfficiency
modSpike Apr 2, 2025
a7d7e73
Merge branch 'master' into work/improveEfficiency
modSpike Apr 3, 2025
5899afc
this is as done as I can get it for now.
modSpike Apr 3, 2025
c4c7560
updated some comments + removed handling for legacy folder config gro…
modSpike Apr 3, 2025
215ce41
home stretch. Erik and I worked out the strategy for scheduling folde…
modSpike Apr 7, 2025
08dc47b
Merge branch 'master' into work/improveEfficiency
modSpike Apr 7, 2025
4b1555d
worked out the final open questions with Erik so this is "done" in te…
modSpike Apr 8, 2025
b43d4d5
found an error from last refactoring of FolderMan::setupFoldersFromCo…
modSpike Apr 8, 2025
f4f6f79
Merge branch 'master' into work/improveEfficiency
modSpike Apr 8, 2025
06e3c7d
Merge branch 'master' into work/improveEfficiency
modSpike Apr 9, 2025
3dd3a61
Merge branch 'master' into work/improveEfficiency
modSpike Apr 9, 2025
1dfc0f1
Merge branch 'master' into work/improveEfficiency
modSpike Apr 9, 2025
8dc7b23
Merge branch 'master' into work/improveEfficiency
modSpike Apr 9, 2025
0cfbf94
addressed Erik's requested review changes
modSpike Apr 9, 2025
1d788b4
Merge branch 'work/improveEfficiency' of github.com:owncloud/client i…
modSpike Apr 9, 2025
8197ebe
Merge branch 'master' into work/improveEfficiency
modSpike Apr 10, 2025
4f781dd
this should fix the current squish test failures - revisit once qa is…
modSpike Apr 10, 2025
427c26a
Merge branch 'work/improveEfficiency' of github.com:owncloud/client i…
modSpike Apr 10, 2025
df6a835
removed tests for obsolete/no longer supported folder migrations
modSpike Apr 10, 2025
f07801f
Merge branch 'master' into work/improveEfficiency
modSpike Apr 10, 2025
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: 5 additions & 1 deletion src/common/restartmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ RestartManager::RestartManager(std::function<int(int, char **)> &&main)
: _main(main)
{
Q_ASSERT(!_instance);
_instance = this;
if (!_instance)
_instance = this;
}

RestartManager::~RestartManager()
Expand All @@ -59,6 +60,9 @@ int RestartManager::exec(int argc, char **argv) const
void RestartManager::requestRestart()
{
Q_ASSERT(_instance);
if (!_instance)
return;

qCInfo(lcRestart) << "Restarting application with PID" << QCoreApplication::applicationPid();

QString pathToLaunch = QCoreApplication::applicationFilePath();
Expand Down
20 changes: 13 additions & 7 deletions src/gui/folder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -388,11 +388,9 @@ QUrl Folder::webDavUrl() const
QString Folder::remotePathTrailingSlash() const
{
const QString remote = remotePath();
if (remote == QLatin1Char('/')) {
return remote;
}
Q_ASSERT(!remote.endsWith(QLatin1Char('/')));
return remote + QLatin1Char('/');
if (!remote.endsWith((QLatin1Char('/'))))
return remote + QLatin1Char('/');
return remote;
}

QUrl Folder::remoteUrl() const
Expand Down Expand Up @@ -640,7 +638,8 @@ void Folder::slotWatchedPathsChanged(const QSet<QString> &paths, ChangeReason re
bool needSync = false;
for (const auto &path : paths) {
Q_ASSERT(FileSystem::isChildPathOf(path, this->path()));

if (!FileSystem::isChildPathOf(path, this->path()))
continue;
const QString relativePath = path.mid(this->path().size());
if (reason == ChangeReason::UnLock) {
journalDb()->wipeErrorBlacklistEntry(relativePath, SyncJournalErrorBlacklistRecord::Category::LocalSoftError);
Expand Down Expand Up @@ -924,6 +923,9 @@ void Folder::startSync()
Q_ASSERT(isReady());
Q_ASSERT(_folderWatcher);

if (!isReady() || !_folderWatcher)
return;

if (!OC_ENSURE(!isSyncRunning())) {
qCCritical(lcFolder) << "ERROR sync is still running and new sync requested.";
return;
Expand Down Expand Up @@ -984,6 +986,9 @@ void Folder::startSync()
void Folder::setDirtyNetworkLimits()
{
Q_ASSERT(isReady());
if (!isReady())
return;

ConfigFile cfg;
int downloadLimit = -75; // 75%
int useDownLimit = cfg.useDownloadLimit();
Expand Down Expand Up @@ -1332,7 +1337,6 @@ bool Folder::groupInSidebar() const
if (_accountState->account()->hasDefaultSyncRoot()) {
// QFileInfo is horrible and "/foo/" is treated different to "/foo"
const QString parentDir = QFileInfo(Utility::stripTrailingSlash(path())).dir().path();
Q_ASSERT(QFileInfo(parentDir) != QFileInfo(path()));
// If parentDir == home, we would add a the home dir to the side bar.
return QFileInfo(parentDir) != QFileInfo(QDir::homePath()) && FileSystem::isChildPathOf(parentDir, _accountState->account()->defaultSyncRoot());
}
Expand Down Expand Up @@ -1365,6 +1369,8 @@ QString FolderDefinition::spaceId() const
// we might call the function to check for the id
// anyhow one of the conditions needs to be true
Q_ASSERT(_webDavUrl.isValid() || !_spaceId.isEmpty());
if (!_webDavUrl.isValid() || _spaceId.isEmpty())
return QString();
return _spaceId;
}
} // namespace OCC
Loading