Fix Qt deprectation warnings
This commit is contained in:
parent
2134f13b06
commit
aef41f5f6b
@ -201,7 +201,8 @@ void FITSFileModel::prepareQuery()
|
||||
if(lastError().type() != QSqlError::NoError)
|
||||
qDebug() << "Database error" << lastError();
|
||||
|
||||
m_markedFiles = m_database->getMarkedFiles().toSet();
|
||||
QStringList list = m_database->getMarkedFiles();
|
||||
m_markedFiles = QSet<QString>(list.begin(), list.end());
|
||||
}
|
||||
|
||||
DatabaseTableView::DatabaseTableView(QWidget *parent) : QTableView(parent)
|
||||
|
@ -106,7 +106,7 @@ void ImageScrollArea::wheelEvent(QWheelEvent *event)
|
||||
m_scale = (float)size().width()/m_pixmap.size().width();
|
||||
|
||||
QPointF top(horizontalScrollBar()->value(), verticalScrollBar()->value());
|
||||
QPointF mousePos = (top + event->posF()) / m_scale;
|
||||
QPointF mousePos = (top + event->position()) / m_scale;
|
||||
|
||||
QPoint delta = event->angleDelta();
|
||||
if(delta.y() > 0)
|
||||
@ -115,7 +115,7 @@ void ImageScrollArea::wheelEvent(QWheelEvent *event)
|
||||
setScale(m_scale - 0.1);
|
||||
|
||||
mousePos *= m_scale;
|
||||
top = mousePos - event->posF();
|
||||
top = mousePos - event->position();
|
||||
horizontalScrollBar()->setValue(top.x());
|
||||
verticalScrollBar()->setValue(top.y());
|
||||
}
|
||||
|
@ -637,7 +637,7 @@ void ImageWidget::wheelEvent(QWheelEvent *event)
|
||||
else
|
||||
{
|
||||
if(std::abs(event->angleDelta().y()) > 15)
|
||||
zoom(event->angleDelta().y(), event->modifiers() & Qt::ShiftModifier ? QPointF() : event->posF());
|
||||
zoom(event->angleDelta().y(), event->modifiers() & Qt::ShiftModifier ? QPointF() : event->position());
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user