Do not use deprecated Qt5 methods.

This commit is contained in:
Andrius Štikonas 2022-01-18 23:23:00 +00:00
parent 850151655e
commit 458872f359
3 changed files with 8 additions and 7 deletions

View File

@ -13,8 +13,8 @@ set (RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE
project(partitionmanager VERSION ${RELEASE_SERVICE_VERSION}) project(partitionmanager VERSION ${RELEASE_SERVICE_VERSION})
# Dependencies # Dependencies
set(QT_MIN_VERSION "5.14.0") set(QT_MIN_VERSION "5.15.0")
set(KF5_MIN_VERSION "5.73") set(KF5_MIN_VERSION "5.90")
set(KPMCORE_MIN_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}") set(KPMCORE_MIN_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}")
set(CMAKE_USE_RELATIVE_PATHS OFF) set(CMAKE_USE_RELATIVE_PATHS OFF)
@ -69,7 +69,7 @@ add_definitions(
-DQT_NO_CAST_FROM_BYTEARRAY -DQT_NO_CAST_FROM_BYTEARRAY
-DQT_NO_CAST_TO_BYTEARRAY -DQT_NO_CAST_TO_BYTEARRAY
-DQT_USE_FAST_OPERATOR_PLUS -DQT_USE_FAST_OPERATOR_PLUS
-DQT_DISABLE_DEPRECATED_BEFORE=0x050900 -DQT_DISABLE_DEPRECATED_BEFORE=0x050f00
-DQT_NO_KEYWORDS -DQT_NO_KEYWORDS
) )

View File

@ -162,6 +162,7 @@ void SizeDialogBase::setupConnections()
connect(&dialogWidget().partResizerWidget(), &PartResizerWidget::firstSectorChanged, this, &SizeDialogBase::onResizerWidgetFirstSectorChanged); connect(&dialogWidget().partResizerWidget(), &PartResizerWidget::firstSectorChanged, this, &SizeDialogBase::onResizerWidgetFirstSectorChanged);
connect(&dialogWidget().partResizerWidget(), &PartResizerWidget::lastSectorChanged, this, &SizeDialogBase::onResizerWidgetLastSectorChanged); connect(&dialogWidget().partResizerWidget(), &PartResizerWidget::lastSectorChanged, this, &SizeDialogBase::onResizerWidgetLastSectorChanged);
// TODO: Qt6 remove qOverload
connect(&dialogWidget().spinFreeBefore(), qOverload<double>(&QDoubleSpinBox::valueChanged), this, &SizeDialogBase::onSpinFreeBeforeChanged); connect(&dialogWidget().spinFreeBefore(), qOverload<double>(&QDoubleSpinBox::valueChanged), this, &SizeDialogBase::onSpinFreeBeforeChanged);
connect(&dialogWidget().spinFreeAfter(), qOverload<double>(&QDoubleSpinBox::valueChanged), this, &SizeDialogBase::onSpinFreeAfterChanged); connect(&dialogWidget().spinFreeAfter(), qOverload<double>(&QDoubleSpinBox::valueChanged), this, &SizeDialogBase::onSpinFreeAfterChanged);
connect(&dialogWidget().spinCapacity(), qOverload<double>(&QDoubleSpinBox::valueChanged), this, &SizeDialogBase::onSpinCapacityChanged); connect(&dialogWidget().spinCapacity(), qOverload<double>(&QDoubleSpinBox::valueChanged), this, &SizeDialogBase::onSpinCapacityChanged);
@ -305,7 +306,7 @@ void SizeDialogBase::onSpinFreeAfterChanged(double newAfter)
updateSpinFreeAfter(dialogUnitToSectors(device(), oldAfter)); updateSpinFreeAfter(dialogUnitToSectors(device(), oldAfter));
} }
void SizeDialogBase::onSpinFirstSectorChanged(qint64 newFirst) void SizeDialogBase::onSpinFirstSectorChanged(double newFirst)
{ {
if (newFirst >= minimumFirstSector() && dialogWidget().partResizerWidget().updateFirstSector(newFirst)) if (newFirst >= minimumFirstSector() && dialogWidget().partResizerWidget().updateFirstSector(newFirst))
setDirty(); setDirty();
@ -315,7 +316,7 @@ void SizeDialogBase::onSpinFirstSectorChanged(qint64 newFirst)
updateSpinFirstSector(partition().firstSector()); updateSpinFirstSector(partition().firstSector());
} }
void SizeDialogBase::onSpinLastSectorChanged(qint64 newLast) void SizeDialogBase::onSpinLastSectorChanged(double newLast)
{ {
if (newLast <= maximumLastSector() && dialogWidget().partResizerWidget().updateLastSector(newLast)) if (newLast <= maximumLastSector() && dialogWidget().partResizerWidget().updateLastSector(newLast))
setDirty(); setDirty();

View File

@ -117,8 +117,8 @@ protected:
void onSpinFreeBeforeChanged(double newBefore); void onSpinFreeBeforeChanged(double newBefore);
void onSpinFreeAfterChanged(double newAfter); void onSpinFreeAfterChanged(double newAfter);
void onSpinFirstSectorChanged(qint64 newFirst); void onSpinFirstSectorChanged(double newFirst);
void onSpinLastSectorChanged(qint64 newLast); void onSpinLastSectorChanged(double newLast);
void onAlignToggled(bool); void onAlignToggled(bool);
void onLVNameChanged(const QString& newName); void onLVNameChanged(const QString& newName);