Replace deprecated Qt APIs, Windows fixes
This commit is contained in:
parent
5bda353d57
commit
6e08f95d10
|
@ -7,7 +7,7 @@
|
|||
"inheritEnvironments": [ "msvc_x64_x64" ],
|
||||
"buildRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\build\\${name}",
|
||||
"installRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\install\\${name}",
|
||||
"cmakeCommandArgs": "-DCMAKE_PREFIX_PATH=C:/Qt/5.12.6/msvc2017_64/lib/cmake/Qt5",
|
||||
"cmakeCommandArgs": "-DCMAKE_PREFIX_PATH=C:/Qt/5.14.1/msvc2017_64/lib/cmake/Qt5",
|
||||
"buildCommandArgs": "",
|
||||
"ctestCommandArgs": "",
|
||||
"variables": []
|
||||
|
@ -19,7 +19,7 @@
|
|||
"inheritEnvironments": [ "msvc_x64_x64" ],
|
||||
"buildRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\build\\${name}",
|
||||
"installRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\install\\${name}",
|
||||
"cmakeCommandArgs": "-DCMAKE_PREFIX_PATH=C:/Qt/5.12.6/msvc2017_64/lib/cmake/Qt5",
|
||||
"cmakeCommandArgs": "-DCMAKE_PREFIX_PATH=C:/Qt/5.14.1/msvc2017_64/lib/cmake/Qt5",
|
||||
"buildCommandArgs": "",
|
||||
"ctestCommandArgs": "",
|
||||
"variables": []
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 828bda48869ae3a75ae77ac690bb33dcd2ecedee
|
||||
Subproject commit 22bf8551d31b3ac3e712b853ad20f769ef5a49c7
|
|
@ -281,7 +281,7 @@ bool CGizmo::TransformFromInput(const CRay& rkRay, CCamera& rCamera)
|
|||
|
||||
// Calculate normalized cursor position
|
||||
QPoint CursorPos = QCursor::pos();
|
||||
QRect Geom = QApplication::desktop()->screenGeometry();
|
||||
QRect Geom = QApplication::primaryScreen()->geometry();
|
||||
CVector2f MouseCoords(
|
||||
(((2.f * CursorPos.x()) / Geom.width()) - 1.f),
|
||||
(1.f - ((2.f * CursorPos.y()) / Geom.height()))
|
||||
|
@ -618,7 +618,7 @@ void CGizmo::UpdateTransform()
|
|||
|
||||
void CGizmo::WrapCursor()
|
||||
{
|
||||
QRect Geom = QApplication::desktop()->screenGeometry();
|
||||
QRect Geom = QApplication::primaryScreen()->geometry();
|
||||
QPoint CursorPos = QCursor::pos();
|
||||
|
||||
// Horizontal
|
||||
|
|
|
@ -332,9 +332,9 @@ QString GetDolphinPath()
|
|||
}
|
||||
|
||||
QString AskForDolphinPath(QWidget* pParentWidget) {
|
||||
#if Q_OS_WIN
|
||||
#if defined(Q_OS_WIN)
|
||||
QString Path = UICommon::OpenFileDialog(pParentWidget, "Open Dolphin", "*.exe");
|
||||
#elif Q_OS_MACOS
|
||||
#elif defined(Q_OS_MACOS)
|
||||
QString Path = UICommon::OpenFileDialog(pParentWidget, "Open Dolphin", "*.app");
|
||||
if (Path.endsWith(".app"))
|
||||
Path += "/Contents/MacOS/Dolphin";
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#include <QDesktopWidget>
|
||||
#include <QLineEdit>
|
||||
#include <QMouseEvent>
|
||||
#include <QScreen>
|
||||
|
||||
WDraggableSpinBox::WDraggableSpinBox(QWidget *parent)
|
||||
: QDoubleSpinBox(parent)
|
||||
|
@ -66,7 +67,7 @@ void WDraggableSpinBox::mouseMoveEvent(QMouseEvent*)
|
|||
setValue(value() + DragAmount);
|
||||
|
||||
// Wrap cursor
|
||||
int ScreenHeight = QApplication::desktop()->screenGeometry().height();
|
||||
int ScreenHeight = QApplication::primaryScreen()->geometry().height();
|
||||
|
||||
if (CursorPos.y() == ScreenHeight - 1)
|
||||
QCursor::setPos(CursorPos.x(), 1);
|
||||
|
|
Loading…
Reference in New Issue