Commit 4d3e2f88 authored by Laurent Montel's avatar Laurent Montel 😁

adapt to new kde4 api

svn path=/trunk/KDE/kdemultimedia/juk/; revision=472266
parent 7ba8ec07
......@@ -17,7 +17,7 @@
#include <klocale.h>
#include <kmessagebox.h>
#include <kdebug.h>
#include <kpopupmenu.h>
#include <kmenu.h>
#include <kiconloader.h>
#include <kconfig.h>
#include <kaction.h>
......
......@@ -18,7 +18,7 @@
#include <kiconviewsearchline.h>
#include <kiconloader.h>
#include <kapplication.h>
#include <kpopupmenu.h>
#include <kmenu.h>
#include <klocale.h>
#include <qtimer.h>
......@@ -122,13 +122,13 @@ void CoverDialog::slotArtistClicked(Q3ListViewItem *item)
void CoverDialog::slotContextRequested(Q3IconViewItem *item, const QPoint &pt)
{
static KPopupMenu *menu = 0;
static KMenu *menu = 0;
if(!item)
return;
if(!menu) {
menu = new KPopupMenu(this);
menu = new KMenu(this);
menu->insertItem(i18n("Remove Cover"), this, SLOT(removeSelectedCover()));
}
......
......@@ -69,7 +69,7 @@ public:
QWidget *parent = 0, const char *name = 0)
: KDialogBase(parent, name, true, i18n("Warning"), Ok | Cancel)
{
Q3VBox *vbox = makeVBoxMainWidget();
KVBox *vbox = makeVBoxMainWidget();
Q3HBox *hbox = new Q3HBox(vbox);
QLabel *l = new QLabel(hbox);
......
......@@ -34,6 +34,7 @@
#include <QVBoxLayout>
#include <QDragEnterEvent>
#include <QMouseEvent>
#include <krandom.h>
#include "nowplaying.h"
#include "playlistcollection.h"
......@@ -359,7 +360,7 @@ void HistoryItem::slotAddPlaying()
PlayerManager *manager = PlayerManager::instance();
if(manager->playing() && manager->playingFile() == m_file) {
m_history.prepend(Item(KApplication::randomString(20),
m_history.prepend(Item(KRandom::randomString(20),
m_file, Playlist::playingItem()->playlist()));
}
......
......@@ -19,7 +19,7 @@
#include <kiconloader.h>
#include <klineedit.h>
#include <kaction.h>
#include <kpopupmenu.h>
#include <kmenu.h>
#include <klocale.h>
#include <kdebug.h>
#include <kinputdialog.h>
......@@ -1609,7 +1609,7 @@ void Playlist::slotPopulateBackMenu() const
if(!playingItem())
return;
KPopupMenu *menu = action<KToolBarPopupAction>("back")->popupMenu();
KMenu *menu = action<KToolBarPopupAction>("back")->popupMenu();
menu->clear();
m_backMenuItems.clear();
......@@ -2056,7 +2056,7 @@ void Playlist::slotShowRMBMenu(Q3ListViewItem *item, const QPoint &point, int co
// A bit of a hack to get a pointer to the action collection.
// Probably more of these actions should be ported over to using KActions.
m_rmbMenu = new KPopupMenu(this);
m_rmbMenu = new KMenu(this);
m_rmbUpcomingID = m_rmbMenu->insertItem(SmallIcon("today"),
i18n("Add to Play Queue"), this, SLOT(slotAddToUpcoming()));
......
......@@ -41,7 +41,7 @@
#include "playlistinterface.h"
#include "playlistitem.h"
class KPopupMenu;
class KMenu;
class KActionMenu;
class QEvent;
......@@ -682,8 +682,8 @@ private:
QString m_playlistName;
QString m_fileName;
KPopupMenu *m_rmbMenu;
KPopupMenu *m_headerMenu;
KMenu *m_rmbMenu;
KMenu *m_headerMenu;
KActionMenu *m_columnVisibleAction;
PlaylistToolTip *m_toolTip;
......
......@@ -16,7 +16,7 @@
#include <kiconloader.h>
#include <kurldrag.h>
#include <kmessagebox.h>
#include <kpopupmenu.h>
#include <kmenu.h>
#include <kaction.h>
#include <kdebug.h>
......@@ -77,7 +77,7 @@ PlaylistBox::PlaylistBox(QWidget *parent, Q3WidgetStack *playlistStack,
setAcceptDrops(true);
setSelectionModeExt(Extended);
m_contextMenu = new KPopupMenu(this);
m_contextMenu = new KMenu(this);
K3bPlaylistExporter *exporter = new K3bPlaylistExporter(this);
m_k3bAction = exporter->action();
......
......@@ -35,7 +35,7 @@ class ViewMode;
class PlaylistSearch;
class SearchPlaylist;
class KPopupMenu;
class KMenu;
class KSelectAction;
typedef Q3ValueList<Playlist *> PlaylistList;
......@@ -124,7 +124,7 @@ private slots:
void slotRemoveItem(const QString &tag, unsigned column);
private:
KPopupMenu *m_contextMenu;
KMenu *m_contextMenu;
Q3PtrDict<Item> m_playlistDict;
int m_viewModeIndex;
Q3ValueList<ViewMode *> m_viewModes;
......
......@@ -20,7 +20,7 @@
#include <kpassivepopup.h>
#include <kiconeffect.h>
#include <kaction.h>
#include <kpopupmenu.h>
#include <kmenu.h>
#include <kglobalsettings.h>
#include <kdebug.h>
......@@ -173,7 +173,7 @@ SystemTray::SystemTray(QWidget *parent, const char *name) : KSystemTray(parent,
new KAction(i18n("Redisplay Popup"), KShortcut(), this,
SLOT(slotPlay()), actions(), "showPopup");
KPopupMenu *cm = contextMenu();
KMenu *cm = contextMenu();
connect(PlayerManager::instance(), SIGNAL(signalPlay()), this, SLOT(slotPlay()));
connect(PlayerManager::instance(), SIGNAL(signalPause()), this, SLOT(slotPause()));
......
......@@ -16,7 +16,7 @@
#include <kconfig.h>
#include <klocale.h>
#include <kaction.h>
#include <kpopupmenu.h>
#include <kmenu.h>
#include "actioncollection.h"
#include "tracksequencemanager.h"
......
......@@ -18,7 +18,7 @@
#include <qobject.h>
class KPopupMenu;
class KMenu;
class TrackSequenceIterator;
class PlaylistItem;
class Playlist;
......@@ -109,10 +109,10 @@ public:
PlaylistItem *currentItem() const;
/**
* @return the current KPopupMenu used by the manager, or 0 if none is
* @return the current KMenu used by the manager, or 0 if none is
* set
*/
KPopupMenu *popupMenu() const { return m_popupMenu; }
KMenu *popupMenu() const { return m_popupMenu; }
/**
* @return the TrackSequenceManager's idea of the current playlist
......@@ -181,7 +181,7 @@ protected slots:
private:
Playlist *m_playlist;
PlaylistItem *m_curItem, *m_playNextItem;
KPopupMenu *m_popupMenu;
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