Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
juk
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
David Planella
juk
Commits
7f78b74c
Commit
7f78b74c
authored
Oct 15, 2006
by
Tim Beaulen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use QMimeData
svn path=/trunk/KDE/kdemultimedia/juk/; revision=595694
parent
bc7cceda
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
playlistbox.cpp
playlistbox.cpp
+5
-6
playlistbox.h
playlistbox.h
+2
-1
No files found.
playlistbox.cpp
View file @
7f78b74c
...
...
@@ -223,8 +223,7 @@ void PlaylistBox::duplicate()
void
PlaylistBox
::
paste
()
{
Item
*
i
=
static_cast
<
Item
*>
(
currentItem
());
#warning port to QMimeData (from QMimeSource) (need to know the mimetype though to use data())
decode
(
kapp
->
clipboard
()
->
data
(),
i
);
decode
(
kapp
->
clipboard
()
->
mimeData
(),
i
);
}
////////////////////////////////////////////////////////////////////////////////
...
...
@@ -416,14 +415,14 @@ void PlaylistBox::slotRemoveItem(const QString &tag, unsigned column)
(
*
it
)
->
removeItem
(
tag
,
column
);
}
void
PlaylistBox
::
decode
(
QMimeSource
*
s
,
Item
*
item
)
void
PlaylistBox
::
decode
(
const
QMimeData
*
s
,
Item
*
item
)
{
if
(
!
s
||
(
item
&&
item
->
playlist
()
&&
item
->
playlist
()
->
readOnly
()))
return
;
KUrl
::
List
urls
;
KUrl
::
List
urls
=
KUrl
::
List
::
fromMimeData
(
s
)
;
if
(
K3URLDrag
::
decode
(
s
,
urls
)
&&
!
urls
.
isEmpty
())
{
if
(
!
urls
.
isEmpty
())
{
QStringList
files
;
for
(
KUrl
::
List
::
Iterator
it
=
urls
.
begin
();
it
!=
urls
.
end
();
++
it
)
files
.
append
((
*
it
).
path
());
...
...
@@ -456,7 +455,7 @@ void PlaylistBox::contentsDropEvent(QDropEvent *e)
m_showTimer
->
stop
();
Item
*
i
=
static_cast
<
Item
*>
(
itemAt
(
contentsToViewport
(
e
->
pos
())));
decode
(
e
,
i
);
decode
(
e
->
mimeData
()
,
i
);
if
(
m_dropItem
)
{
Item
*
old
=
m_dropItem
;
...
...
playlistbox.h
View file @
7f78b74c
...
...
@@ -28,6 +28,7 @@
#include <QDropEvent>
#include <Q3ValueList>
#include <QMouseEvent>
#include <QMimeData>
class
Playlist
;
class
PlaylistItem
;
...
...
@@ -90,7 +91,7 @@ private:
void
readConfig
();
void
saveConfig
();
virtual
void
decode
(
QMimeSource
*
s
,
Item
*
item
);
virtual
void
decode
(
const
QMimeData
*
s
,
Item
*
item
);
virtual
void
contentsDropEvent
(
QDropEvent
*
e
);
virtual
void
contentsDragMoveEvent
(
QDragMoveEvent
*
e
);
virtual
void
contentsDragLeaveEvent
(
QDragLeaveEvent
*
e
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment