diff options
| author | Felix Ernst <[email protected]> | 2020-08-12 20:45:17 +0200 |
|---|---|---|
| committer | Elvis Angelaccio <[email protected]> | 2020-11-09 23:49:07 +0100 |
| commit | b6fc58c3c32b03f504a5f697b62c4834dc3f650a (patch) | |
| tree | cda0394689ba6001bc14b1895c2ef95a4baf2dcd /src/dolphinviewcontainer.cpp | |
| parent | 00abc6d28031569de17e4888d8b21e6afbe0872f (diff) | |
Adress the first round of Angelaccio's review comments
- Split the viewContainers(bool includeInActive) into two methods
without parameters
- Prevent users from accidently hiding all Url Navigators by
preventing the dangerous action and then displaying a helpful
message instead
Unrelated to review comments: Remove a useless line of code
Diffstat (limited to 'src/dolphinviewcontainer.cpp')
| -rw-r--r-- | src/dolphinviewcontainer.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/dolphinviewcontainer.cpp b/src/dolphinviewcontainer.cpp index da3504187..3cdad13fb 100644 --- a/src/dolphinviewcontainer.cpp +++ b/src/dolphinviewcontainer.cpp @@ -367,10 +367,13 @@ void DolphinViewContainer::disconnectUrlNavigator() updateNavigatorWidgetVisibility(); } -void DolphinViewContainer::showMessage(const QString& msg, MessageType type) +KMessageWidget *DolphinViewContainer::showMessage(const QString& msg, MessageType type) { if (msg.isEmpty()) { - return; + return m_messageWidget; + } + for (auto action : m_messageWidget->actions()) { + m_messageWidget->removeAction(action); } m_messageWidget->setText(msg); @@ -396,6 +399,7 @@ void DolphinViewContainer::showMessage(const QString& msg, MessageType type) m_messageWidget->hide(); } m_messageWidget->animatedShow(); + return m_messageWidget; } void DolphinViewContainer::readSettings() |
