mirror of
https://github.com/leozide/leocad
synced 2024-11-16 07:47:27 +01:00
Require Qt 5.4.
This commit is contained in:
parent
b70fab3059
commit
ab9df4a712
5 changed files with 6 additions and 30 deletions
|
@ -729,19 +729,11 @@ void lcPiecesLibrary::ReadDirectoryDescriptions(const QFileInfoList (&FileLists)
|
|||
|
||||
while (!LoadFuture.isFinished())
|
||||
{
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 3, 0))
|
||||
ProgressDialog->setValue(FilesLoaded);
|
||||
#else
|
||||
ProgressDialog->setValue(FilesLoaded.load());
|
||||
#endif
|
||||
QApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
|
||||
}
|
||||
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 3, 0))
|
||||
ProgressDialog->setValue(FilesLoaded);
|
||||
#else
|
||||
ProgressDialog->setValue(FilesLoaded.load());
|
||||
#endif
|
||||
QApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
|
||||
|
||||
ProgressDialog->deleteLater();
|
||||
|
|
|
@ -473,13 +473,7 @@ void lcPartSelectionListModel::DrawPreview(int InfoIndex)
|
|||
|
||||
Context->ClearResources();
|
||||
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 2, 0))
|
||||
QVector<int> Roles;
|
||||
Roles.append(Qt::DecorationRole);
|
||||
emit dataChanged(index(InfoIndex, 0), index(InfoIndex, 0), Roles);
|
||||
#else
|
||||
emit dataChanged(index(InfoIndex, 0), index(InfoIndex, 0));
|
||||
#endif
|
||||
emit dataChanged(index(InfoIndex, 0), index(InfoIndex, 0), QVector<int>() << Qt::DecorationRole);
|
||||
}
|
||||
|
||||
void lcPartSelectionListModel::SetShowDecoratedParts(bool Show)
|
||||
|
@ -758,10 +752,8 @@ lcPartSelectionWidget::lcPartSelectionWidget(QWidget* Parent)
|
|||
|
||||
mFilterWidget = new QLineEdit(PartsGroupWidget);
|
||||
mFilterWidget->setPlaceholderText(tr("Search Parts"));
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 2, 0))
|
||||
mFilterAction = mFilterWidget->addAction(QIcon(":/resources/parts_search.png"), QLineEdit::TrailingPosition);
|
||||
connect(mFilterAction, SIGNAL(triggered()), this, SLOT(FilterTriggered()));
|
||||
#endif
|
||||
SearchLayout->addWidget(mFilterWidget);
|
||||
|
||||
QToolButton* OptionsButton = new QToolButton();
|
||||
|
|
|
@ -41,11 +41,7 @@ public:
|
|||
{
|
||||
mRefCount.ref();
|
||||
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 3, 0))
|
||||
if (mRefCount == 1)
|
||||
#else
|
||||
if (mRefCount.load() == 1)
|
||||
#endif
|
||||
Load();
|
||||
}
|
||||
|
||||
|
|
|
@ -221,11 +221,7 @@ void lcViewWidget::mouseMoveEvent(QMouseEvent* MouseEvent)
|
|||
|
||||
void lcViewWidget::wheelEvent(QWheelEvent* WheelEvent)
|
||||
{
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 2, 0))
|
||||
if (WheelEvent->angleDelta().y() == 0)
|
||||
#else
|
||||
if ((WheelEvent->orientation() & Qt::Vertical) == 0)
|
||||
#endif
|
||||
{
|
||||
WheelEvent->ignore();
|
||||
return;
|
||||
|
@ -240,11 +236,7 @@ void lcViewWidget::wheelEvent(QWheelEvent* WheelEvent)
|
|||
#endif
|
||||
mView->SetMouseModifiers(WheelEvent->modifiers());
|
||||
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 2, 0))
|
||||
mWheelAccumulator += WheelEvent->angleDelta().y() / 8;
|
||||
#else
|
||||
mWheelAccumulator += WheelEvent->delta() / 8;
|
||||
#endif
|
||||
int numSteps = mWheelAccumulator / 15;
|
||||
|
||||
if (numSteps)
|
||||
|
|
|
@ -3,7 +3,11 @@ QT *= printsupport
|
|||
TEMPLATE = app
|
||||
|
||||
lessThan(QT_MAJOR_VERSION, 5) {
|
||||
error("LeoCAD requires Qt5 or later.")
|
||||
error("LeoCAD requires Qt5.4 or later.")
|
||||
}
|
||||
|
||||
equals(QT_MAJOR_VERSION, 5):lessThan(QT_MINOR_VERSION, 4) {
|
||||
error("LeoCAD requires Qt5.4 or later.")
|
||||
}
|
||||
|
||||
qtHaveModule(gamepad) {
|
||||
|
|
Loading…
Reference in a new issue