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.
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.
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.
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
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.
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
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
- 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
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
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.
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
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.
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.
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
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
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