Adapt to kpmcore createWithLabel changes.

This commit is contained in:
Andrius Štikonas 2017-08-18 14:50:41 +03:00
parent 4b68a0cba0
commit 58281d6855
2 changed files with 7 additions and 2 deletions

View File

@ -272,7 +272,10 @@ void NewDialog::onLVNameChanged(const QString& newName)
void NewDialog::updateHideAndShow()
{
// this is mostly copy'n'pasted from PartPropsDialog::updateHideAndShow()
if (partition().roles().has(PartitionRole::Extended) || partition().fileSystem().supportSetLabel() == FileSystem::cmdSupportNone) {
if (partition().roles().has(PartitionRole::Extended) ||
(partition().fileSystem().supportSetLabel() == FileSystem::cmdSupportNone &&
partition().fileSystem().supportCreateWithLabel() == FileSystem::cmdSupportNone) )
{
dialogWidget().label().setReadOnly(true);
dialogWidget().noSetLabel().setVisible(true);
dialogWidget().noSetLabel().setFont(QFontDatabase::systemFont(QFontDatabase::SmallestReadableFont));

View File

@ -32,6 +32,8 @@
#include <util/capacity.h>
#include <algorithm>
#include <KLocalizedString>
#include <QFrame>
@ -234,7 +236,7 @@ void SizeDialogBase::onSpinCapacityChanged(double newCapacity)
}
}
tmp = qMin(delta, partition().firstSector() - minimumFirstSector());
tmp = std::min(delta, partition().firstSector() - minimumFirstSector());
delta -= tmp;
if (tmp != 0) {