setWindowFlags triggered changeEvent, thus causing a crash in customizeStyle.
This fix should be kept even if we decide against delayed init in the future.
Signed-off-by: Michael Schuster <michael@schuster.ms>
ownCloudGui::slotShowSettings already got what it takes to create it only when we try to show it for the first time.
This however has some implications:
Pros:
- Only created when needed, while testing saved ca. 20 MB of RAM and got freed again after closing the dialog.
- Since we defaulted to the new Tray UI from 3.0, this is an added bonus for users don't opening the settings.
Cons:
- Resources like the avatar image have to be refetched everytime the dialog is recreated.
This may be desired as well, because it ensures displaying no outdated info (e.g. on connection issues).
Signed-off-by: Michael Schuster <michael@schuster.ms>
Use a similar trick of a semi-transparent rectangle on top when the
mouse area is hovered. This way it will always work whatever is the
background color.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
This way we avoid the expensive SQL query on the server at the price of
more round-trips since we're doing the recursive traversal by hand now.
Also it turns out this depth was used for all the other propfind calls
during sync when we want fresher information regarding a folder. This
was very inefficient in all cases and won't happen anymore.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Otherwise it would spin forever while we know we're not doing any work
anymore since we got a message from the server.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
All the other ShareLinkWidgets process that signal (which allows to
display error messages for instance) but not that one for some reason.
That being said it might need to deal with an enforced password
situation.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
It turns out the shareDeleted() signal is connected to a function
cleaning up the ShareLinkWidget holding the last shared pointer to the
Share object. Since we use member variables for calling updateFolder()
this would lead to using deleted objects.
Just swap the call and the signal to have everything back in order.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Make sure we got a fixed size for that label. Also ensure that the
pixmap we display there is properly scaled to fit while maintaining the
aspect ratio.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Combining translated strings like this makes them hard to translate since the order of words is different between languages.
Use proper placeholder strings instead.
Signed-off-by: Nicolas Fella <nicolas.fella@gmx.de>
By using properties and property bindings the QML code gets more declarative rather than imperative, which is considered better.
This patch:
- Introduces a currentUserId property in UserModel that replaces the equivalent Q_INVOKABLE call
- Introduces an avatar property in User that contains the avatar's image provider url without any fallback
- Introduces new image provider urls for fallback images
- Moves the fallback image selection to QML since we want different fallbacks according to where it is used
- Wires up the necessary signals to propagate a changing avatar
Signed-off-by: Nicolas Fella <nicolas.fella@gmx.de>