Merge branch 'Applications/16.12'

This commit is contained in:
Elvis Angelaccio 2017-01-02 14:57:57 +01:00
commit 331c8bc89e
3 changed files with 11 additions and 1 deletions

View 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) void DolphinSearchBox::keyReleaseEvent(QKeyEvent* event)
{ {
QWidget::keyReleaseEvent(event); QWidget::keyReleaseEvent(event);

View file

@ -100,6 +100,7 @@ public:
protected: protected:
virtual bool event(QEvent* event) Q_DECL_OVERRIDE; virtual bool event(QEvent* event) Q_DECL_OVERRIDE;
virtual void showEvent(QShowEvent* 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 void keyReleaseEvent(QKeyEvent* event) Q_DECL_OVERRIDE;
virtual bool eventFilter(QObject* obj, QEvent* event) Q_DECL_OVERRIDE; virtual bool eventFilter(QObject* obj, QEvent* event) Q_DECL_OVERRIDE;

View file

@ -37,6 +37,7 @@
#include <KSelectAction> #include <KSelectAction>
#include <KToggleAction> #include <KToggleAction>
#include <KPropertiesDialog> #include <KPropertiesDialog>
#include <KProtocolManager>
#include <QIcon> #include <QIcon>
#include "dolphindebug.h" #include "dolphindebug.h"
@ -486,7 +487,8 @@ void DolphinViewActionHandler::slotHiddenFilesShownChanged(bool shown)
void DolphinViewActionHandler::slotWriteStateChanged(bool isFolderWritable) 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() KToggleAction* DolphinViewActionHandler::iconsModeAction()