Issue #22: Fix compilation warnings

This commit is contained in:
Jakub Melka
2022-07-31 18:32:57 +02:00
parent b30150a503
commit e310efb763
70 changed files with 424 additions and 435 deletions

View File

@@ -236,7 +236,7 @@ void DimensionsPlugin::drawPage(QPainter* painter,
painter->setPen(qMove(pen));
painter->setBrush(QBrush(brushColor, isArea ? Qt::SolidPattern : Qt::DiagCrossPattern));
painter->setMatrix(pagePointToDevicePointMatrix, true);
painter->setTransform(QTransform(pagePointToDevicePointMatrix), true);
painter->drawPolygon(polygon.data(), int(polygon.size()), Qt::OddEvenFill);
painter->restore();

View File

@@ -245,9 +245,9 @@ void ObjectViewerWidget::updateUi()
}
else
{
QByteArray data = m_document->getDecodedStream(stream);
data.replace('\r', ' ');
QByteArray percentEncodedData = data.toPercentEncoding(m_printableCharacters);
QByteArray dataToBeAdjusted = m_document->getDecodedStream(stream);
dataToBeAdjusted.replace('\r', ' ');
QByteArray percentEncodedData = dataToBeAdjusted.toPercentEncoding(m_printableCharacters);
ui->contentTextBrowser->setText(QString::fromLatin1(percentEncodedData));
ui->stackedWidget->setCurrentWidget(ui->contentTextBrowserPage);
}

View File

@@ -98,7 +98,7 @@ private:
Statistics m_statistics;
std::vector<QRect> m_colorBoxes;
size_t m_selectedColorBox = -1;
size_t m_selectedColorBox = std::numeric_limits<size_t>::max();
};
} // namespace pdfplugin

View File

@@ -312,12 +312,12 @@ QVariant InkCoverageStatisticsModel::data(const QModelIndex& index, int role) co
break;
}
case Qt::BackgroundColorRole:
case Qt::BackgroundRole:
{
if (index.column() >= LastStandardColumn && getChannelColumn(index.column()) == ChannelColumnColorant)
{
const int channelIndex = getChannelIndex(index.column());
return m_inkCoverageResults.sumInfo[channelIndex].color;
return QBrush(m_inkCoverageResults.sumInfo[channelIndex].color);
}
break;

View File

@@ -358,9 +358,9 @@ void OutputPreviewWidget::paintEvent(QPaintEvent* event)
const int textWidth = painter.fontMetrics().horizontalAdvance(textCoverage);
const int textStart = textRight - textWidth;
QRect textRect(textStart, yCoordinate - halfHeight, textWidth + 1, rowHeight);
QRect currentTextRect(textStart, yCoordinate - halfHeight, textWidth + 1, rowHeight);
painter.setPen(Qt::black);
painter.drawText(textRect, Qt::AlignVCenter | Qt::AlignLeft | Qt::TextSingleLine, textCoverage);
painter.drawText(currentTextRect, Qt::AlignVCenter | Qt::AlignLeft | Qt::TextSingleLine, textCoverage);
}
}