Reverse change.

Follow don't repeat yourself approach.
This commit is contained in:
Roman Telezhynskyi 2024-02-23 14:31:29 +02:00
parent e8c0f73726
commit cf5fd8124f
3 changed files with 14 additions and 20 deletions

View File

@ -62,14 +62,14 @@ BEGIN
BLOCK "040904E4" BLOCK "040904E4"
BEGIN BEGIN
VALUE "CompanyName", VER_COMPANYNAME_STR VALUE "CompanyName", VER_COMPANYNAME_STR
VALUE "FileDescription", "Valentina's manual layout creator." VALUE "FileDescription", VER_FILEDESCRIPTION_STR
VALUE "FileVersion", VER_FILEVERSION_STR VALUE "FileVersion", VER_FILEVERSION_STR
VALUE "InternalName", "Puzzle" VALUE "InternalName", VER_INTERNALNAME_STR
VALUE "LegalCopyright", VER_LEGALCOPYRIGHT_STR VALUE "LegalCopyright", VER_LEGALCOPYRIGHT_STR
VALUE "LegalTrademarks1", VER_LEGALTRADEMARKS1_STR VALUE "LegalTrademarks1", VER_LEGALTRADEMARKS1_STR
VALUE "LegalTrademarks2", VER_LEGALTRADEMARKS2_STR VALUE "LegalTrademarks2", VER_LEGALTRADEMARKS2_STR
VALUE "OriginalFilename", "puzzle.exe" VALUE "OriginalFilename", VER_ORIGINALFILENAME_STR
VALUE "ProductName", "Puzzle" VALUE "ProductName", VER_PRODUCTNAME_STR
VALUE "ProductVersion", VER_PRODUCTVERSION_STR VALUE "ProductVersion", VER_PRODUCTVERSION_STR
END END
END END

View File

@ -29,12 +29,11 @@
#ifndef VERSION_H #ifndef VERSION_H
#define VERSION_H #define VERSION_H
#include <QString>
#include "../../libs/vmisc/projectversion.h" #include "../../libs/vmisc/projectversion.h"
extern const QString verInternalNameStr; #define VER_INTERNALNAME_STR "Puzzle"
extern const QString verOriginalFilenameStr; #define VER_ORIGINALFILENAME_STR "puzzle.exe"
extern const QString verProductNameStr; #define VER_PRODUCTNAME_STR "Puzzle"
extern const QString verFileDescriptionStr; #define VER_FILEDESCRIPTION_STR "Valentina's manual layout creator."
#endif // VERSION_H #endif // VERSION_H

View File

@ -71,15 +71,10 @@ Q_LOGGING_CATEGORY(pApp, "p.application") // NOLINT
QT_WARNING_POP QT_WARNING_POP
const QString verInternalNameStr = QStringLiteral("Puzzle"); #define VER_INTERNALNAME_STR "Puzzle"
const QString verOriginalFilenameStr = QStringLiteral("puzzle.exe"); #define VER_ORIGINALFILENAME_STR "puzzle.exe"
const QString verProductNameStr = QStringLiteral("Puzzle"); #define VER_PRODUCTNAME_STR "Puzzle"
const QString verFileDescriptionStr = QStringLiteral("Valentina's manual layout creator."); #define VER_FILEDESCRIPTION_STR "Valentina's manual layout creator."
//#define VER_INTERNALNAME_STR "Puzzle"
//#define VER_ORIGINALFILENAME_STR "puzzle.exe"
//#define VER_PRODUCTNAME_STR "Puzzle"
//#define VER_FILEDESCRIPTION_STR "Valentina's manual layout creator."
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
inline void noisyFailureMsgHandler(QtMsgType type, const QMessageLogContext &context, inline void noisyFailureMsgHandler(QtMsgType type, const QMessageLogContext &context,
@ -259,8 +254,8 @@ inline void noisyFailureMsgHandler(QtMsgType type, const QMessageLogContext &con
VPApplication::VPApplication(int &argc, char **argv) VPApplication::VPApplication(int &argc, char **argv)
: VAbstractApplication(argc, argv) : VAbstractApplication(argc, argv)
{ {
setApplicationDisplayName(verProductNameStr); setApplicationDisplayName(QStringLiteral(VER_PRODUCTNAME_STR));
setApplicationName(verInternalNameStr); setApplicationName(QStringLiteral(VER_INTERNALNAME_STR));
setOrganizationName(QStringLiteral(VER_COMPANYNAME_STR)); setOrganizationName(QStringLiteral(VER_COMPANYNAME_STR));
setOrganizationDomain(QStringLiteral(VER_COMPANYDOMAIN_STR)); setOrganizationDomain(QStringLiteral(VER_COMPANYDOMAIN_STR));
// Setting the Application version // Setting the Application version