From 65132e97817675b9026cc36e5256734fc08113b3 Mon Sep 17 00:00:00 2001 From: Martchus Date: Mon, 27 Jul 2015 23:22:46 +0200 Subject: [PATCH] added macros for setting application info provided in project file --- resources/resources.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/resources/resources.h b/resources/resources.h index 2447d3f..c643abc 100644 --- a/resources/resources.h +++ b/resources/resources.h @@ -10,6 +10,16 @@ class QString; class QStringList; QT_END_NAMESPACE +#define SET_APPLICATION_INFO \ + QCoreApplication::setOrganizationName(QStringLiteral(APP_AUTHOR)); \ + QCoreApplication::setOrganizationDomain(QStringLiteral(APP_URL)); \ + QCoreApplication::setApplicationName(QStringLiteral(APP_NAME)); \ + QCoreApplication::setApplicationVersion(QStringLiteral(APP_VERSION)) + +#define LOAD_TRANSLATIONS \ + TranslationFiles::loadQtTranslationFile(); \ + TranslationFiles::loadApplicationTranslationFile(QStringLiteral(PROJECT_NAME)) + namespace QtUtilitiesResources { LIB_EXPORT void init();