┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphinviewcontainer.h
diff options
context:
space:
mode:
authorFelix Ernst <[email protected]>2024-07-13 15:37:31 +0000
committerFelix Ernst <[email protected]>2024-07-13 15:37:31 +0000
commit19fdc5b67990bb75009a1fc511619bd449d559d7 (patch)
tree846b3d1392fc94ed1e9530458bad046c706be1ad /src/dolphinviewcontainer.h
parent8271df42bda9284012ebc05f7edbd0689c07f6a1 (diff)
Stop acting as admin when the authorization expires
Previously, the authorization just silently expired without any visible change. The surprise only came when the user tried to do any action, which immediately would show a password prompt. We don't want users to randomly type passwords into password prompts unexpectedly showing up. This commit avoids that. With this change, the view container visibly de-escalates privileges and shows a message explaining what happened. A method was implemented in kio-admin to make this possible. See: https://commits.kde.org/kio-admin/a2da29289d12ef845e2c1da17ed04c59f1c47762 This commit also improves some logic around the responsibility of hiding bars and activating view containers. This is also part of my project funded by the European Commission.
Diffstat (limited to 'src/dolphinviewcontainer.h')
-rw-r--r--src/dolphinviewcontainer.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/dolphinviewcontainer.h b/src/dolphinviewcontainer.h
index 55d00a3b8..c5da6b48b 100644
--- a/src/dolphinviewcontainer.h
+++ b/src/dolphinviewcontainer.h
@@ -21,6 +21,8 @@
#include <QPushButton>
#include <QWidget>
+#include <initializer_list>
+
namespace Admin
{
class Bar;
@@ -150,8 +152,9 @@ public:
/**
* Shows the message \message with the given type \messageType non-modal above the view-content.
+ * \buttonActions defines actions which the user can trigger as a response to this message. They are presented as buttons below the \message.
*/
- void showMessage(const QString &message, KMessageWidget::MessageType messageType);
+ void showMessage(const QString &message, KMessageWidget::MessageType messageType, std::initializer_list<QAction *> buttonActions = {});
/**
* Refreshes the view container to get synchronized with the (updated) Dolphin settings.
@@ -328,11 +331,6 @@ private Q_SLOTS:
*/
void showItemInfo(const KFileItem &item);
- /**
- * Sets the Admin::Bar visible or invisible based on whether \a url is an admin url.
- */
- void updateAdminBarVisibility(const QUrl &url);
-
void closeFilterBar();
/**