Browse Source

qt: make Qt Mouse/Input/KeyEvent to VLC converter functions const

cherry-pick-c5513cf9
Pierre Lamot 9 months ago
parent
commit
5d1b310ca0
  1. 6
      modules/gui/qt/util/customwidgets.cpp
  2. 6
      modules/gui/qt/util/customwidgets.hpp

6
modules/gui/qt/util/customwidgets.cpp

@ -109,7 +109,7 @@ void VLCQDial::paintEvent( QPaintEvent *event )
/***************************************************************************
* Hotkeys converters
***************************************************************************/
int qtKeyModifiersToVLC( QInputEvent* e )
int qtKeyModifiersToVLC( const QInputEvent* e )
{
int i_keyModifiers = 0;
if( e->modifiers() & Qt::ShiftModifier ) i_keyModifiers |= KEY_MODIFIER_SHIFT;
@ -265,7 +265,7 @@ static int keycmp( const void *a, const void *b )
return *q - m->qt;
}
int qtEventToVLCKey( QKeyEvent *e )
int qtEventToVLCKey( const QKeyEvent *e )
{
int qtk = e->key();
uint32_t i_vlck = 0;
@ -294,7 +294,7 @@ int qtEventToVLCKey( QKeyEvent *e )
return i_vlck;
}
int qtWheelEventToVLCKey( QWheelEvent *e )
int qtWheelEventToVLCKey( const QWheelEvent *e )
{
const qreal v_cos_deadzone = 0.45; // ~63 degrees
const qreal h_cos_deadzone = 0.95; // ~15 degrees

6
modules/gui/qt/util/customwidgets.hpp

@ -144,9 +144,9 @@ class QKeyEvent;
class QWheelEvent;
class QInputEvent;
int qtKeyModifiersToVLC( QInputEvent* e );
int qtEventToVLCKey( QKeyEvent *e );
int qtWheelEventToVLCKey( QWheelEvent *e );
int qtKeyModifiersToVLC( const QInputEvent* e );
int qtEventToVLCKey( const QKeyEvent *e );
int qtWheelEventToVLCKey( const QWheelEvent *e );
QString VLCKeyToString( unsigned val, bool );
#endif

Loading…
Cancel
Save