Minor clang warnings++
This commit is contained in:
parent
5433294a5b
commit
8a477e689e
|
@ -61,7 +61,7 @@ protected:
|
||||||
const QFile& sourceFile() const {
|
const QFile& sourceFile() const {
|
||||||
return m_SourceFile;
|
return m_SourceFile;
|
||||||
}
|
}
|
||||||
qint32 size() const {
|
qint64 size() const {
|
||||||
return m_Size;
|
return m_Size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -483,7 +483,7 @@ QString PartitionTable::tableTypeToName(TableType l)
|
||||||
return xi18nc("@item partition table name", "unknown");
|
return xi18nc("@item partition table name", "unknown");
|
||||||
}
|
}
|
||||||
|
|
||||||
qint64 PartitionTable::maxPrimariesForTableType(TableType l)
|
qint32 PartitionTable::maxPrimariesForTableType(TableType l)
|
||||||
{
|
{
|
||||||
for (const auto &type : tableTypes)
|
for (const auto &type : tableTypes)
|
||||||
if (l == type.type)
|
if (l == type.type)
|
||||||
|
|
|
@ -179,7 +179,7 @@ public:
|
||||||
|
|
||||||
static PartitionTable::TableType nameToTableType(const QString& n);
|
static PartitionTable::TableType nameToTableType(const QString& n);
|
||||||
static QString tableTypeToName(TableType l);
|
static QString tableTypeToName(TableType l);
|
||||||
static qint64 maxPrimariesForTableType(TableType l);
|
static qint32 maxPrimariesForTableType(TableType l);
|
||||||
static bool tableTypeSupportsExtended(TableType l);
|
static bool tableTypeSupportsExtended(TableType l);
|
||||||
static bool tableTypeIsReadOnly(TableType l);
|
static bool tableTypeIsReadOnly(TableType l);
|
||||||
|
|
||||||
|
|
|
@ -98,11 +98,11 @@ void PartResizerWidget::init(Device& d, Partition& p, qint64 minFirst, qint64 ma
|
||||||
if (!readOnly()) {
|
if (!readOnly()) {
|
||||||
QPixmap pixmap(handleWidth(), handleHeight());
|
QPixmap pixmap(handleWidth(), handleHeight());
|
||||||
pixmap.fill(Qt::transparent);
|
pixmap.fill(Qt::transparent);
|
||||||
QPainter p(&pixmap);
|
QPainter painter(&pixmap);
|
||||||
QStyleOption opt;
|
QStyleOption opt;
|
||||||
opt.state |= QStyle::State_Horizontal;
|
opt.state |= QStyle::State_Horizontal;
|
||||||
opt.rect = pixmap.rect().adjusted(0, 2, 0, -2);
|
opt.rect = pixmap.rect().adjusted(0, 2, 0, -2);
|
||||||
style()->drawControl(QStyle::CE_Splitter, &opt, &p, this);
|
style()->drawControl(QStyle::CE_Splitter, &opt, &painter, this);
|
||||||
|
|
||||||
if (moveAllowed())
|
if (moveAllowed())
|
||||||
leftHandle().setPixmap(pixmap);
|
leftHandle().setPixmap(pixmap);
|
||||||
|
|
|
@ -68,7 +68,7 @@ bool SetPartFlagsJob::run(Report& parent)
|
||||||
: backendPartitionTable->getPartitionBySector(partition().firstSector());
|
: backendPartitionTable->getPartitionBySector(partition().firstSector());
|
||||||
|
|
||||||
if (backendPartition) {
|
if (backendPartition) {
|
||||||
quint32 count = 0;
|
int count = 0;
|
||||||
|
|
||||||
for (const auto &f : PartitionTable::flagList()) {
|
for (const auto &f : PartitionTable::flagList()) {
|
||||||
emit progress(++count);
|
emit progress(++count);
|
||||||
|
|
|
@ -227,7 +227,7 @@ QString ResizeOperation::description() const
|
||||||
case MoveRightShrink:
|
case MoveRightShrink:
|
||||||
return xi18nc("@info:status describe resize/move action", "Move partition <filename>%1</filename> to the right by %2 and shrink it from %3 to %4", partition().deviceNode(), moveDelta, origCapacity, newCapacity);
|
return xi18nc("@info:status describe resize/move action", "Move partition <filename>%1</filename> to the right by %2 and shrink it from %3 to %4", partition().deviceNode(), moveDelta, origCapacity, newCapacity);
|
||||||
|
|
||||||
default:
|
case None:
|
||||||
qWarning() << "Could not determine what to do with partition " << partition().deviceNode() << ".";
|
qWarning() << "Could not determine what to do with partition " << partition().deviceNode() << ".";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,8 +46,7 @@ Capacity::Capacity(const Partition& p, Type t) :
|
||||||
switch (t) {
|
switch (t) {
|
||||||
case Used: m_Size = p.used(); break;
|
case Used: m_Size = p.used(); break;
|
||||||
case Available: m_Size = p.available(); break;
|
case Available: m_Size = p.available(); break;
|
||||||
case Total: m_Size = p.capacity(); break;
|
case Total: m_Size = p.capacity();
|
||||||
default: break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue