Commit Graph

725 Commits

Author SHA1 Message Date
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
Matthieu Gallien e4590d7a3b ensure that bulk upload network job errors are handled
in case we get a network error during bulk propagator POST network
request, report all files within this upload as files in error that will
then be sent using the plain old WebDAV protocol

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-02-11 09:44:20 +01:00
Matthieu Gallien d0c2570b04 simplify sync folder in some automated local discovery tests
should be faster and easier to understand

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-02-07 21:32:06 +00:00
Matthieu Gallien 8decd475e5 clean transition when files with spaces exist already
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-02-07 21:32:06 +00:00
Matthieu Gallien e89268bdd7 ensure we emit a rename command for renamed files
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-02-07 21:32:05 +00:00
alex-z ae44dd5978 Adjust icons for activity entries in main dialog. Refactor the dialog by splitting it to separate components.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2022-02-04 17:52:37 +02:00
Claudio Cambra ce5494b4ec Add testing for ActivityListModel
Signed-off-by: Claudio Cambra <claudio.cambra@gmail.com>
2022-02-01 13:57:08 +00:00
alex-z 225753a8c0 Refactor DeleteJob and DeleteApiJob to use SimpleFileJob.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2022-01-11 13:37:09 +00:00
alex-z 190d278fd4 Checksum validation PropagateDownload unit tests.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2022-01-11 13:37:09 +00:00
alex-z 5b0e2d8ed0 Checksum validator unit tests.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2022-01-11 13:37:09 +00:00
alex-z b7be10f712 Ask server to recalculate checksum on validatin failure.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2022-01-11 13:37:09 +00:00
Matthieu Gallien c88f57b42d check modified time sent by upload jobs in automated tests
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-01-11 08:46:11 +00:00
Matthieu Gallien 6ceb45bac4 test files that should be renamed in sub-directory
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-12-07 11:35:38 +01:00
Matthieu Gallien 18ef471332 let auto tests of batch upload return proper file paths
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-11-26 15:49:25 +01:00
Matthieu Gallien c194605c35 implement bulk upload
add PutMultiFileJob to send many files at once

use it in BulkPropagatorJob to implement bulk upload feature

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-11-24 16:17:47 +01:00
Matthieu Gallien 112be18635 read capabilities for bulk upload from server
use it in dedicated tests

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-11-24 16:17:47 +01:00
rakekniven 416d98716f Make argument singular to fix i18n issue
Reported at Transifex.
See https://www.transifex.com/nextcloud/nextcloud/translate/#hu_HU/client/309577611

Signed-off-by: rakekniven <2069590+rakekniven@users.noreply.github.com>
2021-11-05 10:00:17 +01:00
alex-z 2f3c58daac Fix review comments. Use QImage for QML and QPixmap for rest of code. Do not cache images for QML. Fix tests. Use signal in QML.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2021-11-04 20:50:51 +00:00
alex-z 0b8ab5c079 Use SvgRenderer for Unified Search input icons. Refactor IconUtils. Extend unit tests.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2021-11-04 20:50:51 +00:00
alex-z c52718c104 Replace deprecated QRegExp with QRegularExpression.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2021-11-02 08:54:06 +00:00
Camila 5decbd0b21
Expand ExcludedFiles tests.
Signed-off-by: Camila <hello@camila.codes>
2021-10-28 11:38:03 +02:00
Camila 5788f35e82
Skip sync exclude file from list of exclude files if it doesn't exist.
The file might not exist anymore because the user deleted it by hand or
the folder where it was located got unchecked in the selective sync
view. It is a fix for #2632.

Signed-off-by: Camila <hello@camila.codes>
2021-10-28 11:37:56 +02:00
Matthieu Gallien 87c583dcb6 schedule files upload after all other jobs have been completed
should allow smarter policy dedicated to optimizing files upload

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-10-26 14:26:28 +02:00
Matthieu Gallien c6344c05be add test to check the order of actions when uploading new files
should allow to check that uploads are delayed after directories are
created

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-10-26 12:45:15 +02:00
Matthieu Gallien 69d6f4acec our source code files have lower case names
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-10-25 15:38:21 +02:00
alex-z c1dab7e4cb Unified Search via Tray window
Signed-off-by: alex-z <blackslayer4@gmail.com>
2021-10-25 14:45:05 +03:00
Felix Weilbach df11424596 Trim trailing spaces before uploading files
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-10-14 11:22:59 +00:00
Guido Falsi 5667a6aad2 Fix BUILD_TESTING on non Linux unices
vfs_xattr is build only if LINUX is defined, but when building tests it is depended upon when UNIX is defined.

This patch requires it only when LINUX is defined.

Signed-off-by: Guido Falsi <mad@madpilot.net>
2021-10-12 16:32:24 +02:00
Matthieu Gallien 833237b2e4 use alias target for internal libraries
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-10-06 07:56:33 +00:00
Camila 1de38a13f3 Extend TestCapabilities with shareDefaultPermissions tests.
Signed-off-by: Camila <hello@camila.codes>
2021-09-27 08:53:45 +00:00
Felix Weilbach 8a8d488454 Add dialog to set user status
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-09-09 11:18:22 +02:00
Felix Weilbach 5622c33f40 Fix various deprecated warnings
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-09-08 08:54:00 +00:00
Felix Weilbach 45f59e7eca Use QDateTime::startOfDay()
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-09-08 08:54:00 +00:00
Felix Weilbach 0af83dd1b6 Use QRandomGenerator instead of qrand
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-09-08 08:54:00 +00:00
allexzander a3fc812539 Enable share to Talk and Email. Display correct icon. Added unit tests.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-09-06 13:27:39 +00:00
Matthieu Gallien d17d831205 switch from Q_DECL_OVERRIDE to plain override
our requirements guarantee availability of override keyword so we just
use it

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-08-31 08:35:57 +00:00
Matthieu Gallien 25669938fd let clang-tidy add missing override after enabling again the check
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-08-31 08:35:56 +00:00
Hannah von Reth acd83a2998 Ensure unit test are using absolute paths 2021-08-23 09:44:34 +02:00
Hannah von Reth 5a7fd3f316 testlockedfiles use long file path 2021-08-23 09:40:27 +02:00
Hannah von Reth 8ca5035c42 Add test for csync_vio_local_stat with long path 2021-08-23 09:40:27 +02:00