Commit Graph
17214 Commits
Author SHA1 Message Date
Jürgen WeigertandRoeland Jago Douma c1e2bdc3d2 Update CMakeLists.txt
Make admin folder optional. It is needed for osx, but it is deleted from Linux builds for the sake of easier license review as discussed in https://github.com/owncloud/client/issues/6005
2017-10-05 22:01:38 +02:00
Jürgen WeigertandRoeland Jago Douma 09c3043c85 support old sqlite before 3.7.7
quickfix: define the symbol for backwards compat
or FIXME: better solution #ifdef SQLITE_IOERR_SHMMAP where needed...
2017-10-05 22:01:38 +02:00
Olivier GoffartandRoeland Jago Douma 0a8c394ee9 fixup! [tx-robot] updated from transifex 2017-10-05 22:01:38 +02:00
Olivier GoffartandRoeland Jago Douma cd44d8ed77 Test OAuth2
Include a test for PR #6057
2017-10-05 22:01:38 +02:00
Olivier GoffartandRoeland Jago Douma cfc38753b4 SyncEngine: _hasNoneFiles should be set when there are INSTRUCTION_UPDATE_METADATA 2017-10-05 22:01:38 +02:00
Olivier GoffartandRoeland Jago Douma c424dec7d4 OAuth: fix compilation with old gcc
We need to used QPointer::data in the signal slot connection

Relates to pr #6065
2017-10-05 22:01:38 +02:00
Jenkins for ownCloudandRoeland Jago Douma 78078b714e [tx-robot] updated from transifex 2017-10-05 22:01:38 +02:00
Markus GoetzandRoeland Jago Douma 36117336e7 Updater: Rudimentary support for beta channel
So we can get people update from our alpha to the beta and rc
2017-10-05 22:01:38 +02:00
Olivier GoffartandRoeland Jago Douma d59c146488 Fix encoding of version string 2017-10-05 22:01:38 +02:00
Olivier GoffartandRoeland Jago Douma 6583ebdcd9 csync_rename: optimize lookup
Avoid many memory allocations in reconcile
2017-10-05 22:01:38 +02:00
Olivier GoffartandRoeland Jago Douma 917e2e43c6 csync_reconcile: Optimize reconcile by avoiding alocations
Fix performence regression from commit d66c2b5fae
For every new file we would look up every parent directories. Allocating
a new QByteArreay for every parent riectory just to know if it is in the other
tree is wasting lots of CPU.
Use a ByteArrayRef trick, similar to QStringRef
2017-10-05 22:01:37 +02:00
Dominik SchmidtandRoeland Jago Douma bdd3dc743b Set CMAKE_INSTALL_RPATH as RPATH for installed executables 2017-10-05 22:01:37 +02:00
Christian KammandRoeland Jago Douma 9143ddd0ad Packaging: Add options for fine-grained builds #5957
Extracted and adjusted from packaging.diff by @jnweiger and @dschmidt
2017-10-05 22:01:37 +02:00
Christian KammandRoeland Jago Douma f46440eb67 Packaging: Adjust APPNAME handling #5957
Extracted and adjusted from packaging.diff by @jnweiger and @dschmidt
2017-10-05 22:01:37 +02:00
Christian KammandRoeland Jago Douma 96a6d64500 Packaging: Make check for theme.qrc more specific #5957
Extracted and adjusted from packaging.diff by @jnweiger and @dschmidt
2017-10-05 22:01:37 +02:00
Christian KammandRoeland Jago Douma 08bc21937b Packaging: Change directory for docs #5957
Extracted and adjusted from packaging.diff by @jnweiger and @dschmidt
2017-10-05 22:01:37 +02:00
Christian KammandRoeland Jago Douma f64519bfbd Move the --version output text to Theme #5957
Extracted and adjusted from packaging.diff by @jnweiger and @dschmidt
2017-10-05 22:01:37 +02:00
Jenkins for ownCloudandRoeland Jago Douma 494df32ee4 [tx-robot] updated from transifex 2017-10-05 22:01:37 +02:00
Olivier GoffartandRoeland Jago Douma bbbd2319ed Use QDateTime::currentDateTimeUtc instead of the non utc version
QDateTime::currentDateTime is terribly slow.
2017-10-05 22:01:37 +02:00
Olivier GoffartandRoeland Jago Douma 79c775bcd8 OAuth: Fix crash when closing the browser while identifying
To reproduce, log in and click "authorize" on the browser, then close
the browser before the client has replied, (but after redirected to localhost,
i.e. when the client is asking the server for the token)

The problem is that socket can be destroyed so we don't need to answer on a
destroyed socket.
2017-10-05 22:01:37 +02:00
Olivier GoffartandRoeland Jago Douma a3b1597d17 OwnSQL: don't parse the error message when we are done 2017-10-05 22:01:37 +02:00
Jocelyn TurcotteandRoeland Jago Douma ecb4e96794 SyncJournalDb: Reimplement the db_is_empty logic from csync
This reduces the initial sync local discovery time from
2.0 to 0.6 seconds in LargeSyncBench on my machine.
2017-10-05 22:01:37 +02:00
Jocelyn TurcotteandRoeland Jago Douma 185cb2e39a Use SyncJournalDb in csync
This gets rid of the csync_statedb sqlite layer and use
the same code and same connection as the rest of the SyncEngine.

Missing functions are added to SyncJournalDb and change a few minor
things (like changing SyncJournalFileRecord::_modtime to be an int64
instead of a QDateTime, like it was in csync).
2017-10-05 22:01:37 +02:00
Jocelyn TurcotteandRoeland Jago Douma c6610f6fbf SyncJournalDB: Allow callers of getFileRecord if the query failed
The current implementation would return the same value whether the query failed
or if no row would be found. This is something that is currently checked by csync
and needs to be provided if we want to use SyncJournalDB there.

Adjusted all call sites to also check the return value even though they
could still just rely on rec.isValid(), but makes it more explicit as to what
happens for database errors in those cases, if we ever want to gracefully handle
them.
2017-10-05 22:01:37 +02:00
Jocelyn TurcotteandRoeland Jago Douma d76ecf015c SyncJournalDB: Bind phash as a qlonglong instead of a QString
This is what csync does and we don't need to pass it as a string
to let sqlite convert it back to a uint64 later.
2017-10-05 22:01:36 +02:00
Jenkins for ownCloudandRoeland Jago Douma 312f3a9bf3 [tx-robot] updated from transifex 2017-10-05 22:01:36 +02:00
Olivier GoffartandRoeland Jago Douma fd9662b803 bandwidthmanager: Fix unregistering devices on delete
from the destroyed signal, qobject_cast won't work because the object
is already destroyed. One must use reinterpret_cast then
2017-10-05 22:01:36 +02:00
Olivier GoffartandRoeland Jago Douma 37810c0a19 PropagateUpload: Fix another non-normalized connect that appears while profiling 2017-10-05 22:01:36 +02:00
Olivier GoffartandRoeland Jago Douma 38a76ac5bf benchlargesync: Do several syncs
Make sure there is already a small sync before so the database is queried.
Make also a sync after to run an update with many files in the database.
2017-10-05 22:01:36 +02:00
Olivier GoffartandRoeland Jago Douma d100f9ac67 c_utf8_from_locale: optimize the UTF8 case on Linux
Avoid converting to a QString as an intermediate step
2017-10-05 22:01:36 +02:00
Olivier GoffartandRoeland Jago Douma 5fc864adb6 csync: use a unordered_map for the FileMap
Saves more than 10% of csync_update on LargeSyncBench
2017-10-05 22:01:36 +02:00
Jenkins for ownCloudandRoeland Jago Douma 2738d5d9ab [tx-robot] updated from transifex 2017-10-05 22:01:36 +02:00
Olivier GoffartandRoeland Jago Douma 0936cfee5d chsck_vio: fix readdir test by removing it.
The code that was creating the files in the directory was removed in
commit 6906b8d30c. The directory is empty
so the result is expected to be null. It was passing before because the
code was returning an entry for . and ..,  but since commit
35f80bd439 this is no longer the case
2017-10-05 22:01:36 +02:00
Olivier GoffartandRoeland Jago Douma 38962ca694 csync_update: fix assert
Amend 1dc44c0f62
2017-10-05 22:01:36 +02:00
Jenkins for ownCloudandRoeland Jago Douma 7e677516ae [tx-robot] updated from transifex 2017-10-05 22:01:36 +02:00
Markus GoetzandRoeland Jago Douma cabf7a79d5 macOS: Fix compile 2017-10-05 22:01:36 +02:00
Olivier GoffartandRoeland Jago Douma 2b12990f19 Httpcreds: Fix double slash in the Request App Password url
Issue #6044
2017-10-05 22:01:36 +02:00
Olivier GoffartandRoeland Jago Douma 3184d4bb32 OAuth2: Fix double slash in URL
We need to use concatPath to avoid possible double '/' in the URLs if the
account url() ends with '/'.

This has become even more of a problem since commit
d1b8370a4a which was resolving the url after
a redirect where most server actually add a '/' if the url is a folder
2017-10-05 22:01:36 +02:00
Jenkins for ownCloudandRoeland Jago Douma 0cbbea9796 [tx-robot] updated from transifex 2017-10-05 22:01:35 +02:00
Olivier GoffartandRoeland Jago Douma b19677ea97 csync_vio_local: merge readdir and stat in the same call
For the remote this was already done long time ago
For windows, this was already partially done

The goal is to avoid needless conversion of the path to local encoding.
2017-10-05 22:01:35 +02:00
Olivier GoffartandRoeland Jago Douma dc0a0841fa csync_update/reconcile: replace CSYNC_LOG with qDebug/qInfo
CSYNC_LOG has quite an overhead as it uses vsprintf and it might
be run even if the category is disabled
2017-10-05 22:01:35 +02:00
Christian KammandRoeland Jago Douma 351e65309c SyncEngine: Adjust free space messaging
Before, the way the info message was phrased implied a failure. And
since the large numbers can be hard to compare that can be confusing.
2017-10-05 22:01:35 +02:00
Olivier GoffartandRoeland Jago Douma e36c8678d9 csync: remove unused type 2017-10-05 22:01:35 +02:00
Olivier GoffartandRoeland Jago Douma f793de4629 RemotePermissions: Store in a class rather than in a QByteArray to save memory
Create a specific type that parses the permissions so we can store
it in a short rather than in a QByteArray

Note: in RemotePermissions::toString, we make sure the string is not
empty by adding a space, this was already existing before commit
e8f7adc7ca where it was removed by mistake.
2017-10-05 22:01:35 +02:00
Jenkins for ownCloudandRoeland Jago Douma cd4908ac6a [tx-robot] updated from transifex 2017-10-05 22:01:35 +02:00
Olivier GoffartandRoeland Jago Douma 0ad05aee0d Port to new signal-slot syntax what cannot be done automatically
Some slot were protected or private but needed to be public.
Some needed a static_cast (can't use qOverload because it is in Qt 5.7)

This is not only a partial change.
2017-10-05 22:01:35 +02:00
Olivier GoffartandRoeland Jago Douma 190f821d93 DiscoveryPhase: use the new syntax in disconnect
Since we used the new syntax in connect, we need to use it in disconnect
2017-10-05 22:01:35 +02:00
Olivier GoffartandRoeland Jago Douma 7aca2352be Use the Qt5 connection syntax (automated with clazy)
This is motivated by the fact that QMetaObject::noralizeSignature takes 7.35%
CPU of the LargeSyncBench. (Mostly from ABstractNetworkJob::setupConnections and
PropagateUploadFileV1::startNextChunk). It could be fixed by using normalized
signature in the connection statement, but i tought it was a good oportunity
to modernize the code.

This commit only contains calls that were automatically converted with clazy.
2017-10-05 22:01:35 +02:00
Olivier GoffartandRoeland Jago Douma 3143b32aa5 test/stub: add some call required by the next patches
As we use the new connection syntax in folderman.cpp, some more symbol
need to be mocked
2017-10-05 22:01:35 +02:00
Olivier GoffartandRoeland Jago Douma e8a76859c1 Include <QAuthenticator> from code that connect to signal that uses it
The new connection syntax will need that
2017-10-05 22:01:35 +02:00