Remove some useless casts

This commit is contained in:
spiros
2024-06-22 18:04:27 +03:00
parent dc8100d3ee
commit 86c4c7647f
3 changed files with 3 additions and 3 deletions

View File

@@ -643,7 +643,7 @@ void MainWindow::populateWindow(const QJsonObject &localObj, const QString &heal
int i = 0;
for (const QString& key : keys) {
QString minutes = QString::number(static_cast<int>(pollingMinutes[key].toInt()));
QString minutes = QString::number(pollingMinutes[key].toInt());
QString keyTranslated;
if (key == "short") {
keyTranslated = tr("Short");

View File

@@ -9,7 +9,7 @@ void StatusDot::paint(QPainter *painter, const QStyleOptionViewItem &option, con
painter->save();
painter->setRenderHint(QPainter::Antialiasing, true);
QRect dotRect(opt.rect.center().x() - dotSize / 2, opt.rect.center().y() - dotSize / 2, dotSize, dotSize);
QColor color = QColor(index.data(Qt::BackgroundRole).value<QColor>());
QColor color = index.data(Qt::BackgroundRole).value<QColor>();
painter->setBrush(color);
painter->setPen(Qt::NoPen);
painter->drawEllipse(dotRect);

View File

@@ -74,7 +74,7 @@ QPair<QStringList, QJsonArray> utils::scanDevices(bool initializing)
for (const QJsonValue &value : std::as_const(devices)) {
QJsonObject device = value.toObject();
QString deviceName = device["name"].toString();
commandList.append(QString(smartctlPath + " --all --json=o %1").arg(deviceName));
commandList.append((smartctlPath + " --all --json=o %1").arg(deviceName));
}
QString command = commandList.join(" ; ");