Compat code to make LMMS compile on Qt <4.8

This commit is contained in:
Vesa
2014-03-24 17:11:42 +02:00
parent 794e697e22
commit 11a76c45fc

View File

@@ -40,6 +40,10 @@
#include "text_float.h"
#if QT_VERSION < 0x040800
#define MiddleButton MidButton
#endif
QPixmap * timeLine::s_timeLinePixmap = NULL;
QPixmap * timeLine::s_posMarkerPixmap = NULL;
@@ -283,14 +287,14 @@ void timeLine::mousePressEvent( QMouseEvent* event )
m_moveXOff = s_posMarkerPixmap->width() / 2;
}
}
else if( event->button() == Qt::RightButton || event->button() == Qt::MiddleButton )
else if( event->button() == Qt::RightButton || event->button() == Qt:: MiddleButton )
{
const MidiTime t = m_begin + static_cast<int>( event->x() * MidiTime::ticksPerTact() / m_ppt );
if( m_loopPos[0] > m_loopPos[1] )
{
qSwap( m_loopPos[0], m_loopPos[1] );
}
if( ( event->modifiers() & Qt::ShiftModifier ) || event->button() == Qt::MiddleButton )
if( ( event->modifiers() & Qt::ShiftModifier ) || event->button() == Qt:: MiddleButton )
{
m_action = MoveLoopBegin;
}