@@ -156,15 +156,15 @@ void MainWindow::onNextButtonClicked()
156
156
{
157
157
qsizetype currentIndex = buttonGroup->buttons ().indexOf (buttonGroup->checkedButton ());
158
158
qsizetype nextIndex = (currentIndex + 1 ) % buttonGroup->buttons ().size ();
159
- buttonGroup->buttons ().at (nextIndex)->click ();
159
+ buttonGroup->buttons ().at (static_cast < int >( nextIndex) )->click ();
160
160
updateNavigationButtons (nextIndex);
161
161
}
162
162
163
163
void MainWindow::onPrevButtonClicked ()
164
164
{
165
165
qsizetype currentIndex = buttonGroup->buttons ().indexOf (buttonGroup->checkedButton ());
166
166
qsizetype prevIndex = (currentIndex - 1 + buttonGroup->buttons ().size ()) % buttonGroup->buttons ().size ();
167
- buttonGroup->buttons ().at (prevIndex)->click ();
167
+ buttonGroup->buttons ().at (static_cast < int >( prevIndex) )->click ();
168
168
updateNavigationButtons (prevIndex);
169
169
}
170
170
@@ -363,7 +363,7 @@ void MainWindow::updateUI(const QString ¤tDeviceName)
363
363
364
364
connect (button, &QPushButton::clicked, this , [=]() {
365
365
updateWindow ();
366
- disksGroup->actions ().at (buttonIndex)->setChecked (true );
366
+ disksGroup->actions ().at (static_cast < int >( buttonIndex) )->setChecked (true );
367
367
gridView->highlightDisk (buttonIndex);
368
368
gridView->setActiveIndex (buttonIndex);
369
369
});
@@ -742,7 +742,7 @@ void MainWindow::populateWindow(const QJsonObject &localObj, const QString &heal
742
742
} else if (stringValue.startsWith (" Warning Comp. Temp. Threshold" )) {
743
743
qsizetype pos = stringValue.indexOf (' :' );
744
744
if (pos != -1 ) {
745
- QString thresholdStr = stringValue.mid (pos + 1 ).trimmed ();
745
+ QString thresholdStr = stringValue.mid (static_cast < int >( pos + 1 ) ).trimmed ();
746
746
int temperature = thresholdStr.section (' ' , 0 , 0 ).toInt ();
747
747
if (temperature > 0 ) {
748
748
warningTemperature = temperature;
@@ -751,7 +751,7 @@ void MainWindow::populateWindow(const QJsonObject &localObj, const QString &heal
751
751
} else if (stringValue.startsWith (" Critical Comp. Temp. Threshold" )) {
752
752
qsizetype pos = stringValue.indexOf (' :' );
753
753
if (pos != -1 ) {
754
- QString thresholdStr = stringValue.mid (pos + 1 ).trimmed ();
754
+ QString thresholdStr = stringValue.mid (static_cast < int >( pos + 1 ) ).trimmed ();
755
755
int temperature = thresholdStr.section (' ' , 0 , 0 ).toInt ();
756
756
if (temperature > 0 ) {
757
757
criticalTemperature = temperature;
@@ -1157,7 +1157,7 @@ void MainWindow::addSmartAttributesTable(const QJsonArray &attributes)
1157
1157
1158
1158
qsizetype spaceIndex = rawHEX.indexOf (' ' );
1159
1159
if (spaceIndex != -1 ) {
1160
- rawHEX = rawHEX.left (spaceIndex);
1160
+ rawHEX = rawHEX.left (static_cast < int >( spaceIndex) );
1161
1161
}
1162
1162
1163
1163
if (rawHEX.startsWith (" 0x" ) && rawHEX.length () == 14 ) {
0 commit comments