In owncloudsetupnocredspage.ui, the URL input field leUrl has a
placeholder text saying "https://..." which is a very useful hint
for the user. However, in the OwncloudSetupPage constructor, the
placeholer text is overwritten by the return string of the theme's
wizardUrlHint() method. The NextcloudTheme class does not override
this virtual method, so an empty string is used.
To make available the "https://..." hint, it is moved from the
UI file to NextcloudTheme::wizardUrlHint(). Note that, if a
theme is used which does not allow a custom server URL, the
placeholder text is now empty. This makes sense because the
input field is disabled in that case.
Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
The input field for the nextcloud server URL is vertically too
big (because of the icon next to it in the same horizontal layout).
This commit solves this issue by changing its vertical size policy
from Ignored to Fixed.
Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
We simply use a static QObject using Q_GLOBAL_STATIC()
instead of allocating a leaking QObject on the heap.
Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
The member _trayEngine, allocated in the constructor, was leaking.
This commit sets the Systray instance as the Qt object tree parent of
the _trayEngine to fix the leak.
While at it, a few unused header includes have been removed.
Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
The member _map, allocated in the constructor, was leaking.
The ad-hoc way to fix the leak would have been to add a destructor
that deletes _map. However, there is no good reason why _map has
to be a pointer to a QMap (instead of a QMap).
Hence this commit changes the type of the _map member from a QMap
pointer to a QMap.
Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
The member _recentlyChanged, allocated in the constructor, was leaking.
The ad-hoc way to fix the leak would have been to add a destructor
that deletes _recentlyChanged. However, there is no good reason why
_recentlyChanged has to be a pointer to a QList (instead of a QList).
Hence this commit changes the type of the _recentlyChanged member
from a QList pointer to a QList.
Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
Using default member initializers (available since C++11) in
OCC::FolderDefinition allows to remove its explicit default
constructor, which is favorable.
Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
OCC::FolderDefinition has a member called isClientSideEncrypted
that was introduced by commit 9318c487b9 but has not been used
in any way since.
Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
Change it to path() to be consistent with the other usages in the project :)
See: https://doc.qt.io/qt-5/qurl.html#path
Signed-off-by: Michael Schuster <michael@schuster.ms>
Update the issue and open PR links with the new repository URL.
The old URL is forwarded, but feels not completely right.
Signed-off-by: Reinhold Gschweicher <pyro4hell@gmail.com>
The UndefinedBehaviorSanitizer includes the "vptr" check. This
check, however, needs typeinfo for OCC::AccountManager because
otherwise its stub for FileManTest leads to undefined references
when linking. Adding the -frtti flag to enable run-time typeinfo
did not solve the problem. I do not know another solution, so this
commit disables the vptr check.
Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
The SANITIZE_ADDRESS option of our CMake configuration activates the
AddressSanitizer (and UBSan in a non-working way) for the whole project
(although, by the way, its documentation pretends that it is only enabled
for tests).
This commit introduces new options SANITIZE_LEAK, SANITIZE_MEMORY,
SANITIZE_UNDEFINED, SANITIZE_THREAD. Each of these options (including
SANITIZE_ADDRESS) enables only the corresponding sanitizer.
Moreover, we mark all sanitizer options as advanced options, because these
options are only interesting for developers.
Note that some sanitizers are conflicting, that is, not all options can
be enabled simultaneously. Also, not all sanitizers are available for
all compilers and versions. We, however, do not check for this, instead
we let the compiler throw its errors in such cases.
The explicit usage of the Google Linker is removed, because it is not
necessary and can lead to problems with clang.
The commit can be considered a rewrite of cmake/modules/SanitizerFlags.cmake.
Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
In case of denormalized paths in the dav href (presence of . or .. in
the path) simple string startsWith comparison wasn't enough to know if
said href ended up in the right namespace. That's why we're now using
QUrl (pretending local file since we don't have a full URL in the href)
to normalize the path before comparison.
This could happen with broken proxies for instance where we would
wrongly validate the dav information resulting in potentially surprising
syncing and name collisions.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>