Commit c69a7d3d authored by Laurent Montel's avatar Laurent Montel

Port some deprecated method

parent 0b3da398
Pipeline #7937 passed with stage
in 6 minutes and 20 seconds
......@@ -28,7 +28,7 @@ FileRenamerTagOptions::FileRenamerTagOptions(QWidget *parent,
{
setupUi(this);
layout()->setMargin(0);
layout()->setContentsMargins(0, 0, 0, 0);
if(m_options.category() != Track)
m_trackGroup->hide();
......
......@@ -123,7 +123,7 @@ CoverItem::CoverItem(NowPlaying *parent) :
{
setObjectName(QLatin1String("CoverItem"));
setFixedHeight(parent->height() - parent->layout()->margin() * 2);
setMargin(1);
setContentsMargins(1, 1, 1, 1);
setAcceptDrops(true);
}
......
......@@ -292,7 +292,7 @@ void Scrobbler::scrobble()
params["track"] = m_file.tag()->title();
params["artist"] = m_file.tag()->artist();
params["album"] = m_file.tag()->album();
params["timestamp"] = QString::number(m_playbackTimer.toTime_t());
params["timestamp"] = QString::number(m_playbackTimer.toSecsSinceEpoch());
params["trackNumber"] = QString::number(m_file.tag()->track());
params["duration"] = QString::number(m_file.tag()->seconds());
......
......@@ -84,7 +84,7 @@ Slider::wheelEvent( QWheelEvent *e )
// Position Slider (horizontal)
// only used for progress slider now!
int step = e->delta() * 24;
int step = e->angleDelta().y() * 24;
int nval = value() + step;
nval = qMax(nval, minimum());
nval = qMin(nval, maximum());
......@@ -256,7 +256,7 @@ void
VolumeSlider::wheelEvent( QWheelEvent *e )
{
static const int volumeSensitivity = 30;
const uint step = e->delta() / volumeSensitivity;
const uint step = e->angleDelta().y() / volumeSensitivity;
QSlider::setValue( QSlider::value() + step );
emit volumeChanged( float( value() ) / float( maximum() ) );
......
......@@ -110,7 +110,7 @@ void PassiveInfo::hideEvent(QHideEvent *)
void PassiveInfo::wheelEvent(QWheelEvent *e)
{
if(e->delta() >= 0) {
if(e->angleDelta().y() >= 0) {
emit nextSong();
}
else {
......
......@@ -80,7 +80,7 @@ public:
QHBoxLayout(parent),
m_width(-1)
{
setMargin(margin);
setContentsMargins(margin, margin, margin, margin);
setSpacing(spacing);
setObjectName(QLatin1String(name));
}
......
......@@ -167,7 +167,7 @@ VolumePopupButton::wheelEvent( QWheelEvent * event )
{
event->accept();
PlayerManager *player = JuK::JuKInstance()->playerManager();
float volume = qBound( 0.0f, player->volume() + float( event->delta() ) / 4000.0f, 1.0f );
float volume = qBound( 0.0f, player->volume() + float( event->angleDelta().y() ) / 4000.0f, 1.0f );
player->setVolume( volume );
volumeChanged( volume );
}
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