]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Merge branch 'Applications/16.12'
authorElvis Angelaccio <elvis.angelaccio@kde.org>
Mon, 2 Jan 2017 13:57:57 +0000 (14:57 +0100)
committerElvis Angelaccio <elvis.angelaccio@kde.org>
Mon, 2 Jan 2017 13:57:57 +0000 (14:57 +0100)
src/search/dolphinsearchbox.cpp
src/search/dolphinsearchbox.h
src/views/dolphinviewactionhandler.cpp

index 26ddd27f8ee535fb8de6a8a594a97027826fee00..60a4a7567acb8d631a8d9617170a80e27a70ea52 100644 (file)
@@ -206,6 +206,13 @@ void DolphinSearchBox::showEvent(QShowEvent* event)
     }
 }
 
+void DolphinSearchBox::hideEvent(QHideEvent* event)
+{
+    Q_UNUSED(event);
+    m_startedSearching = false;
+    m_startSearchTimer->stop();
+}
+
 void DolphinSearchBox::keyReleaseEvent(QKeyEvent* event)
 {
     QWidget::keyReleaseEvent(event);
index a806174760521bb66350721b506583c8c37a6b33..b747679ec272af8a88dc788612ebb3e00b0b26b9 100644 (file)
@@ -100,6 +100,7 @@ public:
 protected:
     virtual bool event(QEvent* event) Q_DECL_OVERRIDE;
     virtual void showEvent(QShowEvent* event) Q_DECL_OVERRIDE;
+    virtual void hideEvent(QHideEvent* event) Q_DECL_OVERRIDE;
     virtual void keyReleaseEvent(QKeyEvent* event) Q_DECL_OVERRIDE;
     virtual bool eventFilter(QObject* obj, QEvent* event) Q_DECL_OVERRIDE;
 
index 858f9299b96d22ebbd81f324661cec3f3ff895e0..5c0b49cd206c371fd5dda83895dd93f9e1f37be2 100644 (file)
@@ -37,6 +37,7 @@
 #include <KSelectAction>
 #include <KToggleAction>
 #include <KPropertiesDialog>
+#include <KProtocolManager>
 #include <QIcon>
 
 #include "dolphindebug.h"
@@ -486,7 +487,8 @@ void DolphinViewActionHandler::slotHiddenFilesShownChanged(bool shown)
 
 void DolphinViewActionHandler::slotWriteStateChanged(bool isFolderWritable)
 {
-    m_actionCollection->action(QStringLiteral("create_dir"))->setEnabled(isFolderWritable);
+    m_actionCollection->action(QStringLiteral("create_dir"))->setEnabled(isFolderWritable &&
+                                                                         KProtocolManager::supportsMakeDir(currentView()->url()));
 }
 
 KToggleAction* DolphinViewActionHandler::iconsModeAction()