Sun, 28 Nov 2021 23:53:23 +0200
Simplify ZandronumVersion structure
--- a/commonlib/types.h Sun Nov 28 23:47:55 2021 +0200 +++ b/commonlib/types.h Sun Nov 28 23:53:23 2021 +0200 @@ -24,17 +24,9 @@ struct ZandronumVersion { - ZandronumVersion (QString name, bool isRelease, QString binaryPath) : - name (name), - binaryPath (binaryPath), - isRelease (isRelease) {} - - ZandronumVersion() : - isRelease (false) {} - QString name; QString binaryPath; - bool isRelease; + bool isRelease = false; }; inline QDataStream& operator<< (QDataStream& out, const ZandronumVersion& version)
--- a/config/configwindow.cpp Sun Nov 28 23:47:55 2021 +0200 +++ b/config/configwindow.cpp Sun Nov 28 23:53:23 2021 +0200 @@ -202,7 +202,7 @@ ZandronumVersion VersionGuiEntry::toNonGuiVersion() const { - return ZandronumVersion (m_name, m_isRelease, m_pathItem->text()); + return {m_name, m_pathItem->text(), m_isRelease}; } //
--- a/launcher/prompts.cpp Sun Nov 28 23:47:55 2021 +0200 +++ b/launcher/prompts.cpp Sun Nov 28 23:53:23 2021 +0200 @@ -69,7 +69,7 @@ void UnknownVersionPrompt::addBinary() { - ZandronumVersion version (m_binaryString, m_isRelease, ui->m_binaryPath->text()); + const ZandronumVersion version {m_binaryString, ui->m_binaryPath->text(), m_isRelease}; QList<QVariant> versions = Config::get ("versions").toList(); QVariant var; var.setValue (version);