1
0
mirror of https://github.com/chylex/Nextcloud-Desktop.git synced 2024-09-30 20:42:52 +02:00
Commit Graph

13663 Commits

Author SHA1 Message Date
Jürgen Weigert
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 Goffart
0a8c394ee9
fixup! [tx-robot] updated from transifex 2017-10-05 22:01:38 +02:00
Olivier Goffart
cd44d8ed77
Test OAuth2
Include a test for PR #6057
2017-10-05 22:01:38 +02:00
Olivier Goffart
cfc38753b4
SyncEngine: _hasNoneFiles should be set when there are INSTRUCTION_UPDATE_METADATA 2017-10-05 22:01:38 +02:00
Olivier Goffart
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 ownCloud
78078b714e
[tx-robot] updated from transifex 2017-10-05 22:01:38 +02:00
Markus Goetz
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 Goffart
d59c146488
Fix encoding of version string 2017-10-05 22:01:38 +02:00
Olivier Goffart
6583ebdcd9
csync_rename: optimize lookup
Avoid many memory allocations in reconcile
2017-10-05 22:01:38 +02:00
Olivier Goffart
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 Schmidt
bdd3dc743b
Set CMAKE_INSTALL_RPATH as RPATH for installed executables 2017-10-05 22:01:37 +02:00
Christian Kamm
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 Kamm
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 Kamm
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 Kamm
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 Kamm
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 ownCloud
494df32ee4
[tx-robot] updated from transifex 2017-10-05 22:01:37 +02:00
Olivier Goffart
bbbd2319ed
Use QDateTime::currentDateTimeUtc instead of the non utc version
QDateTime::currentDateTime is terribly slow.
2017-10-05 22:01:37 +02:00
Olivier Goffart
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 Goffart
a3b1597d17
OwnSQL: don't parse the error message when we are done 2017-10-05 22:01:37 +02:00
Jocelyn Turcotte
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 Turcotte
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 Turcotte
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 Turcotte
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 ownCloud
312f3a9bf3
[tx-robot] updated from transifex 2017-10-05 22:01:36 +02:00
Olivier Goffart
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 Goffart
37810c0a19
PropagateUpload: Fix another non-normalized connect that appears while profiling 2017-10-05 22:01:36 +02:00
Olivier Goffart
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 Goffart
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 Goffart
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 ownCloud
2738d5d9ab
[tx-robot] updated from transifex 2017-10-05 22:01:36 +02:00
Olivier Goffart
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 Goffart
38962ca694
csync_update: fix assert
Amend 1dc44c0f62
2017-10-05 22:01:36 +02:00
Jenkins for ownCloud
7e677516ae
[tx-robot] updated from transifex 2017-10-05 22:01:36 +02:00
Markus Goetz
cabf7a79d5
macOS: Fix compile 2017-10-05 22:01:36 +02:00
Olivier Goffart
2b12990f19
Httpcreds: Fix double slash in the Request App Password url
Issue #6044
2017-10-05 22:01:36 +02:00
Olivier Goffart
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 ownCloud
0cbbea9796
[tx-robot] updated from transifex 2017-10-05 22:01:35 +02:00
Olivier Goffart
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 Goffart
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 Kamm
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 Goffart
e36c8678d9
csync: remove unused type 2017-10-05 22:01:35 +02:00
Olivier Goffart
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 ownCloud
cd4908ac6a
[tx-robot] updated from transifex 2017-10-05 22:01:35 +02:00
Olivier Goffart
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 Goffart
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 Goffart
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 Goffart
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 Goffart
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
Olivier Goffart
c219ceea52
Gui: Use lambda instead of QSignalMapper
It's simpler, and QSignalMapper is deprecated in Qt 5.10
2017-10-05 22:01:34 +02:00