Synchronizer: Rework

Authored by abika on May 20 2018, 7:04 PM.


Group Reviewers

Synchronizer: Apply clang-format
Synchronizer: Apply style changes to GUI code
Synchronizer: Replace QStrings with QUrl for absolute URL paths
And add checks and documentation for sync with KGet instead of silently doing nothing.
Synchronizer: Create implementation file for SynchronizerFileItem
Synchronizer: Clean SynchronizerGUI file
Synchronizer: Use FileSystem-FileItem in SynchronizerFileItem
Instead of copying and passing every single field multiple times.
Search/FileSystem: Moved and rename Search/KRSearchMod to FileSystem/FileSearcher
Can be used by other components as well.
FileSystem: Extend and optimiz KRQuery
And apply code style fixes.
FileSystem: Extend FileSearcher to be used by other components
Use KRQuery as entity class - not as pointer.
And apply style fixes, as always.
Synchronizer: SynchronizerGUI - Move implementation from header and remove duplicate code
Synchronizer: Renamed exists* methods in SynchronizerFileItem
Synchronizer: Merge duplicate code
Synchronizer: Set more detailed error messages

Diff Detail

R167 Krusader
No Linters Available
No Unit Test Coverage
abika requested review of this revision.May 20 2018, 7:04 PM
abika created this revision.
abika added a comment.May 20 2018, 7:15 PM

Please see commit message. If not stated, the functionality/behaviour should not have changed.

asensi accepted this revision as: asensi.Jan 20 2020, 11:42 PM
asensi added a subscriber: asensi.

Well, as Martin couldn't answer in, time passes, modifications are made in the source code and therefore we are at danger of losing Alex's work (because e.g. nowadays the proposal no longer can be applied as it is), and the situation does not get better: I've tried what Alex proposed and it worked under Kubuntu 18.04 LTS and Kubuntu 19.10 (after adapting that code to the current Krusader codebase, I attach a file that contains the adaptation).

Note: When testing, dates weren't taken into account when comparing, therefore that change was also made:

diff --git a/krusader/Synchronizer/synchronizer.cpp b/krusader/Synchronizer/synchronizer.cpp
index 12d4804b..bac780f8 100644
--- a/krusader/Synchronizer/synchronizer.cpp
+++ b/krusader/Synchronizer/synchronizer.cpp
@@ -415,7 +415,7 @@ SynchronizerFileItem *Synchronizer::addDuplicateItem(FileItem *leftFile, FileIte

        if (leftFile->getSize() == rightFile->getSize()) {
-            if (leftFile->isSymLink() == rightFile->isSymLink() &&
+            if (leftFile->isSymLink() && rightFile->isSymLink() &&
                rightFile->getSymDest() == rightFile->getSymDest()) {
                task = TT_EQUALS;
This revision is now accepted and ready to land.Jan 20 2020, 11:42 PM