diff options
| author | arnav dhamija <[email protected]> | 2016-09-25 23:13:22 +0530 |
|---|---|---|
| committer | arnav dhamija <[email protected]> | 2016-09-25 23:13:22 +0530 |
| commit | 67099640b90588af1c72c340756253400da3e95b (patch) | |
| tree | 16fe472cc13677496793c2a4967097e978379ef4 /src/views/dolphinview.cpp | |
| parent | ccd0a74eed22c35b5eb72e6f46e747f621169732 (diff) | |
| parent | 1710304e9ba926d2aec4226d00974b826f9bcbc0 (diff) | |
Merge branch 'master' of git.kde.org:dolphin
Diffstat (limited to 'src/views/dolphinview.cpp')
| -rw-r--r-- | src/views/dolphinview.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index c3df3a9a8..4105628ee 100644 --- a/src/views/dolphinview.cpp +++ b/src/views/dolphinview.cpp @@ -75,10 +75,6 @@ #endif #include <KFormat> -namespace { - const int MaxModeEnum = DolphinView::CompactView; -} - DolphinView::DolphinView(const QUrl& url, QWidget* parent) : QWidget(parent), m_active(true), @@ -728,6 +724,15 @@ void DolphinView::stopLoading() bool DolphinView::eventFilter(QObject* watched, QEvent* event) { switch (event->type()) { + case QEvent::KeyPress: + if (GeneralSettings::useTabForSwitchingSplitView()) { + QKeyEvent* keyEvent = static_cast<QKeyEvent*>(event); + if (keyEvent->key() == Qt::Key_Tab && keyEvent->modifiers() == Qt::NoModifier) { + toggleActiveViewRequested(); + return true; + } + } + break; case QEvent::FocusIn: if (watched == m_container) { setActive(true); @@ -1031,7 +1036,7 @@ void DolphinView::slotItemDropEvent(int index, QGraphicsSceneDragDropEvent* even destUrl = url(); } else { // The item represents a directory or desktop-file - destUrl = destItem.url(); + destUrl = destItem.mostLocalUrl(); } QDropEvent dropEvent(event->pos().toPoint(), @@ -1278,7 +1283,7 @@ QUrl DolphinView::openItemAsFolderUrl(const KFileItem& item, const bool browseTh if (desktopFile.hasLinkType()) { const QString linkUrl = desktopFile.readUrl(); if (!linkUrl.startsWith(QLatin1String("http"))) { - return linkUrl; + return QUrl::fromUserInput(linkUrl); } } } |
