Change "getMbToPrettyString" to const function

This commit is contained in:
Johnny Silverman
2025-11-04 02:45:07 +02:00
parent 702b9c8415
commit 557d6db040
2 changed files with 2 additions and 2 deletions

View File

@@ -101,5 +101,5 @@ private:
QString gbSymbol;
QString tbSymbol;
QString pbSymbol;
QString getMbToPrettyString(const int64_t &sizeInMbI64, const int &precisionInt, const bool &useGbBool);
QString getMbToPrettyString(const int64_t &sizeInMbI64, const int &precisionInt, const bool &useGbBool) const;
};

View File

@@ -1451,7 +1451,7 @@ void MainWindow::on_actionSave_Image_triggered()
screenshot.save(QFileDialog::getSaveFileName(this, tr("Save Image"), "QDiskInfo_" + deviceNodeLineEdit->text().section('/', -1) + ".png", tr("PNG Files (*.png)")));
}
QString MainWindow::getMbToPrettyString(const int64_t &sizeInMbI64, const int &precisionInt, const bool &useGbBool)
QString MainWindow::getMbToPrettyString(const int64_t &sizeInMbI64, const int &precisionInt, const bool &useGbBool) const
{
if (!sizeInMbI64)
return "----";