nextcloud-desktop.git
8 years agoReplace the custom rbtree by a std::map
Jocelyn Turcotte [Wed, 23 Aug 2017 17:16:12 +0000 (19:16 +0200)]
Replace the custom rbtree by a std::map

8 years agocsync: Keep the csync_file_stat_t instances created during discovery
Jocelyn Turcotte [Thu, 17 Aug 2017 17:06:58 +0000 (19:06 +0200)]
csync: Keep the csync_file_stat_t instances created during discovery

Now that they use the same structure, avoid _csync_detect_update
having to recreate another instance and transfer everything manually.
Any instance created during discovery should now be used all the way
up to SyncEngine::treewalkFile.

This also makes sure that the path and types are properly set in that
object instead of having to pass everything as separate parameters.

This gets rid of csync_ftw_flags_e which was now converted from,
and to csync_ftw_type_e, already in the csync_file_stat_t.

Issue #1817

8 years ago[tx-robot] updated from transifex
Jenkins for ownCloud [Mon, 18 Sep 2017 00:18:30 +0000 (02:18 +0200)]
[tx-robot] updated from transifex

8 years ago[tx-robot] updated from transifex
Jenkins for ownCloud [Sun, 17 Sep 2017 00:18:29 +0000 (02:18 +0200)]
[tx-robot] updated from transifex

8 years ago[tx-robot] updated from transifex
Jenkins for ownCloud [Sat, 16 Sep 2017 00:18:35 +0000 (02:18 +0200)]
[tx-robot] updated from transifex

8 years agoAbstractNetworkJob: Allow relative redirect
Christian Kamm [Fri, 15 Sep 2017 07:24:56 +0000 (09:24 +0200)]
AbstractNetworkJob: Allow relative redirect

Previously all redirects were considered absolute.

8 years agoReduce timeout for some admin jobs
Christian Kamm [Fri, 15 Sep 2017 07:11:52 +0000 (09:11 +0200)]
Reduce timeout for some admin jobs

The oauth token jobs and the wizard redirect check job shouldn't have
5min timeouts.

8 years agoWizard: Handle url-shortener redirects #5954
Christian Kamm [Mon, 11 Sep 2017 11:45:01 +0000 (13:45 +0200)]
Wizard: Handle url-shortener redirects #5954

Grab any permanent redirects from the base url the user entered
before attempting to connect to a modified url (with status.php
added).

8 years agoHttpCreds: Remove migration code from 1.7
Christian Kamm [Thu, 14 Sep 2017 12:45:46 +0000 (14:45 +0200)]
HttpCreds: Remove migration code from 1.7

8 years agoCredentials: Use per-account keychain entries #5830
Christian Kamm [Tue, 12 Sep 2017 15:15:22 +0000 (17:15 +0200)]
Credentials: Use per-account keychain entries #5830

This requires a lot of migration code: the old entries need to be read,
saved to the new locations and then deleted.

8 years agoJournal: Second attempt at journal mode fallback #5723
Christian Kamm [Wed, 13 Sep 2017 07:27:07 +0000 (09:27 +0200)]
Journal: Second attempt at journal mode fallback #5723

Some filesystems, vms or other limitations make using the WAL journal
mode impossible. We are notified of this problem through an sqlite
IOERR for SHMMAP. In that case We want to attempt to fall back to the
DELETE journal mode.

8 years agoOAuth: Don't use implicit POST bodies
Christian Kamm [Mon, 11 Sep 2017 10:24:29 +0000 (12:24 +0200)]
OAuth: Don't use implicit POST bodies

The query args of POST requests become the request body. If there's a
redirect, the redirected url will therefore not contain the query
arguments. Use an explicit request body to make the redirection work.

8 years agoOAuth: Pass client auth in header instead of url
Christian Kamm [Mon, 11 Sep 2017 10:23:52 +0000 (12:23 +0200)]
OAuth: Pass client auth in header instead of url

To play more nicely with redirects.

8 years agoOAuth: Use redirectable jobs for oauth token management
Christian Kamm [Fri, 8 Sep 2017 14:43:59 +0000 (16:43 +0200)]
OAuth: Use redirectable jobs for oauth token management

8 years agoPropagateUpload: Model of remote quota, avoid some uploads #5537
Christian Kamm [Wed, 12 Jul 2017 07:58:15 +0000 (09:58 +0200)]
PropagateUpload: Model of remote quota, avoid some uploads #5537

When we see a 507 error, assume that quota is < uploaded size.

8 years agoSyncOptions/Propagator: Parallelism as an option
Christian Kamm [Wed, 12 Jul 2017 11:19:58 +0000 (13:19 +0200)]
SyncOptions/Propagator: Parallelism as an option

Very useful for changing it on a per-test basis.

8 years agoMake DetailError different from BlacklistedError
Christian Kamm [Wed, 12 Jul 2017 10:38:53 +0000 (12:38 +0200)]
Make DetailError different from BlacklistedError

It's quite different in regard to blacklist handling and overall
sync failure changes.

8 years agoremove qt4 code
Helmut K. C. Tessarek [Wed, 13 Sep 2017 04:26:56 +0000 (00:26 -0400)]
remove qt4 code

8 years ago[tx-robot] updated from transifex
Jenkins for ownCloud [Fri, 15 Sep 2017 00:18:32 +0000 (02:18 +0200)]
[tx-robot] updated from transifex

8 years agoExcludes: Allow escaping # #6012
Christian Kamm [Wed, 13 Sep 2017 11:03:40 +0000 (13:03 +0200)]
Excludes: Allow escaping # #6012

Otherwise adding patterns that start with # are impossible to add, since
they get treated as comments. Also add this escaping for patterns added
in the ui.

8 years ago[tx-robot] updated from transifex
Jenkins for ownCloud [Thu, 14 Sep 2017 00:18:30 +0000 (02:18 +0200)]
[tx-robot] updated from transifex

8 years ago[tx-robot] updated from transifex
Jenkins for ownCloud [Wed, 13 Sep 2017 00:18:31 +0000 (02:18 +0200)]
[tx-robot] updated from transifex

8 years agoChunkingNgTest: CI debuggability #6015
Markus Goetz [Tue, 12 Sep 2017 15:07:19 +0000 (17:07 +0200)]
ChunkingNgTest: CI debuggability #6015

8 years agoJournal: Fall back to DELETE on IO error #5723
Christian Kamm [Tue, 12 Sep 2017 11:39:45 +0000 (13:39 +0200)]
Journal: Fall back to DELETE on IO error #5723

Also add logging of extended error codes for this IO error, maybe we can
become more specific about which situations should trigger a journal
mode switch.

8 years agoFolder: Check etag again after active sync #4116
Christian Kamm [Tue, 12 Sep 2017 11:02:00 +0000 (13:02 +0200)]
Folder: Check etag again after active sync #4116

Maybe more things were happening on the server?

8 years ago[tx-robot] updated from transifex
Jenkins for ownCloud [Tue, 12 Sep 2017 00:18:30 +0000 (02:18 +0200)]
[tx-robot] updated from transifex

8 years agoUpdate server url in case of permanent redirection #5972
Christian Kamm [Fri, 8 Sep 2017 09:59:45 +0000 (11:59 +0200)]
Update server url in case of permanent redirection #5972

This is the first time the account url may update outside of
account setup.

Summary of redirection handling:
1. During account setup (wizard)
   - status.php gets permanently redirected -> adjust url
   - authed PROPFIND gets *any* redirection -> adjust url
2. During connectivity ping (ConnectionValidator)
   - status.php gets permanently redirected -> adjust url (new!)

All other redirections should be followed transparently and
don't update the account url in the settings.

8 years agoUse DetermineAuthTypeJob in HttpCredentials
Christian Kamm [Thu, 7 Sep 2017 12:58:45 +0000 (14:58 +0200)]
Use DetermineAuthTypeJob in HttpCredentials

* Move it to networkjobs
* Minor adjustments to its logic
* Fixes redirect handling for oauth/basic http auth check #6003

8 years agoAdd clean_tarball.sh #6005
Markus Goetz [Mon, 11 Sep 2017 16:53:51 +0000 (18:53 +0200)]
Add clean_tarball.sh #6005

8 years ago[tx-robot] updated from transifex
Jenkins for ownCloud [Mon, 11 Sep 2017 14:03:15 +0000 (16:03 +0200)]
[tx-robot] updated from transifex

8 years agoWindows: Make sure that the folder and Desktop.ini have the right attributes (#6018)
Jocelyn Turcotte [Mon, 11 Sep 2017 13:32:42 +0000 (15:32 +0200)]
Windows: Make sure that the folder and Desktop.ini have the right attributes (#6018)

When created from scratch, the owncloud icon won't be picked-up by
explorer unless the right attributes are set on both the sync root and the
Desktop.ini file.

Issue #2446

8 years agoEnable DEP & ASLR on Windows
rockihack [Mon, 4 Sep 2017 11:42:20 +0000 (13:42 +0200)]
Enable DEP & ASLR on Windows

8 years agoRemove qtkeychain submodule #6004
Markus Goetz [Fri, 8 Sep 2017 13:23:01 +0000 (15:23 +0200)]
Remove qtkeychain submodule #6004

8 years agoFix the macOS Sparkle build
Jocelyn Turcotte [Fri, 8 Sep 2017 11:54:04 +0000 (13:54 +0200)]
Fix the macOS Sparkle build

8 years agoHttp credentials: Fix behavior for bad password #5989
Christian Kamm [Thu, 7 Sep 2017 09:10:23 +0000 (11:10 +0200)]
Http credentials: Fix behavior for bad password #5989

When the GET request from askFromUser is scheduled on the QNAM inside
the slot that handles the QNetworkReply::finished signal, it seems to
not get processed at all.

This workaround moves the sending of the new GET to the event loop,
sidestepping the problem.

8 years agoFix compile errors
Christian Kamm [Thu, 7 Sep 2017 09:02:05 +0000 (11:02 +0200)]
Fix compile errors

cmocka seems to #define fail to something inappropriate.

8 years agocsync_statedb: (really) Make sure children of non-synced items aren't read from the DB
Jocelyn Turcotte [Thu, 7 Sep 2017 08:26:19 +0000 (10:26 +0200)]
csync_statedb: (really) Make sure children of non-synced items aren't read from the DB

No tests are covering this and I reversed the original logic.

8 years agocsync_statedb: Make sure children of non-synced items aren't read from the DB
Jocelyn Turcotte [Thu, 7 Sep 2017 08:16:16 +0000 (10:16 +0200)]
csync_statedb: Make sure children of non-synced items aren't read from the DB

Fix a regression during C++ conversion from 704ca366b38391c0ef56e090561b4a3a158307fb

8 years agoFix build after C++ conversion of csync
Jocelyn Turcotte [Mon, 4 Sep 2017 15:40:56 +0000 (17:40 +0200)]
Fix build after C++ conversion of csync

Use the same macro as in SyncFileItem for bitfields on enums.

Fixes #5993

8 years agoUse a C++ contructor and destructor for CSYNC
Jocelyn Turcotte [Mon, 4 Sep 2017 17:06:13 +0000 (19:06 +0200)]
Use a C++ contructor and destructor for CSYNC

Merge csync_create and csync_init into the constructor and
replace csync_destroy with the destructor.

Also use a QByteArray for csync_s::root_perms and flatten
csync_rename_s as a rename sub-struct of csync_s since it
can now handle C++ types.

8 years agoRemove csync_s::replica
Jocelyn Turcotte [Mon, 4 Sep 2017 13:09:09 +0000 (15:09 +0200)]
Remove csync_s::replica

The only difference with csync_s::current is that it's
assigned the value of csync_s::local::type and
csync_s::remote::type, which never change. So might as
well only use the "current" field with constants.

8 years agoReplace TREE_WALK_FILE with csync_file_stat_t
Jocelyn Turcotte [Thu, 17 Aug 2017 12:39:23 +0000 (14:39 +0200)]
Replace TREE_WALK_FILE with csync_file_stat_t

Just expose csync_file_stat_t since we don't need an abstraction layer
anymore. Also pass the nodes of both trees directly to the visitor
function.

Issue #1817

8 years agoReplace csync_vio_file_stat_t with csync_file_stat_t
Jocelyn Turcotte [Tue, 5 Sep 2017 14:12:32 +0000 (16:12 +0200)]
Replace csync_vio_file_stat_t with csync_file_stat_t

Also move csync_normalize_etag to common/utility since we
don't need the char* function anymore.

Remove the single space file_stat->remotePerm codepath since
this won't be used in csync anymore since
8de3bda0b1f900ab183698454740fd979f7ab9d7.

Issue #1817

8 years agoFix link to download the ownCloud client
Matthew Setter [Mon, 4 Sep 2017 13:01:29 +0000 (15:01 +0200)]
Fix link to download the ownCloud client

This was requested in https://github.com/owncloud/documentation/issues/3354.

8 years agoFix broken images in FAQ
Matthew Setter [Mon, 4 Sep 2017 12:55:12 +0000 (14:55 +0200)]
Fix broken images in FAQ

This relates to https://github.com/owncloud/documentation/issues/3354.

8 years agoUpdate ChangeLog
Jürgen Weigert [Tue, 5 Sep 2017 16:20:03 +0000 (18:20 +0200)]
Update ChangeLog

8 years agoMake csync_file_stat_t public and partly convert to C++
Jocelyn Turcotte [Thu, 17 Aug 2017 08:06:14 +0000 (10:06 +0200)]
Make csync_file_stat_t public and partly convert to C++

This is the first commit trying to unify csync_file_stat_s,
csync_vio_file_stat_s and csync_tree_walk_file_s. Use QByteArray
and unique_ptr already since I'm not used to track memory allocations
and this will make the transition easier.

Issue #1817

8 years agoMove Utility to a new common static library
Jocelyn Turcotte [Wed, 16 Aug 2017 06:36:52 +0000 (08:36 +0200)]
Move Utility to a new common static library

Now that csync builds as C++, this will avoid having to implement
functionalities needed by csync mandatorily in csync itself.

This library is built as part of libocsync and symbols exported
through it.
This requires a relicense of Utility as LGPL. All classes moved into
this library from src/libsync will need to be relicensed as well.

8 years agoAdd minor unittest for numeric id extraction #5933
Christian Kamm [Tue, 5 Sep 2017 11:40:26 +0000 (13:40 +0200)]
Add minor unittest for numeric id extraction #5933

8 years agoStatusTracker: Fix different case paths not matching (#5981)
Jocelyn Turcotte [Thu, 31 Aug 2017 11:32:00 +0000 (13:32 +0200)]
StatusTracker: Fix different case paths not matching (#5981)

Use a custom std::map comparator functor to do all comparisons
on contained QStrings using Qt::CaseInsensitive on macOS and Windows.

Issue #5257

8 years agofix branded nemo and caja shell integration (#5966)
Jürgen Weigert [Thu, 31 Aug 2017 11:16:34 +0000 (13:16 +0200)]
fix branded nemo and caja shell integration (#5966)

* Update createcajaplugin.sh

* first apply branding, then create copies. Better.
Fixes https://github.com/owncloud/ownbrander/issues/753

* fix https://github.com/owncloud/ownbrander/issues/752 too.

8 years agoFix cmocka deprecation warnings
Jocelyn Turcotte [Mon, 21 Aug 2017 18:05:00 +0000 (20:05 +0200)]
Fix cmocka deprecation warnings

Just use cmocka_run_group_tests like we already use in
some of those tests.

8 years agoEnable csync logs in unit tests
Jocelyn Turcotte [Thu, 17 Aug 2017 16:32:03 +0000 (18:32 +0200)]
Enable csync logs in unit tests

Go through the Logger to enable the csync-QDebug bridge.

8 years agoCompile almost all of csync as C++
Jocelyn Turcotte [Mon, 14 Aug 2017 14:19:52 +0000 (16:19 +0200)]
Compile almost all of csync as C++

This will allow us to unify data structures between csync and libsync.

Utility functions like csync_time and c_std are still compiled as C
since we won't need to be coupled with Qt in the short term.

8 years agoUse .cpp for existing csync .cc files
Jocelyn Turcotte [Mon, 14 Aug 2017 12:32:11 +0000 (14:32 +0200)]
Use .cpp for existing csync .cc files

Make this consistent with the rest of the client code.

8 years agoMove csync to src/csync
Jocelyn Turcotte [Mon, 14 Aug 2017 17:19:52 +0000 (19:19 +0200)]
Move csync to src/csync

8 years agoMove csync/tests to test/csync
Jocelyn Turcotte [Mon, 14 Aug 2017 16:49:44 +0000 (18:49 +0200)]
Move csync/tests to test/csync

8 years agoMove csync/tests/ownCloud to test/scripts/txpl
Jocelyn Turcotte [Mon, 14 Aug 2017 15:45:49 +0000 (17:45 +0200)]
Move csync/tests/ownCloud to test/scripts/txpl

8 years agoMerge pull request #2 from nextcloud/update-readme
Roeland Jago Douma [Wed, 27 Sep 2017 12:03:23 +0000 (14:03 +0200)]
Merge pull request #2 from nextcloud/update-readme

Update README

8 years agoRemove templates for now
Roeland Jago Douma [Wed, 27 Sep 2017 12:02:49 +0000 (14:02 +0200)]
Remove templates for now

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
8 years agoUpdate README
Christoph Wurst [Wed, 27 Sep 2017 12:00:02 +0000 (14:00 +0200)]
Update README

Adjust branding and remove some sections

8 years agoMerge pull request #48 from nextcloud-gmbh/master-oc
Roeland Jago Douma [Fri, 25 Aug 2017 13:06:26 +0000 (15:06 +0200)]
Merge pull request #48 from nextcloud-gmbh/master-oc

Bump to oc master

8 years agoMerge remote-tracking branch 'oc/master' into master-oc
Roeland Jago Douma [Wed, 23 Aug 2017 13:40:35 +0000 (15:40 +0200)]
Merge remote-tracking branch 'oc/master' into master-oc

8 years agoMerge pull request #5974 from owncloud/Documentation_Activity_Update
Martin [Sun, 20 Aug 2017 19:09:42 +0000 (21:09 +0200)]
Merge pull request #5974 from owncloud/Documentation_Activity_Update

Documentation improvement for #5969

8 years agoDocumentation improvement for #5969
Martin [Sun, 20 Aug 2017 16:17:58 +0000 (18:17 +0200)]
Documentation improvement for #5969

8 years agoHardcode Desktop.ini in the exclude list
Jocelyn Turcotte [Mon, 14 Aug 2017 09:42:30 +0000 (11:42 +0200)]
Hardcode Desktop.ini in the exclude list

This prevents it from being removed from the exclude list, which
would be an issue since the client itself creates this file in a way
that wouldn't match on machines with different installation paths.

8 years agoWindows: Use the application icon for the sidebar
Jocelyn Turcotte [Fri, 11 Aug 2017 15:19:02 +0000 (17:19 +0200)]
Windows: Use the application icon for the sidebar

By setting the icon in Desktop.ini of the root folder, this adds the icon
both when browsing the folder directly and to the sidebar shortcut.

To avoid overwriting any user setting that could exist in Desktop.ini,
only do this if the file doesn't exist. Editing .ini files on Windows
isn't trivial and isn't worth it given that this file won't exist most
of the time.

Fixes #2446

8 years agoCMake: Print the Qt version and path #5957 #5932
Markus Goetz [Mon, 14 Aug 2017 12:23:25 +0000 (14:23 +0200)]
CMake: Print the Qt version and path #5957 #5932

8 years agoMerge pull request #47 from nextcloud-gmbh/drone_qt5.9
Roeland Jago Douma [Sat, 5 Aug 2017 19:15:30 +0000 (21:15 +0200)]
Merge pull request #47 from nextcloud-gmbh/drone_qt5.9

Add Qt5.9  to drone

8 years agoAdd Qt5.9 to drone
Roeland Jago Douma [Sat, 5 Aug 2017 19:08:45 +0000 (21:08 +0200)]
Add Qt5.9  to drone

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
8 years agoMerge pull request #46 from nextcloud-gmbh/drone_57_58
Roeland Jago Douma [Sat, 5 Aug 2017 12:37:26 +0000 (14:37 +0200)]
Merge pull request #46 from nextcloud-gmbh/drone_57_58

Add qt5.7 and qt5.8 CI tests

8 years agoAdd qt5.7 and qt5.8 CI tests
Roeland Jago Douma [Sat, 5 Aug 2017 12:29:13 +0000 (14:29 +0200)]
Add qt5.7 and qt5.8 CI tests

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
8 years agoSync Folder: Add file manager favorite also in folder wizard #455
Markus Goetz [Thu, 3 Aug 2017 17:54:20 +0000 (19:54 +0200)]
Sync Folder: Add file manager favorite also in folder wizard #455

Not only in the account wizard.

8 years agoUpload: Log the checksum / file hash
Markus Goetz [Fri, 4 Aug 2017 13:42:11 +0000 (15:42 +0200)]
Upload: Log the checksum / file hash

8 years agoChangeLog: More 2.4.0 stuff
Markus Goetz [Fri, 4 Aug 2017 13:23:44 +0000 (15:23 +0200)]
ChangeLog: More 2.4.0 stuff

8 years agoMerge pull request #43 from nextcloud-gmbh/drone
Roeland Jago Douma [Fri, 4 Aug 2017 08:55:06 +0000 (10:55 +0200)]
Merge pull request #43 from nextcloud-gmbh/drone

Get drone up and running

8 years agoAdd drone test for Qt-5.6
Roeland Jago Douma [Tue, 18 Jul 2017 12:59:37 +0000 (14:59 +0200)]
Add drone test for Qt-5.6

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
8 years agoMerge pull request #5762 from owncloud/update-docs-to-2.3.2
Matthew Setter [Thu, 3 Aug 2017 11:56:39 +0000 (13:56 +0200)]
Merge pull request #5762 from owncloud/update-docs-to-2.3.2

Update client docs version string to 2.3.2

8 years agoUpdate client docs version string to 2.4.0
Matthew Setter [Wed, 10 May 2017 07:46:57 +0000 (09:46 +0200)]
Update client docs version string to 2.4.0

Need to update this to match the latest version.

8 years agoMerge pull request #5929 from owncloud/doc-cleanup
Matthew Setter [Tue, 1 Aug 2017 09:52:05 +0000 (11:52 +0200)]
Merge pull request #5929 from owncloud/doc-cleanup

Clean up the client docs removing old, outdated, content

8 years agomacos: Add a sidebar icon
Jocelyn Turcotte [Fri, 28 Jul 2017 15:51:52 +0000 (17:51 +0200)]
macos: Add a sidebar icon

In the process, use an iconset to generate the icns using iconutil.
Also add some missing icon resolutions according to the guidelines.

Issue #296

8 years agoClean up the client docs removing old, outdated, content
Matthew Setter [Mon, 31 Jul 2017 12:04:02 +0000 (14:04 +0200)]
Clean up the client docs removing old, outdated, content

This makes changes as suggested by @michaelstingl in
https://github.com/owncloud/documentation/issues/3240.

8 years agoFolderWizard: fix crash in FolderWizardRemotePath::slotHandleLsColNetworkError
Olivier Goffart [Fri, 28 Jul 2017 08:13:07 +0000 (10:13 +0200)]
FolderWizard: fix crash in FolderWizardRemotePath::slotHandleLsColNetworkError

The Job is a LsColJob, not a MkColJob!

Reproduce by entering a name with invalid character that cause an error 400
in the folder wizard's remote path line edit.

(Relates issue #5924)

8 years agoGeneral settings: Put all advanced checkboxes in a layout
Jocelyn Turcotte [Thu, 27 Jul 2017 08:53:17 +0000 (10:53 +0200)]
General settings: Put all advanced checkboxes in a layout

The mac style has the concept of Layout Item Rectangle that bleeds
widgets margins into parent margins. This unfortunately doesn't work
when the parent layout doesn't have any margin, like we do when we
have the hierarchy:
 Vertical(normal margin)
   / Horizontal(no margin, uses parent layout spacing)
     /Widget

I guess Qt should propagate remaining uneaten margins to grand-parent
layouts and so on to have this work properly, but nobody seems to
have touched that code since Qt 4.4.
So just try to make the problem less worse by making sure that
all checkboxes we want to align are either in the same layout, or
in a loyout of their own.

Issue #5492

8 years agoFix the selective sync notification folder list being cropped
Jocelyn Turcotte [Thu, 27 Jul 2017 08:46:46 +0000 (10:46 +0200)]
Fix the selective sync notification folder list being cropped

The maximumHeight would stay at the last animated value.

Issue #5492

8 years agoAccountState: reset _waitingForNewCredentials when signin in
Olivier Goffart [Fri, 21 Jul 2017 13:54:47 +0000 (15:54 +0200)]
AccountState: reset _waitingForNewCredentials when signin in

Just to force the logic to re-ask the credenticals, in case we were
already asking them when singin off.

Issue: https://github.com/owncloud/client/issues/5893#issuecomment-316949686

8 years agoencoding_tests: No more iconv
Markus Goetz [Wed, 26 Jul 2017 09:46:18 +0000 (11:46 +0200)]
encoding_tests: No more iconv

8 years agoOAuth: clear refresh token when the server claim not to support oauth
Olivier Goffart [Mon, 24 Jul 2017 10:00:29 +0000 (12:00 +0200)]
OAuth: clear refresh token when the server claim not to support oauth

Allow upgrade path when the server removes support for oauth
Relates: https://github.com/owncloud/client/issues/5848#issuecomment-317353049

We also need to force the account to commit the config to the disk,
otherwise we may not register we are no longer using owncloud and we
risk sending the password as the token to the token refresh API call

8 years agoOAuth: Fix refresh of token after expiration
Olivier Goffart [Tue, 18 Jul 2017 12:53:41 +0000 (14:53 +0200)]
OAuth: Fix refresh of token after expiration

Before commit d3b00532b1dd9f44cc606e6738b53345c37582cf,
fetchFromKeychain was called everytime we detect that the creds are
invalid (in AccountState::slotInvalidCredentials)
But since that commit, AccountState was calling askFromUser directly,
breaking the refresh of the token.

So I made sure AccountState::slotInvalidCredentials still calls
refreshAccessToken.

Another change that was made was too be sure to clear the cookies
in HttpCredentials::invalidateToken even when we are only clearing the
access_token. That's because the session with a cookie may stay valid
longer than the access_token

8 years agoRevert "Revert "Discovery: consider also the "shared by me" as shared""
Olivier Goffart [Fri, 21 Jul 2017 09:28:15 +0000 (11:28 +0200)]
Revert "Revert "Discovery: consider also the "shared by me" as shared""

This reverts commit efa7821dd28491ad0b93fec53be6d4ad0f94f19f.

This reverts the revert, but also add a check that the server version
is bigger than 10.0

Issue #4788

8 years agoDon't keep the list of touched files for the whole sync
Jocelyn Turcotte [Mon, 24 Jul 2017 06:03:05 +0000 (08:03 +0200)]
Don't keep the list of touched files for the whole sync

We only want to know if they were touched within the last 15 seconds,
so change the data structure to use a QMultiMap, and sort them by
QElapsedTimer. This allows us to iterate over old entries ordered by
time and to stop once we find a recent entry.

This makes the look-up slower but in most cases the folder watcher
will report any change within milliseconds, and we start from the
most recent. What this really makes slower are actual user file
changes while a fast sync is underways which will need to iterate
over the whole map to find out the file isn't there.

This reduces the growth of the memory usage when downloading a large
amount of files.

8 years agowindows: Fix a memory leak in FileSystem::longWinPath
Jocelyn Turcotte [Mon, 24 Jul 2017 13:11:30 +0000 (15:11 +0200)]
windows: Fix a memory leak in FileSystem::longWinPath

Also use c_path_to_UNC directly instead of doing an extra
UTF-8->wchar conversion.

8 years agobuildint.rst: Put back reference to openssl on windows
Olivier Goffart [Fri, 21 Jul 2017 06:54:06 +0000 (08:54 +0200)]
buildint.rst: Put back reference to openssl on windows

OpenSSL might no longer be needed to build the client, but we still need
it to run it.

That reverts part of commit 6e57b0219edd7dcc99509620277bb53478d958a6 for
this file.

Fix #5858
Reported in https://central.owncloud.org/t/locally-built-client-error-creating-ssl-context/8264

8 years agoPropagator: fix a qMax which should have been a qMin
Olivier Goffart [Tue, 18 Jul 2017 06:58:07 +0000 (08:58 +0200)]
Propagator: fix a qMax which should have been a qMin

8 years agoOAuth: Add the user in the authorize call
Olivier Goffart [Fri, 14 Jul 2017 13:56:32 +0000 (15:56 +0200)]
OAuth: Add the user in the authorize call

Issues: #5897, https://github.com/owncloud/oauth2/issues/48

8 years agoPropagateUpload: Remove the Qt workaround against data corruption
Olivier Goffart [Sat, 15 Jul 2017 07:36:24 +0000 (09:36 +0200)]
PropagateUpload: Remove the Qt workaround against data corruption

This was only for Qt <= 5.4, which we don't really support anymore.
And even then, the data corruption is happens very seldomly anyway.

8 years agoMerge pull request #5905 from kaustubh-welankar/issue_5692_pull
Olivier Goffart [Mon, 17 Jul 2017 06:38:57 +0000 (08:38 +0200)]
Merge pull request #5905 from kaustubh-welankar/issue_5692_pull

Fix for issue number #5692 :

Abort owncloudcmd if the capabilities call fails.

8 years agoAccessManager: Disable HTTP/2 without TLS
Olivier Goffart [Tue, 13 Jun 2017 13:29:01 +0000 (15:29 +0200)]
AccessManager: Disable HTTP/2 without TLS

Qt would otherwise still try to do HTTP/2 connection even over "http://".
And that does not work with server that does not support it

8 years agoHTTP/2 Support
Olivier Goffart [Mon, 22 May 2017 12:41:06 +0000 (14:41 +0200)]
HTTP/2 Support

We need Qt 5.9 for HTTP2 because, even if Qt 5.8 already has support
for it, there is some critical bug in the HTTP2 implementation which
make it unusable [ https://codereview.qt-project.org/186050 and
https://codereview.qt-project.org/186066 ]

When using HTTP2, we can use many more parallel network request, this
is especially good for small file handling

Lower the priority of the GET and PUT propagation jobs, so the quota
or selective sync ui PROPFIND will not be blocked by them

8 years agoMerge pull request #5326 from owncloud/cleanup_tests
Olivier Goffart [Sat, 15 Jul 2017 12:48:25 +0000 (14:48 +0200)]
Merge pull request #5326 from owncloud/cleanup_tests

Use OWNCLOUD_BIN_DIR directly in C++ code.