Commit b82ed0ee authored by Tim Beaulen's avatar Tim Beaulen

K3URLDrag to QDrag

Rename dragObject to drag so it doesn't conflict with K3ListView::dragObject


svn path=/trunk/KDE/kdemultimedia/juk/; revision=643791
parent fa600bca
......@@ -107,7 +107,7 @@ KAction *K3bExporter::action()
if(!m_action && !KStandardDirs::findExe("k3b").isNull()) {
m_action = new PlaylistAction(
i18n("Add Selected Items to Audio or Data CD"),
SmallIconSet("k3b"),
KIcon("k3b"),
SLOT(slotExport())
);
......
......@@ -746,7 +746,7 @@ void Playlist::synchronizePlayingItems(const PlaylistList &sources, bool setMast
void Playlist::copy()
{
kapp->clipboard()->setData(dragObject(0), QClipboard::Clipboard);
kapp->clipboard()->setMimeData(drag(0)->mimeData(), QClipboard::Clipboard);
}
void Playlist::paste()
......@@ -1025,10 +1025,7 @@ void Playlist::removeFromDisk(const PlaylistItemList &items)
}
}
#ifdef __GNUC__
#warning Port Q3DragObject to QMimeData
#endif
Q3DragObject *Playlist::dragObject(QWidget *parent)
QDrag *Playlist::drag(QWidget *parent)
{
PlaylistItemList items = selectedItems();
KUrl::List urls;
......@@ -1038,7 +1035,11 @@ Q3DragObject *Playlist::dragObject(QWidget *parent)
urls.append(url);
}
K3URLDrag *drag = new K3URLDrag(urls, parent);
QDrag *drag = new QDrag( parent );
QMimeData *md = new QMimeData;
drag->setMimeData( md );
urls.populateMimeData( md );
drag->setPixmap(BarIcon("sound"));
return drag;
......
......@@ -35,6 +35,7 @@
#include <QMouseEvent>
#include <QCustomEvent>
#include <QMimeData>
#include <QDrag>
#include "covermanager.h"
#include "stringhash.h"
......@@ -431,8 +432,8 @@ protected:
virtual bool eventFilter(QObject *watched, QEvent *e);
virtual void keyPressEvent(QKeyEvent *e);
virtual Q3DragObject *dragObject(QWidget *parent);
virtual Q3DragObject *dragObject() { return dragObject(this); }
virtual QDrag *drag(QWidget *parent);
virtual QDrag *drag() { return drag(this); }
virtual bool canDecode(QMimeSource *s);
virtual void decode(const QMimeData *s, PlaylistItem *item = 0);
virtual void contentsDropEvent(QDropEvent *e);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment