Commit 62bddf48 authored by Michael Pyne's avatar Michael Pyne

Remove dead code and unused private fields.

parent ecd85d8f
......@@ -36,8 +36,7 @@ DirectoryList::DirectoryList(QStringList directories,
bool importPlaylists,
QWidget *parent) :
KDialog(parent),
m_dirListModel(0),
m_importPlaylists(importPlaylists)
m_dirListModel(0)
{
if(directories.isEmpty()) {
directories = defaultFolders();
......
......@@ -68,7 +68,6 @@ private:
QStringListModel *m_dirListModel;
QStringListModel *m_excludedDirListModel;
bool m_importPlaylists;
DirectoryListBase *m_base;
Result m_result;
};
......
......@@ -89,10 +89,8 @@ private:
KToggleAction *m_toggleDockOnCloseAction;
KToggleAction *m_togglePopupsAction;
KToggleAction *m_toggleSplashAction;
KToggleAction *m_loopPlaylistAction;
PlayerManager *m_player;
KGlobalAccel *m_accel;
bool m_startDocked;
bool m_showSplash;
......
......@@ -336,27 +336,4 @@ void TimeSlider::mousePressEvent( QMouseEvent *event )
Slider::mousePressEvent( event );
}
bool TimeSlider::event( QEvent * event )
{
if( event->type() == QEvent::ToolTip )
{
// Make a QHelpEvent out of this
QHelpEvent * helpEvent = dynamic_cast<QHelpEvent *>( event );
if( helpEvent )
{
//figure out "percentage" of the track length that the mouse is hovering over the slider
qreal percentage = (qreal) helpEvent->x() / (qreal) width();
long trackLength = 0; // The::engineController()->trackLength();
int trackPosition = trackLength * percentage;
// Update tooltip to show the track position under the cursor
// setToolTip( i18nc( "Tooltip shown when the mouse is over the progress slider, representing the position in the currently playing track that Amarok will seek to if you click the mouse. Keep it concise.", "Jump to: %1", Meta::msToPrettyTime( trackPosition ) ) );
}
}
return QWidget::event( event );
}
#include "slider.moc"
......@@ -113,7 +113,6 @@ protected:
virtual void paintEvent( QPaintEvent* );
virtual void mousePressEvent( QMouseEvent* );
virtual void sliderChange( SliderChange change );
virtual bool event( QEvent * event );
private:
Q_DISABLE_COPY( TimeSlider )
......
......@@ -49,14 +49,12 @@
using namespace ActionCollection;
PassiveInfo::PassiveInfo(SystemTray *parent) :
PassiveInfo::PassiveInfo() :
QFrame(static_cast<QWidget *>(0),
Qt::ToolTip | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint
),
m_icon(parent),
m_timer(new QTimer(this)),
m_layout(new QVBoxLayout(this)),
m_view(0),
m_justDie(false)
{
connect(m_timer, SIGNAL(timeout()), SLOT(timerExpired()));
......@@ -81,11 +79,6 @@ void PassiveInfo::show()
QFrame::show();
}
QWidget *PassiveInfo::view() const
{
return m_view;
}
void PassiveInfo::setView(QWidget *view)
{
m_layout->addWidget(view);
......@@ -239,14 +232,6 @@ void SystemTray::slotPause()
setOverlayIconByName("media-playback-pause");
}
void SystemTray::slotTogglePopup()
{
if(m_popup && m_popup->view()->isVisible())
m_popup->startTimer(50);
else
slotPlay();
}
void SystemTray::slotPopupLargeCover()
{
if(!m_player->playing())
......@@ -376,7 +361,7 @@ void SystemTray::createPopup()
m_fade = true;
m_step = 0;
m_popup = new PassiveInfo(this);
m_popup = new PassiveInfo;
connect(m_popup, SIGNAL(destroyed()), SLOT(slotPopupDestroyed()));
connect(m_popup, SIGNAL(timeExpired()), SLOT(slotFadeOut()));
connect(m_popup, SIGNAL(nextSong()), SLOT(slotForward()));
......
......@@ -47,7 +47,7 @@ class PassiveInfo : public QFrame
{
Q_OBJECT
public:
PassiveInfo(SystemTray *parent = 0);
PassiveInfo();
// Sets view as a child widget to show in the popup window.
// This widget does not take ownership of the widget. If you want it auto-deleted,
......@@ -82,10 +82,8 @@ private slots:
void timerExpired();
private:
SystemTray *m_icon;
QTimer *m_timer;
QVBoxLayout *m_layout;
QWidget *m_view;
bool m_justDie;
};
......@@ -124,7 +122,6 @@ private:
private slots:
void slotPlay();
void slotTogglePopup();
void slotPause();
void slotStop();
void slotPopupDestroyed();
......
......@@ -181,7 +181,7 @@ protected slots:
private:
QPointer<Playlist> m_playlist;
PlaylistItem *m_curItem, *m_playNextItem;
PlaylistItem *m_playNextItem;
KMenu *m_popupMenu;
TrackSequenceIterator *m_iterator;
TrackSequenceIterator *m_defaultIterator;
......
......@@ -28,11 +28,10 @@
using namespace ActionCollection;
UpcomingPlaylist::UpcomingPlaylist(PlaylistCollection *collection, int defaultSize) :
UpcomingPlaylist::UpcomingPlaylist(PlaylistCollection *collection) :
Playlist(collection, true),
m_active(false),
m_oldIterator(0),
m_defaultSize(defaultSize)
m_oldIterator(0)
{
setName(i18n("Play Queue"));
setAllowDuplicates(true);
......
......@@ -52,7 +52,7 @@ public:
* @param collection The PlaylistCollection that owns this playlist.
* @param defaultSize The default number of tracks to place in the playlist.
*/
explicit UpcomingPlaylist(PlaylistCollection *collection, int defaultSize = 15);
explicit UpcomingPlaylist(PlaylistCollection *collection);
/**
* Destructor for the UpcomingPlaylist. This destructor will restore the
* iterator for the TrackSequenceManager, and if a song is playing when
......@@ -124,7 +124,6 @@ private:
bool m_active;
TrackSequenceIterator *m_oldIterator;
int m_defaultSize;
QMap<PlaylistItem::Pointer, QPointer<Playlist> > m_playlistIndex;
};
......
......@@ -47,7 +47,6 @@ private slots:
private:
QLabel * m_volumeLabel;
QToolButton * m_volumeToolButton;
QMenu * m_volumeMenu;
VolumeSlider * m_volumeSlider;
QAction * m_muteAction;
......
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