Konsole: port from KonqOperations to the new KIO::DropJob

This allows to get rid of the libkonq dependency completely.

REVIEW: 121679
wilder-portage
David Faure 11 years ago
parent ffd2b2037b
commit 506495b477
  1. 12
      src/CMakeLists.txt
  2. 12
      src/TerminalDisplay.cpp
  3. 3
      src/config-konsole.h.cmake

@ -2,14 +2,6 @@
add_definitions(-DTRANSLATION_DOMAIN=\"konsole\")
set(LIBKONQ_MIN_VERSION "5.96.0")
find_package(KF5Konq ${LIBKONQ_MIN_VERSION} CONFIG)
set_package_properties(LibKonq PROPERTIES DESCRIPTION "Provides high-level file management functions"
URL "https://projects.kde.org/projects/kde/applications/kde-baseapps" TYPE OPTIONAL
PURPOSE "Required for drag-n-drop menus")
set(HAVE_LIBKONQ ${KF5Konq_FOUND})
### Too many crashes/issues with detaching on MacOSX
IF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(ENABLE_DETACHING 0)
@ -145,10 +137,6 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
list(APPEND konsole_LIBS util)
endif()
if(HAVE_LIBKONQ)
set(konsole_LIBS ${konsole_LIBS} KF5::Konq)
endif()
### Konsole Application
ki18n_wrap_ui(konsoleprivate_SRCS ColorSchemeEditor.ui

@ -53,10 +53,9 @@
#include <QDebug>
#include <KLocalizedString>
#include <KNotification>
#include <KIO/DropJob>
#include <KJobWidgets>
#include <kio/netaccess.h>
#if defined(HAVE_LIBKONQ)
#include <konq_operations.h>
#endif
#include <KFileItem>
#include <KMessageBox>
@ -3159,7 +3158,6 @@ void TerminalDisplay::dropEvent(QDropEvent* event)
dropText += ' ';
}
#if defined(HAVE_LIBKONQ)
// If our target is local we will open a popup - otherwise the fallback kicks
// in and the URLs will simply be pasted as text.
if (_sessionController && _sessionController->url().isLocalFile()) {
@ -3191,11 +3189,11 @@ void TerminalDisplay::dropEvent(QDropEvent* event)
QUrl target = QUrl::fromLocalFile(_sessionController->currentDir());
KonqOperations::doDrop(KFileItem(), target, event, this, additionalActions);
KIO::DropJob* job = KIO::drop(event, target);
KJobWidgets::setWindow(job, this);
job->setApplicationActions(additionalActions);
return;
}
#endif
} else {
dropText = event->mimeData()->text();

@ -1,6 +1,3 @@
/* Defined if you have LibKonq */
#cmakedefine HAVE_LIBKONQ 1
/* Defined if you want detaching enabled */
#cmakedefine ENABLE_DETACHING 1

Loading…
Cancel
Save