_manager ptr only got initialized in the constructor when sharingPossible was set to true
Changes:
- Move member ptr inits from constructor to the header file's class definition
- Init _manager: set to nullptr too
- Add check for _manager to avoid crash in showSharingUi()
Signed-off-by: Michael Schuster <michael@schuster.ms>
I think I got the if clause wrong regarding limiting the command only to
member users. Let's move this out of the way for now.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
This should pass, with the minimal .clang-tidy which was provided. Other
PRs should be done to enable further checks.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
This test was failing locally for me. Indeed, through QStandardPaths it
was finding the user settings of my production client and not having the
initial state it expected. Using QStandardPaths test mode then it starts
from a clean slate every time.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
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>