Merge pull request #9331 from leoetlino/deprecation-fixes
Qt: Fix deprecated use of MidButton
This commit is contained in:
commit
ac25256156
|
@ -7,25 +7,17 @@
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QFontMetrics>
|
#include <QFontMetrics>
|
||||||
#include <QMouseEvent>
|
#include <QMouseEvent>
|
||||||
#include <QRegExp>
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
#include "Common/Thread.h"
|
|
||||||
#include "Core/Core.h"
|
|
||||||
|
|
||||||
#include "DolphinQt/Config/Mapping/IOWindow.h"
|
#include "DolphinQt/Config/Mapping/IOWindow.h"
|
||||||
#include "DolphinQt/Config/Mapping/MappingCommon.h"
|
#include "DolphinQt/Config/Mapping/MappingCommon.h"
|
||||||
#include "DolphinQt/Config/Mapping/MappingWidget.h"
|
#include "DolphinQt/Config/Mapping/MappingWidget.h"
|
||||||
#include "DolphinQt/Config/Mapping/MappingWindow.h"
|
#include "DolphinQt/Config/Mapping/MappingWindow.h"
|
||||||
#include "DolphinQt/QtUtils/BlockUserInputFilter.h"
|
|
||||||
#include "DolphinQt/QtUtils/QueueOnObject.h"
|
|
||||||
#include "DolphinQt/Settings.h"
|
|
||||||
|
|
||||||
#include "InputCommon/ControlReference/ControlReference.h"
|
#include "InputCommon/ControlReference/ControlReference.h"
|
||||||
#include "InputCommon/ControllerEmu/ControlGroup/Buttons.h"
|
#include "InputCommon/ControllerEmu/ControlGroup/Buttons.h"
|
||||||
#include "InputCommon/ControllerEmu/ControllerEmu.h"
|
#include "InputCommon/ControllerEmu/ControllerEmu.h"
|
||||||
#include "InputCommon/ControllerInterface/ControllerInterface.h"
|
#include "InputCommon/ControllerInterface/ControllerInterface.h"
|
||||||
#include "InputCommon/ControllerInterface/Device.h"
|
|
||||||
|
|
||||||
constexpr int SLIDER_TICK_COUNT = 100;
|
constexpr int SLIDER_TICK_COUNT = 100;
|
||||||
|
|
||||||
|
@ -149,7 +141,7 @@ void MappingButton::mouseReleaseEvent(QMouseEvent* event)
|
||||||
{
|
{
|
||||||
switch (event->button())
|
switch (event->button())
|
||||||
{
|
{
|
||||||
case Qt::MouseButton::MidButton:
|
case Qt::MouseButton::MiddleButton:
|
||||||
Clear();
|
Clear();
|
||||||
return;
|
return;
|
||||||
case Qt::MouseButton::RightButton:
|
case Qt::MouseButton::RightButton:
|
||||||
|
|
|
@ -247,7 +247,7 @@ void RenderWidget::OnFreeLookMouseMove(QMouseEvent* event)
|
||||||
// Camera Pitch and Yaw:
|
// Camera Pitch and Yaw:
|
||||||
g_freelook_camera.Rotate(Common::Vec3{mouse_move.y() / 200.f, mouse_move.x() / 200.f, 0.f});
|
g_freelook_camera.Rotate(Common::Vec3{mouse_move.y() / 200.f, mouse_move.x() / 200.f, 0.f});
|
||||||
}
|
}
|
||||||
else if (event->buttons() & Qt::MidButton)
|
else if (event->buttons() & Qt::MiddleButton)
|
||||||
{
|
{
|
||||||
// Camera Roll:
|
// Camera Roll:
|
||||||
g_freelook_camera.Rotate({0.f, 0.f, mouse_move.x() / 200.f});
|
g_freelook_camera.Rotate({0.f, 0.f, mouse_move.x() / 200.f});
|
||||||
|
|
Loading…
Reference in New Issue