Commit graph

3300 commits

Author SHA1 Message Date
Olivier Goffart
c2dacd03a5 BandwidthManager: fix warnings
Unused variables
2015-05-12 16:35:27 +02:00
Markus Goetz
9e7779a476 Bandwidth Manager: Comment out qDebug
We have not received any grave bug reports for it, not needed anymore.
2015-05-11 16:07:34 +02:00
Markus Goetz
625e61516f Propagator: Limit length of temporary file name #2789 (fixup)
Fix 22c35c4d15
2015-05-11 15:42:35 +02:00
Klaas Freitag
41614ec851 Application: ifdef lock file issue as it only happens on Qt>5.1
However, the fix breaks Qt4 compile, so it needs to be ifdefed.
Not viel hilft viel.
2015-05-11 13:35:04 +02:00
Markus Goetz
22c35c4d15 Propagator: Limit length of temporary file name #2789 2015-05-08 16:42:03 +02:00
Christian Kamm
9507bb4be6 ShareDialog: Password ui fixes. #3189
* Change the textedit-empty text to be just "Password"
* Hide the 'Copy link' button when the share isn't created yet
* Show the checked and disabled 'Password required' checkbox
  when a password is required.
2015-05-08 14:53:38 +02:00
Christian Kamm
e1c370a9a2 Fix startup hang by removing QSettings lock file. #3175
In some situations the .lock file would stay around and
cause subsequent starts of the client to get stuck before
showing the ui.
2015-05-08 14:02:44 +02:00
Christian Kamm
b9eafaaf24 Wizard: Allow SSL cert dialog to show twice. #3168
Normally we never ask twice for the same url, but in the setup wizard
it makes sense to do so.
2015-05-08 12:32:14 +02:00
Christian Kamm
909368025f ProtocolWidget: Fix rename message. #3210
For remote renames that are replicated locally the _file member is
overwritten by the target file name when the new entry is added to
the metadata table. Using _originalFile here guarantees that
the affected local file is mentioned.
2015-05-08 11:33:34 +02:00
Markus Goetz
0359c775e0 Discovery: Test better, treat invalid hrefs as error #3176 2015-05-07 17:19:48 +02:00
Jocelyn Turcotte
1053153ec4 Fix the Qt4 build
Following a6500d8068
Qt4's moc doesn't expand macros and wouldn't evaluate QT_VERSION_CHECK.
2015-05-07 14:49:01 +02:00
Christian Kamm
79ac61684c Propagator: Overwrite local data only if unchanged. #3156 2015-05-07 14:43:33 +02:00
Christian Kamm
441eca86c4 ShareDialog: Improve error reporting for share API fails.
This would have made debugging #3204 and #3136 easier.
2015-05-07 14:16:13 +02:00
Markus Goetz
f07d3d069e Updater on OS X: Only allow if in /Applications #2931 2015-05-07 13:04:25 +02:00
Markus Goetz
e300e3c744 Wizard: Fix lock icon #1447 2015-05-07 13:04:25 +02:00
Christian Kamm
73e2254a80 AccountState: Treat *any* 503 as a temporary error. #3113 2015-05-07 09:21:52 +02:00
Jocelyn Turcotte
a6500d8068 Work around the Qt PUT corruption bug with Qt < 5.4.2 #2425
Since QNonContiguousByteDeviceThreadForwardImpl::reset will
call UploadDevice::reset with a BlockingQueuedConnection, this
allows us to reset the HTTP channel along with its buffers
before they get the chance to be reused with a subsequent request.
2015-05-06 16:56:50 +02:00
Daniel Molkentin
bceb40ed80 Disable setSslConfiguration calls for older Qt version
This is only required for client certs, which currently have
no GUI anyway and are experimental.
2015-05-06 11:20:16 +02:00
Christian Kamm
9e3c3353bd IgnoreListEditor: Remove invalid connect. #3201
This has been around ever since the ignore editor was
added and the slot never existed.
2015-05-06 09:34:45 +02:00
Markus Goetz
07ffff3d77 SyncEngine: Fix accidental re-discovery because of broken version table
Bug had been triggered by d63abef718
Broken version table in there since some time it seems like.
2015-05-05 17:07:13 +02:00
Klaas Freitag
d63abef718 SyncEngine: Handle upgrade case from 1.8.0
If 1.8.0 caused missing data in the local tree, this patch gets it
back. For that, the usage of the journal for remote repository is
disabled at the first start.
2015-05-04 13:40:25 +02:00
Markus Goetz
4700c604b1 Proxy: Register meta type #3170 2015-04-29 14:54:08 +02:00
Christian Kamm
78e82eb920 AccountWizard: Fix auth error handling. #3155
The problem was that on network error the networkError() and
finishedWithError() signals both fired. To fix it, I collapse all
error handing into a slot triggered by finishedWithError().

I tested the redirection case and the invalid credentials case.
2015-04-24 16:03:28 +02:00
Markus Goetz
3a52db46ad Discovery: Fix another empty-local-directory bug 2015-04-23 16:15:13 +02:00
Markus Goetz
137bce6dd0 Folder: Clear _syncResult better
I had a situation here where we were showing stale desktop notifications when a remote folder
errored out and then sync finished with _syncResult data from previous sync.
2015-04-23 13:30:30 +02:00
Christian Kamm
7c1281dd06 Windows: Fix rename of finished file. #3073
The file was still open and therefore couldn't be renamed...
2015-04-22 14:46:04 +02:00
Markus Goetz
6c5ca055c4 ShareDialog: Unused/invalid forward declaration 2015-04-21 10:33:38 +02:00
Olivier Goffart
b039c2ce86 More change to compile with 5.5
The problem is again that QStringList no longer include QDataStream
2015-04-20 09:47:25 +02:00
Olivier Goffart
ba65187ad3 Fix compilation with Qt 5.5
Because of commit 90e7cc172a7521396bb2d49720ee4ceb9a9390b3 in qtbase,
we now need to explicitly include QDataStream

Fixes #2809
2015-04-19 11:02:43 +02:00
Jocelyn Turcotte
155c965866 Prevent another crash in ~SocketApi #3118
Since the QLocalServer parent of the QLocalSockets gets destroyed
after the _listeners QList, onLostConnection might try to update
an already destroyed list.

Fix the issue by simply making sure that _localServer is destroyed
first.
2015-04-17 12:42:40 +02:00
Olivier Goffart
6c73f25747 HTTP creds: Fix translation of the password input dialog
tr() needs Q_OBJECT
2015-04-17 12:19:37 +02:00
Olivier Goffart
8bb4af067a Propagate download: Fix restoring files for which the conflict file exists
For issue #3106

1) Always use the actual timestamp from the file in the file system
to create the conflict file.  This is important because if one edit a
file several time, they should have different name. Also it makes more
sens to have the mtime of the modified file.

2) Give the correct size to the job so we know when the temporary file
is complete in case of resuming.
2015-04-16 11:36:01 +02:00
Olivier Goffart
458f336405 PropagateDownload: Read the mtime from the file system after writing it
Because file system like FAT only have two second accuracy and would result
in a upload if the mtime in the database is not the same as the one that was
downloaded

Issue #3103
2015-04-15 15:50:20 +02:00
Markus Goetz
7c9cffa5ae ConfigFile: Remove unused functions 2015-04-15 14:58:27 +02:00
Daniel Molkentin
ed80a712ab Sort folder sizes SelectiveSyncTreeView numerically
Fixes #3112
2015-04-14 20:00:42 +02:00
Markus Goetz
2866e56c51 LsColXMLParser: More testing 2 2015-04-14 14:56:25 +02:00
Klaas Freitag
4283ab3b44 LsColJob: Create a XML parser object for better unit testability. 2015-04-14 13:43:05 +02:00
Klaas Freitag
c579069071 LsColXMLParser: let parse return bool. 2015-04-14 13:41:51 +02:00
Markus Goetz
9ffacd4ecd Discovery: Explicitly check for XML parser errors
..instead of relying that our state machine does not do anything in that case.
2015-04-13 16:04:24 +02:00
Markus Goetz
9d5f5ea3bc Discovery: Initialize error with EIO in constructor
This is safer, initializing it in remote_vio_opendir_hook was enough though.
2015-04-13 15:54:08 +02:00
Markus Goetz
2dbd27af76 Discovery: Initialize error with EIO 2015-04-13 15:36:07 +02:00
Markus Goetz
0634a4d0c6 Discovery: Add a sanity check when results are parsed 2015-04-13 15:10:04 +02:00
Klaas Freitag
7b99877c68 owncloudcmd: Filter out empty lines in selectivesync 2015-04-12 12:59:25 +02:00
Klaas Freitag
ec81cdefb0 Networkjobs: Only log a subset of the account url.
This avoids disclosing of user and password in the logfile which can
happen in some cases.
2015-04-12 12:37:14 +02:00
Christian Kamm
9d8fc4aa4d ProtocolWidget: Fix adding of seconds. #2535 2015-04-10 12:11:35 +02:00
Christian Kamm
57ac1d9ea2 AuthRedirect: Use the configured DAV path. #3082 2015-04-10 09:24:25 +02:00
Christian Kamm
d9ea6936ab Handle redirect of auth request. #3082 2015-04-10 09:18:15 +02:00
Christian Kamm
adcf40afc3 Discovery: Speed up initial run. #2796 2015-04-08 15:43:49 +02:00
Christian Kamm
d986011067 Sync: Fix sync of deletions during 503. #2894 2015-04-08 10:50:08 +02:00
Roeland Jago Douma
5a83636f81 Only show share dialog if we are connected. 2015-04-08 09:53:57 +02:00
Jocelyn Turcotte
4a890eae38 SyncEngine: Fix a crash caused by an invalid DiscoveryDirectoryResult::iterator #3051
The default constructor of the iterator points to NULL, which makes
it != end() but invalid to dereference.

Use an integer index instead to keep 0 as a valid default value that
can always correctly be checked against size().

Also make sure that no data is shared between threads by making the
csync_vio_file_stat_t copyable and passing it as const.
2015-04-08 09:35:43 +02:00
Christian Kamm
760e11bc5d Sharedialog: Fix compiler warnings. 2015-04-08 08:59:36 +02:00
Klaas Freitag
4a6f4919d7 More GUI refinements. 2015-04-07 13:38:01 +02:00
Klaas Freitag
b98040c7d5 ShareDialog: handle resize properly with elided text 2015-04-07 13:38:01 +02:00
Klaas Freitag
1240a8163d ShareDialog: Some GUI rework requested by Jan. 2015-04-07 13:38:01 +02:00
Olivier Goffart
e15b9b5358 Merge remote-tracking branch into 1.8 2015-04-07 10:42:27 +02:00
Olivier Goffart
1617c9d482 PropfindJob: fix xml parsing
It would only find the first property
2015-04-07 10:35:27 +02:00
Olivier Goffart
50ba73860c Merge remote-tracking branch into 1.8 2015-04-07 08:02:55 +02:00
Markus Goetz
750cdc1910 AbstractSslErrorHandler: Also give QSslConfiguration 2015-04-06 21:46:03 +02:00
Olivier Goffart
f4e2c84111 AccountState: Fix uninitialized memory access spotted by valgrind
QuotaInfo's constructor uses the AccountState's _state which is
initialized after
2015-04-06 16:21:05 +02:00
Olivier Goffart
71d9f23068 theme: fix compilation of libsync without QtGui 2015-04-03 11:27:06 +02:00
Markus Goetz
7f2213416a Discovery: Add warning if returned etag is 0
There will be another bugfix which fixes
https://gist.github.com/jturcotte/3d5a7874d26bc27b1be9
directory.
2015-04-02 16:57:53 +02:00
Markus Goetz
9b9f0bdd4d SyncEngine: Show more timing measurements #3064 2015-04-02 15:18:46 +02:00
Jocelyn Turcotte
c2fd7d6ebd Clean up remains of SOCKETAPI_TCP 2015-04-01 15:03:42 +02:00
Jocelyn Turcotte
4a893c5267 Fix a crash on shutdown in ~SocketApi #3057
Deleting the QLocalSocket while iterating the QList with qDeleteAll
would trigger onLostConnection, which would modify the list mid-air
and leave dangling pointers in it.
2015-04-01 15:03:42 +02:00
Jocelyn Turcotte
2473183f19 Windows: Add version information for owncloud.exe
This should help us know what version or build number a crash report was generated with.
2015-04-01 15:03:41 +02:00
Daniel Molkentin
f2fa812b0b Updater: Give context as to which app is about to be updated
Fixes #3040
2015-03-30 14:44:34 +02:00
Markus Goetz
ef89582d7e Propagator: Fix compile 2015-03-30 08:41:53 +02:00
Christian Kamm
ba0c3256fa Remove unused HttpConfigFile. 2015-03-27 13:20:10 +01:00
Markus Goetz
b6fe5d2cff Propagator: Debug output regarding OC-ETag
We can remove this in some time, but currently it is interesting
to see for what server setup is no ETag but an OC-ETag.
2015-03-27 13:16:11 +01:00
Markus Goetz
9123fac545 owncloudcmd: Always trail path with /
Else the csync code vs the Qt code get confused.
2015-03-27 13:15:43 +01:00
Markus Goetz
c6bc388001 Proxy: More debug, always set returned system proxy 2015-03-27 11:53:58 +01:00
Christian Kamm
ea985a85af ProtocolWidget: Always add seconds to the DateTime locale. #2535 2015-03-27 11:25:30 +01:00
Christian Kamm
2578832002 Fix clang warnings about deleting incomplete 'Account'. 2015-03-27 11:11:44 +01:00
Markus Goetz
cfada67aa6 Proxy: Fix compile harder 2015-03-27 11:02:19 +01:00
Christian Kamm
5483682281 CookieJar: Don't accidentally overwrite cookies. #2808
Calling save() in the CookieJar destructor was problematic. For instance
we sometimes create a new QNAM with a new CookieJar and then call
setCookieJar() on it to assign some other jar. That destroy the fresh
jar and potentially overwrite cookies.

Also explicitly saving the account's cookies when the account is saved
is more explicit and thus more reliable than counting on the Account
destructor to do it.
2015-03-27 10:49:24 +01:00
Christian Kamm
2a8c23aac3 Account: Destroy on exit.
During shutdown we want the account object to be deleted and
therefore we need to be able to remove the strong reference
in AccountManager.
2015-03-27 10:43:14 +01:00
Christian Kamm
88bc96fc4c ConValidator: Delete instance if no credentials. 2015-03-27 10:43:14 +01:00
Christian Kamm
588129d852 HttpCreds: Delete password from old location. #2186 2015-03-27 10:40:19 +01:00
Markus Goetz
5c87a35fe4 Proxy: Fix compile 2015-03-26 18:36:37 +01:00
Markus Goetz
418185af9a Qt4: Fix compile 2015-03-26 15:17:16 +01:00
Roeland Jago Douma
4b56cc6e08 On creation of a share always retrieve the share
This makes sure that if a default expiration date is set this is reflected in
the dialog. #2889
2015-03-26 13:48:33 +01:00
Christian Kamm
3cef771868 HttpCreds: Fill pw dialog with previous password. #2848 #2879 2015-03-26 09:25:45 +01:00
Markus Goetz
e0ae34f01b SslButton: Make menu creation lazy
Saves ~200msec on my not-so-old MBP on OS X.
For #3007 #2990
2015-03-25 15:41:23 +01:00
Christian Kamm
a9a24c96fc Themes: Cache icons instead of rebuilding a lot. 2015-03-25 14:59:28 +01:00
Markus Goetz
a202203325 Proxy: Fix issues with previous patch
This is for #2993 and #2802
2015-03-25 12:25:49 +01:00
Markus Goetz
83c3d76966 Proxy: Look up system proxy from different thread
We should actually upstream this into QNAM.

This is for #2993 and #2802
2015-03-25 08:52:23 +01:00
Markus Goetz
99734f8d72 Account: Unusued variable 2015-03-25 08:52:23 +01:00
Olivier Goffart
dafc2d2b73 Sync engine: Check the blacklist for the right tree
When the operation is download, we have a INSTRUCTION_NONE for the local
tree, but we should not check the blacklist just yet.
2015-03-24 12:23:04 +01:00
Olivier Goffart
9c05150c12 SSLButton: Fix a crash
Made with danimo.
Attempt to fix a crash seen on breakpad reports.
(cc06b990-0c10-40eb-bcec-4d3902150320)
2015-03-23 18:30:53 +01:00
Daniel Molkentin
c7eb85ef78 Activity: Correctly restore column sizes
Fixes: #3005
2015-03-23 18:22:25 +01:00
Olivier Goffart
4df455f2e0 Add-folder Wizard: Select the newly created folder 2015-03-23 16:50:37 +01:00
Olivier Goffart
653a00d63d Add-folder wizard: Make sure there is a scrollbar if folder names are too long
Fixes #2962
2015-03-23 16:32:41 +01:00
Jocelyn Turcotte
3c9acdf724 Fix a crash when accessing a dangling UploadDevice pointer #2984
This is largely a guess, but this is the only place where we use
a QIODevice to push data through QNAM and that the QIODevice isn't
a direct child of the QNetworkReply.

Fix the issue by making sure that we don't go back to the event loop
and possibly handle network events between the destruction of the
upload QIODevice and the QNetworkReply, which might lead to QNAM
dereferencing a dangling QIODevice pointer.
2015-03-23 16:14:54 +01:00
Olivier Goffart
e81d1ab9b8 application: --confdir option with invalid direcotry now exit
Show an error and exit if an invalid directory (eg, a file) is passed to --confdir

Fixes: #2453
2015-03-23 15:02:27 +01:00
Christian Kamm
4ef0ce112c CookieJar: Session cookies should *not* be stored in cookies.db. 2015-03-19 11:57:25 +01:00
Christian Kamm
57c14a0eba Windows: Reset QNAM as a workaround. #2899 #2895 #2973
The QNetworkAccessManager is reset when we are disconnected, just
before attempting to fetch the server's status.php.

This may help fix the problem described in various issues where we
get 'Connection closed' or timeout errors after the OS has woken
from sleep.
2015-03-19 11:40:47 +01:00
Christian Kamm
89f831e7d4 Remote delete: Consider 404 a success. #2919 2015-03-19 10:04:02 +01:00
Markus Goetz
06a2f58c51 Propagator: Introduce custom property to make error soft
This can be set by a custom credential QNAM.
2015-03-17 23:31:30 +01:00
Jocelyn Turcotte
5264a8c7f6 shell_integration: Fix disappearing context menus on Windows #2898
Since each new connection to the socket API would trigger a broadcast
of REGISTER_PATH to all existing connections, opening the context menu
would trigger a SHChangeNotify call of the root directory through
the overlay icon extension, which is currently also connected to the
socket API, waiting for changes.

Fix the issue by sending the initial REGISTER_PATH automatic response
only to the connecting socket.
2015-03-13 20:53:59 +01:00