Fix some minor clang warnings.
This commit is contained in:
parent
78eca538d6
commit
aa762266ae
|
@ -97,7 +97,7 @@ ApplyProgressDialog::ApplyProgressDialog(QWidget* parent, OperationRunner& orunn
|
|||
dialogButtonBox->addButton(detailsButton, QDialogButtonBox::ActionRole);
|
||||
mainLayout->addWidget(dialogButtonBox);
|
||||
|
||||
dialogWidget().treeTasks().setColumnWidth(0, width() * 0.8);
|
||||
dialogWidget().treeTasks().setColumnWidth(0, width() * 8 / 10);
|
||||
detailsWidget().buttonBrowser().setIcon(QIcon::fromTheme(QStringLiteral("document-open")).pixmap(IconSize(KIconLoader::Toolbar)));
|
||||
detailsWidget().buttonSave().setIcon(QIcon::fromTheme(QStringLiteral("document-save")).pixmap(IconSize(KIconLoader::Toolbar)));
|
||||
|
||||
|
|
|
@ -20,4 +20,4 @@
|
|||
ApplyProgressDialogWidget::ApplyProgressDialogWidget(QWidget* parent) : QWidget(parent) {
|
||||
setupUi(this);
|
||||
m_TreeTasks->header()->setSectionResizeMode(QHeaderView::ResizeToContents);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -200,7 +200,7 @@ void InfoPane::showDevice(Qt::DockWidgetArea area, const Device& d)
|
|||
}
|
||||
}
|
||||
|
||||
quint32 InfoPane::cols(Qt::DockWidgetArea area) const
|
||||
qint32 InfoPane::cols(Qt::DockWidgetArea area) const
|
||||
{
|
||||
if (area == Qt::LeftDockWidgetArea || area == Qt::RightDockWidgetArea)
|
||||
return 2;
|
||||
|
|
|
@ -53,7 +53,7 @@ protected:
|
|||
Q_ASSERT(m_GridLayout);
|
||||
return *m_GridLayout;
|
||||
}
|
||||
quint32 cols(Qt::DockWidgetArea area) const;
|
||||
qint32 cols(Qt::DockWidgetArea area) const;
|
||||
|
||||
private:
|
||||
QGridLayout* m_GridLayout;
|
||||
|
|
|
@ -210,7 +210,7 @@ static QTreeWidgetItem* createTreeWidgetItem(const Partition& p)
|
|||
{
|
||||
QTreeWidgetItem* item = new PartitionTreeWidgetItem(&p);
|
||||
|
||||
quint32 i = 0;
|
||||
int i = 0;
|
||||
item->setText(i++, p.deviceNode());
|
||||
|
||||
if (p.roles().has(PartitionRole::Luks) && p.fileSystem().name() != p.fileSystem().nameForType(FileSystem::Luks))
|
||||
|
@ -328,11 +328,11 @@ void PartitionManagerWidget::on_m_PartTableWidget_itemSelectionChanged(PartWidge
|
|||
if (p) {
|
||||
QList<QTreeWidgetItem*> findResult = treePartitions().findItems(p->deviceNode(), Qt::MatchFixedString | Qt::MatchRecursive, 0);
|
||||
|
||||
for (const auto &item : findResult) {
|
||||
const PartitionTreeWidgetItem* ptwItem = dynamic_cast<PartitionTreeWidgetItem*>(item);
|
||||
for (const auto &treeWidgetItem : findResult) {
|
||||
const PartitionTreeWidgetItem* ptwItem = dynamic_cast<PartitionTreeWidgetItem*>(treeWidgetItem);
|
||||
|
||||
if (ptwItem && ptwItem->partition() == p) {
|
||||
treePartitions().setCurrentItem(item);
|
||||
treePartitions().setCurrentItem(treeWidgetItem);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ class ScanProgressDialog : public QProgressDialog
|
|||
public:
|
||||
ScanProgressDialog(QWidget* parent);
|
||||
|
||||
void setProgress(quint32 p) {
|
||||
void setProgress(int p) {
|
||||
setValue(p);
|
||||
}
|
||||
void setDeviceName(const QString& d);
|
||||
|
|
|
@ -113,8 +113,8 @@ void SizeDialogBase::setupConstraints()
|
|||
dialogWidget().spinFreeAfter().setEnabled(moveAllowed);
|
||||
detailsWidget().spinFirstSector().setEnabled(moveAllowed);
|
||||
|
||||
setMinimumLength(!canShrink() ? partition().length() : qMax(partition().sectorsUsed(), partition().minimumSectors()));
|
||||
setMaximumLength(!canGrow() ? partition().length() : qMin(maximumLastSector() - minimumFirstSector() + 1, partition().maximumSectors()));
|
||||
setMinimumLength(!canShrink() ? partition().length() : std::max(partition().sectorsUsed(), partition().minimumSectors()));
|
||||
setMaximumLength(!canGrow() ? partition().length() : std::min(maximumLastSector() - minimumFirstSector() + 1, partition().maximumSectors()));
|
||||
|
||||
dialogWidget().partResizerWidget().setMinimumLength(minimumLength());
|
||||
dialogWidget().partResizerWidget().setMaximumLength(maximumLength());
|
||||
|
@ -210,7 +210,7 @@ void SizeDialogBase::onSpinCapacityChanged(double newCapacity)
|
|||
qint64 newLength = qBound(
|
||||
minimumLength(),
|
||||
dialogUnitToSectors(device(), newCapacity),
|
||||
qMin(maximumLastSector() - minimumFirstSector() + 1, maximumLength())
|
||||
std::min(maximumLastSector() - minimumFirstSector() + 1, maximumLength())
|
||||
);
|
||||
|
||||
if (newLength == partition().length())
|
||||
|
@ -218,7 +218,7 @@ void SizeDialogBase::onSpinCapacityChanged(double newCapacity)
|
|||
|
||||
qint64 delta = newLength - partition().length();
|
||||
|
||||
qint64 tmp = qMin(delta, maximumLastSector() - partition().lastSector());
|
||||
qint64 tmp = std::min(delta, maximumLastSector() - partition().lastSector());
|
||||
delta -= tmp;
|
||||
|
||||
const bool signalState = dialogWidget().partResizerWidget().blockSignals(true);
|
||||
|
@ -291,7 +291,7 @@ void SizeDialogBase::onSpinFreeAfterChanged(double newAfter)
|
|||
updateSpinFreeAfter(dialogUnitToSectors(device(), oldAfter));
|
||||
}
|
||||
|
||||
void SizeDialogBase::onSpinFirstSectorChanged(double newFirst)
|
||||
void SizeDialogBase::onSpinFirstSectorChanged(qint64 newFirst)
|
||||
{
|
||||
if (newFirst >= minimumFirstSector() && dialogWidget().partResizerWidget().updateFirstSector(newFirst))
|
||||
setDirty();
|
||||
|
@ -301,7 +301,7 @@ void SizeDialogBase::onSpinFirstSectorChanged(double newFirst)
|
|||
updateSpinFirstSector(partition().firstSector());
|
||||
}
|
||||
|
||||
void SizeDialogBase::onSpinLastSectorChanged(double newLast)
|
||||
void SizeDialogBase::onSpinLastSectorChanged(qint64 newLast)
|
||||
{
|
||||
if (newLast <= maximumLastSector() && dialogWidget().partResizerWidget().updateLastSector(newLast))
|
||||
setDirty();
|
||||
|
|
|
@ -122,8 +122,8 @@ protected:
|
|||
void onSpinFreeBeforeChanged(double newBefore);
|
||||
void onSpinFreeAfterChanged(double newAfter);
|
||||
|
||||
void onSpinFirstSectorChanged(double newFirst);
|
||||
void onSpinLastSectorChanged(double newLast);
|
||||
void onSpinFirstSectorChanged(qint64 newFirst);
|
||||
void onSpinLastSectorChanged(qint64 newLast);
|
||||
void onAlignToggled(bool);
|
||||
|
||||
void toggleDetails();
|
||||
|
|
Loading…
Reference in New Issue