m_model->setData(index, data);
}
- KonqOperations* op = KonqOperations::renameV2(this, oldUrl, newName);
+ KonqOperations* op = KonqOperations::rename(this, oldUrl, newName);
if (op && !newNameExistsAlready) {
// Only connect the renamingFailed signal if there is no item with the new name
// in the model yet, see bug 328262.
void DolphinView::pasteToUrl(const KUrl& url)
{
- KonqOperations* op = KonqOperations::doPasteV2(this, url);
+ KonqOperations* op = KonqOperations::doPaste(this, url);
if (op) {
m_clearSelectionBeforeSelectingNewItems = true;
m_markFirstNewlySelectedItemAsCurrent = true;
return job;
}
-void KonqOperations::doPaste( QWidget * parent, const KUrl & destUrl, const QPoint &pos )
-{
- (void) KonqOperations::doPasteV2( parent, destUrl, pos );
-}
-
-KonqOperations *KonqOperations::doPasteV2(QWidget *parent, const KUrl &destUrl, const QPoint &pos)
+KonqOperations *KonqOperations::doPaste( QWidget * parent, const KUrl & destUrl, const QPoint &pos )
{
QClipboard *clipboard = QApplication::clipboard();
const QMimeData *data = clipboard->mimeData();
return path;
}
-void KonqOperations::rename( QWidget * parent, const KUrl & oldurl, const KUrl& newurl )
-{
- renameV2(parent, oldurl, newurl);
-}
-
-KonqOperations *KonqOperations::renameV2( QWidget * parent, const KUrl & oldurl, const KUrl& newurl )
+KonqOperations *KonqOperations::rename( QWidget * parent, const KUrl & oldurl, const KUrl& newurl )
{
kDebug(1203) << "oldurl=" << oldurl << " newurl=" << newurl;
if ( oldurl == newurl )
deleteLater();
}
-void KonqOperations::rename( QWidget * parent, const KUrl & oldurl, const QString & name )
-{
- renameV2(parent, oldurl, name);
-}
-
-KonqOperations *KonqOperations::renameV2( QWidget * parent, const KUrl & oldurl, const QString & name )
+KonqOperations *KonqOperations::rename( QWidget * parent, const KUrl & oldurl, const QString & name )
{
KUrl newurl( oldurl );
newurl.setPath( oldurl.directory( KUrl::AppendTrailingSlash ) + name );
kDebug(1203) << "KonqOperations::rename("<<name<<") called. newurl=" << newurl;
- return renameV2( parent, oldurl, newurl );
+ return rename( parent, oldurl, newurl );
}
// Duplicated in libkfile's KDirOperator
#include <kurl.h>
#include <konq_export.h>
+#include <kio/job.h>
#include <QtCore/QObject>
#include <QtGui/qevent.h>
+#include <QtGui/QWidget>
class KJob;
namespace KIO { class Job; class SimpleJob; struct CopyInfo; }
-#include <QWidget>
class KFileItem;
class KFileItemListProperties;
* after the slot returns.
*
* @return The KonqOperations object
+ *
* @since 4.3
*/
static KonqOperations *doDrop( const KFileItem & destItem, const KUrl & destUrl, QDropEvent * ev, QWidget * parent,
/**
* Paste the clipboard contents
- */
- static void doPaste( QWidget * parent, const KUrl & destUrl, const QPoint &pos = QPoint() );
-
- /**
- * Paste the clipboard contents
*
* @return The KonqOperations object
- * @since 4.10
- *
- * @todo TODO KDE 5,0 - Merge doPaste and doPasteV2
*/
- static KonqOperations *doPasteV2(QWidget * parent, const KUrl & destUrl, const QPoint &pos = QPoint());
+ static KonqOperations *doPaste( QWidget * parent, const KUrl & destUrl, const QPoint &pos = QPoint() );
/**
* Returns the state of the paste action:
* first is whether the action should be enabled
* second is the text for the action
+ *
* @since 4.3
*/
static QPair<bool, QString> pasteInfo(const KUrl& targetUrl);
* @param parent the parent widget, passed to KonqOperations ctor
* @param oldurl the current url of the file to be renamed
* @param name the new name for the file. Shouldn't include '/'.
- */
- static void rename( QWidget * parent, const KUrl & oldurl, const QString & name );
-
- /**
- * Do a renaming.
- * @param parent the parent widget, passed to KonqOperations ctor
- * @param oldurl the current url of the file to be renamed
- * @param name the new name for the file. Shouldn't include '/'.
*
* @return The KonqOperations object
- * @since 4.11
- *
- * @todo TODO KDE 5.0 - Merge rename and renameV2
- */
- static KonqOperations *renameV2( QWidget * parent, const KUrl & oldurl, const QString & name );
-
- /**
- * Do a renaming.
- * @param parent the parent widget, passed to KonqOperations ctor
- * @param oldurl the current url of the file to be renamed
- * @param newurl the new url for the file
- * Use this version if the other one wouldn't work :) (e.g. because name could
- * be a relative path, including a '/').
*/
- static void rename( QWidget * parent, const KUrl & oldurl, const KUrl & newurl );
+ static KonqOperations *rename( QWidget * parent, const KUrl & oldurl, const QString & name );
/**
* Do a renaming.
* be a relative path, including a '/').
*
* @return The KonqOperations object
- * @since 4.11
- *
- * @todo TODO KDE 5.0 - Merge rename and renameV2
*/
- static KonqOperations *renameV2( QWidget * parent, const KUrl & oldurl, const KUrl & newurl );
+ static KonqOperations *rename( QWidget * parent, const KUrl & oldurl, const KUrl & newurl );
enum ConfirmationType { DEFAULT_CONFIRMATION, SKIP_CONFIRMATION, FORCE_CONFIRMATION };
/**
/**
* Returns the position where the drop occurred.
+ *
* @since 4.3
*/
QPoint dropPosition() const;
KIOPasteInfo * m_pasteInfo;
};
-#include <kio/job.h>
-
/// Restore multiple trashed files
class KonqMultiRestoreJob : public KIO::Job
{