Jocelyn Turcotte [Mon, 23 Mar 2015 15:13:52 +0000 (16:13 +0100)]
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.
Jocelyn Turcotte [Mon, 23 Mar 2015 12:43:59 +0000 (13:43 +0100)]
Disable asserts in official builds
Make sure that we define NDEBUG in all configurations.
Also remove inconsistent defines:
WIN32: We don't use
_DEBUG;_WINDOWS;_USRDLL: Should be defined by the compiler if necessary
OCCONTEXTMENU_EXPORTS: We currently don't use dllimport anyway
This also update the binary submodule with an updated build.
Jocelyn Turcotte [Fri, 13 Mar 2015 17:30:45 +0000 (18:30 +0100)]
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.
Jocelyn Turcotte [Thu, 12 Mar 2015 15:49:47 +0000 (16:49 +0100)]
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.
Jocelyn Turcotte [Wed, 11 Mar 2015 14:34:53 +0000 (15:34 +0100)]
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.
Klaas Freitag [Wed, 11 Mar 2015 13:09:31 +0000 (14:09 +0100)]
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.
Klaas Freitag [Mon, 9 Mar 2015 13:33:02 +0000 (14:33 +0100)]
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.
This attempts to replicate what i686-w64-mingw32-gen_sym_files
is doing for us with MinGW by parsing the output of otool -L
to get the library name actually used by the executable.
Klaas Freitag [Fri, 6 Mar 2015 15:36:21 +0000 (16:36 +0100)]
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
Olivier Goffart [Tue, 3 Mar 2015 07:33:59 +0000 (08:33 +0100)]
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.
Klaas Freitag [Fri, 27 Feb 2015 14:27:49 +0000 (15:27 +0100)]
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.