fix: take JavaCheckResult by const reference

Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
Sefa Eyeoglu 2023-07-29 11:00:33 +02:00
parent 9d5818916a
commit a545f67a21
No known key found for this signature in database
GPG Key ID: E13DFD4B47127951
4 changed files with 8 additions and 8 deletions

View File

@ -68,7 +68,7 @@ bool JavaCommon::checkJVMArgs(QString jvmargs, QWidget *parent)
return true; return true;
} }
void JavaCommon::javaWasOk(QWidget *parent, JavaCheckResult result) void JavaCommon::javaWasOk(QWidget *parent, const JavaCheckResult &result)
{ {
QString text; QString text;
text += QObject::tr("Java test succeeded!<br />Platform reported: %1<br />Java version " text += QObject::tr("Java test succeeded!<br />Platform reported: %1<br />Java version "
@ -83,7 +83,7 @@ void JavaCommon::javaWasOk(QWidget *parent, JavaCheckResult result)
CustomMessageBox::selectable(parent, QObject::tr("Java test success"), text, QMessageBox::Information)->show(); CustomMessageBox::selectable(parent, QObject::tr("Java test success"), text, QMessageBox::Information)->show();
} }
void JavaCommon::javaArgsWereBad(QWidget *parent, JavaCheckResult result) void JavaCommon::javaArgsWereBad(QWidget *parent, const JavaCheckResult &result)
{ {
auto htmlError = result.errorLog; auto htmlError = result.errorLog;
QString text; QString text;
@ -93,7 +93,7 @@ void JavaCommon::javaArgsWereBad(QWidget *parent, JavaCheckResult result)
CustomMessageBox::selectable(parent, QObject::tr("Java test failure"), text, QMessageBox::Warning)->show(); CustomMessageBox::selectable(parent, QObject::tr("Java test failure"), text, QMessageBox::Warning)->show();
} }
void JavaCommon::javaBinaryWasBad(QWidget *parent, JavaCheckResult result) void JavaCommon::javaBinaryWasBad(QWidget *parent, const JavaCheckResult &result)
{ {
QString text; QString text;
text += QObject::tr( text += QObject::tr(

View File

@ -11,11 +11,11 @@ namespace JavaCommon
bool checkJVMArgs(QString args, QWidget *parent); bool checkJVMArgs(QString args, QWidget *parent);
// Show a dialog saying that the Java binary was usable // Show a dialog saying that the Java binary was usable
void javaWasOk(QWidget *parent, JavaCheckResult result); void javaWasOk(QWidget *parent, const JavaCheckResult &result);
// Show a dialog saying that the Java binary was not usable because of bad options // Show a dialog saying that the Java binary was not usable because of bad options
void javaArgsWereBad(QWidget *parent, JavaCheckResult result); void javaArgsWereBad(QWidget *parent, const JavaCheckResult &result);
// Show a dialog saying that the Java binary was not usable // Show a dialog saying that the Java binary was not usable
void javaBinaryWasBad(QWidget *parent, JavaCheckResult result); void javaBinaryWasBad(QWidget *parent, const JavaCheckResult &result);
// Show a dialog if we couldn't find Java Checker // Show a dialog if we couldn't find Java Checker
void javaCheckNotFound(QWidget *parent); void javaCheckNotFound(QWidget *parent);

View File

@ -43,7 +43,7 @@ JavaVersion::JavaVersion(const QString &rhs)
operator=(rhs); operator=(rhs);
} }
QString JavaVersion::toString() QString JavaVersion::toString() const
{ {
return m_string; return m_string;
} }

View File

@ -25,7 +25,7 @@ public:
bool requiresPermGen(); bool requiresPermGen();
QString toString(); QString toString() const;
int major() int major()
{ {