mirror of
https://github.com/edisionnano/QDiskInfo.git
synced 2026-04-18 14:31:29 +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;
|
int i = 0;
|
||||||
for (const QString& key : keys) {
|
for (const QString& key : keys) {
|
||||||
QString minutes = QString::number(static_cast<int>(pollingMinutes[key].toInt()));
|
QString minutes = QString::number(pollingMinutes[key].toInt());
|
||||||
QString keyTranslated;
|
QString keyTranslated;
|
||||||
if (key == "short") {
|
if (key == "short") {
|
||||||
keyTranslated = tr("Short");
|
keyTranslated = tr("Short");
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ void StatusDot::paint(QPainter *painter, const QStyleOptionViewItem &option, con
|
|||||||
painter->save();
|
painter->save();
|
||||||
painter->setRenderHint(QPainter::Antialiasing, true);
|
painter->setRenderHint(QPainter::Antialiasing, true);
|
||||||
QRect dotRect(opt.rect.center().x() - dotSize / 2, opt.rect.center().y() - dotSize / 2, dotSize, dotSize);
|
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->setBrush(color);
|
||||||
painter->setPen(Qt::NoPen);
|
painter->setPen(Qt::NoPen);
|
||||||
painter->drawEllipse(dotRect);
|
painter->drawEllipse(dotRect);
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ QPair<QStringList, QJsonArray> utils::scanDevices(bool initializing)
|
|||||||
for (const QJsonValue &value : std::as_const(devices)) {
|
for (const QJsonValue &value : std::as_const(devices)) {
|
||||||
QJsonObject device = value.toObject();
|
QJsonObject device = value.toObject();
|
||||||
QString deviceName = device["name"].toString();
|
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(" ; ");
|
QString command = commandList.join(" ; ");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user