mirror of
https://github.com/edisionnano/QDiskInfo.git
synced 2026-03-07 11:59:57 +03:00
Remove some useless casts
This commit is contained in:
@@ -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");
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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(" ; ");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user