Merge pull request #16451 from wwmayer/fix_qt6_warnings
Fix Qt6 warnings
This commit is contained in:
@@ -36,7 +36,7 @@ using namespace MillSim;
|
||||
namespace CAMSimulator
|
||||
{
|
||||
|
||||
static const float MouseScrollDelta = 120.0f;
|
||||
static const float MouseScrollDelta = 120.0F;
|
||||
|
||||
DlgCAMSimulator::DlgCAMSimulator(QWindow* parent)
|
||||
: QWindow(parent)
|
||||
@@ -86,17 +86,33 @@ void DlgCAMSimulator::mouseMoveEvent(QMouseEvent* ev)
|
||||
int modifiers = (ev->modifiers() & Qt::ShiftModifier) != 0 ? MS_KBD_SHIFT : 0;
|
||||
modifiers |= (ev->modifiers() & Qt::ControlModifier) != 0 ? MS_KBD_CONTROL : 0;
|
||||
modifiers |= (ev->modifiers() & Qt::AltModifier) != 0 ? MS_KBD_ALT : 0;
|
||||
mMillSimulator->MouseMove(ev->x(), ev->y(), modifiers);
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
QPoint pnt = ev->pos();
|
||||
#else
|
||||
QPoint pnt = ev->position().toPoint();
|
||||
#endif
|
||||
mMillSimulator->MouseMove(pnt.x(), pnt.y(), modifiers);
|
||||
}
|
||||
|
||||
void DlgCAMSimulator::mousePressEvent(QMouseEvent* ev)
|
||||
{
|
||||
mMillSimulator->MousePress(ev->button(), true, ev->x(), ev->y());
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
QPoint pnt = ev->pos();
|
||||
#else
|
||||
QPoint pnt = ev->position().toPoint();
|
||||
#endif
|
||||
mMillSimulator->MousePress(ev->button(), true, pnt.x(), pnt.y());
|
||||
}
|
||||
|
||||
void DlgCAMSimulator::mouseReleaseEvent(QMouseEvent* ev)
|
||||
{
|
||||
mMillSimulator->MousePress(ev->button(), false, ev->x(), ev->y());
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
QPoint pnt = ev->pos();
|
||||
#else
|
||||
QPoint pnt = ev->position().toPoint();
|
||||
#endif
|
||||
mMillSimulator->MousePress(ev->button(), false, pnt.x(), pnt.y());
|
||||
}
|
||||
|
||||
void DlgCAMSimulator::wheelEvent(QWheelEvent* ev)
|
||||
|
||||
@@ -1159,8 +1159,7 @@ QString SheetTableView::toHtml() const
|
||||
boldFont.setBold(true);
|
||||
boldFormat.setFont(boldFont);
|
||||
|
||||
QColor bgColor;
|
||||
bgColor.setNamedColor(QLatin1String("#f0f0f0"));
|
||||
QColor bgColor(QLatin1String("#f0f0f0"));
|
||||
QTextCharFormat bgFormat;
|
||||
bgFormat.setBackground(QBrush(bgColor));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user