Commit 2264cba4 authored by Michael Pyne's avatar Michael Pyne

Port away from KMenu.

parent ce733545
......@@ -18,10 +18,10 @@
#include "coverdialog.h"
#include <kiconloader.h>
#include <kmenu.h>
#include <klocale.h>
#include <QTimer>
#include <QMenu>
#include "covericonview.h"
#include "covermanager.h"
......@@ -136,7 +136,7 @@ void CoverDialog::slotArtistClicked(QListWidgetItem *item)
void CoverDialog::slotContextRequested(const QPoint &pt)
{
static KMenu *menu = 0;
static QMenu *menu = nullptr;
QListWidgetItem* item = m_covers->currentItem();
......@@ -144,7 +144,7 @@ void CoverDialog::slotContextRequested(const QPoint &pt)
return;
if(!menu) {
menu = new KMenu(this);
menu = new QMenu(this);
menu->addAction(i18n("Remove Cover"), this, SLOT(removeSelectedCover()));
}
......
......@@ -33,7 +33,6 @@
#include "filehandle.h"
#include "juk_debug.h"
class KMenu;
class KActionMenu;
class QFileInfo;
......
......@@ -16,11 +16,8 @@
#include "playlistbox.h"
#include <QIcon>
#include <kiconloader.h>
#include <kmessagebox.h>
#include <kmenu.h>
#include <QAction>
#include <kactioncollection.h>
#include <ktoggleaction.h>
#include <kselectaction.h>
......@@ -28,6 +25,9 @@
#include <kglobal.h>
#include <kurl.h>
#include <QAction>
#include <QIcon>
#include <QMenu>
#include <QPainter>
#include <QTimer>
#include <QDragLeaveEvent>
......@@ -84,14 +84,12 @@ PlaylistBox::PlaylistBox(PlayerManager *player, QWidget *parent, QStackedWidget
header()->blockSignals(false);
sortByColumn(0);
// FIXME ?
//setFullWidth(true);
viewport()->setAcceptDrops(true);
setDropIndicatorShown(true);
setSelectionMode(QAbstractItemView::ExtendedSelection);
m_contextMenu = new KMenu(this);
m_contextMenu = new QMenu(this);
m_contextMenu->addAction( action("file_new") );
m_contextMenu->addAction( action("renamePlaylist") );
......
......@@ -26,7 +26,7 @@ class Playlist;
class PlaylistItem;
class ViewMode;
class KMenu;
class QMenu;
template<class T>
class QList;
......@@ -132,7 +132,7 @@ private slots:
void slotLoadCachedPlaylists();
private:
KMenu *m_contextMenu;
QMenu *m_contextMenu;
QHash<Playlist *, Item*> m_playlistDict;
int m_viewModeIndex;
QList<ViewMode *> m_viewModes;
......
......@@ -34,7 +34,7 @@
TrackSequenceManager::~TrackSequenceManager()
{
// m_playlist and m_popupMenu don't belong to us, don't try to delete them
// m_playlist doesn't belong to us, don't try to delete
if(m_iterator == m_defaultIterator)
m_iterator = 0;
......@@ -160,7 +160,6 @@ TrackSequenceManager::TrackSequenceManager() :
QObject(),
m_playlist(0),
m_playNextItem(0),
m_popupMenu(0),
m_iterator(0),
m_initialized(false)
{
......
......@@ -20,7 +20,6 @@
#include <QObject>
#include <QPointer>
class KMenu;
class TrackSequenceIterator;
class PlaylistItem;
class Playlist;
......@@ -110,12 +109,6 @@ public:
*/
PlaylistItem *currentItem() const;
/**
* @return the current KMenu used by the manager, or 0 if none is
* set
*/
KMenu *menu() const { return m_popupMenu; }
/**
* @return the TrackSequenceManager's idea of the current playlist
*/
......@@ -183,7 +176,6 @@ protected slots:
private:
QPointer<Playlist> m_playlist;
PlaylistItem *m_playNextItem;
KMenu *m_popupMenu;
TrackSequenceIterator *m_iterator;
TrackSequenceIterator *m_defaultIterator;
bool m_initialized;
......
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