From d953875b60ca372f37d896de955da6e7cf42654c Mon Sep 17 00:00:00 2001 From: Felix Ernst Date: Thu, 20 Jun 2024 12:35:51 +0200 Subject: DolphinViewContainer: Use KMessageWidget::MessageType instead of own type This slightly simplifies code and allows showing KMessageWidget::Positive message boxes. --- src/dolphinviewcontainer.h | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'src/dolphinviewcontainer.h') diff --git a/src/dolphinviewcontainer.h b/src/dolphinviewcontainer.h index 9628def63..55d00a3b8 100644 --- a/src/dolphinviewcontainer.h +++ b/src/dolphinviewcontainer.h @@ -14,6 +14,7 @@ #include #include +#include #include #include @@ -25,7 +26,6 @@ namespace Admin class Bar; } class FilterBar; -class KMessageWidget; class QAction; class QGridLayout; class QUrl; @@ -53,8 +53,6 @@ class DolphinViewContainer : public QWidget Q_OBJECT public: - enum MessageType { Information, Warning, Error }; - DolphinViewContainer(const QUrl &url, QWidget *parent); ~DolphinViewContainer() override; @@ -151,10 +149,9 @@ public: bool isSelectionModeEnabled() const; /** - * Shows the message \msg with the given type non-modal above - * the view-content. + * Shows the message \message with the given type \messageType non-modal above the view-content. */ - void showMessage(const QString &msg, MessageType type); + void showMessage(const QString &message, KMessageWidget::MessageType messageType); /** * Refreshes the view container to get synchronized with the (updated) Dolphin settings. @@ -393,9 +390,9 @@ private Q_SLOTS: void slotStatusBarZoomLevelChanged(int zoomLevel); /** - * Slot that calls showMessage(msg, Error). + * Slot that calls showMessage(message, KMessageWidget::Error). */ - void showErrorMessage(const QString &msg); + void showErrorMessage(const QString &message); /** * Is invoked when a KFilePlacesModel has been changed -- cgit v1.3