1
0
mirror of https://github.com/chylex/Nextcloud-Desktop.git synced 2024-10-21 10:42:45 +02:00
Commit Graph

3218 Commits

Author SHA1 Message Date
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
Markus Goetz
c42c9f0002 Propagator: Add comment 2015-03-13 15:48:35 +01:00
Christian Kamm
95f299f865 Remote folder wizard: Add optional manual entry #2613 2015-03-13 09:52:21 +01:00
Jocelyn Turcotte
e93c1ccb73 Install the crash handler earlier during startup
This moves the crash handler installation during the OCC::Application
contruction. This still leaves a window where crashes wouldn't be
caught, leaving the QtSingleApplication and theme initialization
code unreported, but isn't requiring any refactoring for now.

Issue #2952
2015-03-12 17:16:05 +01:00
Jocelyn Turcotte
0f84510e6f Fix the build with GCC 4.7
Disable bitfields completely in SyncFileItem with that compiler.
2015-03-12 14:54:11 +01:00
Christian Kamm
1dd3488973 Uploads: Fix big seeks on Windows. #2954 2015-03-12 13:18:08 +01:00
Christian Kamm
9249d6c2f9 Logging: Print instruction when job completed. 2015-03-12 10:26:44 +01:00
Christian Kamm
d0f07ee3a9 FolderMan: fix folderSyncStateChange emission. #2896
It was not emitted when a removed folder finished its sync,
and that left the UI in an old state sometimes.

Removing the Folder explicitly is unnecessary as a QSignalMapper
will automatically remove mappings for deleted QObjects.
2015-03-12 10:00:45 +01:00
Christian Kamm
3992fba168 Activity: Set a message for conflicts. #2792
Also show size when conflicting files are downloaded.
2015-03-12 10:00:45 +01:00
Markus Goetz
f13dfc19a0 OS X: Fix UI glitches related to sync folder
For #2113 and #2947
2015-03-11 16:42:12 +01:00
Jocelyn Turcotte
0fccf5e50d Completely disable the crash handler if the user disabled it
The config currently only disable the reporter, but still leaves
the crash handler installed on startup. This causes conflicts
when running those builds in lldb.

Work around the issue by requiring the crash reporter to be
disabled in the settings before owncloud can be run in lldb.
This has the negative side-effect of not covering the
initial ConfigFile loading with the crash handler.

Issue #2946
2015-03-11 15:49:49 +01:00
Klaas Freitag
a2aab28ba6 ShareDialog: Connect the proper DateEdit signal. 2015-03-11 15:46:05 +01:00
Klaas Freitag
8e7b7caf04 ShareDialog: If the password is empty, disable button 2015-03-11 14:57:55 +01:00
Klaas Freitag
8cc5ff0e70 ShareDialog: Consider if resharing is not allowed on a share.
If a file or directory is shared without resharing permission, the
share dialog displays an error. This is not the optimal solution, but
best for now, as we do not have the permissions available for the file
manager plugin.

This fixes #2923
2015-03-11 14:12:08 +01:00
Klaas Freitag
9086f09fe2 SocketAPI: If filename has a trailing slash, remove it.
The SyncJournal stores the the names of directories without trailing slash.
2015-03-11 14:11:18 +01:00
Christian Kamm
efe9f1b442 Lnk: Work around QFile::rename() #2792
QFile::rename() fails if the source file is a shortcut to a file
or directory that does not exist.
2015-03-11 12:29:33 +01:00
Jocelyn Turcotte
db7919dc2f Shrink sizeof(SyncFileItem) by 20%
Move all small fields together in the struct and make them use bitfields.
Also remove the unused log::_other_remotePerm field.
2015-03-11 11:49:11 +01:00
Olivier Goffart
4a01644625 Disable parallel uploads for server versions <= 8.0.2
Issue #2938
2015-03-11 11:31:51 +01:00
Klaas Freitag
071177cee2 Output a more sensible error message for auth errors 2015-03-10 12:14:14 +01:00
Klaas Freitag
c88742fad3 Revert "SetupW: Display proper error messages if password or user was wrong."
This reverts commit 396f38598f.

This adds redundant code and potentially breaks Shibboleth
2015-03-10 11:17:35 +01:00
Markus Goetz
3b12b9d81d Revert "Propagator: Delete job on finish"
Needs a bit more thinking.

This reverts commit 8746914f3b.
2015-03-09 16:19:16 +01:00
Markus Goetz
31e4009737 Propagator: Use QBA for responseTimestamp instead of QString 2015-03-09 15:52:52 +01:00
Markus Goetz
8746914f3b Propagator: Delete job on finish 2015-03-09 15:41:43 +01:00
Klaas Freitag
2fa6839ac7 Make win32 build work again. 2015-03-09 15:14:55 +01:00
Klaas Freitag
b09e08c06f ShareDialog: Made it less "webbish" for better usability.
- Check the share checkbox automatically on open of the dialog
- Use the date picker with popping up calendar
- Proper initial size
- no resizing and appearing and disappearing.

Fixes probably #2917, also #2764
2015-03-09 14:33:02 +01:00
Jocelyn Turcotte
99f51998f2 Fix a crash in the crash reporter on OSX
The install_name of dependent libraries need to be updated
like we do for cmd and gui.
2015-03-06 19:28:53 +01:00
Klaas Freitag
396f38598f SetupW: Display proper error messages if password or user was wrong.
If the password or user was wrong during setup, the client showed a
ConnectionClosed error instead of a proper Username or password wrong
message. This was because in HTTPCredentials::slotAuthentication, the
reply is closed, and a property is set to indicate the auth problem.

This patch now checks at all occurences of networkErrors if it might
have been an authentication problem, and displays something useful.

There is a good chance that this is a sufficient fix for
owncloud/enterprise#556
2015-03-06 16:41:59 +01:00
Klaas Freitag
d2848b9c26 Theme: Return the correct version string from version() 2015-03-06 16:41:59 +01:00
Markus Goetz
b622981b23 SyncEngine: Show a debug msg only when relevant 2015-03-06 09:28:50 +01:00
Markus Goetz
668de9bf31 Propagate: Don't retry direct download on abort 2015-03-05 21:56:39 +01:00
Markus Goetz
3f712dce02 ETags: For Folder and RequestEtagJob, always use Concatenation 2015-03-05 17:49:12 +01:00
Markus Goetz
2eaeaf33fa Discovery: Change abort code a bit
Now pressing pause in the UI will not show an error to the user.
2015-03-05 16:50:33 +01:00
Klaas Freitag
398bca9fe4 Add OWNCLOUDSYNC_EXPORT prefix to make windows build. 2015-03-04 13:50:55 +01:00
Olivier Goffart
46d5d22f72 PropagateUpload: also read the OC-ErrorString header from the poll job 2015-03-04 12:01:41 +01:00
Olivier Goffart
97c221d860 PropagateUpload: add a few comments 2015-03-04 12:00:55 +01:00
Jocelyn Turcotte
a5d29e6d56 Fix missing symbols on XP
Import a fix from libcrashreporter-qt that should remove
usage of symbols not available in XP's msvcrt.dll

This should help solving #2907 with the crash reporter enabled.
2015-03-04 09:51:54 +01:00
Markus Goetz
131cf63d8d Propagator: Don't use 0,0 progress signals.
They seemed to have messed up the calculation sometimes for
the last chunk.
2015-03-03 17:46:57 +01:00
Olivier Goffart
4d85f1daec setup wizard: use a PROPFIND instead of a GET on the webdav url
In order to initiate the conneciton, we should not send a GET on the
webdav URL because that is not a valid webdav command on a collection.

Issue #2911
2015-03-03 16:03:53 +01:00
Klaas Freitag
f913cd97ee DiscoveryJob: Fix progress display.
This fixes #2909
2015-03-03 16:01:17 +01:00
Olivier Goffart
ccbeb86140 Fix build of the legacy propagator 2015-03-03 10:05:38 +01:00
Olivier Goffart
b43e0f5ebd Do not ask for the password when the check server job times up
QNetworkReply::OperationCanceledError may be both because of anthentication
error (because the HTTPCredentials abort the reply) or because of a timeout
(the timer abort the reply). We should only ask for the password if the
reply was canceled because the password was wrong.
2015-03-03 09:21:24 +01:00
Markus Goetz
fe574dbbf9 Discovery: Free some memory before propagate (#2902) 2015-03-02 15:08:21 +01:00
Markus Goetz
7595c7e697 Discovery: Free some memory on VIO dir close (#2902) 2015-03-02 14:09:01 +01:00
Olivier Goffart
bd6769a3fd LsColJob: one must now specify the properties
So the discovery phase don't ask for the quota, and the selective sync
don't ask for all the other properties

Issue #2906
2015-03-02 11:03:25 +01:00
Markus Goetz
80f3c7584b libowncloudsync: Don't link to Qt SQL and Qt XML
For issue #2901 ..
2015-02-27 16:20:25 +01:00
Klaas Freitag
05624e3fc8 FileSystem: Remove QFileInfo based implementations.
QFileInfo has to be refreshed if the underlying file has been
modified in between. That is dangerous so ckamm and me decided
to eliminate the QFileInfo based implementations.

This was triggered by a bug that the client uploaded files that
it should not have.
2015-02-27 15:27:49 +01:00
Christian Kamm
e381143a8f Ensure good sync state if in-progress folder is deleted. #2896
The slotFolderSyncFinished() didn't reliably trigger because
the folder was being deleted before the syncFinished signal could
fire.
2015-02-27 12:39:19 +01:00
Christian Kamm
b03209ccef Inform user about ignored long files. #2882 2015-02-27 12:12:39 +01:00
Markus Goetz
ec03ebd69f Token Auth: Allow empty token
Just username/password. The received token will automatically be stored
inside the QNetworkCookieJar.
2015-02-27 11:58:18 +01:00
Roeland Jago Douma
51c617801d static member QFileInfo::exists is not available on 4.8 2015-02-27 08:43:33 +01:00
Klaas Freitag
8507aba9f8 SocketAPI: Append trailing slash for directories in UPDATE_VIEW.
This fixes #2233
2015-02-26 16:41:55 +01:00
Olivier Goffart
d8b6e00fe7 Propagator: Let network propagator job understand a new header OC-ErrorString
This allows the server to send a readable error string in many cases
2015-02-26 15:53:09 +01:00
Christian Kamm
c8167b77c9 Remove mention of allprop #2865 2015-02-26 12:36:11 +01:00
Christian Kamm
c37792f58f Propagator: Upload files with future timestamps. #2880 2015-02-26 11:00:06 +01:00
Christian Kamm
842e5ba5e0 Sharing: Fix for folders containing &. #2892 2015-02-26 09:58:09 +01:00
Klaas Freitag
506cc3908a Add proper copyright headers to some files, fixes #2869 2015-02-25 17:00:27 +01:00
Klaas Freitag
ca00b02b0a ShareDialog: Improve some GUI, fix #2850
This improves some wording and fixes some show/hide issues with password
setting.
2015-02-25 13:44:27 +01:00
Klaas Freitag
201075827f Sharedialog: Add a Share button. 2015-02-25 13:44:27 +01:00
Christian Kamm
5c7fd24ea8 Handle 503 due to maintenance more gracefully. #2884 2015-02-25 12:02:10 +01:00
Christian Kamm
76ac628153 Discovery: Distinguish 503 Storage not available. #2884 2015-02-25 12:02:10 +01:00
Christian Kamm
6f71bd9353 SocketAPI: Don't mark .lnk files as ignored on windows. #2447 2015-02-25 11:55:48 +01:00
Christian Kamm
f88398e776 lnk files: Fix exists() calls. #2792 2015-02-25 11:50:32 +01:00
Christian Kamm
08c33cd1dc Discovery: Fix handling of 503 on a folder. #2884 2015-02-25 08:09:07 +01:00
Klaas Freitag
1929040bb7 Discovery: Preserve the error message. 2015-02-24 22:02:31 +01:00
Klaas Freitag
3af936c8a1 Some minor cleanups. 2015-02-24 22:02:29 +01:00
Daniel Molkentin
f38aa698eb Don't translate dummy strings 2015-02-20 10:12:31 +01:00
Daniel Molkentin
366f3f68b8 Activity view: Always add date
Fixes #2223
2015-02-20 10:12:19 +01:00
Jocelyn Turcotte
03e23da6a3 Show the settings also when no arguments are passed
sendMessage would only be called if there were options to
be sent to the running application.
Fix the issue by having explicitly named messages and always
send the show settings message.

Issue #2374
2015-02-19 16:57:16 +01:00
Jocelyn Turcotte
2ddaf5a06a Add a NO_MSG_HANDLER cmake option
This allows QDebug to output to stdout or OutputDebugString
to ease development.
2015-02-19 16:57:16 +01:00
Olivier Goffart
5e1aa7d383 SyncEngine: Fix move would re-upload the file
Because SyncJournalDb::postSyncCleanup was deleting the entries in the database
2015-02-19 15:00:37 +01:00
Olivier Goffart
e1871eb325 libsync: Fix qWarning in SyncEngine::slotJobCompleted saying we cannot find the sync item when moving
We need to compare against the original file name, that's why it's there
2015-02-19 13:13:45 +01:00
Olivier Goffart
1998b602b9 SyncEngine: better merge of the renames node
The same file is on the two sync trees under different names in case of a rename
We must therefore use the rename target as the key in the _syncItemMap to ensure
that the trees are correctly merged.

Also use the same UTF-8 decoding for the target than for the actual file in order
to catch invalid utf-8 in the rename target
2015-02-18 12:41:06 +01:00
Olivier Goffart
193fca4a8b SyncFileItem::operator<: must return false when two items are equal
Fixes #2852
2015-02-18 12:41:06 +01:00
Olivier Goffart
fb77cd5f7e SyncEngine: Fix detection of the server reconfiguration
Some files might be kept (like the default files)
The files should be considered as NONE only if they are NONE on both trees

issue #2847
2015-02-17 16:44:13 +01:00
Daniel Molkentin
99d674c346 Default shiboolethwebview to 900x700, remember last size
Also add host to the title

Addresses #2285
2015-02-17 15:28:14 +01:00
Daniel Molkentin
9690ca0198 Explain the "crash now" button to translators 2015-02-17 14:03:09 +01:00
Olivier Goffart
9351c7485f Try another way to fix the build 2015-02-17 14:04:16 +01:00
Olivier Goffart
d43b82dc82 Fix compilation with clang
The compilation error was

 account.h:140:113: error: expected ')'
 const QList< QPair<QString, QString> > &queryItems = QList< QPair<QString, QString> >());
                                                                                   ^
followed by more errors.

The problem is because the compiler has hard time disambiguiating the comma

int foo(const QPair<int, int> &p = QPair<int, int>());
                                            ^
It is indeed quite hard for the compiler to know if this comma is a separation
between complate arguments or the separation between arguments of the functions.

Use the C++11 construct instead which does not need commas
2015-02-17 11:09:45 +01:00
Olivier Goffart
ce195bd599 SyncEngine: add an getter to the journal 2015-02-17 11:08:16 +01:00
Olivier Goffart
c0c8a22fa3 SyncEngine: pass a non-const reference to the SyncFileItemVector in aboutToPropagate
That way, users of the library  can change the contents of the sync item vector.
2015-02-17 11:08:16 +01:00
Jocelyn Turcotte
a955defae5 Raise the share window to make sure that the user sees it 2015-02-16 16:47:00 +01:00
Daniel Molkentin
2423aa592f Add new icons by Jan 2015-02-16 14:47:32 +01:00
Olivier Goffart
151228b2a6 Fix build when compiling libsync without QtGui
Utility must stay QtGui-free, move the hidpiFileName to the theme which
is the only part in libsync which uses it, and already has #ifdefs
2015-02-16 10:24:42 +01:00