From 2f045c60109e0a5811f68bcce617236e3478e402 Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Sun, 6 Apr 2014 03:32:55 +0200 Subject: Allow compiling Dolphin with KF5 This does not work properly yet, there are probably quite a few bad signal/ slot connections due to KUrl -> QUrl. However dolphin starts without crashing. Accessibility is not ported since that changed quite a lot from Qt4 -> Qt5 and I have no idea how it is supposed to be used. This is the first commit for review 117395 --- src/dolphinviewcontainer.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/dolphinviewcontainer.cpp') diff --git a/src/dolphinviewcontainer.cpp b/src/dolphinviewcontainer.cpp index 768fd5ef9..abb63f4ed 100644 --- a/src/dolphinviewcontainer.cpp +++ b/src/dolphinviewcontainer.cpp @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -86,15 +87,15 @@ DolphinViewContainer::DolphinViewContainer(const KUrl& url, QWidget* parent) : this, SLOT(dropUrls(KUrl,QDropEvent*))); connect(m_urlNavigator, SIGNAL(activated()), this, SLOT(activate())); - connect(m_urlNavigator->editor(), SIGNAL(completionModeChanged(KGlobalSettings::Completion)), - this, SLOT(saveUrlCompletionMode(KGlobalSettings::Completion))); + connect(m_urlNavigator->editor(), SIGNAL(completionModeChanged(KCompletion::CompletionMode)), + this, SLOT(saveUrlCompletionMode(KCompletion::CompletionMode))); const GeneralSettings* settings = GeneralSettings::self(); m_urlNavigator->setUrlEditable(settings->editableUrl()); m_urlNavigator->setShowFullPath(settings->showFullPath()); m_urlNavigator->setHomeUrl(KUrl(settings->homeUrl())); KUrlComboBox* editor = m_urlNavigator->editor(); - editor->setCompletionMode(KGlobalSettings::Completion(settings->urlCompletionMode())); + editor->setCompletionMode(KCompletion::CompletionMode(settings->urlCompletionMode())); m_searchBox = new DolphinSearchBox(this); m_searchBox->hide(); @@ -492,7 +493,7 @@ void DolphinViewContainer::slotItemActivated(const KFileItem& item) return; } - item.run(); + new KRun(item.targetUrl(), this); } void DolphinViewContainer::slotItemsActivated(const KFileItemList& items) @@ -654,7 +655,7 @@ void DolphinViewContainer::requestFocus() m_view->setFocus(); } -void DolphinViewContainer::saveUrlCompletionMode(KGlobalSettings::Completion completion) +void DolphinViewContainer::saveUrlCompletionMode(KCompletion::CompletionMode completion) { GeneralSettings::setUrlCompletionMode(completion); } -- cgit v1.3