1
0
mirror of https://github.com/chylex/Nextcloud-Desktop.git synced 2024-11-26 13:42:45 +01:00
Commit Graph

3218 Commits

Author SHA1 Message Date
Olivier Goffart
22ad34fa0e Merge branch '1.7'
Conflicts:
	admin/win/nsi/l10n/French.nsh
	src/mirall/propagator_qnam.cpp
2015-01-15 17:58:43 +01:00
Olivier Goffart
ce0e7e4a5d Propagator download: Do not assume the server do not support ranges if we cannot parse the Content-Range header
There are several reason why start==0
* The Content-Range header was not present
* We can't parse it
* Or it is actually 0

If we can't parse it, we cannot assume anything and must error out.
So only in the first case we should discard the temporary file and continue.

Issue #2708
2015-01-15 17:56:49 +01:00
Olivier Goffart
907b79d3b8 Utility: Use appropriate unit when converting from bytes to human readable units
We must not use the SI units if we use power of 2

I believe that we should use SI units and power of 10
But since the server still use power of 2, we need to show the same numbers

But at least we use the proper standard IEC unit that are explicit
2015-01-15 14:06:17 +01:00
Olivier Goffart
863731fd6a Revert "Utility: Use SI units"
This reverts commit 7445fa7ef7.
and commit f654c53c35.

The server still use wrong powers, so we still need to use the same
2015-01-15 13:56:51 +01:00
Olivier Goffart
c9f1b3229b Add Folder Wizard: fix wording
(Relates #2663)
2015-01-15 13:55:48 +01:00
Olivier Goffart
2b8b204cfc SelectiveSyncDialog::estimatedSize: return qint64 because -1 in case of error 2015-01-15 13:07:16 +01:00
Olivier Goffart
264471af43 csync: cleanup some unused error code 2015-01-15 12:19:06 +01:00
Olivier Goffart
08d3ae9f02 csync_statedb: Have more granular error reporting when the loaddb fails
In order to distiguish error from sqlite_open or from the integrity check

Issue #2673
2015-01-15 11:36:24 +01:00
Roeland Jago Douma
cd0c9b2ddb Sharedialog: More error checking 2015-01-14 19:47:25 +01:00
Roeland Jago Douma
b80bbe6587 Sharedialog: more const 2015-01-14 19:36:42 +01:00
Roeland Jago Douma
879d41bf2d Sharedialog: Fix spinners and passwordfield
The password field now show correct info when a password is entered etc.
Maybe we should have an extra info part where we state that the user needs to
press enter to submit the password
2015-01-14 19:08:04 +01:00
Roeland Jago Douma
7b1cfd69d7 Sharedialog: use QProgressIndicator
This is a merge from the movie in the original commit (which was local) to the
QProgressIndicator. However, on all connections I tested it, it did not add
much since the API is in gernal pretty quick. So maybe we can just remove this.
2015-01-14 18:42:56 +01:00
Luca Lorenzetto
ef9f2a965d Fix for issue #2703 2015-01-14 17:39:14 +01:00
Olivier Goffart
ac0e8b1fe1 Qt 4 fix 2015-01-14 16:30:10 +01:00
Olivier Goffart
da0f7317b4 Wizard: Show the size of the folders that will be downloaded
Part of #2580
2015-01-14 16:11:07 +01:00
Roeland Jago Douma
3e81839af5 Sharedialog: Removed duplicted code
Handling of updated shares is identical from users and groups
2015-01-14 15:27:15 +01:00
Christian Kamm
0af5574951 Propagate upload: code cleanup 2015-01-14 15:20:02 +01:00
Olivier Goffart
0ae9055ea6 Propagator upload: Fix UploadDevice::seek 2015-01-14 15:08:09 +01:00
Olivier Goffart
885aafcea3 SelectiveSync dialog: Show the sizes of the folder 2015-01-14 15:08:09 +01:00
Olivier Goffart
7445fa7ef7 Utility: Use SI units 2015-01-14 15:08:09 +01:00
Markus Goetz
a544133d73 Propagator: Guard access to BandwidthManager
Shouls fix #2623
2015-01-14 14:28:47 +01:00
Christian Kamm
b3c02798a3 Propagator: Use FILE_SHARE_DELETE on Windows. #2070 #2597 2015-01-14 14:16:05 +01:00
Roeland Jago Douma
0bd6eb1792 Sharedialog: fix changes due to rebase 2015-01-14 13:51:02 +01:00
Olivier Goffart
3ec19ee355 Propatage upload: Preload the chunk in memory and close the file
This should solve #2675 and #1981

By preloading the chunks in memory before sending them, we don't keep the
file open and therefore we let other program open the file for writing.

If the file is modified between two chunks, we detect that and abort anyway
2015-01-14 13:46:51 +01:00
Olivier Goffart
0215b250af UploadDevice: mark overrided method as Q_DECL_OVERRIDE 2015-01-14 13:46:51 +01:00
Olivier Goffart
6a0c9fdd34 Propagate upload: Change the default chunk size to 5MiB and make chunk upload parallel
The server is slow to process each chunk. As a result the time between
the chunks is not neglectible. Therefore we gain a lot of time by
uploading the chunks in parallel. So the bandwitdh is used when the
server is waiting between chunks.
2015-01-14 13:46:51 +01:00
Olivier Goffart
7f1593c5d7 PropagateUpload: The PUTJob owns the chunk device, so make it a QScopedPointer instead of a QSharedPointer 2015-01-14 13:46:51 +01:00
Roeland Jago Douma
e420a689dc Sharedialog: More reply checking and removing some duplicated code 2015-01-14 13:43:01 +01:00
Roeland Jago Douma
9addd56f9b Sharedialog: follow correct behavior for files when editing permissions 2015-01-14 13:43:01 +01:00
Roeland Jago Douma
a7e69a5dc5 Sharedialog: Started parsing server replies 2015-01-14 13:43:01 +01:00
Roeland Jago Douma
f6a83d5de2 ShareDialog: UI is different for files/dirs
Bunch of if statements to make sure that we do not display delete/create on
files.
2015-01-14 13:43:01 +01:00
Roeland Jago Douma
d1d8a40acf Sharedialog: fix unused var compiler warnings 2015-01-14 13:39:07 +01:00
Roeland Jago Douma
cb18dfaaef Sharedialog: Of course users can also have create and delete privileges 2015-01-14 13:39:07 +01:00
Roeland Jago Douma
a22a03e501 ShareDialog: Group sharing is now also possible
Basically the same functionality as for user sharing. Maybe it would be wise to
merge the two functionalities. Should be rather straight forward if we also
merge the UI parts.
2015-01-14 13:39:06 +01:00
Roeland Jago Douma
9a35b5670e ShareDialog: Allow sharing with users
This commit needs a lot of cleaning up. And a lot of error checking needs to be
added. However it is now possible to change and add new shares with users.
Sharing with groups should be just copy paste.

Also the UI needs some love.
2015-01-14 13:39:06 +01:00
Roeland Jago Douma
017b54f9a8 Sharedialog: Allow modifications of permission for users 2015-01-14 13:39:06 +01:00
Christian Kamm
9b7e6cc5c1 Fix warnings.
* remove Unused variable
* zorder for spacers makes no sense
2015-01-14 11:28:53 +01:00
Klaas Freitag
209276efa8 ShareDialog: Moved open slot from Application object to Gui object.
Also set auto delete flag for the dialog explicitely.
2015-01-13 13:50:41 +01:00
Daniel Molkentin
31e584e3e3 Fix win32 build 2015-01-12 13:53:40 +01:00
Klaas Freitag
ad09f6491b ShareDialog: Fix const ref for arguments. 2015-01-12 11:35:11 +01:00
Klaas Freitag
efbe033bfb Sharedialog: Fix merge problem (use AccountPtr) plus cleanup. 2015-01-12 11:30:02 +01:00
Klaas Freitag
2c6f0950f6 Merge pull request #2674 from rullzer/filebrowser_integration
Add Sharing from the desktop, SocketAPI and Dialog.
2015-01-12 11:16:28 +01:00
Roeland Jago Douma
b680788f48 Sharedialog: Allow setting and retrieving of experiation data for public urls 2015-01-12 10:14:45 +01:00
Daniel Molkentin
5e0d4ab31d Further Windows compile fix 2015-01-12 09:50:37 +01:00
Daniel Molkentin
488f993f45 Fix compilation on Windows 2015-01-12 09:40:11 +01:00
Roeland Jago Douma
811cbc27c0 Sharedialog: Construct correct public url for existing shares 2015-01-11 14:16:49 +01:00
Volkan Gezer
cefa31eb82 fix typo
suggested by transifex translator
2015-01-11 14:07:04 +01:00
Roeland Jago Douma
25e90ff658 Sharedialog: use Q_FOREACH 2015-01-11 13:56:23 +01:00
Roeland Jago Douma
fa390299f9 Added Q_FUNC_INFO at several places 2015-01-11 13:41:15 +01:00
Roeland Jago Douma
accb036507 Removed some unused outcommented code 2015-01-11 13:36:45 +01:00
Roeland Jago Douma
44690ff596 ShareDialog: fixed "" -> QString 2015-01-11 13:27:32 +01:00
Roeland Jago Douma
e20f819c1d Sharedialog: QString("") -> QString() 2015-01-11 13:24:40 +01:00
Roeland Jago Douma
1d011a2f9a ShareDialog: make visible text translatable 2015-01-11 13:22:48 +01:00
Roeland Jago Douma
bc84a78b0f ShareDialog: Made slot arguments const 2015-01-11 11:19:12 +01:00
Daniel Molkentin
6034bd0946 Wizard: Never attempt to hide server page
The wizard code used to call hide() on hardcoded wizards.
This means that for a brief moment, the first page with the URL
(disabled line edit) may be seen. I think that's completely
legitimate from a feedback perspective. The alternative would
be to unhide on error, but this is rather unelegant...
2015-01-11 07:38:09 +01:00
Klaas Freitag
786a877986 SocketAPI: Some cleanups plus added some consts 2015-01-09 11:44:01 +01:00
Daniel Molkentin
c86d8e5acf Clean up BSD support patch 2015-01-08 22:40:47 +01:00
Daniel Molkentin
4a819026df Merge pull request #2634 from ryo-on/netbsd-support
Support NetBSD like FreeBSD or Linux.
2015-01-08 22:35:44 +01:00
Olivier Goffart
7671ae8df7 Application: Initialize the folderman after we checked for existance
So we don't start the SocketAPI if we are going to quit.
We also do not log any message anymore before we install the hooks

Should solve #2666
2015-01-08 16:52:23 +01:00
Daniel Molkentin
df555d5321 Merge remote-tracking branch 'origin/master' into accountstate
Conflicts:
	src/cmd/cmd.cpp
2015-01-08 15:38:41 +01:00
Daniel Molkentin
c3468b7ed6 Merge remote-tracking branch 'origin/master' into accountstate
Conflicts:
	src/gui/owncloudsetupwizard.cpp
	src/gui/owncloudsetupwizard.h
	src/libsync/propagatedownload.cpp
	src/libsync/propagatedownload.h
2015-01-08 15:33:39 +01:00
Olivier Goffart
bbf0e7c0a5 owncloudcmd: add --unsyncedfolders to test selective sync 2015-01-08 15:27:02 +01:00
Daniel Molkentin
3f5c1d2ade Merge pull request #2678 from chrodan/master
Hide Ignored files in context menu
2015-01-08 14:29:36 +01:00
Daniel Molkentin
dd063d0207 Add hack to make old themes work 2015-01-08 14:21:58 +01:00
Christoph Dann
309ff2997c potential fix for #1865
Do not show ignored files in context menu
2015-01-08 11:42:14 +01:00
Daniel Molkentin
8e8ca97eec Fix build 2015-01-08 09:42:26 +01:00
Daniel Molkentin
51d7559a2c Simplify checkDowngradeAdvised logic
Also, show() and back() belong into slotConnectionCheck only
2015-01-07 18:22:44 +01:00
Daniel Molkentin
5c4f706fe4 Setup Wizard: Make sure to reset auth type when URL changes 2015-01-07 18:01:18 +01:00
Daniel Molkentin
7ac32a19b5 Do not show the HTTP-reconnect popup when its not warranted
Fixes usability issues in the workaround of #2607
2015-01-07 18:01:11 +01:00
Olivier Goffart
8e3dbcb7c0 SocketAPi: use absoluteFilePath unstead of canonicalFilePath
Because canonicalFilePath is way too slow.

Issue #2671
2015-01-07 14:37:05 +01:00
Olivier Goffart
ab0bc75e43 PropagateUploadFileQNAM::slotUploadProgress: Fix inverted condition
( Apply this commit 2d8053a9df )
2015-01-05 17:32:12 +01:00
Olivier Goffart
414ac5433d Merge branch '1.7'
Conflicts:
	binary
	doc/accountsetup.rst
	doc/architecture.rst
	doc/navigating.rst
	doc/owncloudcmd.rst
	doc/troubleshooting.rst
2015-01-05 14:40:53 +01:00
Olivier Goffart
b2c01ffe21 SyncEngine: Show an error when a file name is not encoded with valid UTF-8
... instead of uploading the file with replacement character, and asserting
on the next sync.

Issue #2649

If the file or folder on the file system has a name with invalid UTF-8,
We would convert the name to utf-8, and the conversion would result in
replacement character placeholder.  And we would upload that file on the server
with that name, and save it with this name on the database.
Fix this issue by showing an error to the user for invalid files.
2015-01-05 13:54:31 +01:00
Olivier Goffart
517dea6958 accountsettings: Use right palette when using reversed palette
Issue #2654

The problem is that the WindowsVistaStyle does something wierd with the palette
when drawing the text, and we should do the same then.
2015-01-05 12:17:05 +01:00
Roeland Jago Douma
ee2e6e5dce Also allow sharing if we only sync a part 2014-12-28 20:13:11 +01:00
Roeland Jago Douma
facb6b2e81 Check box public link now works multiple times
When deleting a share (public link) and recreating it we need to store the new
id.
2014-12-28 20:13:11 +01:00
Roeland Jago Douma
ec3c83c0c9 Minor sharedialog.ui fixes 2014-12-28 20:13:10 +01:00
Roeland Jago Douma
0ad4fb7273 Create valid poststring 2014-12-28 20:13:10 +01:00
Roeland Jago Douma
763d5f67cd Some error checking on SHARE sockeAPI command 2014-12-28 20:13:10 +01:00
Roeland Jago Douma
b7d4c997a3 Fix rebase of branch 2014-12-28 20:13:10 +01:00
Alfie "Azelphur" Day
bd7f45e398 Everything works now, albeit without error checking. 2014-12-28 20:13:10 +01:00
Alfie "Azelphur" Day
748440ced3 Initial push for filebrowser integration, not finished yet but it's a start :) 2014-12-28 20:13:10 +01:00
Ryo ONODERA
16c4864e67 Support NetBSD like FreeBSD or Linux. 2014-12-21 23:00:56 +09:00
Roeland Jago Douma
cd8affc255 Resepct theming when no syncs are configure 2014-12-19 15:08:49 +01:00
Roeland Jago Douma
8677fb18bb Manged folder list in the tray icon is now sorted
We are using a QHash to store all the folder objects. This does not allow for
easy sorting and looks weird to the user. Now they are first inserted into a
temp QMap to sort them properly.
2014-12-19 13:59:50 +01:00
Christian Kamm
4fa212c43b CSync callbacks: Don't use global account. 2014-12-18 15:39:51 +01:00
Christian Kamm
a9da5ebff6 Wizard: Sometimes preserve folders when folder config is skipped.
* When folder config is used, other folder definitions are always
  removed.
* Fix a bug with the wizard becoming stuck when 'skip folder config'
  is used.
2014-12-18 15:39:51 +01:00
Christian Kamm
38ebfec1fb Use global Account/AccountState less.
* Use a shared pointer to Account everywhere to ensure
  the instance stays alive long enough for a sync to terminate
* Folder is now tied to an AccountState
* SyncEngine and OwncloudPropagator tie to an Account and use that
  for all jobs they run

Issue: Since the setup wizard currently always replaces the
account, it will always wipe all folder definitions, even when
the actual changes to the account were minor.
2014-12-18 15:39:51 +01:00
Christian Kamm
6c7acd585e Account: Split into libsync/Account and gui/AccountState.
This allows all the account state information to live in gui
while the sync-relevant data stays in libsync.

I also moved quotainfo to gui since it depends on the account state.
2014-12-18 15:39:51 +01:00
Olivier Goffart
e8efaa5ed8 Direct download URL: Fix resuming
The server might support resuming, so don't always erase the temporary file
and pass the startSize, so the temporary file will be remove if the server
does not support it after all (because it is not sending the "bytes" header

Also pass the expected etag for consistency even if it's not used in this case.
2014-12-18 12:13:12 +01:00
Daniel Molkentin
986b23856f Make setup page usable from shibboleth
Second patch to address #2607
2014-12-17 18:13:59 +01:00
Olivier Goffart
96872e2b3b Download: When direct URL don't work, retry through webdav 2014-12-17 14:28:13 +01:00
Daniel Molkentin
42ffed3f57 Wizard: Show server errors when coming from shibboleth
The wizard needs to be restored and rewound to the first page

First patch to address #2607
2014-12-17 14:24:07 +01:00
Christian Kamm
a006c6962c Move account state related logic into Account.
The account state is now managed mostly by the Account itself
instead of through Application. The gui can still control whether
an account is signed out or not.
2014-12-17 12:01:10 +01:00
Olivier Goffart
b1d392e415 Download job: allow redirect on direct download link
Issue #2614
2014-12-16 11:51:25 +01:00
Olivier Goffart
cbf00e9378 Connection Validator: Fix connection warning
The timeout signal does not exist.
Timeout is handled as a normal network arror.
2014-12-16 11:48:15 +01:00
Olivier Goffart
414838cae8 Settings dialog: remove the code that was updating the account icon
I just wanted to fix the warning:
 QObject::connect: No such slot OCC::SettingsDialog::slotUpdateAccountIcon(QIcon) in settingsdialog.cpp:108

It turns out we don't need anymore the signal or any of the code that
was updating the account icon in the settings dialog since it we now have a fixed icon
2014-12-16 11:36:52 +01:00
Olivier Goffart
3ee14164db network jobs: Refactor the redirect handling in AbdtractNetworkJob
Move the redirect handling from CheckServerJob to AbstractNetworkJob, so we can
later use it in any job  (in preparation for task #2614)
2014-12-16 11:27:02 +01:00
Klaas Freitag
c6daa8e59b Overlays: In case of folders, make sure to append slashes at end.
This fixes #2373
2014-12-12 16:38:07 +01:00
Klaas Freitag
7cc6c1a10f Theme: Add a missing dot. 2014-12-12 13:37:02 +01:00
Klaas Freitag
7f73cc1694 Theme: split the about string apart to have small translation units. 2014-12-12 13:33:38 +01:00
Daniel Molkentin
9a13ec736d Fix OS X compilation 2014-12-11 15:08:13 +01:00
Christian Kamm
1a3041690f ConValidator: Simplify and cleanup.
* This way using it with multiple accounts will be easier.
* Timeouts on the authed requests are handled.
2014-12-11 14:48:01 +01:00
Christian Kamm
84e5ad7346 FolderMan: Delete old journal file when adding folder. #2606 2014-12-11 12:28:01 +01:00
Christian Kamm
4559bb5553 Fix counting of affected files. #1132
* Also ensure the maximum is always >= the current value.
* Take care to handle the ULLONG_MAX value that's sometimes used
  as _completedFileCount.
2014-12-11 11:33:42 +01:00
Christian Kamm
d8c59fcb73 Use connection validator to ping the server. #2485
* Stop the quota job from having an effect on account status
  as it can sometimes take a long time to reply. See #2485 and
  owncloud/core#12744.

* Instead of indirectly using the quota job, use the connection
  validator to regularly ping the server with a basic PROPFIND for
  'getlastmodified' on /.
  This request was usually fast for users even when the quota PROPFIND
  was slow.
2014-12-10 13:40:11 +01:00
Christian Kamm
53d5de685c Merge remote-tracking branch 'origin/1.7'
Conflicts:
	src/gui/folder.cpp
	src/gui/folder.h
	src/libsync/networkjobs.cpp
	src/libsync/owncloudpropagator.h
	src/libsync/propagatedownload.cpp
2014-12-10 13:01:36 +01:00
Olivier Goffart
a3e7f513e6 SocketAPI: use the canonical path
Issue #2591
2014-12-09 20:48:51 +01:00
Daniel Molkentin
d034f10af3 Fix compilation 2014-12-08 19:25:57 +01:00
Daniel Molkentin
a2b817f0c0 mirall.qrc -> client.qrc 2014-12-08 18:00:29 +01:00
Daniel Molkentin
d5f2c36abd Mirall -> (Desktop) Client 2014-12-08 17:54:32 +01:00
Daniel Molkentin
d86b3f04b1 Merge branch 'master' into rename_client 2014-12-08 17:44:04 +01:00
Klaas Freitag
72a90199db Wizard: Removed superflous text, as it is already in the header.
This fixes mirall#2358
2014-12-08 11:12:15 +01:00
Klaas Freitag
49bb861045 Removed useless debug output 2014-12-06 12:37:53 +01:00
Klaas Freitag
1d6661e7e4 Fix the number of displayed items in progress display for removes.
This fixes mirall#1132

A variable that counts the affected items of the propagator operation
done on a item was added to SyncFileItem. Usually that is 1 because
most operations affect only the item itself. But for removes, the
number can be higher for directories (one remove removes a whole tree).

Some rearrangements were needed.
2014-12-06 12:31:45 +01:00
Christian Kamm
40f44c2389 DB: Delete corrupt database. #2547
* Also use readonly DB access for SocketAPI.
2014-12-04 15:35:55 +01:00
Olivier Goffart
441b5bd1dc Setup Wizard: remove all folder definition before starting a new sync
Issue #1989
2014-12-04 15:18:27 +01:00
Christian Kamm
dc2f0d59cb FolderWizard: Clean up naming of 'add folder' button. #2371 2014-12-04 10:47:26 +01:00
Christian Kamm
4dcfacf2d5 Fix compile. :/ 2014-12-04 09:59:24 +01:00
Christian Kamm
b7485106ef NetworkJobs: Set timeout to 5 minutes everywhere. 2014-12-04 09:54:17 +01:00
Christian Kamm
f82893496b Fix typo. 2014-12-04 09:54:15 +01:00
Christian Kamm
c418e58f88 Etag job scheduling: Silence warnings, make prettier. 2014-12-04 09:52:13 +01:00
Klaas Freitag
9ea359de52 GUI: Check if there are sync folders configured and how proper msg.
This fixes #2264
2014-12-03 17:11:42 +01:00
Christian Kamm
b7d7f424c5 FolderMan: only touch _currentSyncFolder when done #2407
Also simplity terminateSyncProcess() to always terminate the
*current* sync run. Only one can be running at a time anyway.
2014-12-03 13:46:37 +01:00
Markus Goetz
46bd473664 Folders: Move ETag check scheduling to FolderMan
Only 1 check per time is able to run now.
For #2553
Might improve #2479 #2485 #2534
2014-12-02 22:32:54 +01:00
Daniel Molkentin
6030fec6cb Fix typo 2014-12-02 15:08:15 +01:00
Daniel Molkentin
b7323dc403 Merge branch 'master' into rename_client 2014-12-02 14:33:28 +01:00
Daniel Molkentin
c6d74d6c12 Fix typo 2014-12-02 14:33:17 +01:00
Daniel Molkentin
a42709f814 Namespace fixes 2014-12-02 14:20:13 +01:00
Daniel Molkentin
3016844dd7 Merge branch 'master' into rename_client
Conflicts:
	README.md
	src/gui/folderman.cpp
	src/gui/settingsdialog.cpp
	src/libsync/accessmanager.cpp
	src/libsync/propagateupload.h
2014-12-02 13:37:22 +01:00
Olivier Goffart
8fbb55a0c8 Wizard: Fix escaping of error message.
An url can contains % signs, so if it does, the errors formating was wrong
because of the use of QString::args

Also, the error is in html format, and we need to let the message box know
that, otherwise we will just see <br/>
2014-12-02 10:22:46 +01:00
Olivier Goffart
f046a7e7fe Wizard: Attempts to really close the database when starting the backup
Still for issue #1989
2014-12-02 10:22:46 +01:00
Markus Goetz
92ce707268 Bandwidth: Fix issue with removed download jobs
The measuring broke when a job that is currently measuring was removed.
2014-12-02 09:37:48 +01:00
Daniel Molkentin
3f5887cc03 Merge pull request #2565 from owncloud/accountsettings_itemsontop
Refactor generic settings dialog
2014-12-01 15:01:45 +01:00
Olivier Goffart
fb3f5d86cf Fix compilation after merge 2014-12-01 14:41:39 +01:00
Olivier Goffart
512492bf30 Merge remote-tracking branch 'origin/1.7'
Conflicts:
	src/libsync/propagatedownload.cpp
2014-12-01 14:37:47 +01:00
Daniel Molkentin
afee1ee1c0 Make all ptr-based members either const or check for their existance 2014-12-01 13:08:49 +01:00
Olivier Goffart
3253cc38b2 Propagator upload: Mark error while opening the file as SoftError
Because otherwise a lot of error are shown to the user when
the user deletes a directory that is syncing

Task #1981
2014-12-01 12:22:52 +01:00
Olivier Goffart
b154e1baa1 Nautilus shell integration: Use fallback when XDG_RUNTIME_DIR is not defined
Same fallback as in Qt5

Task #2477
2014-12-01 12:06:09 +01:00
Daniel Molkentin
714599aeaa Refactor generic settings dialog
- move items on top like on Mac OS (right is free for accounts now)
- The account icon no longer reflects the current status (in prep for multi-account)
2014-12-01 11:37:06 +01:00
Olivier Goffart
fc3a8b944e Propagator: Don't forget to mark the direcotry as finished if its first job fails
Otherwise we would go ahead and propagate the content of the directory
2014-11-27 15:36:13 +01:00
Olivier Goffart
2ed2ef3b28 Propagator QNAM: Fix resuming
We forgot to account the fact that we could have been resuming when
comparing the size of the Content-lenght to the size of the temporary file
2014-11-27 14:50:49 +01:00
Olivier Goffart
e7e91b6931 Revert "Folder: Don't blindly trigger sync on first EtagJob result"
We need to do a sync even if the etag was empty because we do not know
if this is because the etag really changed or because it was new.

Also, some part of the code rely on this fact to schedule a sync.

The fact that there is two sync with 30 sec at the beginning is not
a big problem, because we also need to do the sync the put the directory
etag in the db.

This reverts commit 1c001ee138.
2014-11-27 12:50:36 +01:00
Olivier Goffart
1f9d02e7fa Shibboleth: Fix our implemtnation of CookieJar::deleteCookie
It was deleting too many cookies.
That function is virtual in Qt5 and is used when adding cookie.
But some Shibboleth have several cookies with the same name, and we need to keep them.

Our implementaiton was meant to delete all the shiboleth cookies when we want to log out
2014-11-27 12:26:59 +01:00
Olivier Goffart
c9c1547813 Compile with Qt4
(QSharedPointer::reset is only in Qt5)
2014-11-25 16:24:47 +01:00
Olivier Goffart
9a8c868793 Propagator upload: Remove debug output 2014-11-25 15:34:06 +01:00
Olivier Goffart
13ec5da84e neon jobs: Start them in their thread. 2014-11-25 15:08:32 +01:00
Klaas Freitag
3e34d000f2 Propagator: Add the chunk size to PUT requests. 2014-11-25 10:21:33 +01:00
Olivier Goffart
734db6f932 propagate Upload: Let the poll job count for a job
In order to avoid that there are many concurrent poll jobs that takes
all the QNAM channel and causes timeouts of queued jobs
2014-11-24 13:33:13 +01:00
Olivier Goffart
d76e3c0488 Parallel chunk upload: abort all chunks if one of them errors out 2014-11-24 12:05:25 +01:00
Olivier Goffart
c0de20dda0 UploadDevice: reduce debug verbosity 2014-11-24 12:05:25 +01:00
Markus Goetz
79c37f9fe4 Poll Jobs: Properly use DB index
Why do we sometimes use 0-based, sometimes 1-based indices?
2014-11-24 11:35:39 +01:00
Olivier Goffart
c460b3f3be Bandwith manager: It needs do be initialiazed after the limits of the propagator 2014-11-21 16:55:46 +01:00
Markus Goetz
1c001ee138 Folder: Don't blindly trigger sync on first EtagJob result
For #2352
2014-11-21 16:47:15 +01:00
Olivier Goffart
78362af168 Compile with TOKEN_AUTH_ONLY
(QtGui is not included in that case)
2014-11-21 12:15:41 +01:00
Olivier Goffart
1c58b75ac2 Merge branch '1.7' 2014-11-21 11:08:20 +01:00
Olivier Goffart
41568c885d Propagator: only check the content-lenght if it is there
If content-lenght is 0, don't chack it is the size we recieved.
It can be zero when using HTTP chunk encoding.

Also do not remove the temporary file so it can be re-used on the next sync
and ask for a new sync immediatly to re-do the sync.

Fixup the fix to task #2528
2014-11-21 11:03:14 +01:00
Klaas Freitag
65a307970b Propagator: Compare the actual file size with the request content length
The values must match. Otherwise the request did succeed, but the file
was not downloaded completely.

This fixes https://github.com/owncloud/mirall/issues/2528
2014-11-20 18:49:34 +01:00
Christian Kamm
3e3ca14b4c Print ssl library version only on Qt >=5.0.0. 2014-11-20 13:46:44 +01:00
Christian Kamm
8b45d1c928 Sync: Change force-sync interval to 2h everywhere. #2297 2014-11-20 13:38:32 +01:00
Christian Kamm
0fe7a69b39 FolderWatcher: Detect own changes. #2297 2014-11-20 13:16:29 +01:00
Christian Kamm
6d09f1b6c0 Folder watcher now reports changing paths instead of dirs. 2014-11-20 12:51:16 +01:00
Christian Kamm
1ada20ac7b Linux folderwatcher: Get full path of changed file. #2297 2014-11-20 12:42:59 +01:00
Christian Kamm
d04eedeb8d OSX: Trust the file watcher. #2297
* Use a bigger default force sync interval (2h)
* Allow the file watcher to schedule a sync while a sync for
  the same file is running.
2014-11-20 12:42:59 +01:00
Christian Kamm
f275002ebe Merge branch '1.7' 2014-11-20 12:41:06 +01:00
Christian Kamm
d4e0941c27 Windows filewatcher: switch to ReadDirectoryChangesW.
Based on danimo's #2454 fix for #2455 and related to #2297.
2014-11-20 12:36:17 +01:00
Christian Kamm
9dc57359b9 csync db files: Hide after some commit/transactions. #2461
The shm and wal files are only created later.
2014-11-20 12:30:04 +01:00
Christian Kamm
4d7b8bdb25 Merge remote-tracking branch 'origin/1.7'
Conflicts:
	OWNCLOUD.cmake
	test/CMakeLists.txt
	test/testfolderwatcher.h
2014-11-19 14:45:25 +01:00
Christian Kamm
421a8cc6b7 Windows: Make unit tests compile. 2014-11-19 14:18:37 +01:00
Christian Kamm
3706c76622 useLegacyJobs: Fix logic. 2014-11-19 10:31:42 +01:00
Olivier Goffart
9a6710e330 Propagator: add a bit of documentation comments 2014-11-18 17:54:53 +01:00
Olivier Goffart
1113980b20 Propagator: Change the scheduler
It still needs to be a bit optimized, but it allows to paralelized jobs between directories

(this is required to paralelize the mkcol)
2014-11-18 17:35:31 +01:00
Olivier Goffart
0b275c4933 Revert "WiP: switch to ReadDirectoryChangesW" 2014-11-17 11:11:13 +01:00
Olivier Goffart
e529bbed90 Merge pull request #2454 from owncloud/fswatcher_readdirectorychanges_port
switch to ReadDirectoryChangesW
2014-11-17 09:43:29 +01:00
Olivier Goffart
a3b21022af new bandwith limiting: Do a test on the Qt version to activate it
We need Qt 5.3.3.
If the compiled qt version is Qt 5 but smaller than Qt 5.3.3, do a runtime
check.

OWNCLOUD_NEW_BANDWIDTH_LIMITING is still there for a special setup in which
we patch Qt with the patches
2014-11-14 17:29:28 +01:00
Olivier Goffart
ad92e7b888 Move UploadDevice to the right header 2014-11-14 16:40:13 +01:00
Olivier Goffart
c73522de2e Remove ChunkBlock
It is not in used
2014-11-14 16:39:39 +01:00
Olivier Goffart
14f5e8e32e Move all the neon code to the _legacy files 2014-11-14 16:13:50 +01:00
Olivier Goffart
f3797abecf Fix the PropfindJob
-the namespace mangling was wrong
-And the way we read the reply did not work
2014-11-14 15:03:48 +01:00
Markus Goetz
5b7ec19778 SyncEngine: Also output the neon version 2014-11-14 15:02:09 +01:00
Olivier Goffart
1310bef528 Port the propagate mkdir to QNAM
This way we can make it parallel
2014-11-13 18:57:07 +01:00
Markus Goetz
348b7bf4eb SyncEngine: Output versions used 2014-11-12 09:21:37 +01:00
Markus Goetz
30479cc5a2 Wizard: Properly show error message 2014-11-12 09:21:37 +01:00
Daniel Molkentin
7246011b62 Merge pull request #2459 from owncloud/typo
fix typo
2014-11-12 00:09:22 +01:00
Daniel Molkentin
281c0e1553 Merge branch 'master' into rename_client
Conflicts:
	CMakeLists.txt
	src/gui/main.cpp
	src/libsync/accessmanager.cpp
	src/libsync/accessmanager.h
	src/libsync/owncloudpropagator_p.h
2014-11-12 00:07:59 +01:00
Daniel Molkentin
cdac8d56d5 Merge remote-tracking branch 'origin/master' into crashreporter
Conflicts:
	src/libsync/utility.cpp
	src/libsync/utility.h
2014-11-11 23:53:38 +01:00
Olivier Goffart
7b4be209aa MOVE: fix moving with special character.
The Destination header need to be %-encoded
2014-11-11 16:27:06 +01:00
Olivier Goffart
c712b7c46c Parallel MOVE by porting the job to qnam 2014-11-11 16:09:01 +01:00
Olivier Goffart
22c6892870 DELETE: Error out if the HTTP code is not 204 2014-11-11 14:32:25 +01:00
Olivier Goffart
134650eb44 Parallel DELETE 2014-11-11 13:19:29 +01:00
Olivier Goffart
506ba022f1 Split propagator_qnam.cpp into propagateupload.cpp and propagatedownload.cpp 2014-11-11 12:17:10 +01:00
Klaas Freitag
fc6d572a6c Make compile against Qt4 2014-11-11 10:10:46 +01:00
Daniel Molkentin
b54c079766 Adjust issue urls 2014-11-09 23:38:07 +01:00
Daniel Molkentin
2db17a57d2 Fix header names 2014-11-09 23:25:57 +01:00
Daniel Molkentin
a992c5b8d3 Fix build 2014-11-09 23:10:18 +01:00
Daniel Molkentin
269b59c2ba More CMake adjustments 2014-11-09 22:58:24 +01:00
Daniel Molkentin
d57d3cf1f6 Drop Mirall from strings 2014-11-09 22:35:29 +01:00
Daniel Molkentin
ae85aa33fd Adjust namespaces 2014-11-09 22:34:07 +01:00
Daniel Molkentin
f2eadacf09 Remove "Mirall" from class names 2014-11-09 22:30:29 +01:00
Daniel Molkentin
9ebc41ed6f Remove "Mirall" from cmake project files 2014-11-09 22:30:05 +01:00
Olivier Goffart
7ae6712d56 Add a few Q_DECL_OVERRIDE 2014-11-08 11:21:48 +01:00
Olivier Goffart
98a283b4ec Fix clang warnings 2014-11-08 11:21:48 +01:00
Olivier Goffart
d524f6b395 Fix compilation errors after merge 2014-11-08 11:11:05 +01:00
Olivier Goffart
6b716683e2 Merge the long PUT Poll URL feature with the new sql backend 2014-11-08 11:09:50 +01:00
Olivier Goffart
ba2c33af0b Fix the il branch merge: Move the bandwidthmanager to libsync 2014-11-08 10:52:14 +01:00
Olivier Goffart
de11f602d5 Merge remote-tracking branch 'origin/il'
Conflicts:
	csync/src/csync_private.h
	src/CMakeLists.txt
	src/gui/folder.cpp
	src/libsync/owncloudpropagator.cpp
	src/libsync/owncloudpropagator.h
	src/libsync/propagator_qnam.cpp
	src/libsync/propagator_qnam.h
	src/libsync/syncengine.cpp
	src/libsync/syncengine.h
	src/mirall/syncjournaldb.cpp
2014-11-08 10:48:36 +01:00
Volkan Gezer
260c8e0227 fix typo 2014-11-07 17:51:15 +01:00
Daniel Molkentin
7c034b427e Handle invalid handle & fix an issue found during code review 2014-11-07 14:52:31 +01:00
Daniel Molkentin
f25d175b5d Merge remote-tracking branch 'origin/1.7' 2014-11-06 19:54:20 +01:00
Olivier Goffart
b70ecc3dd3 Never overwrite the mtime from the local file system in the db when updating the metadata
Attempt to fix #2431
2014-11-06 15:13:10 +01:00
Daniel Molkentin
89670e5ce4 Folderwatcher_win: handle conversion error 2014-11-06 12:54:33 +01:00
Christian Kamm
174e1acbc7 Folder::wipe(): Remove partial downloads and -shm,-wal db files. 2014-11-06 12:49:02 +01:00
Christian Kamm
1f09a24a72 Resync button: Remove partial downloads too. #2445 2014-11-06 12:17:04 +01:00
Christian Kamm
eed91ddf46 Legacy propagator: Don't use mtime retrieved via _fstat64.
May be the cause of #2431
2014-11-06 12:16:55 +01:00
Daniel Molkentin
96a7118d05 WiP: switch to ReadDirectoryChangesW 2014-11-06 12:04:33 +01:00
Klaas Freitag
6eec896282 FolderWatcher: Check for hidden outside of loop 2014-11-06 09:23:30 +01:00
Christian Kamm
a49a6bfd88 Logging: Report setModTime failures.
Ths may be helpful for #2252 and maybe even #2431.
2014-11-05 13:20:19 +01:00
Christian Kamm
b87931c0a9 Logging: Print etags, not just result of comparison. 2014-11-05 13:08:53 +01:00
Christian Kamm
9b640d586b Wizard: Fix local folder warning in advanced setup wizard. #2362
The _oldLocalFolder should always be the previously configured
folder, not the one that was most recently chosen on the wizard
page.
2014-11-05 12:10:41 +01:00
Christian Kamm
7440ffc0e6 Download: Fix data loss when rename fails. #2428 2014-11-05 11:00:46 +01:00
Markus Goetz
cf6219bb6f NetworkJobs: Improve timeout handling and increase timeout by 5 sec 2014-10-30 11:54:58 +01:00
Christian Kamm
45eeb5065f Download: Avoid overwriting file with case conflict. #1914 2014-10-30 09:06:53 +01:00
Klaas Freitag
ef16c409ef Merge pull request #2393 from svkurowski/issue-2215
Switch monochrome systray icon color depending on systray brightness
2014-10-29 14:54:33 +01:00
Olivier Goffart
1eccfb798f Add missing license headers
Part of #2068
2014-10-29 13:30:46 +01:00
Klaas Freitag
b9b9f3c136 Propagator: Schedule a resync immediately if file is modified during upload 2014-10-29 13:10:56 +01:00
Olivier Goffart
7810da51a8 Propagator: report error when deleting directories
Will help to understand why a directory cannot be removed

Will help for #2348
2014-10-29 12:23:48 +01:00
Christian Kamm
4e20a02fe5 SyncJournalDB: Add filesize column to metadata.
* Alter table to include column.
* Make get/set in SyncJournalDB store and load it.
* Make csync recover the stat_t's size member from it.
2014-10-29 09:53:36 +01:00
Markus Goetz
7bad731ad2 CheckServerJob: Guard again null reply
Lucia had reported a crash in this function
2014-10-29 09:38:20 +01:00
Daniel Molkentin
dc1e73dcb7 Merge remote-tracking branch 'origin/1.7'
Conflicts:
	src/libsync/syncjournaldb.cpp
	test/CMakeLists.txt
2014-10-28 23:27:58 -04:00
Markus Goetz
782463589e ownSql: Also mention filename 2014-10-28 21:50:09 +01:00
Markus Goetz
ff570c4a6b ownSql: Don't set busy timeout on bad object 2014-10-28 21:46:30 +01:00
Klaas Freitag
105ff694f2 SyncEngine: Handle 503 condition as soft error to properly handle etags.
Otherwise the ETags could be removed from the db and cause file
deletes.
2014-10-28 17:13:21 +01:00
Olivier Goffart
5723abe6eb Merge remote-tracking branch 'origin/fix_service_unavailable' into 1.7 2014-10-27 20:49:46 +01:00
Klaas Freitag
0692fea9d8 discovery: handle 503 reply code from server for directories
503 for directories means that the dir is a mounted directory from an
external mount which currently is not available. The directory is
ignored and not traversed into during discovery phase.
2014-10-27 19:21:12 +01:00
Markus Goetz
b0882a5cd2 Fix compile 2014-10-27 17:18:49 +01:00
Markus Goetz
4c1a0005e6 Make two more asserts usable in nondebug 2014-10-27 16:01:18 +01:00
Markus Goetz
05ceed926c SyncEngine: Log for an assert, return -1 for nondebug compile 2014-10-27 15:52:17 +01:00
Olivier Goffart
ce300d88ee Wizard: show the choice to start a clean sync if the directory exist even on new accounts
Task #2406
2014-10-27 13:05:17 +01:00
Brandon Coleman
05c0249672 correct spelling on user is empty error. 2014-10-27 07:59:31 -04:00
Brandon Coleman
2498c13078 options are required at the beginning of owncloudcmd.
Conflicts:
	src/owncloudcmd/owncloudcmd.cpp
2014-10-27 07:59:31 -04:00
Olivier Goffart
cddad94e45 Selective Sync: change the label text
to specify that the files will be removed from the local folder

Task #2404
2014-10-27 11:33:25 +01:00
Brandon Coleman
ece1100d65 options are required at the beginning of owncloudcmd. 2014-10-26 15:33:50 -05:00
Brandon Coleman
e5b03634ae correct spelling on user is empty error. 2014-10-25 11:01:58 -05:00
Sascha Vincent Kurowski
59f18583d1 Switch monochrome systray icon color depending on systray brightness.
https://github.com/owncloud/mirall/issues/2215

As of version 10.10 Yosemite, Mac OS X offers the user the option to use
a dark version of the dock and menu bar. The systray icon was black even
on the dark menu bar, thus rendering it nearly impossible to spot.
2014-10-24 21:52:41 +02:00
Christian Kamm
1c4072e231 Selective sync ui: Fix #2390 2014-10-24 16:11:29 +02:00
Klaas Freitag
86e13ea06f FolderMan: Use folderForPath method to get the folder object for a path 2014-10-24 15:07:33 +02:00
Klaas Freitag
c12d3870cd Merging work branch for a bug fix for bug #2379.
It closes all db connections if the new local path is a already
synced folder path.
2014-10-24 14:43:48 +02:00
Christian Kamm
fce76a13cb Sync scheduling: Only do a follow-up sync 3 times. #2355
After trying again immediately for 3 times, no more fast follow-ups
are run until a sync finishes without needing a fast follow-up.
2014-10-24 13:31:48 +02:00
Christian Kamm
82b14370fc Sync scheduling: Only retry up to twice after fail. #2386
Previously when a sync failed, we'd retry very soon (30s) no matter how
often a sync had failed before. After this change we'll retry twice and
then back off to the regular 5min interval.
2014-10-24 13:31:48 +02:00
Klaas Freitag
a9d8e9dcd8 Setupwizard: Close the database in case of moving the folder. 2014-10-24 13:05:29 +02:00
Klaas Freitag
542e989046 Setup Dialog: Terminate sync if the new folder is a an actual folder. 2014-10-24 11:59:56 +02:00
Klaas Freitag
f5c199740d Followup: To unregister a path in socket api use the alias of folder. 2014-10-24 11:36:01 +02:00
Klaas Freitag
f37b81c8b7 Unregister path in socketapi before removing it. 2014-10-24 11:12:06 +02:00
Christian Kamm
c0ea69ee24 SqlQuery: Reset after each successful exec().
In e5269a4151 I moved the reset calls to
before the first bindValue() because we didn't consistently reset()
after exec().

However, some queries may keep a lock on the database so it is necessary
to reset() as soon as the data is read. This commit reintroduces these
reset() calls.
2014-10-24 10:11:00 +02:00
Christian Kamm
5640cbf653 SqlDatabase: Make it non-copyable. 2014-10-24 09:56:30 +02:00
Daniel Molkentin
3c7ff97ed4 SocketAPI: Don't use a theme dependent name for now
We will revert this once #2388 is implemented
2014-10-23 17:46:17 -04:00
Christian Kamm
e5269a4151 Add SyncJournalDB autotests.
There also was a bug in syncjournaldb: in some error conditions the
sql query wasn't reset properly. We now always reset a query before
calling bindValue.
2014-10-23 15:15:47 +02:00
Markus Goetz
0d9ae241c9 OwnCloudFinder: Rename to SyncStateFinder
Project file names stay the same, only the output file(s) changed
2014-10-23 12:19:19 +02:00
Klaas Freitag
e726e7aad8 util: Use canonicalFilePath to clean the path opened by explorer.
This fixes bug #2299
2014-10-23 10:41:07 +02:00
Olivier Goffart
de56b753d1 protocolwidget: fix string that need to use plural translation 2014-10-22 18:26:40 +02:00
Olivier Goffart
e46ab72718 SocketAPI: Show error when we are not allowed
Issue #1931
2014-10-22 17:25:38 +02:00
Olivier Goffart
9330d2e1e8 SocketAPI: always clean the path and use the normal slash 2014-10-22 15:33:35 +02:00
Olivier Goffart
020e19f770 SocketAPI: Fix all files are new
(Introduced because of bad resolution of merge conflict
in my last commit)
2014-10-22 15:32:09 +02:00
Olivier Goffart
22dd275b15 SocketAPI: Fix the shared symbol, including for owncloud6 Shared dir
The shared symbol would not appear if the status came for estimateState

Also added the shared symbol for the Shared/ directories (owncloud 6 compat)
2014-10-22 15:10:21 +02:00
Markus Goetz
6342e76e19 Wizard: Change misleading text 2014-10-22 15:06:33 +02:00
Markus Goetz
55dd149a03 SocketAPI: Less verbose 2014-10-22 14:43:23 +02:00
Markus Goetz
39a0f28753 Move qtmacgoodies module forward 2014-10-22 14:43:03 +02:00
Olivier Goffart
7740150576 Selective Sync widget: add a "Loading..." label
Task #2088
2014-10-22 13:48:05 +02:00
Olivier Goffart
4f367faf4d SocketAPI: Show an error for files inside the selective sync folders
Task #2283
2014-10-22 13:31:20 +02:00
Olivier Goffart
3840186dd8 Utility: fix function signature 2014-10-22 13:31:20 +02:00
Daniel Molkentin
ed51a45187 Add title to selective sync dialog 2014-10-22 06:29:22 -04:00
Christian Kamm
c832226aa1 Merge remote-tracking branch 'origin/1.7' into master 2014-10-22 12:25:58 +02:00
Christian Kamm
a20375372d Blacklist: Don't ignore error files forever. #2247
Instead try them again regularly, but don't show the user any
error messages if the error persists.
2014-10-22 12:25:18 +02:00
Olivier Goffart
6073e3f345 SocketAPI: do not show a progress icon in case of errors 2014-10-22 12:19:57 +02:00
Olivier Goffart
d31ccacf57 SocketAPI: show an ignored icon for paused folders 2014-10-22 12:19:57 +02:00
Klaas Freitag
3243365210 JournalDb: Do not longer always have a write operation on version table.
Rather read the value from the table and if it is what we expect do not
write it.
2014-10-22 10:59:58 +02:00
Christian Kamm
7ae0338f5c Merge remote-tracking branch 'origin/1.7'
Conflicts:
	src/CMakeLists.txt
	src/cmd/cmd.cpp
	src/gui/socketapi.h
	src/libsync/syncengine.h
	test/CMakeLists.txt
2014-10-22 10:41:55 +02:00
Markus Goetz
a993496ab4 SyncJournalDB/SyncEngine: Properly detect 1.5 upgrade
Else we end up never reading file data from the DB.
2014-10-21 20:25:15 +02:00
Markus Goetz
d7ac878efd SyncJournalDB: Fix deleteBatch 2014-10-21 16:37:51 +02:00
Markus Goetz
e5a0db8782 SyncJournalDB: Fix version table filling up 2014-10-21 16:37:39 +02:00
Markus Goetz
24d4840c93 SyncJournalDB: Set WAL files to hidden 2014-10-21 15:58:56 +02:00
Markus Goetz
fa70798fb5 SyncJournalDB: WAL checkpoint at end of sync 2014-10-21 15:41:11 +02:00
Markus Goetz
1af480ea3b CMake: Fix RPATH 2014-10-21 15:39:31 +02:00
Olivier Goffart
a76fc0ee5a SocketAPI: send the change of the parent folder in the broatcast
Also do not compute the status if there is nno listeners
2014-10-21 15:26:51 +02:00
Olivier Goffart
80e86d6c1b ownsql: fix warning with clang
warning: equality comparison with extraneous parentheses [-Wparentheses-equality]
2014-10-21 14:59:42 +02:00
Olivier Goffart
dc13e39bb1 SocketAPI: do not have a special case for UPDATE_VIEW on windows
This is a relique on the old times when there was no persistant connection
in the windows plugin
2014-10-21 14:57:50 +02:00
Markus Goetz
5d048c18bc Sqlite3: Switch to WAL
This is faster.
2014-10-20 23:09:28 +02:00
Markus Goetz
0fb779d363 SyncEngine: De-initialize recursive PROPFIND value correctly 2014-10-20 22:24:28 +02:00
Daniel Molkentin
d0ed82a686 We need SqlDatabase and SqlQuery to be exported
Required due to 53b3e5af1b
2014-10-20 19:58:10 +02:00
Klaas Freitag
26f068bcab SocketApi: Properly manage the database connections.
Removed the fishy closeDb() method of SqlQuery again.
2014-10-20 17:31:33 +02:00
Markus Goetz
f0dc3725e8 ownSql: Still also use sqlite3 busy handler 2014-10-20 17:26:25 +02:00
Markus Goetz
2de22b408b SyncEngine: Avoid transaction warning 2014-10-20 17:20:58 +02:00
Klaas Freitag
04b62b139d Fix compile error and add warning. 2014-10-20 17:10:34 +02:00
Klaas Freitag
2f20f3c65d SocketApi: Instanziate Object to call QFileInfo::exists
QFileInfo on Qt4 does not have static members.
2014-10-20 17:05:14 +02:00
Klaas Freitag
53b3e5af1b SocketAPI: Use new class SqlQuery to cache the sql queries.
This results in better handling of the BUSY condition through SqlQuery.
2014-10-20 16:55:37 +02:00
Markus Goetz
7dbb98c2e5 SyncEngine/SyncJournalDB: Don't keep transactions open 2014-10-20 16:50:55 +02:00
Markus Goetz
8b35cda4c6 SyncEngine: Refactor startSync() code 2014-10-20 15:51:50 +02:00
Markus Goetz
cb36a37779 SyncEngine/SyncJournalDB: Fix creation of .csync_journal 2014-10-20 14:27:00 +02:00
Markus Goetz
704c5f2de7 NetworkJobs: Higher timeout for pre-oC7
Pre-oc7 has PHP session locking for PROPFIND (by recursive PROPFIND in csync_update),
the oc7 doesn't.
2014-10-20 13:34:09 +02:00
Klaas Freitag
3fcb0d2d6b SocketAPI: Properly release precompiled statements. Use sqlite3_close
rather than its v2 equivalent. That should make it compile on older
linux platforms.
2014-10-20 10:51:03 +02:00
Klaas Freitag
2dfe0ed42e Remove unused variable, fixes compile warning. 2014-10-20 10:51:03 +02:00
Daniel Molkentin
6048a7143a Revert "Remove references to qsqlite3"
QtWebkit needs it

This reverts commit b1c10c8454.
2014-10-20 10:27:34 +02:00
Klaas Freitag
b5736fb5a7 Sql: Handle SQLITE_BUSY properly for sqlite3_step and sqlite3_prepare.
Repeat the statements a couple of times and sleep in between.
2014-10-18 16:16:29 +02:00
Klaas Freitag
7822a6b000 csync_statedb: Finalize the precompiled statements after discovery.
As described in http://www.sqlite.org/cvstrac/wiki?p=MultiThreading precompiled
statements should not be used across thread borders. However, the reconcile
phase would reuse the statements if defined (it calls statedb function from
a different thread) so it is saver to finalize them at the end of the
update run.
2014-10-18 14:18:11 +02:00
Olivier Goffart
a5bd437d48 Propagator: Fix renaming of files and case confflicts
Better fix for #1385 and #2318
2014-10-17 16:15:03 +02:00
Olivier Goffart
08156186fa Revert "propagator: Do not check for case clash when renaming"
This caused test regressions in t8.pl (#2318)

This reverts commit dad8c1c27c.
2014-10-17 16:15:03 +02:00
Markus Goetz
f1006ca8b0 owncloudcmd: Always need exclude list
Try to load the system list or the user supplied list.

For #2322
2014-10-17 15:58:01 +02:00
Markus Goetz
93c85711d1 ownSql: Always use finish() 2014-10-17 13:39:48 +02:00
Markus Goetz
e5ef5f2410 Revert "socketapi: if the filename is empty, it's actually /"
Not needed, the socketapi checks for "".

This reverts commit 561e3c780d.
2014-10-17 13:29:34 +02:00
Daniel Molkentin
52a5729298 Merge pull request #2319 from owncloud/sqlite_capi
Introduce a common sqlite layer across csync and mirall.

This avoids conflicts that both each load different and/or updated sqlite versions.
2014-10-17 12:11:27 +02:00
Daniel Molkentin
4525161e7c Updater: allow overriding update URL through environment 2014-10-17 12:07:18 +02:00
Daniel Molkentin
dee6d18d69 Discovery phase: Improve UI by quoting folder names 2014-10-17 12:07:18 +02:00
Daniel Molkentin
d44179142f Discovery phase: Properly decode percent encoding 2014-10-17 12:07:18 +02:00
Klaas Freitag
c66c01245b Beautified some debug logging strings. 2014-10-17 11:35:06 +02:00
Markus Goetz
b1c10c8454 Remove references to qsqlite3 2014-10-16 17:51:17 +02:00
Markus Goetz
1d5b3aadea sqlite3: Bundle 3.8.6 for Mac and Windows
it is linked into ocsync.
2014-10-16 17:38:45 +02:00
Markus Goetz
2d420cd72c ownSql: Always use SQLITE_TRANSIENT
More safe.
2014-10-16 15:30:50 +02:00
Markus Goetz
707d6880a8 main: Show console message if already running 2014-10-16 15:25:33 +02:00
Markus Goetz
dbad1a8d45 ownSql: Don't allow copying of SqlQuery
This fixes a crash on OS X where the destructor
calls sqlite3 to invalidate the underlying handle.
2014-10-16 15:10:25 +02:00
Klaas Freitag
36eaff92e5 JournalDb: Some Sql statement fixes, make t7 work again.
plus some minor fixes.
2014-10-16 11:22:57 +02:00
Klaas Freitag
e51c299937 ownSql: create an null value of an empty string in bindValue. 2014-10-16 11:20:50 +02:00
Klaas Freitag
8c7953a47c ownSql: Proper initialization of result value plus assert on it. 2014-10-16 11:20:21 +02:00
Daniel Molkentin
4527784905 Second part of #1661
- QT_INSTALL_TRANSLATIONS was not defined in Qt5
- Some languages have been split up in multiple qm's. We only need qtbase for now
2014-10-16 11:08:29 +02:00
Klaas Freitag
ee8a93ae9a ownSql: Proper initialization of errId 2014-10-16 10:39:10 +02:00
Klaas Freitag
89c51e7649 ownsql: Implement the transaction functions. 2014-10-15 19:47:25 +02:00
Olivier Goffart
2bba4134fb owncloudgui: Fix a small leak
The systray icon were not destroyed while qutting
2014-10-15 18:11:52 +02:00
Klaas Freitag
336c95ce5b ownsql: Cleanups: In modern C++, we use 0 instead of NULL 2014-10-15 16:46:39 +02:00
Klaas Freitag
babe891242 SyncEngine: Show a warning if post update script can not be exec. 2014-10-15 16:43:58 +02:00
Klaas Freitag
eeb5ca42e0 ownsql: Added some paranthisis to make clear whats happening. 2014-10-15 13:29:25 +02:00
Daniel Molkentin
03ee742981 Correct lookup logic for Qt translations
Fixes #1661
2014-10-15 09:33:38 +02:00
Klaas Freitag
0094c1ecf5 Make the sync work with new sql implementation. 2014-10-14 20:51:51 +02:00
Klaas Freitag
357c08c5b3 NewSQL: minor fixes to get stuff going 2014-10-14 12:18:33 +02:00
Klaas Freitag
e7d9ec50dc Merge branch 'sqlite_capi' of github.com:owncloud/mirall into sqlite_capi
Conflicts:
	src/mirall/socketapi.cpp
2014-10-14 11:43:10 +02:00
Klaas Freitag
09b0ba31ef Sql: New implementation of ownSql class to go away from Qt's own Sql 2014-10-14 11:14:57 +02:00
Klaas Freitag
26ffa078ef SocketAPI: Cache database conections and statements 2014-10-13 17:31:40 +02:00
Markus Goetz
eb60aca34f SyncJournalDB: Clarify debug message 2014-10-13 17:29:26 +02:00
Markus Goetz
4d3020421a SocketAPI: Remove old dbFileRecord function
We will use the _capi functions
2014-10-13 17:29:26 +02:00
Markus Goetz
f1ce0a1cf3 SocketAPI: Use non-recursive (heuristic) computation of icons 2014-10-13 17:29:26 +02:00
Klaas Freitag
dd28a645a1 SocketAPI: Cleanup, removed helper namespace, added as private methods. 2014-10-13 15:38:57 +02:00
Klaas Freitag
561e3c780d socketapi: if the filename is empty, it's actually / 2014-10-13 15:36:13 +02:00
Klaas Freitag
46fd79604d JournalDb: Do not use static variable for path. 2014-10-13 14:49:53 +02:00
Klaas Freitag
d08c2de619 Use sqlite C api. 2014-10-13 14:14:43 +02:00
Jürgen Weigert
07bcaaebf9 unreachable --version code made reachable.
error message improved.
2014-10-12 19:28:13 +02:00
Markus Goetz
b285e98988 SQlite: Print versions we use 2014-10-11 17:33:35 +02:00
Klaas Freitag
ab40ba2f75 owncloudcmd: Handle trust ssl switch correctly by overwriting trustssl
method in a subclass of HTTPCredentials.
2014-10-11 17:17:43 +02:00
Klaas Freitag
bbcb8ba3e7 credentials: Allow to trust ssl certs in subclasses of HTTPCredentials.
This allows to handle the --trust option in owncloudcmd. In the
owncloudcmd subclass of the httpcredentials, we allow to manually trust
the ssl certificate through a command line switch.
2014-10-11 17:17:43 +02:00
Markus Goetz
ef48de34f7 Logger: Log the thread pointer
Maybe we can somehow reduce this to make it not so many characters wide?
2014-10-11 16:58:47 +02:00
Olivier Goffart
7e898cf60c SelectiveSync: rename blacklist to selectiveSyncBlackList in some places
Issue #2301
2014-10-11 16:24:45 +02:00
Klaas Freitag
2f5cea0e73 owncloudcmd: Add a custom ssl verification callback for neon.
That fixes the SSL related problems we had with ci.owncloud.org
2014-10-11 15:55:37 +02:00
Olivier Goffart
282abdd804 Sync engine: Restart sync when we get a precondition failed error 2014-10-11 15:40:28 +02:00