mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-12 12:54:29 +00:00
DolphinView: rename new methods to copy/move urls
DolphinView doesn't know anything about split views and it shouldn't. Rename these new methods to what they actually do (just copy or move to a given QUrl).
This commit is contained in:
parent
1ee665bac8
commit
a3052c3942
|
@ -330,10 +330,10 @@ void DolphinTabWidget::copyToInactiveSplitView()
|
||||||
|
|
||||||
if (tabPage->primaryViewActive()) {
|
if (tabPage->primaryViewActive()) {
|
||||||
// copy from left panel to right
|
// copy from left panel to right
|
||||||
activeViewContainer->view()->copySelectedItemsToInactiveSplitView(activeViewContainer->view()->selectedItems(), tabPage->secondaryViewContainer()->url());
|
activeViewContainer->view()->copySelectedItems(activeViewContainer->view()->selectedItems(), tabPage->secondaryViewContainer()->url());
|
||||||
} else {
|
} else {
|
||||||
// copy from right panel to left
|
// copy from right panel to left
|
||||||
activeViewContainer->view()->copySelectedItemsToInactiveSplitView(activeViewContainer->view()->selectedItems(), tabPage->primaryViewContainer()->url());
|
activeViewContainer->view()->copySelectedItems(activeViewContainer->view()->selectedItems(), tabPage->primaryViewContainer()->url());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -347,10 +347,10 @@ void DolphinTabWidget::moveToInactiveSplitView()
|
||||||
|
|
||||||
if (tabPage->primaryViewActive()) {
|
if (tabPage->primaryViewActive()) {
|
||||||
// move from left panel to right
|
// move from left panel to right
|
||||||
activeViewContainer->view()->moveSelectedItemsToInactiveSplitView(activeViewContainer->view()->selectedItems(), tabPage->secondaryViewContainer()->url());
|
activeViewContainer->view()->moveSelectedItems(activeViewContainer->view()->selectedItems(), tabPage->secondaryViewContainer()->url());
|
||||||
} else {
|
} else {
|
||||||
// move from right panel to left
|
// move from right panel to left
|
||||||
activeViewContainer->view()->moveSelectedItemsToInactiveSplitView(activeViewContainer->view()->selectedItems(), tabPage->primaryViewContainer()->url());
|
activeViewContainer->view()->moveSelectedItems(activeViewContainer->view()->selectedItems(), tabPage->primaryViewContainer()->url());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -692,7 +692,7 @@ void DolphinView::copySelectedItemsToClipboard()
|
||||||
QApplication::clipboard()->setMimeData(mimeData);
|
QApplication::clipboard()->setMimeData(mimeData);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DolphinView::copySelectedItemsToInactiveSplitView(const KFileItemList &selection, const QUrl &destinationUrl)
|
void DolphinView::copySelectedItems(const KFileItemList &selection, const QUrl &destinationUrl)
|
||||||
{
|
{
|
||||||
KIO::CopyJob* job = KIO::copy(selection.urlList(), destinationUrl, KIO::DefaultFlags);
|
KIO::CopyJob* job = KIO::copy(selection.urlList(), destinationUrl, KIO::DefaultFlags);
|
||||||
KJobWidgets::setWindow(job, this);
|
KJobWidgets::setWindow(job, this);
|
||||||
|
@ -702,7 +702,7 @@ void DolphinView::copySelectedItemsToInactiveSplitView(const KFileItemList &sele
|
||||||
KIO::FileUndoManager::self()->recordCopyJob(job);
|
KIO::FileUndoManager::self()->recordCopyJob(job);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DolphinView::moveSelectedItemsToInactiveSplitView(const KFileItemList &selection, const QUrl &destinationUrl)
|
void DolphinView::moveSelectedItems(const KFileItemList &selection, const QUrl &destinationUrl)
|
||||||
{
|
{
|
||||||
KIO::CopyJob* job = KIO::move(selection.urlList(), destinationUrl, KIO::DefaultFlags);
|
KIO::CopyJob* job = KIO::move(selection.urlList(), destinationUrl, KIO::DefaultFlags);
|
||||||
KJobWidgets::setWindow(job, this);
|
KJobWidgets::setWindow(job, this);
|
||||||
|
|
|
@ -371,16 +371,14 @@ public slots:
|
||||||
void copySelectedItemsToClipboard();
|
void copySelectedItemsToClipboard();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copies all selected items to the inactive split view.
|
* Copies all selected items to @p destinationUrl.
|
||||||
* Only used in Split View.
|
|
||||||
*/
|
*/
|
||||||
void copySelectedItemsToInactiveSplitView(const KFileItemList &selection, const QUrl &destinationUrl);
|
void copySelectedItems(const KFileItemList &selection, const QUrl &destinationUrl);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Moves all selected items to the inactive split view.
|
* Moves all selected items to @p destinationUrl.
|
||||||
* Only used in Split View.
|
|
||||||
*/
|
*/
|
||||||
void moveSelectedItemsToInactiveSplitView(const KFileItemList &selection, const QUrl &destinationUrl);
|
void moveSelectedItems(const KFileItemList &selection, const QUrl &destinationUrl);
|
||||||
|
|
||||||
/** Pastes the clipboard data to this view. */
|
/** Pastes the clipboard data to this view. */
|
||||||
void paste();
|
void paste();
|
||||||
|
|
Loading…
Reference in a new issue