mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-12 12:54:29 +00:00
Merge branch 'Applications/17.08'
This commit is contained in:
commit
82b2dbd3ec
|
@ -180,6 +180,8 @@ set(dolphinpart_SRCS
|
||||||
dolphindebug.cpp
|
dolphindebug.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
qt5_add_resources(dolphinpart_SRCS dolphinpart.qrc)
|
||||||
|
|
||||||
add_library(dolphinpart MODULE ${dolphinpart_SRCS})
|
add_library(dolphinpart MODULE ${dolphinpart_SRCS})
|
||||||
|
|
||||||
target_link_libraries(dolphinpart
|
target_link_libraries(dolphinpart
|
||||||
|
@ -188,7 +190,6 @@ target_link_libraries(dolphinpart
|
||||||
|
|
||||||
install(TARGETS dolphinpart DESTINATION ${KDE_INSTALL_PLUGINDIR})
|
install(TARGETS dolphinpart DESTINATION ${KDE_INSTALL_PLUGINDIR})
|
||||||
|
|
||||||
install(FILES dolphinpart.rc DESTINATION ${KDE_INSTALL_KXMLGUI5DIR}/dolphinpart)
|
|
||||||
install(FILES dolphinpart.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
|
install(FILES dolphinpart.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
|
||||||
|
|
||||||
##########################################
|
##########################################
|
||||||
|
@ -267,6 +268,8 @@ if(NOT WIN32)
|
||||||
set(dolphinstatic_SRCS ${dolphinstatic_SRCS} panels/terminal/terminalpanel.cpp)
|
set(dolphinstatic_SRCS ${dolphinstatic_SRCS} panels/terminal/terminalpanel.cpp)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
qt5_add_resources(dolphinstatic_SRCS dolphin.qrc)
|
||||||
|
|
||||||
add_library(dolphinstatic STATIC ${dolphinstatic_SRCS})
|
add_library(dolphinstatic STATIC ${dolphinstatic_SRCS})
|
||||||
|
|
||||||
target_include_directories(dolphinstatic PRIVATE ${PHONON_INCLUDES})
|
target_include_directories(dolphinstatic PRIVATE ${PHONON_INCLUDES})
|
||||||
|
@ -389,7 +392,6 @@ install( FILES settings/dolphin_directoryviewpropertysettings.kcfg
|
||||||
settings/dolphin_detailsmodesettings.kcfg
|
settings/dolphin_detailsmodesettings.kcfg
|
||||||
settings/dolphin_versioncontrolsettings.kcfg
|
settings/dolphin_versioncontrolsettings.kcfg
|
||||||
DESTINATION ${KDE_INSTALL_KCFGDIR} )
|
DESTINATION ${KDE_INSTALL_KCFGDIR} )
|
||||||
install( FILES dolphinui.rc DESTINATION ${KDE_INSTALL_KXMLGUI5DIR}/dolphin )
|
|
||||||
install( FILES org.kde.dolphin.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR} )
|
install( FILES org.kde.dolphin.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR} )
|
||||||
install( FILES settings/kcm/kcmdolphinviewmodes.desktop DESTINATION
|
install( FILES settings/kcm/kcmdolphinviewmodes.desktop DESTINATION
|
||||||
${KDE_INSTALL_KSERVICES5DIR} )
|
${KDE_INSTALL_KSERVICES5DIR} )
|
||||||
|
|
5
src/dolphin.qrc
Normal file
5
src/dolphin.qrc
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
<RCC>
|
||||||
|
<qresource prefix="/kxmlgui5/dolphin">
|
||||||
|
<file>dolphinui.rc</file>
|
||||||
|
</qresource>
|
||||||
|
</RCC>
|
5
src/dolphinpart.qrc
Normal file
5
src/dolphinpart.qrc
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
<RCC>
|
||||||
|
<qresource prefix="/kxmlgui5/dolphinpart">
|
||||||
|
<file>dolphinpart.rc</file>
|
||||||
|
</qresource>
|
||||||
|
</RCC>
|
|
@ -284,7 +284,7 @@ void DolphinTabWidget::tabDropEvent(int index, QDropEvent* event)
|
||||||
{
|
{
|
||||||
if (index >= 0) {
|
if (index >= 0) {
|
||||||
DolphinView* view = tabPageAt(index)->activeViewContainer()->view();
|
DolphinView* view = tabPageAt(index)->activeViewContainer()->view();
|
||||||
view->dropUrls(view->url(), event);
|
view->dropUrls(view->url(), event, view);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
#include <KFilePlacesModel>
|
#include <KFilePlacesModel>
|
||||||
#include <KLocalizedString>
|
#include <KLocalizedString>
|
||||||
#include <KIO/PreviewJob>
|
#include <KIO/PreviewJob>
|
||||||
|
#include <kio_version.h>
|
||||||
#include <KMessageWidget>
|
#include <KMessageWidget>
|
||||||
#include <KShell>
|
#include <KShell>
|
||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
|
@ -135,8 +136,14 @@ DolphinViewContainer::DolphinViewContainer(const QUrl& url, QWidget* parent) :
|
||||||
this, &DolphinViewContainer::slotUrlNavigatorLocationChanged);
|
this, &DolphinViewContainer::slotUrlNavigatorLocationChanged);
|
||||||
connect(m_urlNavigator, &KUrlNavigator::returnPressed,
|
connect(m_urlNavigator, &KUrlNavigator::returnPressed,
|
||||||
this, &DolphinViewContainer::slotReturnPressed);
|
this, &DolphinViewContainer::slotReturnPressed);
|
||||||
connect(m_urlNavigator, &KUrlNavigator::urlsDropped,
|
connect(m_urlNavigator, &KUrlNavigator::urlsDropped, this, [=](const QUrl &destination, QDropEvent *event) {
|
||||||
m_view, &DolphinView::dropUrls);
|
#if KIO_VERSION >= QT_VERSION_CHECK(5, 37, 0)
|
||||||
|
m_view->dropUrls(destination, event, m_urlNavigator->dropWidget());
|
||||||
|
#else
|
||||||
|
// TODO: remove as soon as we can hard-depend of KF5 >= 5.37
|
||||||
|
m_view->dropUrls(destination, event, m_view);
|
||||||
|
#endif
|
||||||
|
});
|
||||||
|
|
||||||
// Initialize status bar
|
// Initialize status bar
|
||||||
m_statusBar = new DolphinStatusBar(this);
|
m_statusBar = new DolphinStatusBar(this);
|
||||||
|
|
|
@ -1051,14 +1051,14 @@ void DolphinView::slotItemDropEvent(int index, QGraphicsSceneDragDropEvent* even
|
||||||
event->mimeData(),
|
event->mimeData(),
|
||||||
event->buttons(),
|
event->buttons(),
|
||||||
event->modifiers());
|
event->modifiers());
|
||||||
dropUrls(destUrl, &dropEvent);
|
dropUrls(destUrl, &dropEvent, this);
|
||||||
|
|
||||||
setActive(true);
|
setActive(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DolphinView::dropUrls(const QUrl &destUrl, QDropEvent *dropEvent)
|
void DolphinView::dropUrls(const QUrl &destUrl, QDropEvent *dropEvent, QWidget *dropWidget)
|
||||||
{
|
{
|
||||||
KIO::DropJob* job = DragAndDropHelper::dropUrls(destUrl, dropEvent, this);
|
KIO::DropJob* job = DragAndDropHelper::dropUrls(destUrl, dropEvent, dropWidget);
|
||||||
|
|
||||||
if (job) {
|
if (job) {
|
||||||
connect(job, &KIO::DropJob::result, this, &DolphinView::slotPasteJobResult);
|
connect(job, &KIO::DropJob::result, this, &DolphinView::slotPasteJobResult);
|
||||||
|
|
|
@ -363,9 +363,9 @@ public slots:
|
||||||
void pasteIntoFolder();
|
void pasteIntoFolder();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles a drop of @p dropEvent onto @p destUrl
|
* Handles a drop of @p dropEvent onto widget @p dropWidget and destination @p destUrl
|
||||||
*/
|
*/
|
||||||
void dropUrls(const QUrl &destUrl, QDropEvent *dropEvent);
|
void dropUrls(const QUrl &destUrl, QDropEvent *dropEvent, QWidget *dropWidget);
|
||||||
|
|
||||||
void stopLoading();
|
void stopLoading();
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@ public:
|
||||||
* @param destUrl URL of the item destination. Is used only if destItem::isNull()
|
* @param destUrl URL of the item destination. Is used only if destItem::isNull()
|
||||||
* is true.
|
* is true.
|
||||||
* @param event Drop event.
|
* @param event Drop event.
|
||||||
* @param window Associated widget.
|
* @param window Widget where the drop happened, will be used as parent of the drop menu.
|
||||||
* @return KIO::DropJob pointer
|
* @return KIO::DropJob pointer
|
||||||
*/
|
*/
|
||||||
static KIO::DropJob* dropUrls(const QUrl& destUrl,
|
static KIO::DropJob* dropUrls(const QUrl& destUrl,
|
||||||
|
|
Loading…
Reference in a new issue