mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-12-08 13:15:01 +00:00
Replace deprecated Qt APIs, Windows fixes
This commit is contained in:
@@ -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": []
|
||||
|
||||
2
externals/LibCommon
vendored
2
externals/LibCommon
vendored
Submodule externals/LibCommon updated: 828bda4886...22bf8551d3
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user