┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphin.cpp
diff options
context:
space:
mode:
authorDavid Faure <[email protected]>2006-11-23 21:50:16 +0000
committerDavid Faure <[email protected]>2006-11-23 21:50:16 +0000
commit47fa21aff1e1b1226767c956953bc0517d52d42e (patch)
treeb6e1880e0a7a2415b7d7ce1a4c6ef25f3486335b /src/dolphin.cpp
parent7fbae445277374fb2bacfcd7c04e8d7fbb2c3f05 (diff)
Some suggestions in comments to avoid porting code when we can share existing ported code instead.
svn path=/trunk/playground/utils/dolphin/; revision=607265
Diffstat (limited to 'src/dolphin.cpp')
-rw-r--r--src/dolphin.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/dolphin.cpp b/src/dolphin.cpp
index b3991531b..8d2f59482 100644
--- a/src/dolphin.cpp
+++ b/src/dolphin.cpp
@@ -143,6 +143,7 @@ void Dolphin::dropUrls(const KUrl::List& urls,
/* KDE4-TODO: selectedIndex = popup.exec(QCursor::pos()); */
popup.exec(QCursor::pos());
selectedIndex = 0; // KD4-TODO: use QAction instead of switch below
+ // See libkonq/konq_operations.cc: KonqOperations::doDropFileCopy() (and doDrop, the main method)
}
if (selectedIndex < 0) {
@@ -641,6 +642,9 @@ void Dolphin::slotRedoTextChanged(const QString& text)
void Dolphin::cut()
{
+ // TODO: this boolean doesn't work between instances of dolphin or with konqueror or with other
+ // apps. The "application/x-kde-cutselection" mimetype should be used instead, see KonqMimeData
+ // in libkonq
m_clipboardContainsCutData = true;
/* KDE4-TODO: Q3DragObject* data = new KUrlDrag(m_activeView->selectedUrls(),
widget());
@@ -658,7 +662,7 @@ void Dolphin::copy()
void Dolphin::paste()
{
- /* KDE4-TODO:
+ /* KDE4-TODO: - see KonqOperations::doPaste
QClipboard* clipboard = QApplication::clipboard();
QMimeSource* data = clipboard->data();
if (!KUrlDrag::canDecode(data)) {
@@ -739,6 +743,8 @@ void Dolphin::updatePasteAction()
else if (count == 1) {
// Only one file is selected. Pasting is only allowed if this
// file is a directory.
+ // TODO: this doesn't work with remote protocols; instead we need a
+ // m_activeView->selectedFileItems() to get the real KFileItems
const KFileItem fileItem(S_IFDIR,
KFileItem::Unknown,
urls.first(),
@@ -1418,7 +1424,7 @@ void Dolphin::setupCreateNewMenuActions()
unplugActionList("create_actions");
KSortableList<CreateFileEntry, QString>::ConstIterator it = m_createFileTemplates.begin();
KSortableList<CreateFileEntry, QString>::ConstIterator end = m_createFileTemplates.end();
- /* KDE4-TODO:
+ /* KDE4-TODO: don't port this code; use KNewMenu instead
while (it != end) {
CreateFileEntry entry = (*it).value();
KAction* action = new KAction(entry.name);