┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphinviewcontainer.h
diff options
context:
space:
mode:
authorFelix Ernst <[email protected]>2024-06-20 12:35:51 +0200
committerFelix Ernst <[email protected]>2024-06-24 17:06:09 +0000
commitd953875b60ca372f37d896de955da6e7cf42654c (patch)
treebd8c00e14cf870a553be170b992f9ddb49422427 /src/dolphinviewcontainer.h
parent3ccd49e586d7dbd2c7e1e87296f4b6c293b176fc (diff)
DolphinViewContainer: Use KMessageWidget::MessageType instead of own type
This slightly simplifies code and allows showing KMessageWidget::Positive message boxes.
Diffstat (limited to 'src/dolphinviewcontainer.h')
-rw-r--r--src/dolphinviewcontainer.h13
1 files changed, 5 insertions, 8 deletions
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 <KFileItem>
#include <KIO/Job>
+#include <KMessageWidget>
#include <KUrlNavigator>
#include <QElapsedTimer>
@@ -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