mirror of
https://github.com/edisionnano/QDiskInfo.git
synced 2026-03-07 11:59:57 +03:00
Fix warnings part 3
This commit is contained in:
@@ -43,6 +43,7 @@ if(ENABLE_TRANSLATIONS)
|
|||||||
TS_FILES ${TS_FILES}
|
TS_FILES ${TS_FILES}
|
||||||
SOURCES ${PROJECT_SOURCES}
|
SOURCES ${PROJECT_SOURCES}
|
||||||
QM_FILES_OUTPUT_VARIABLE QM_FILES
|
QM_FILES_OUTPUT_VARIABLE QM_FILES
|
||||||
|
INCLUDE_DIRECTORIES ${CMAKE_SOURCE_DIR}/include
|
||||||
LUPDATE_OPTIONS -no-obsolete -locations none
|
LUPDATE_OPTIONS -no-obsolete -locations none
|
||||||
)
|
)
|
||||||
set(CALL_LUPDATE TRUE)
|
set(CALL_LUPDATE TRUE)
|
||||||
|
|||||||
@@ -156,7 +156,7 @@ void MainWindow::onNextButtonClicked()
|
|||||||
{
|
{
|
||||||
qsizetype currentIndex = buttonGroup->buttons().indexOf(buttonGroup->checkedButton());
|
qsizetype currentIndex = buttonGroup->buttons().indexOf(buttonGroup->checkedButton());
|
||||||
qsizetype nextIndex = (currentIndex + 1) % buttonGroup->buttons().size();
|
qsizetype nextIndex = (currentIndex + 1) % buttonGroup->buttons().size();
|
||||||
buttonGroup->buttons().at(nextIndex)->click();
|
buttonGroup->buttons().at(static_cast<int>(nextIndex))->click();
|
||||||
updateNavigationButtons(nextIndex);
|
updateNavigationButtons(nextIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -164,7 +164,7 @@ void MainWindow::onPrevButtonClicked()
|
|||||||
{
|
{
|
||||||
qsizetype currentIndex = buttonGroup->buttons().indexOf(buttonGroup->checkedButton());
|
qsizetype currentIndex = buttonGroup->buttons().indexOf(buttonGroup->checkedButton());
|
||||||
qsizetype prevIndex = (currentIndex - 1 + buttonGroup->buttons().size()) % buttonGroup->buttons().size();
|
qsizetype prevIndex = (currentIndex - 1 + buttonGroup->buttons().size()) % buttonGroup->buttons().size();
|
||||||
buttonGroup->buttons().at(prevIndex)->click();
|
buttonGroup->buttons().at(static_cast<int>(prevIndex))->click();
|
||||||
updateNavigationButtons(prevIndex);
|
updateNavigationButtons(prevIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -363,7 +363,7 @@ void MainWindow::updateUI(const QString ¤tDeviceName)
|
|||||||
|
|
||||||
connect(button, &QPushButton::clicked, this, [=]() {
|
connect(button, &QPushButton::clicked, this, [=]() {
|
||||||
updateWindow();
|
updateWindow();
|
||||||
disksGroup->actions().at(buttonIndex)->setChecked(true);
|
disksGroup->actions().at(static_cast<int>(buttonIndex))->setChecked(true);
|
||||||
gridView->highlightDisk(buttonIndex);
|
gridView->highlightDisk(buttonIndex);
|
||||||
gridView->setActiveIndex(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")) {
|
} else if (stringValue.startsWith("Warning Comp. Temp. Threshold")) {
|
||||||
qsizetype pos = stringValue.indexOf(':');
|
qsizetype pos = stringValue.indexOf(':');
|
||||||
if (pos != -1) {
|
if (pos != -1) {
|
||||||
QString thresholdStr = stringValue.mid(pos + 1).trimmed();
|
QString thresholdStr = stringValue.mid(static_cast<int>(pos + 1)).trimmed();
|
||||||
int temperature = thresholdStr.section(' ', 0, 0).toInt();
|
int temperature = thresholdStr.section(' ', 0, 0).toInt();
|
||||||
if (temperature > 0) {
|
if (temperature > 0) {
|
||||||
warningTemperature = temperature;
|
warningTemperature = temperature;
|
||||||
@@ -751,7 +751,7 @@ void MainWindow::populateWindow(const QJsonObject &localObj, const QString &heal
|
|||||||
} else if (stringValue.startsWith("Critical Comp. Temp. Threshold")) {
|
} else if (stringValue.startsWith("Critical Comp. Temp. Threshold")) {
|
||||||
qsizetype pos = stringValue.indexOf(':');
|
qsizetype pos = stringValue.indexOf(':');
|
||||||
if (pos != -1) {
|
if (pos != -1) {
|
||||||
QString thresholdStr = stringValue.mid(pos + 1).trimmed();
|
QString thresholdStr = stringValue.mid(static_cast<int>(pos + 1)).trimmed();
|
||||||
int temperature = thresholdStr.section(' ', 0, 0).toInt();
|
int temperature = thresholdStr.section(' ', 0, 0).toInt();
|
||||||
if (temperature > 0) {
|
if (temperature > 0) {
|
||||||
criticalTemperature = temperature;
|
criticalTemperature = temperature;
|
||||||
@@ -1157,7 +1157,7 @@ void MainWindow::addSmartAttributesTable(const QJsonArray &attributes)
|
|||||||
|
|
||||||
qsizetype spaceIndex = rawHEX.indexOf(' ');
|
qsizetype spaceIndex = rawHEX.indexOf(' ');
|
||||||
if (spaceIndex != -1) {
|
if (spaceIndex != -1) {
|
||||||
rawHEX = rawHEX.left(spaceIndex);
|
rawHEX = rawHEX.left(static_cast<int>(spaceIndex));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rawHEX.startsWith("0x") && rawHEX.length() == 14) {
|
if (rawHEX.startsWith("0x") && rawHEX.length() == 14) {
|
||||||
|
|||||||
Reference in New Issue
Block a user