Members of the KDE Community are recommended to subscribe to the kde-community mailing list at to allow them to participate in important discussions and receive other important announcements

Commit 35aae939 authored by Tim Beaulen's avatar Tim Beaulen

Port the backmenu to QAction.

Reduces the warnings.

Tested and works.

svn path=/trunk/KDE/kdemultimedia/juk/; revision=643834
parent a2cd1e3d
......@@ -242,6 +242,8 @@ CollectionList::CollectionList(PlaylistCollection *collection) :
this, SLOT(slotPopulateBackMenu()));
connect(action<KToolBarPopupAction>("back")->menu(), SIGNAL(activated(int)),
this, SLOT(slotPlayFromBackMenu(int)));
connect(action<KToolBarPopupAction>("back")->menu(), SIGNAL(triggered(QAction *)),
this, SLOT(slotPlayFromBackMenu(QAction *)));
setSorting(-1); // Temporarily disable sorting to add items faster.
m_columnTags[PlaylistItem::ArtistColumn] = new TagCountDict(5001, false);
......@@ -1666,16 +1666,22 @@ void Playlist::slotPopulateBackMenu() const
int count = 0;
PlaylistItemList::ConstIterator it = m_history.end();
QAction *action;
while(it != m_history.begin() && count < 10) {
int index = menu->insertItem((*it)->file().tag()->title());
m_backMenuItems[index] = *it;
action = new QAction((*it)->file().tag()->title(), menu);
m_backMenuItems[count] = *it;
void Playlist::slotPlayFromBackMenu(int number) const
void Playlist::slotPlayFromBackMenu(QAction *backAction) const
int number = backAction->data().toInt();
......@@ -487,7 +487,7 @@ protected:
protected slots:
void slotPopulateBackMenu() const;
void slotPlayFromBackMenu(int number) const;
void slotPlayFromBackMenu(QAction *) const;
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