diff --git a/CMakeLists.txt b/CMakeLists.txt index fdfa884..a358e4f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,6 +43,7 @@ if(ENABLE_TRANSLATIONS) TS_FILES ${TS_FILES} SOURCES ${PROJECT_SOURCES} QM_FILES_OUTPUT_VARIABLE QM_FILES + INCLUDE_DIRECTORIES ${CMAKE_SOURCE_DIR}/include LUPDATE_OPTIONS -no-obsolete -locations none ) set(CALL_LUPDATE TRUE) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 0f6497a..e106aa3 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -156,7 +156,7 @@ void MainWindow::onNextButtonClicked() { qsizetype currentIndex = buttonGroup->buttons().indexOf(buttonGroup->checkedButton()); qsizetype nextIndex = (currentIndex + 1) % buttonGroup->buttons().size(); - buttonGroup->buttons().at(nextIndex)->click(); + buttonGroup->buttons().at(static_cast(nextIndex))->click(); updateNavigationButtons(nextIndex); } @@ -164,7 +164,7 @@ void MainWindow::onPrevButtonClicked() { qsizetype currentIndex = buttonGroup->buttons().indexOf(buttonGroup->checkedButton()); qsizetype prevIndex = (currentIndex - 1 + buttonGroup->buttons().size()) % buttonGroup->buttons().size(); - buttonGroup->buttons().at(prevIndex)->click(); + buttonGroup->buttons().at(static_cast(prevIndex))->click(); updateNavigationButtons(prevIndex); } @@ -363,7 +363,7 @@ void MainWindow::updateUI(const QString ¤tDeviceName) connect(button, &QPushButton::clicked, this, [=]() { updateWindow(); - disksGroup->actions().at(buttonIndex)->setChecked(true); + disksGroup->actions().at(static_cast(buttonIndex))->setChecked(true); gridView->highlightDisk(buttonIndex); gridView->setActiveIndex(buttonIndex); }); @@ -742,7 +742,7 @@ void MainWindow::populateWindow(const QJsonObject &localObj, const QString &heal } else if (stringValue.startsWith("Warning Comp. Temp. Threshold")) { qsizetype pos = stringValue.indexOf(':'); if (pos != -1) { - QString thresholdStr = stringValue.mid(pos + 1).trimmed(); + QString thresholdStr = stringValue.mid(static_cast(pos + 1)).trimmed(); int temperature = thresholdStr.section(' ', 0, 0).toInt(); if (temperature > 0) { warningTemperature = temperature; @@ -751,7 +751,7 @@ void MainWindow::populateWindow(const QJsonObject &localObj, const QString &heal } else if (stringValue.startsWith("Critical Comp. Temp. Threshold")) { qsizetype pos = stringValue.indexOf(':'); if (pos != -1) { - QString thresholdStr = stringValue.mid(pos + 1).trimmed(); + QString thresholdStr = stringValue.mid(static_cast(pos + 1)).trimmed(); int temperature = thresholdStr.section(' ', 0, 0).toInt(); if (temperature > 0) { criticalTemperature = temperature; @@ -1157,7 +1157,7 @@ void MainWindow::addSmartAttributesTable(const QJsonArray &attributes) qsizetype spaceIndex = rawHEX.indexOf(' '); if (spaceIndex != -1) { - rawHEX = rawHEX.left(spaceIndex); + rawHEX = rawHEX.left(static_cast(spaceIndex)); } if (rawHEX.startsWith("0x") && rawHEX.length() == 14) {