Commit graph

764 commits

Author SHA1 Message Date
Matthieu Gallien
783cefe3f1 new autotest to ensure that we delete folders despite blacklist errors
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-11-07 18:33:13 +01:00
Claudio Cambra
63354f8432
Add testing for SortedShareModel
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2022-10-31 18:06:13 +01:00
Claudio Cambra
7ba6969e65
Moved all server mocking code for share model test to independent ShareTestUtils file
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2022-10-31 18:06:10 +01:00
Claudio Cambra
a0ff46a7fb
Add testing for ShareeModel
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2022-10-31 18:06:09 +01:00
Claudio Cambra
e021f25634
Add a suite of tests for ShareModel
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>

Test ShareModel error handling

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>

Improve testing of user/group shares in ShareModel

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>

Add testing for maximum share expire date enforcement in ShareModel

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2022-10-31 18:06:09 +01:00
Camila
f8b3ad8852 Update tests.
Signed-off-by: Camila <hello@camila.codes>
2022-10-17 11:29:23 +00:00
Matthieu Gallien
a378c4d80a add extra tests for lock files to better capture desired behavior
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-10-11 16:01:58 +02:00
Matthieu Gallien
d371855e56 test that files soon to be expired will be synced automatically
try to ensure that we properly sync again files for which lock has
expired

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-10-11 16:01:58 +02:00
allexzander
289a641d74 VFS Windows: Display the sharing state and lock state in the 'Status' column of Windows Explorer
Signed-off-by: allexzander <blackslayer4@gmail.com>
2022-10-04 18:32:51 +02:00
Claudio Cambra
ff5261eaf1 Check local file locked and unlocked correctly in testlocaldiscovery
Signed-off-by: Claudio Cambra <claudio.cambra@gmail.com>
2022-10-04 11:52:23 +02:00
Matthieu Gallien
565a5f0999 add [[nodiscard]] attribute via clang-tidy
ran
run-clang-tidy-14.py -header-filter='.*' -checks='-*,modernize-use-nodiscard' -fix
under linux with most part of our code covered

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-10-04 11:14:45 +02:00
Matthieu Gallien
5fc017575b fix [[nodiscard]] single warning
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-10-04 11:14:45 +02:00
Matthieu Gallien
9b7d1add52 apply modernize-use-using via clang-tidy
ran
run-clang-tidy-14.py -header-filter='.*' -checks='-*,modernize-use-using' -fix

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-10-04 01:32:46 +02:00
Camila
1ccc170f91
Update tests to follow 'Reply' change of primary action.
Signed-off-by: Camila <hello@camila.codes>
2022-09-29 17:15:50 +02:00
Camila
7633cc490d
Fix 'Reply' action primary property.
Primary is set to true when object type is 'room' or 'chat' and it set to
false when object type is 'call'.

Signed-off-by: Camila <hello@camila.codes>
2022-09-29 15:20:56 +02:00
Claudio Cambra
e721b03106 Remove sorting code in activitylistmodel as not needed with sortedactivitylistmodel
Signed-off-by: Claudio Cambra <claudio.cambra@gmail.com>
2022-09-26 18:18:34 +02:00
allexzander
ffb7fcad7d Fix deprecation warnings.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2022-09-17 09:47:15 +02:00
allexzander
5175d186a4 Do not ignore return values for SyncJournalDB in unit tests.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2022-09-17 09:47:15 +02:00
Claudio Cambra
1a5fa50fbb Refactor ActivityListModel population mechanisms
Signed-off-by: Claudio Cambra <claudio.cambra@gmail.com>
2022-09-13 19:34:41 +02:00
alex-z
2a529eef3c Make sure Folder is deleted from the list and the SyncJournalDB is closed for every folder of the account that has been removed.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2022-09-10 10:34:34 +02:00
alex-z
f0b9ecd747 Check folder invalidity reson when deciding to enable or disable the 'Finish' button in a Wizard page.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2022-09-10 10:34:34 +02:00
Matthieu Gallien
2cb88952fb fix build of windows virtual files automated tests
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-09-05 12:30:49 +02:00
Claudio Cambra
d86f25d215 Make UserStatusSelector a dismissible page pushed onto the tray window
Signed-off-by: Claudio Cambra <claudio.cambra@gmail.com>
2022-08-10 09:22:33 +00:00
Matthieu Gallien
8551a14c48 ensure SyncEngine use an initialized instance of SyncOptions
will prevent nextcloudcmd command line client from ignoring the settings
handled by SyncOptions

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-08-08 12:36:37 +03:00
alex-z
001deace2d Implement COM Dll for CfApi shell extensins. Implement Thumbnail Provider.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2022-07-29 19:26:53 +03:00
Claudio Cambra
cf372b43ac Properly adapt the userstatusselectormodel, eliminate hacks, make code more declarative
Signed-off-by: Claudio Cambra <claudio.cambra@gmail.com>
2022-07-12 21:10:26 +02:00
Claudio Cambra
b7c2e16aa9 Make client language gender-neutral and more clear
Signed-off-by: Claudio Cambra <claudio.cambra@gmail.com>
2022-06-24 14:36:36 +02:00
alex-z
300446579c Fail build when Windows tests fail. Use GH Actions to build and run Windows tests. Create coverage and uppload it to codecov.io.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2022-06-10 15:18:54 +03:00
Matthieu Gallien
5f6277b3ee if an exclude file is deleted, skip it and remove it from internal list
ignore files can be removed: not an error so adjust tests

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-05-16 21:00:52 +02:00
alex-z
53654b2a50 Allow manual renaming of files and folders with spaces. Allow uploading invalid file name via the InvalidFileName dialog.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2022-05-16 18:07:26 +03:00
Claudio Cambra
b6def51945 Fix notifications not being shown when they should be
Signed-off-by: Claudio Cambra <claudio.cambra@gmail.com>
2022-05-16 14:28:33 +02:00
Camila
e4a0d57bc8
Do not replace strings in action links coming from the notification api.
Signed-off-by: Camila <hello@camila.codes>
2022-05-12 12:47:48 +02:00
Matthieu Gallien
b55a099b61 allow lock/unlock of files from files explorer integration
add new commands to the contextual menu provided by our files explorer
plugins to allow locking/unlocking a file

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-05-02 13:52:05 +02:00
Matthieu Gallien
2ea68d75bd add automated tests for LockFileJob to validate proper behavior
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-05-02 13:52:05 +02:00
Matthieu Gallien
dc95f29165 fetch and store in sync database information abot lock state of files
fetch lock properties from server

decode them and store them in sync database

test to ensure we do properly handle those properties

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-05-02 13:52:05 +02:00
Matthieu Gallien
860d7dd9de detect capabilities for lock/unlock of files
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-05-02 13:52:05 +02:00
Camila
56825825b5
Update ActivityListModel tests.
Signed-off-by: Camila <hello@camila.codes>
2022-04-06 10:38:01 +02:00
Matthieu Gallien
908066072a avoid deleting renamed file with spaces in name
ensure that normal sync engine will nto delete new file renamed due to
trailing/leading spaces in name

rename before upload in the same job to avoid having invalid state in
local desktop client database to ensure any subsequent run of the sync
engine will not make wrong decisions

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-04-06 07:32:02 +00:00
Claudio Cambra
3d086ae305 Fix dark mode stuff relating to unified search, fix macOS auto dark/light theme switching not always working, fix Windows detection of dark/light theme switching
Signed-off-by: Claudio Cambra <claudio.cambra@gmail.com>
2022-03-28 09:21:35 +00:00
Matthieu Gallien
dc0026704e ensure discovery phase will not try to upload files with invalid mtime
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-03-17 23:28:02 +00:00
Matthieu Gallien
b5a10d7829 add new tests dedicated for recovery scenario of wrong mtime on server
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-03-17 23:28:02 +00:00
Matthieu Gallien
d4081c99a7 prevent updating files when that would result in invalid mtime
ensure that we never try to sync a file with a sync that would result in
setting it up to an invalid mtime

test a recovery scenario with plain old sync folder and virtual files

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-03-17 23:28:02 +00:00
Matthieu Gallien
541447723a remove all usage of QDateTime::toTime_t() to avoid overflow
QDateTime::toTime_t() can overflow if called with a date outside its
domain of working

this method is obsolete and QDateTime::toSecsSinceEpoch() is the
replacement

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-03-17 23:28:02 +00:00
Camila
73bae8cd30
Add TalkReply class and tests.
- Add struct TalkNotificationData to handle token and messageId.
- Handle chat and call notifications with the new struct.
- Add talk token and messageId to data roles in ActivityListModel.
- Add Talk Reply component to the ActivityList.
- User Loader to display the TalkReply component.
- Move Talk Reply from ActivityItem to ActivityItemContent due to PR #4186.
- Use TextField instead of Text.
- Disable send reply button instead of changing border color when field is empty.

Signed-off-by: Camila <hello@camila.codes>
2022-03-17 17:50:33 +01:00
Claudio Cambra
65f2bada3e Add thumbnails for files in the activity view
Signed-off-by: Claudio Cambra <claudio.cambra@gmail.com>
2022-03-17 10:46:09 +00:00
Claudio Cambra
02f3a1aed6 File activity dialog now works for all file actions activities (e.g. deleted files)
Signed-off-by: Claudio Cambra <claudio.cambra@gmail.com>
2022-03-16 08:38:14 +01:00
alex-z
01eb050cd8 Do not remove files from a Group folder and its nested folders whe it is renamed or removed while not allowed.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2022-03-09 10:54:39 +02:00
alex-z
37168fce9f Fix review comments.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2022-02-25 15:31:26 +00:00
alex-z
1a300d0d56 Unit tests for new files restore logic when the parent folder is removed on the server.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2022-02-25 15:31:26 +00:00
alex-z
3443de4388 Rollback local move when server move has failed.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2022-02-23 16:53:26 +02:00