Minor clang warnings++

This commit is contained in:
Andrius Štikonas 2017-09-11 12:01:39 +01:00
parent 5433294a5b
commit 8a477e689e
7 changed files with 8 additions and 9 deletions

View File

@ -61,7 +61,7 @@ protected:
const QFile& sourceFile() const {
return m_SourceFile;
}
qint32 size() const {
qint64 size() const {
return m_Size;
}

View File

@ -483,7 +483,7 @@ QString PartitionTable::tableTypeToName(TableType l)
return xi18nc("@item partition table name", "unknown");
}
qint64 PartitionTable::maxPrimariesForTableType(TableType l)
qint32 PartitionTable::maxPrimariesForTableType(TableType l)
{
for (const auto &type : tableTypes)
if (l == type.type)

View File

@ -179,7 +179,7 @@ public:
static PartitionTable::TableType nameToTableType(const QString& n);
static QString tableTypeToName(TableType l);
static qint64 maxPrimariesForTableType(TableType l);
static qint32 maxPrimariesForTableType(TableType l);
static bool tableTypeSupportsExtended(TableType l);
static bool tableTypeIsReadOnly(TableType l);

View File

@ -98,11 +98,11 @@ void PartResizerWidget::init(Device& d, Partition& p, qint64 minFirst, qint64 ma
if (!readOnly()) {
QPixmap pixmap(handleWidth(), handleHeight());
pixmap.fill(Qt::transparent);
QPainter p(&pixmap);
QPainter painter(&pixmap);
QStyleOption opt;
opt.state |= QStyle::State_Horizontal;
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())
leftHandle().setPixmap(pixmap);

View File

@ -68,7 +68,7 @@ bool SetPartFlagsJob::run(Report& parent)
: backendPartitionTable->getPartitionBySector(partition().firstSector());
if (backendPartition) {
quint32 count = 0;
int count = 0;
for (const auto &f : PartitionTable::flagList()) {
emit progress(++count);

View File

@ -227,7 +227,7 @@ QString ResizeOperation::description() const
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);
default:
case None:
qWarning() << "Could not determine what to do with partition " << partition().deviceNode() << ".";
break;
}

View File

@ -46,8 +46,7 @@ Capacity::Capacity(const Partition& p, Type t) :
switch (t) {
case Used: m_Size = p.used(); break;
case Available: m_Size = p.available(); break;
case Total: m_Size = p.capacity(); break;
default: break;
case Total: m_Size = p.capacity();
}
}