1
0
Fork 0
Commit Graph

3052 Commits

Author SHA1 Message Date
Christian Kamm c3b1a872aa
FolderMan: Remove assumption of unique running sync 2020-12-15 10:58:21 +01:00
Olivier Goffart a6614c18f1
IgnoreListEditor: increase a bit the size
Should Help for issue #6641
2020-12-15 10:58:21 +01:00
Christian Kamm 6b0bb66b17
LockWatcher: Add chrono header 2020-12-15 10:58:20 +01:00
Christian Kamm 0d49056a13
Add Ctrl-L as log window shortcut
F12 is taken on OSX and there's no other way of showing it.
2020-12-15 10:58:17 +01:00
Christian Kamm 9d55590d10
Test: Add test for locked file tracking and propagation 2020-12-15 10:58:17 +01:00
Christian Kamm da178c1352
Folder: Treat file unlock similar to external change #6822
For consistent handling of incoming notifications.
2020-12-15 10:58:17 +01:00
Olivier Goffart 60b17cd128
Folder: update the folder version
Since the new index would crash old version of the client, we need to
upgrade folder version so they do not load in the client 2.5.0
2020-12-15 10:58:15 +01:00
Christian Kamm 7de453d439
Settings: Make FoldersWithPlaceholders group sticky
If virtual files are disabled on a folder it might still have db entries
or local virtual files that would confuse older client versions.
2020-12-15 10:58:15 +01:00
Olivier Goffart ec8c02dad0
Sharing: add the `shareWithAdditionalInfo` string in autocompletion results
Issue #6749
2020-12-15 10:58:15 +01:00
Olivier Goffart 380d7b8028
Migration from 2.4: fallback to move file by file if directory move failled (#6807)
Migration from 2.4: fallback to move file by file if directory move failed

This can happen if the directory already exist because, say, it was
created by the ownCloud outlook plugin which save its file in the same directory
2020-12-15 10:58:15 +01:00
Olivier Goffart dcfbde2a67
Wizard: Reset the QSslConfiguration before checking the server
Because a previous call with another demain might have set some
config for another server.

Issue #6832
2020-12-15 10:58:14 +01:00
Dominik Schmidt 5d9370594d
Disable autostartCheckBox if autostart is configured system wide 2020-12-15 10:58:14 +01:00
Olivier Goffart 8490664860
Account Settings: fix progress being written in white when there are errors 2020-12-15 10:58:12 +01:00
Christian Kamm dd34cbc751
Virtual files: Wipe selective sync settings when enabled 2020-12-15 10:58:12 +01:00
Christian Kamm 60de1c9720
virtual files: show option only when branding allows it 2020-12-15 10:58:12 +01:00
Christian Kamm 251e01a440
Virtual files: Use theme to check for option availability 2020-12-15 10:58:12 +01:00
Olivier Goffart 94e63ef7b9
Account Settings: Add a context menu entry to enable or disable virtual files
Issue #6725
2020-12-15 10:58:12 +01:00
Olivier Goffart 15eab07866
OAuth2: Store 'Account::davUser' in the config, and use that user for connecting
We need to use the user id to check if we are connected to the right account.
These might be different from the HTTP Basic Auth login. (LDAP setups)

When the account was configured as an oauth2 account form the wisard, the
http_user was already set correctly to the user id. But when the server is
upgrading from basic auth to oauth2, we need to pick the right login.

Note that Account::davUser() already defaults to the HTTP user when none
is set, so this means the upgrade will be fine if this is not set in the
config.

Issues:
https://github.com/owncloud/oauth2/issues/109
https://github.com/owncloud/enterprise/issues/2781
2020-12-15 10:58:11 +01:00
Olivier Goffart b86e1efc9a
Remove the backup deteciton code which was used for server < 9.1 2020-12-15 10:58:10 +01:00
Olivier Goffart afed46afcc
New discovery algorithm: Parallel PROPFIND 2020-12-15 10:58:08 +01:00
Olivier Goffart 3289675b8d
Folder Wizard: Disable the 'choose what to sync' treeview if virtual files are selected
Don't allow to configure virtual files with a selective sync blacklist
2020-12-15 10:58:07 +01:00
Olivier Goffart d8fa8e270f
AccountSetting: Fix Small Memoy leak 2020-12-15 10:58:06 +01:00
Olivier Goffart 0ba9dc7dd1
AccountSettings: Force sync should wipe the blacklist
Issue #6757
2020-12-15 10:58:06 +01:00
Olivier Goffart 75a57778d9
Virtual files: Don't show selective sync
Issue #6724
2020-12-15 10:58:06 +01:00
Olivier Goffart 46aa8fd1f8
Socket API: add an option to replace existing files with virtual files
Issue #6726
2020-12-15 10:58:06 +01:00
Olivier Goffart afc953b649
Update the minimum supported version
We want to warn if the server version is not supported and did not get
appropriate QA for this client version.

https://github.com/owncloud/enterprise/issues/2687
2020-12-15 10:58:05 +01:00
Olivier Goffart 358aadfb98
Account Settings: Add a text for folder using vierual files
Issue #6723
2020-12-15 10:58:04 +01:00
Olivier Goffart a17a2a9c06
Virtual Files Mime Type: use "vnd." prefix instead of "x-"
As reported in https://github.com/owncloud/client/issues/6717#issuecomment-413703567
2020-12-15 10:58:03 +01:00
Olivier Goffart 4837bc8d60
FolderStatusModel: Do not abort applying selective sync if one folder has an error
Issue #6675
2020-12-15 10:58:03 +01:00
Olivier Goffart ca32eb1cf7
More cleanup of csync remains 2020-12-15 10:58:01 +01:00
Dominik Schmidt aad928a6be
Install libocsync to lib/ without subfolder.
Installing to lib/${APPLICATION_EXECUTABLE} has caused a bunch of
irritations in the past and subtle annoying to fix bugs. To avoid name
clashes with branded clients ${APPLICATION_EXECUTABLE} becomes now
part of the filename instead of the subfolder.

The concrete motivation to change this now is that on Windows there
is no RPATH and it's not possible to run owncloud directly from the
Craft Root folder, which is nice when you're developing on Windows.

It would have been possible to change this just for Windows but as
written earlier this has caused lots of issues and thus I think it's
a good idea to just stay consistent accross platforms when touching it.
2020-12-15 10:57:56 +01:00
Olivier Goffart 0155a4fa73
Wizard + OAuth: Make opening a new browser after clicking back works again
Issue #6574

When there is an error in the advanced page, OwncloudAdvancedSetupPage::updateStatus
(and others) call completeChanged(), which is connected to
QWizardPrivate::_q_updateButtonStates which will re-enable the back button from the
last page.

When the user click "back" and re-open the browser, the account's credentials
already have a oauth token set. So the call to the API to get a new token fails
because we use the previous token instead of using the client's secret_id.
Fix this with the HttpCredentials::DontAddCredentialsAttribute.

Now, this is still not working because the session cookies are confusing the
server.  So we'll clear the cookies when re-opening the browser
2020-12-15 10:57:55 +01:00
Olivier Goffart 0d21936e95
FolderStatusModel: Fix crash when there is an error while expanding folders
In FolderStatusModel::slotLscolFinishedWithError, the call to parentInfo->resetSubs
deleted the 'job' and the reply 'r' which we accessed later to get the error code.

Fix this problem twice by
 1) Get the error code before caling resetSubs
 2) in FolderStatusModel::SubFolderInfo::resetSubs, call deleteLater instead of delete

Regression introduced in commit d69936e0

Issue #6562
2020-12-15 10:57:55 +01:00
Olivier Goffart 4ee244190b
Virtual Files: Allow to download a folder recursively from the socket API
Issue: #6466
2020-12-15 10:57:54 +01:00
Olivier Goffart 530614bf78
Rename SocketApi::FileData::accountRelativePath to serverRelativePath
As discussed in issue #6552
2020-12-15 10:57:54 +01:00
Olivier Goffart ced5dfb8ee
Share dialog: use the original name and not the virtual file name
When sharing a virtual file, we should actually use the original file name
not the virtual file name

Issue: #6461
2020-12-15 10:57:54 +01:00
Christian Kamm 97f7b5abeb
Settings migration: Preserve future settings where possible
See discussion in #6506
2020-12-15 10:57:54 +01:00
Christian Kamm 87ba4e6b9c
Config: Add version flags to accounts and folders
Also, if there is too-new configuration, backup the file, show a
warning message asking the user whether it's ok to discard the
configuration from the future.

See #6504
2020-12-15 10:57:53 +01:00
Christian Kamm aa6f5f59c4
Rename Placeholders to Virtual Files in code #6531 2020-12-15 10:57:53 +01:00
Olivier Goffart a877a9d472
SyncRunFileLog: Add the requestid
https://github.com/owncloud/client/pull/6427#issuecomment-383879509
2020-12-15 10:57:53 +01:00
Christian Kamm 7da4bb4c20
Wizard: Add a "(recommended)" to the main option #6470 2020-12-15 10:57:53 +01:00
Christian Kamm ddeeecd061
Rename "placeholder" feature 2020-12-15 10:57:53 +01:00
Christian Kamm 4e3f2f755a
Placeholder: Stop adding ignore pattern
Because we can't make older clients preserve the version directive that
was attached to it.

See #6504 and #6498
2020-12-15 10:57:52 +01:00
Christian Kamm 27b65cbc69
Placeholders: Save to key that's invisible to <2.5 clients #6504 2020-12-15 10:57:52 +01:00
Olivier Goffart 3272f3b72b
FolderWizard: fix crash when experimental feature are disabled
The _placeholderCheckBox only exists if the experimental features are enabled

Found via the crash reporter
https://sentry.io/owncloud/desktop-win-and-mac/issues/556407777/
2020-12-15 10:57:52 +01:00
Markus Goetz 215afba89e
Share Dialog: Disable workaround for macOS too #6185 2020-12-15 10:57:52 +01:00
Markus Goetz 8dcfd50a7d
Placeholders: Support for macOS #6290 2020-12-15 10:57:51 +01:00
Christian Kamm 765c12dae1
LocalDiscoveryTracker: Separate from Folder and move to libsync
To allow relevant code to be closer together and for testing in
unittests without having to get a gui Folder.

See #6120
2020-12-15 10:57:51 +01:00
Christian Kamm 27c8bce0b9
Wizards: Show placeholder option only if showExperimentalOptions is set
This config file option will also control other features in the future.
2020-12-15 10:57:50 +01:00
Christian Kamm aee8b9f3c5
Wizards: Add placeholder option and warning to account wizard
Also add the warning dialog to the option in the folder wizard.
2020-12-15 10:57:50 +01:00
Christian Kamm 7dc65b060d
NSIS: Register placeholder extension
Also change the placeholder suffix config option to not include the dot,
the dotless form is needed in the nsis script.
2020-12-15 10:57:50 +01:00
Christian Kamm 12d6f680f2
Placeholders: Ignore placeholder files in older clients
To do this, we add the placeholder extension to the user exclude file
automatically. However, newer clients shouldn't use that exclude
pattern: so we also add version directives that allow making exclude
patterns dependent on the client version.
2020-12-15 10:57:49 +01:00
Christian Kamm d6078f958b
Placeholders: Download from shell integration 2020-12-15 10:57:49 +01:00
Olivier Goffart 91f53521ae
Placeholder: The extension is now a branding option 2020-12-15 10:57:49 +01:00
Olivier Goffart a2bdd5b9a5
Placeholders: Fixup clicking on placeholder after previous change
Now that the name in the db is the name of the placeholder file,
we need to adjust the call to downloadPlaceholder
2020-12-15 10:57:49 +01:00
Christian Kamm b1de184bc8
Placeholders: Safe migration to older client versions
Now the db entries for placeholders will have the full placeholder
paths. That way older clients will, on remote discovery, delete the
placeholders and download the real files.
2020-12-15 10:57:48 +01:00
Olivier Goffart d233e5f8d7
Placeholders: install mimetype on linux 2020-12-15 10:57:48 +01:00
Olivier Goffart 7eeb99ba24
Placeholders: Add an checkbox in the FolderWizard to enable the placeholder feature 2020-12-15 10:57:48 +01:00
Olivier Goffart 1049fb74d9
Placeholders: Move the placeholder option from the account to the folder 2020-12-15 10:57:48 +01:00
Olivier Goffart 6ce7c7a56b
PlaceHolders: Trigger a download of the placeholder and open it 2020-12-15 10:57:48 +01:00
Kevin Ottens 8c4bd2bb52 Ensure a sync happens after a conflict resolution
You'd expect that after a conflict resolution the file watcher would
pick up the change and trigger a sync. For some reason it doesn't seem
to happen on at least some Ubuntu systems. In such cases the user would
then still have a stale conflict entry in the activity list and wouldn't
be able to do anything with it.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-15 09:40:57 +00:00
Kevin Ottens d640076454 UserModel: check indices are inside the user list
The model was just checking for the user list being empty or not which
is overly optimistic. Indeed there might be cases where the id is
actually outside the boundaries so properly check for this.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-15 08:43:32 +00:00
Kevin Ottens 5ed397a430
Have the new account wizard open again
UserModel can't be connected to AccountSettings if the settings dialog
doesn't exist. This is the case now since we delay the creation of that
dialog and free it after use.

Instead it should be properly channeled through the Systray object all
the way up to OwncloudGui which knows how to handle this properly.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-14 15:58:52 +01:00
Camila b4dc682690
Handle the warning message when unchecking folders for syncing.
Split widgets and slot to handle the refreshing of the view:
- refreshSelectiveSyncStatus is connected to signal dirtyChanged
and will handle big folder warning.
- slotSelectiveSyncChanged  which is connected to dataChanged signal
and will handle the selective sync warning. It fixes #1029 because
it looks for the checkbox state before showing the warning.

Signed-off-by: Camila <hello@camila.codes>
2020-12-14 12:36:51 +01:00
Camila cfbd22b5e7
Use the icon color property to color the icons in the tray window header.
The icon color is set with APPLICATION_WIZARD_HEADER_TITLE_COLOR in the
theme.

Signed-off-by: Camila <hello@camila.codes>
2020-12-10 17:43:45 +01:00
allexzander 9266ecc2e8 Fixed slow sharee search in the share dialog
Signed-off-by: allexzander <blackslayer4@gmail.com>
2020-12-08 13:48:43 +00:00
allexzander 6e8658dc2c Added sharing via email.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2020-12-08 11:08:45 +02:00
Camila 5517ff2c02
Add debug log to check which folders are being skipped during syncing.
Signed-off-by: Camila <hello@camila.codes>
2020-12-03 12:24:25 +01:00
allexzander f04281cb69 Implemented notification action buttons and context menu for confirm/dismiss and other actions.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2020-12-02 08:08:37 +00:00
Brian Kendall f9991e180c Fix macOS bug where tray window causes spaces to switch
Signed-off-by: Brian Kendall <brian@briankendall.net>
2020-12-02 06:54:16 +00:00
Dominik Schmidt a50c665051
Simplify Sparkle handling in CMake 2020-11-25 09:43:59 +01:00
Chih-Hsuan Yen 6962cbf582
Fix build without Sparkle.framework
(PR #6567)
2020-11-25 09:40:20 +01:00
Christian Kamm 60d3696ccd
Settings: Add warning when switching update channel 2020-11-25 09:39:16 +01:00
Kevin Ottens 4906353f2e Please the clang-tidy overlord
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-11-24 18:22:33 +00:00
Hannah von Reth 038644f378 Don't scare users with critical parser log messages 2020-11-24 18:22:33 +00:00
Hannah von Reth d30cd0f0fd Include architecture in updater query
Fixes: #8074
2020-11-24 18:22:33 +00:00
Hannah von Reth c76095859a Cleanup stirngs 2020-11-24 18:22:33 +00:00
Olivier Goffart a7f010c370 Updater: Fix crash when there is an XML error
The problem was accessing the lines with an off by one error, while printing
the log.

Other problem included the fact that QDebug added spaces, quotes, and other
things which made the error lot look right in the console.

Issue #7545
2020-11-24 18:22:33 +00:00
Olivier Goffart 1bf895cadc Updater: Fix Version numer not shown in the user visible string
There was one argument too many in the string.
Bug was introduced in commit 21ac396b

Issue: #7288
2020-11-24 18:22:33 +00:00
Christian Kamm c58f00abc7 Updater: Improved logging output #7388 2020-11-24 18:22:33 +00:00
Hannah von Reth 1df3f5b6df NSISUpdater: Improve logging for version comparison 2020-11-24 18:22:33 +00:00
Hannah von Reth 1aca005267 Updater: Log parsing issues in autoupdatLog parsing issues in autoupdatee 2020-11-24 18:22:33 +00:00
Markus Goetz 9a375211d7 Autoupdater: Log the URL #3475 2020-11-24 18:22:33 +00:00
Christian Kamm d2991210c5 Updater: Preserve target version string
For #7217
2020-11-24 18:22:33 +00:00
Christian Kamm aa7409f401 Updater: Make "Update manually" not also "skip this version"
See #7217
2020-11-24 18:22:33 +00:00
Christian Kamm 0b3512f49c WinUpdater: More useful options on update failure #7217
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-11-24 18:22:33 +00:00
Olivier Goffart 9596eb7f20 Updater: show the human readable version in the settings
The xml looks like this:

   <version>2.5.0.328</version>
   <versionstring>ownCloud Client 2.5.0 alpha1 (build 238)</versionstring>

And we should show the version string

Issue #6602
2020-11-24 18:22:33 +00:00
Olivier Goffart f2c3ef741b Updater: remove unused function 2020-11-24 18:22:33 +00:00
Dominik Schmidt ae38b88d1c Remove unused installers before copying new ones into the appdata dir 2020-11-24 18:22:33 +00:00
Olivier Goffart e93972824d MSI: Fix crash in the auto updater
'auto' here is a QStringBuilder referencing a temporary

Ammend commit 150d4f5935
(MSI: Always with logfile #6609)

Found in the crash reporter:
https://sentry.io/owncloud/desktop-win-and-mac/issues/623245771/
2020-11-24 18:22:33 +00:00
Markus Goetz 5e518419de MSI: Always with logfile #6609 2020-11-24 18:22:33 +00:00
Dominik Schmidt d069fda9ab Extract filename of updateFile without leading slash 2020-11-24 18:22:33 +00:00
Dominik Schmidt dfac8c0e59 Escape msi and owncloud.exe path (who knows...) 2020-11-24 18:22:33 +00:00
Dominik Schmidt ed0dc68db2 Run msi properly and restart client after update 2020-11-24 18:22:33 +00:00
Dominik Schmidt 08b5981fb6 Implement basic .msi support in updater 2020-11-24 18:22:33 +00:00
Markus Goetz 412e43b696 Updater: Comments 2020-11-24 18:22:33 +00:00
Christian Kamm 4b39731c27 Updater: Make sparkle updater respect release channel 2020-11-24 18:22:33 +00:00
Markus Goetz 311e3a3bd8 Auto Updater: Show UI element also on macOS
(cherry picked from commit dfdc2e1e87f99d387a042f4983c999fbb7fcf3d9)
2020-11-24 18:22:33 +00:00
Christian Kamm a8ad946758 Settings: Add update channel combobox #6259 2020-11-24 18:22:33 +00:00
Markus Goetz 65035d1990 Sparkle: Delegate calls work now with 1.18.1 (maybe even before)
We can extend on this to give UI feedback.
2020-11-24 18:22:33 +00:00
Christian Kamm 08014b6dc3 FolderWatcher: Disable test on OSX #7305 2020-11-24 16:56:49 +00:00
Olivier Goffart 5a432a193f FolderWatcher: Usage of QTime for elapsed time is deprecated 2020-11-24 16:56:49 +00:00
Christian Kamm 28e4fc54a1 FolderWatcher: Wait for ready before testing #7305 2020-11-24 16:56:49 +00:00
Christian Kamm e97fc430bf FolderWatcher: Become unreliable if test notification fails #7241
Necessary for some filesystems on windows that don't have full file
watching capabilities.
2020-11-24 16:56:49 +00:00
Christian Kamm 74382ddcc0 FolderWatcher linux: Make automatically recursive #7068
Previously it depended on addFolder() / removeFolder() calls to adjust
watchers when new folders were added or removed. There also needed to be
complex move handling.

Now, any folder creation/move-in notifications automatically trigger
watcher additions and folder deletion/move-out triggers removal.
2020-11-24 16:56:49 +00:00
Christian Kamm 21b931dc6b FolderWatcher: Always notify about conflict files #7073
This makes sure that the conflict list can be updated if a user resolves
a conflict by deleting the local conflict file. Previously one had to
wait for the next sync run.
2020-11-24 16:56:49 +00:00
Christian Kamm 351bada552 Folderwatcher: On linux, fix paths after dir renames #6808
If a folder was renamed A -> B, the folder watcher for the inode
would be unaware and still report changes for A/foo. Now directory
renames in the watched folders are tracked and paths are updated
accordingly.
2020-11-24 16:56:49 +00:00
Kevin Ottens 922b322337 Enable the QML debugger on debug builds
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-11-23 17:39:50 +00:00
allexzander 665a8c4217 Use dynamic path for account online/offline state icon. Refresh GUI on connection state change.
Signed-off-by: Alex Zolotov <alex.zolotov.nextcloud.com>
Signed-off-by: allexzander <blackslayer4@gmail.com>
2020-11-23 17:49:25 +02:00
Kevin Ottens 4f7876f520 Migrate journal dbs files back to the sync folder
In case of past collisions during the 3.0 times... well one will resync
from scratch unfortunately. But if that happened there are likely other
problems which occurred.

Also this might fix some of the bugs with people loosing settings from
the database. Indeed the -wal and -shm concatenations were wrong. Using
append was in fact changing the folderDefinition member which (I guess)
would potentially lead to funny ".db-wal-shm-wal-shm" names.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-11-10 17:46:43 +00:00
Kevin Ottens 0b731eb516 Revert "moved default db sync file to Qt standard path AppDataLocation"
This reverts commit fc6b895f52.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-11-10 17:46:43 +00:00
Kevin Ottens 6c463442ef Bring back the pause/resume action in the systray menu
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-11-10 17:29:51 +00:00
Kevin Ottens 1288ee0437 Move pause/unpause helpers to Systray
We had signals just to call those backs in ownCloudGui, they were
otherwise unused. So let's move them inside of Systray since it's
specific to it anyway.

Also fix the dangerous call to sender(). We can call this function
without going through a signal/slot connection and also it's never
connected to an AccountState.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-11-10 17:29:51 +00:00
Kevin Ottens 95487d8bfc Make sure the settings dialog exist before hiding it
Because of PR #2580 the settings dialog doesn't always exist. We need to
check for it first before placing calls to it.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-11-10 16:57:56 +00:00
Kevin Ottens 86d240f7b4
Fetch apps when we get connected only
This was right now on the check connectivity beat which is too much when
you got many users. Be more conservative there and only update the list
of apps when the account gets connected.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-11-05 13:37:25 +01:00
Kevin Ottens 3427dadaeb
Get rid of FindQt5Keychain.cmake
QtKeychain provides Qt5KeychainConfig.cmake and friends nowadays, so no
need to have a less reliable and outdated find module on our end.

Also this shows that we were including keychain.h in the wrong way and
were not using the link target, so both got fixed as well.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-11-02 13:19:48 +01:00
Sergey Zolotarev 18c1bc0bd6 Misc fixes for Windows 7
Signed-off-by: Sergey Zolotarev <sryze@protonmail.com>
2020-10-28 06:24:53 +00:00
Kevin Ottens 3e6b257ccd Remove last left over of the "remote" wording
I switched from "remote" to "server" but apparently left one behind by
mistake...

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-10-26 14:45:46 +00:00
Valdnet 204cced445 l10n: Change the ellipsis 2020-10-26 13:22:55 +00:00
Valdnet f116c39b0a l10n: Add a space in generalsettings.ui 2020-10-26 13:22:55 +00:00
Kevin Ottens 8fad88055e Also output the event flags in the debug logs
When we skip a watcher event on mac, we log the file path but not the
event flags which came with it. Let's add it, it should help figure out
what's going on with #2578.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-10-26 12:37:00 +00:00
rakekniven 62fa8028a6 Triple dot to ellipsis
Reported at Transifex.

Signed-off-by: rakekniven <mark.ziegler@rakekniven.de>
2020-10-26 12:22:23 +00:00
Kevin Ottens 24964e2b9b Ensure we quickly show/hide the systray window on startup
This is quick enough that no flickering should appear in practice.

We end up doing this because for some reason on Windows (I dug up deep
into the Windows QPA without nailing it down) not showing that systray
window at least once prevents the app object to return from exec() when
the session ends.

It's as if that window would be in some limbo state (neither opened nor
closed) which would prevent quitting. Clearly what we're doing here is a
workaround...

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-10-22 17:31:05 +00:00
Kevin Ottens b835092ae9
Use the ConflictDialog directly from the activity list
No need to go to the file manager first to then have the user go through
the context menu, just popup the dialog directly.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-10-22 16:40:47 +02:00
Kevin Ottens 4116c90c9c
Move the activity action behavior on the C++ side
We better do this before this business logic grows in the QML side and
gets out of control. We'll need finer grained information due to the
conflict handling anyway.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-10-22 16:40:46 +02:00
Kevin Ottens 910f0c9339
Repair SettingsDialog::showIssuesList
This was completely disabled code and the connect was gone... So let's
introduce the connect back and have it trigger the main window while
selecting the right user. This way the new activity list is displayed
and since the conflicts are shown at the top this is hopefully obvious
again.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-10-22 16:40:46 +02:00
Kevin Ottens c42f4abd25
Add a function to know the user id matching a given account
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-10-22 16:40:46 +02:00
Kevin Ottens e3b97b0a04
In the case of conflicts, have the socket api propose the config dialog
This should be safe in the case of conflicts in folders on which the
user can write. For other cases we still use the older actions.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-10-22 16:40:46 +02:00
Kevin Ottens 49c478cd2a
Add a conflict dialog to help the user solve them
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-10-22 16:40:46 +02:00
Kevin Ottens 67e81fcd0f
Add KeepBothVersions as a possible solution to ConflictSolver
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-10-22 16:40:46 +02:00
Kevin Ottens 4fdb203cdb
Move some of the SocketApi conflict handling in a ConflictSolver class
The socket api move and delete commands are not strictly about conflicts
since they also deal with files which couldn't be uploaded for some
other reason. Still the new ConflictSolver could be used in those cases.

This opens the door at reusing that logic in other places.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-10-22 16:40:46 +02:00
Kevin Ottens 26d62a9712
Repair the canAddToDir logic
This could only work at the root of the sync folder where the record for
the parent folder would be invalid. Otherwise the negation would be
wrong... assuming you can add a file only if the permission is not
there.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-10-22 16:40:44 +02:00
Christian Kamm 00e901f5a7
SocketAPI: Introduce conflict resolution actions #6252
For conflicts generally as well as new files in read-only directories
the context menu will now present delete and move options.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-10-22 16:40:10 +02:00
Michael Schuster 7699004a11 Fix crash in SettingsDialog with delayed initialization
setWindowFlags triggered changeEvent, thus causing a crash in customizeStyle.

This fix should be kept even if we decide against delayed init in the future.

Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-10-22 11:29:38 +00:00
Michael Schuster 0fb10163a3 Delay initialization of SettingsDialog
ownCloudGui::slotShowSettings already got what it takes to create it only when we try to show it for the first time.

This however has some implications:

Pros:
- Only created when needed, while testing saved ca. 20 MB of RAM and got freed again after closing the dialog.
- Since we defaulted to the new Tray UI from 3.0, this is an added bonus for users don't opening the settings.

Cons:
- Resources like the avatar image have to be refetched everytime the dialog is recreated.
  This may be desired as well, because it ensures displaying no outdated info (e.g. on connection issues).

Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-10-22 11:29:38 +00:00
Kevin Ottens a2e3f9d63a
Expose Theme on the QML side
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-10-21 13:46:38 +02:00
Kevin Ottens de63e5e221
Don't hardcode the color of text in the header
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-10-21 13:40:42 +02:00
Kevin Ottens 0e9efe728a
Get rid of ncBlueHover
Use a similar trick of a semi-transparent rectangle on top when the
mouse area is hovered. This way it will always work whatever is the
background color.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-10-21 11:24:06 +02:00
Camila San 03b1c0b84a
Fix crash when clicking on folder with status 403 in the main dialog.
LsColJob was still being used after delete was called.

Signed-off-by: Camila San <hello@camila.codes>
2020-10-20 16:19:27 +02:00
Kevin Ottens b7ea6530c5 Stop the animation if we got an error message
Otherwise it would spin forever while we know we're not doing any work
anymore since we got a message from the server.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-10-19 14:33:19 +00:00
Kevin Ottens ecc170decc Inform _emptyShareLinkWidget of linkShareRequiresPassword signals
All the other ShareLinkWidgets process that signal (which allows to
display error messages for instance) but not that one for some reason.
That being said it might need to deal with an enforced password
situation.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-10-19 14:33:19 +00:00
Kevin Ottens e502e71926 Emit last to avoid use after delete crash
It turns out the shareDeleted() signal is connected to a function
cleaning up the ShareLinkWidget holding the last shared pointer to the
Share object. Since we use member variables for calling updateFolder()
this would lead to using deleted objects.

Just swap the call and the signal to have everything back in order.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-10-19 14:33:19 +00:00
Michael Schuster 61dc4b9137
Update comments
Everyone uses their private mail, so ensure people can get in touch.

Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-10-15 02:18:52 +02:00
Kevin Ottens ca57221b74
Ensure we use the app name in the GUI
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-10-13 07:28:43 +02:00
Kevin Ottens 7efaa2ed68
Fix the secure lock label aspect
Make sure we got a fixed size for that label. Also ensure that the
pixmap we display there is properly scaled to fit while maintaining the
aspect ratio.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-10-13 07:28:32 +02:00
Kevin Ottens ec945b8ac7
Hide the slideshow when going to the login page
This is indeed very distracting otherwise.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-10-13 07:28:32 +02:00
Kevin Ottens 9ec4b5ef8e
Add a label explaining the server address field
This is as discussed in #1160

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-10-13 07:28:31 +02:00
Kevin Ottens 5e472e629f
Improve wording on the wizard buttons
This is as discussed on #1158

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-10-13 07:28:31 +02:00
Nicolas Fella 206c98688e Avoid string translation puzzle
Combining translated strings like this makes them hard to translate since the order of words is different between languages.
Use proper placeholder strings instead.

Signed-off-by: Nicolas Fella <nicolas.fella@gmx.de>
2020-10-12 13:34:50 +00:00
Nicolas Fella 6f17bbe6d5 Don't use nullptr for QFlags
This fixes some deprecation warnings

Signed-off-by: Nicolas Fella <nicolas.fella@gmx.de>
2020-10-12 11:52:53 +00:00
Nicolas Fella f5860928d9 Make QML code more declarative by using properties
By using properties and property bindings the QML code gets more declarative rather than imperative, which is considered better.

This patch:
- Introduces a currentUserId property in UserModel that replaces the equivalent Q_INVOKABLE call
- Introduces an avatar property in User that contains the avatar's image provider url without any fallback
- Introduces new image provider urls for fallback images
- Moves the fallback image selection to QML since we want different fallbacks according to where it is used
- Wires up the necessary signals to propagate a changing avatar

Signed-off-by: Nicolas Fella <nicolas.fella@gmx.de>
2020-10-12 11:00:20 +00:00
Kevin Ottens ab67741d87 Use setHeader instead of setRawHeader for the user agent
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-10-08 05:55:47 +00:00
Kevin Ottens 3d8af05037 Use friendly user agent during webflow2 auth
This way the server displays a less scary string while granting access
from the browser. Also this same string will be used in the "Devices and
sessions" section of the server settings.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-10-08 05:55:47 +00:00
Kevin Ottens 3fca307fbb Also add build infos in the archive
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-10-07 13:33:20 +00:00
Kevin Ottens 8ce137cc53 Also add the command line arguments in the archive
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-10-07 13:33:20 +00:00
Kevin Ottens 8fb673457b Add a button to create a debug archive
This will harvest everything we might need for debugging purposes:
 * config file
 * sync journal dbs
 * log files

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-10-07 13:33:20 +00:00
Kevin Ottens 15d294e7fb Add dependency on QtGuiPrivate
I'm not a huge fan of using private APIs but QZip is really the API with
the least hassles for our debug archive need. No external dependency and
we know it is generally available and stable despite the lack of
stability promise.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-10-07 13:33:20 +00:00
Kevin Ottens 167800320f Make sure --logfile has precedence on config
Since we changed the default in the config file and since log dir had
precedence on log file, the --logfile command line option wasn't doing
anything anymore.

We make sure it has an effect again overriding --logdir or the logDir
config entry.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-10-07 13:33:20 +00:00
Kevin Ottens e78312f094 If askForOptionalPassword is enabled preset a random password
This is the same approach used on the server side. Turns out I quite
like it, this avoids popping up a dialog to the user and since she won't
know the password she'll have to set a new one anyway or disable it.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-10-07 09:43:47 +00:00
Kevin Ottens 099d25a56c Since we must ask for a password this can't be a default public link
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-10-07 09:43:47 +00:00
Kevin Ottens f39542688a
Handle redirects when downloading updates
This is necessary for downloads coming from Github for instance. They
are systematically redirected and we'd just fail the download.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-10-05 15:48:39 +02:00
Michael Schuster bb30633d31 Fix source file access modes
Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-10-02 16:56:29 +00:00
Michael Schuster 5979ae30e1 macOS: Fix memory leak in FolderWatcherPrivate::startWatching
Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-10-02 16:56:29 +00:00
Camila 954544830d Add a clickable icon for Talk notifications.
Signed-off-by: Camila <hello@camila.codes>
2020-09-30 08:46:01 +00:00
Harald Eilertsen 7721da25e5 Replace find_if with none_of where appropriate.
We're not interested in any found element in these cases, just to check
that none of the elements matches.

Signed-off-by: Harald Eilertsen <haraldei@anduin.net>
2020-09-29 19:32:39 +02:00
Harald Eilertsen 061ef027ff Don't hold ref to value returned from function.
Signed-off-by: Harald Eilertsen <haraldei@anduin.net>
2020-09-29 19:32:24 +02:00
Harald Eilertsen 074a94ceb9 gui/accountmanager: Make isAccountIdAvailable a bit clearer.
Signed-off-by: Harald Eilertsen <haraldei@anduin.net>
2020-09-29 19:31:24 +02:00
Harald Eilertsen 62bf4c5fda gui/folderman: Replace foreach (#2219)
Signed-off-by: Harald Eilertsen <haraldei@anduin.net>
2020-09-29 19:31:24 +02:00
Harald Eilertsen 677997b2b3 gui/folder: Replace foreach (#2219)
Signed-off-by: Harald Eilertsen <haraldei@anduin.net>
2020-09-29 19:31:23 +02:00
Harald Eilertsen 5bd2529ca6 gui/application: replace foreach (#2219)
Signed-off-by: Harald Eilertsen <haraldei@anduin.net>
2020-09-29 19:31:23 +02:00
Harald Eilertsen e343b4b947 gui/accountstate: Replace foreach (#2219)
Signed-off-by: Harald Eilertsen <haraldei@anduin.net>
2020-09-29 19:31:23 +02:00
Harald Eilertsen 225fdabf6a gui/accountstate: Replace foreach (#2219)
Most instances have been converted to range based for, but std::find_if
has been used where it made sense.

Signed-off-by: Harald Eilertsen <haraldei@anduin.net>
2020-09-29 19:31:23 +02:00
Harald Eilertsen 1898782781 gui/accountmanager: Replace foreach/Q_FOREACH (#2219)
Signed-off-by: Harald Eilertsen <haraldei@anduin.net>
2020-09-29 19:31:23 +02:00
Camila dc12cdf196
Correct the object name returned by the api.
The id was always 0 so no new systray messages were displayed.

Signed-off-by: Camila <hello@camila.codes>
2020-09-29 18:53:28 +02:00
Camila d2eb24a9a8
Connect signal guiLog to slot to display systray message.
Signed-off-by: Camila <hello@camila.codes>
2020-09-29 18:53:28 +02:00
Valdnet d50ad548d2
l10n: Remove space from string text 2020-09-29 14:39:34 +02:00
Dominique Fuchs b96b7e20c7 emitting signals from Qts Accessibility interaction invocations instead of duplicating actions
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
2020-09-28 12:38:21 +00:00
Dominique Fuchs 1053c58b0f KISS. Removed description for now, instead clarified some Accessible.name
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
2020-09-28 12:38:21 +00:00
Dominique Fuchs 8abe4219a5 Added missing qsTr() calls - again
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
2020-09-28 12:38:21 +00:00
Dominique Fuchs a69898371f Added missing qsTr() calls
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
2020-09-28 12:38:21 +00:00
Dominique Fuchs a4151d71bc Fix typo
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
2020-09-28 12:38:21 +00:00
Dominique Fuchs 3287ec2387 Typo fixes, minor additions
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
2020-09-28 12:38:21 +00:00
Dominique Fuchs c6047e4d63 Re-add wrongly delete action
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
2020-09-28 12:38:21 +00:00
Dominique Fuchs 43bf703806 Initial accessibility declarations for tray window qml src
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
2020-09-28 12:38:21 +00:00
Dan Griffin 5763e1e9d8
Free IconJob after use
Signed-off-by: Dan Griffin <github.mk@xiragon.com>
2020-09-28 12:30:53 +02:00
Kevin Ottens 78b03739a7
Force tooltip wrap mode because it's not enabled in Qt 5.12...
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-09-24 14:47:56 +02:00
Jeremy Plsek 5fa2a13f8d Use native text rendering for qml windows
Signed-off-by: Jeremy Plsek <jeremyplsek@gmail.com>
2020-09-23 08:00:46 +00:00
Michael Schuster ce71ffe9f9 Allow server URL to be pre-defined without enforcing it to be used unmodified
APPLICATION_SERVER_URL can be either empty or be specified. This commit adds the new CMake option APPLICATION_SERVER_URL_ENFORCE to decide whether to enforce the
URL's unmodified use (like before, default: ON) or to allow modification by the user (new).

By default APPLICATION_SERVER_URL_ENFORCE is set to ON, to no break with the previous implementation's expectations.

If APPLICATION_SERVER_URL is empty, APPLICATION_SERVER_URL_ENFORCE will be ignored by the Account Wizard.

The previous behaviour confused me a bit with branded builds. When the URL was (usually) specified but not forced, it was simply discarded, forcing the user to
manually supply it.

Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-09-23 07:21:35 +00:00
Jeremy Plsek 3a53afd704 Remove "This includes" due to tooltip order
Signed-off-by: Jeremy Plsek <jeremyplsek@gmail.com>
2020-09-21 09:46:25 +00:00
Kevin Ottens 3171cb2720 If there's no description just say nothing
Otherwise we get lots of "No description available" lines in the
activity list which is basically noise. Also trains the user to ignore
the secondary line.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-09-18 17:46:38 +00:00
Dominique Fuchs f8f3190cb4 Fix missing subdirectory discovery on move operations in macOS.
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>

Add qAsConst to avoid detaching

Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>

Changed callchain to find and return possibly coalesced paths

Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>

Removed another qAsConst remnant, more func const-correctness.

Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
2020-09-17 15:44:32 +02:00
Dominique Fuchs d09b0284dd
Do not break out of outer loop when upgrading folders, continue instead
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>

Remove awkward debug line a.k.a. whoops

Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
2020-09-16 10:57:43 +02:00
Jeremy Plsek 797df2b5d5 Include list info in tooltip
Also extend the tooltip timeout

Signed-off-by: Jeremy Plsek <jeremyplsek@gmail.com>
2020-09-15 10:04:06 +00:00
Kevin Ottens 6ee37b5975 Make sure menu are closed when button is clicked again
This way we also made sure all the Menu are currently on the same close
policy.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-09-15 08:46:10 +00:00
Kevin Ottens f7efe6a902 Delay binding on the menu width
Indee the MenuItem might not be linked to its Menu at creation time
which will make the binding fail and give a warning. Delay for the menu
availability.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-09-15 08:46:10 +00:00
Kevin Ottens eb0cedebfa Remove pre-QQC2.3 workaround
Now that we depend on Qt 5.12 anyway, the count property is available
just fine on the Menu item.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-09-15 08:46:09 +00:00
Kevin Ottens 7ccb016397 Use QGuiApplication::primaryScreen() as fallback for Systray::currentScreen()
Under Wayland QCursor::pos() is unlikely to give us anything meaningful,
so fallback to the primary screen information.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-09-15 07:17:03 +00:00
Kevin Ottens 01986df8ca Don't use a confusing "royal you" in the sync messages
Users get rightfully confused with the "You changed ..." messages in the
activity list for syncs. Indeed, some of those changes might be coming
from the server in which case we don't really know who did the change.

So now we use the old "Synced ..." messages for changes pulled from the
server and we have a more precise "You changed ..." (renamed, deleted,
created) when the changes were initiated locally (since there we know
the user reading the message did it).

Also changed how the messages are constructed so that they can be
properly translated.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-09-10 15:40:05 +02:00
Camila 95f634ce28 Click on activity list in systray open file in the file manager.
Clean up code, add more const and auto.

Signed-off-by: Camila <hello@camila.codes>
2020-09-09 20:06:46 +02:00
Camila c1086c9886 Fix tooltip for activity info.
Also improves readability of the items in the list.

Signed-off-by: Camila <hello@camila.codes>
2020-09-09 20:06:46 +02:00
Kevin Ottens fdb35e5f9f Leave the implicit uint to int cast
I wrongly (and stupidly) assumed the int in QBitArray was treated as a
hash as well but it is an index so it must be positive. Also to make
things even worse I misread on which expression clang-tidy was
complaining regarding the implementation specific narrowing
conversion... This is happening after the modulo operator and not
before. We're in a safe range of values at that point, so it's fine to
let the narrowing happen.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-09-08 16:44:31 +02:00
Kevin Ottens aa63889e5b Enable bugprone-terminating-continue clang-tidy check
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-09-01 06:37:03 +00:00
Kevin Ottens 80cc196f6f Enable bugprone-narrowing-conversions clang-tidy check
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-09-01 06:37:03 +00:00
Kevin Ottens 608bf025e6 Enable bugprone-forward-declaration-namespace clang-tidy check
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-09-01 06:37:03 +00:00
Kevin Ottens c8ea848596 Enable the bugprone-branch-clone clang-tidy check
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-09-01 06:37:03 +00:00
Kevin Ottens 1a0945a973 Enable all the misc clang-tidy check except one
This flagged mostly unused parameters. Didn't enable the
misc-non-private-member-variables-in-classes check as we got a lot of
those. Hopefully we'll get to fix them at some point but that feels too
early and too much work for now.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-08-31 09:14:09 +02:00
Michael Schuster 11632da7ea
Windows shell extensions: Change NCUtil Pipe name from ownCloud to APPLICATION_EXECUTABLE
Avoid interference with foreign pipes as this is always a bad idea ;p

Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-08-20 18:50:05 +02:00
Kevin Ottens ed5e9de9f6
Present sharing of E2EE files from the main dialog too
The visibility of the share button for the activity list is tied to the
path role in the ActivityListModel, so make sure we don't return a path
for E2EE files and folders.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-08-20 14:53:14 +02:00
Kevin Ottens 07388e0f22
Disable context menu actions for E2EE files and folders
Those files and folders are not shareable and the "Edit" or "Open in
browser" actions will lead to showing an error in the web GUI. No need
to lead users there so just disable them.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-08-20 14:13:56 +02:00
Kevin Ottens 3540f1e460 Show the "Display mnemonic" button only when we know e2e is supported
Turns out that showing the button straight from the page ctor is a bit
too early. At that point the account might not be connected yet and thus
we wouldn't have proper information. Currently we were displaying that
button all the time, now we wait for the account to be connected to
decide to show it or not.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-08-18 17:41:38 +02:00
Kevin Ottens 866ffc2a6b Enable the modernize-loop-convert check on clang-tidy
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-08-13 12:55:14 +00:00
Kevin Ottens a5b4922a0e Remove unused method
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-08-13 12:55:14 +00:00
Kevin Ottens 0e2af4b502 Enable the modernize-deprecated-headers check on clang-tidy
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-08-13 14:53:52 +02:00
Kevin Ottens 2f8c29082a Enable the modernize-use-equals-default check on clang-tidy
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-08-13 14:19:42 +02:00
Kevin Ottens cdf6e7d72b Enable the modernize-user-nullptr check on clang-tidy
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-08-12 19:45:25 +02:00
Kevin Ottens d58ec4bf70
Enable the modernize-use-using check on clang-tidy
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-08-12 18:18:57 +02:00
Kevin Ottens c50a968a1e
Add more raw string literals missed previously
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-08-12 09:48:29 +02:00
Kevin Ottens 37e20698ca
Keep the E2EE info message around to allow displaying mnemonic
We lost the ability to display the E2EE mnemonic during the GUI
redesign and the info message wasn't displayed again on restart. So now
we display it every time, it still can be dismissed and the button text
is different in such a case to make the intent clearer.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-08-11 14:55:51 +02:00
Camila 8f300ffe66 Remove extra check for talk app on server in AccountState.
- Remove repeated hard coded "spreed" string.

Signed-off-by: Camila <hello@camila.codes>
2020-08-04 16:28:19 +00:00
Camila 6d6cc3852b Fix #2243: use server url instead of hard coded string.
Signed-off-by: Camila <hello@camila.codes>
2020-08-04 16:28:19 +00:00
Kevin Ottens 0516db5e10 Make sure we always have a CLSID when Explorer integration is used
We update properly the CLSID of folders to integrate them with the
Explorer pane when they are added or removed from the GUI. That said,
there might be cases of users adding folders to sync straight from the
GUI. In such a case the CLSID might be missing on config load so now we
assign one on the fly when that happens.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-08-04 07:33:53 +02:00
Michael Schuster bc5888e8e4 Always show Settings in the context menu (amends #2164)
The context menu should allow access to the Settings even when no accounts are configured.

Users may specify proxy / startup / update and other settings at any time.

This slipped through in #2164.

Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-08-03 10:10:05 +02:00
Camila e89177b25b Add OpacityMask to fix mouse hover on round corner.
- Fix for #2173.
- Removed the workaround for the left round corner which was also
fixed with the OpacityMask.

Signed-off-by: Camila <hello@camila.codes>
2020-07-28 11:19:22 +02:00
Stephan Beyer cd008ffe59 Let context menu open wizard if there are no accounts
The context menu offers to open the main dialog and the settings
even if no accounts are configured.  In this case, the main dialog
is useless and the settings are probably confusing.  Hence, this
commit replaces these actions in the context menu by an action
to open the wizard (which also opens on left click, so this is
the most natural thing to do).

Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
2020-07-23 21:08:53 +02:00
Dominique Fuchs a07db657d5 sigh, too
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
2020-07-21 12:44:45 +02:00
Dominique Fuchs cd3a72822e Get a const auto for the FolderMap to iterate over
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
2020-07-21 10:10:07 +00:00
Dominique Fuchs dbdf40ea45 Replaced Qt foreach by C++11 ranged for loop
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
2020-07-21 10:10:07 +00:00
Dominique Fuchs 82c70f0c95 Properly set syncPause state on Systray creation when account init is done
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
2020-07-21 10:10:07 +00:00
Dominique Fuchs 5ac3099b37 Fixed copy/paste bug, resulting in a wrong signal ::pauseSync used instead of ::resumeSync
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
2020-07-21 10:10:07 +00:00
Dominique Fuchs 6ab55eddae Add -no-strip cmd line arg to macdeployqt if when building with Debug profile
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
2020-07-20 15:04:33 +02:00
Kevin Ottens 6b8d2270c6 Make sure the tray icon point is in screen coordinates
Previously we were using QCursor::pos() in the Linux case, which is a
fair heuristic except it will always be relative to the primary screen
and not the current screen. This explains why we had to adjust with the
virtual geometry.

In the Windows and Mac case we got the position out of QSystemTrayIcon
and that one was already relative to the current screen.

So now we use QCursor::pos(currentScreen()) which ensures we give the
coordinates relatively to the current screen also in the Linux case.

Since all platforms are now having that point in the same coordinate
system we don't need to mess around with the virtual geometry to
compensate.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-07-15 12:22:54 +02:00
Dominique Fuchs 6bc70ddd5b
Fix typo, use compound assignment op
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
2020-07-13 17:47:19 +02:00
Dominique Fuchs bc20edc582
Only attempt to move if file exist
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
2020-07-13 17:47:18 +02:00
Dominique Fuchs 4656748130
Move existing syncjournal db files from client ver <2.7
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
2020-07-13 17:47:11 +02:00
Camila f018f7df3b Fix text in the permissions menu for share link.
Changed word capitalization and replace && for andi to match the server.

Signed-off-by: Camila <hello@camila.codes>
2020-07-09 03:21:04 +00:00
Camila 30a533d49c Share link display the correct permissions for files and folders.
- Fix #2175:
	- Shows the correct default permissions
	- Shows the permissions the user set

Signed-off-by: Camila <hello@camila.codes>
2020-07-09 03:21:04 +00:00
Camila d7a1367292
Display the correct default permissions when creating a share.
- The default displayed was not in sync with the server because
the client was setting permissions when creating a share while it
should get the default permissions from the server to display it to the
user first.

Signed-off-by: Camila <hello@camila.codes>
2020-07-08 18:15:36 +02:00
Stephan Beyer 308bed0da7 Use braced initializer list for returns in Systray::taskbarGeometry()
Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
2020-07-08 14:08:41 +02:00
Stephan Beyer 1e6747cd1d Remove redundant initialization of ElidedLabel::_elideMode
The value gets already initialized by default member initialization,
so there is no need to set it again in the constructor.

Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
2020-07-08 14:08:41 +02:00
Stephan Beyer 00f93fdb77 Use more auto in folderstatusdelegate.cpp
Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
2020-07-08 14:08:41 +02:00
Stephan Beyer e32bd75519 Set maximum height of account and app menu
The menus may become too large if they have too many items
(the account menu has this in case of many accounts, the apps
menu in case of many apps).  This commit limits the maximum
height such that the menus do not hide the header.

Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
2020-07-07 17:35:09 +02:00
Kevin Ottens b98cf0a029 Reach out to the contentItem inside of the ListView to find the width
Turns out that the ListView embedded in the Menu (reachable via
contentItem) would create a binding loop if we're using its
childrenRect. But really we're interested in the total width for the
instantiated delegate *inside* the ListView. That's why we go one level
deeper and get the childrenRect of the inner contentItem instead.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-07-06 20:39:42 +00:00
Michael Schuster f4d83d02f6
Cleanup auto pointers and qobject casts, refactor KeychainChunk
Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-07-06 21:51:40 +02:00
Michael Schuster ff631e919f
ProxyAuthHandler: Add template member function execAwait to avoid code duplication
Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-07-06 21:51:40 +02:00
Michael Schuster 8503226c44
Keychain: Use auto deletion in WebFlowCredentials and ConfigFile
- Also make use of the new KeychainChunk::DeleteJob

Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-07-06 21:51:40 +02:00
Michael Schuster ea95c4bf49
Refactor ProxyAuthHandler to use QEventLoop
Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-07-06 21:51:39 +02:00
Michael Schuster 81c644e702
ConfigFile security: Migrate Proxy password to keychain
When specified in the config file, the Proxy password will be migrated
to the keychain, for backward compatibility and to allow admins to
overwrite an existing password by rolling out updated config files.

Once migrated to the keychain, the password will be removed from the
config file.

Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-07-06 21:51:39 +02:00
Michael Schuster 2a3ef044be
Move KeychainChunk class from gui to libsync
Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-07-06 21:51:39 +02:00
Michael Schuster 203a2ce003
Move QKeychain::NoBackendAvailable error handling to KeychainChunk class
Originally this was in the WebFlowCredentials class. Since we've abstracted everything
from there already, let's also move this in case some other code may use
KeychainChunk::ReadJob prior to WebFlowCredentials.

Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-07-06 21:51:36 +02:00
Kevin Ottens d3d713ff9c Fix the hover for the other menu items
Ultimately we would avoid the code duplication by creating our own
proper QQC2 style instead of directly tuning everything. That's a battle
for another time (more elements would need to be adjusted for that, I
don't want to dilute this branch too much).

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-07-06 20:14:57 +02:00