diff options
author | Eike Ziller <eike.ziller@qt.io> | 2023-06-21 15:12:46 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2023-06-26 06:57:46 +0000 |
commit | dff9e1463bfebe803af0c696222b6eeb04857c26 (patch) | |
tree | 71a130bb73c65d88c0e87fdd06d0f06495c6670c /src/app | |
parent | 27302694ab794d8437b6feac4095ad34fa43ed24 (diff) |
Reduce usage of app_version header
Most information is available via Q(Core|Gui)Application.
Add an AppInfo structure for the things that are not.
This avoids that the information ends up duplicated and
hardcoded in the plugins, which is not needed or desired.
Change-Id: I4d565e75c42a7b8facafa90c27096ea49359215d
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'src/app')
-rw-r--r-- | src/app/CMakeLists.txt | 6 | ||||
-rw-r--r-- | src/app/main.cpp | 11 |
2 files changed, 11 insertions, 6 deletions
diff --git a/src/app/CMakeLists.txt b/src/app/CMakeLists.txt index 940ae30a59..2d39c219f9 100644 --- a/src/app/CMakeLists.txt +++ b/src/app/CMakeLists.txt @@ -4,12 +4,6 @@ if(NOT IS_ABSOLUTE "${IDE_ICON_PATH}") set(IDE_ICON_PATH "${CMAKE_CURRENT_SOURCE_DIR}/${IDE_ICON_PATH}") endif() -install( - FILES ${CMAKE_CURRENT_BINARY_DIR}/app_version.h - DESTINATION ${IDE_HEADER_INSTALL_PATH}/src/app - COMPONENT Devel EXCLUDE_FROM_ALL -) - add_qtc_executable(qtcreator DEFINES IDE_LIBRARY_BASENAME=\"${IDE_LIBRARY_BASE_PATH}\" DEPENDS Aggregation ExtensionSystem Qt::Core Qt::Widgets Utils shared_qtsingleapplication app_version diff --git a/src/app/main.cpp b/src/app/main.cpp index 89bf5f7412..c488a2d9be 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -11,6 +11,7 @@ #include <qtsingleapplication.h> #include <utils/algorithm.h> +#include <utils/appinfo.h> #include <utils/environment.h> #include <utils/fileutils.h> #include <utils/fsengine/fsengine.h> @@ -653,6 +654,16 @@ int main(int argc, char **argv) PluginManager::setGlobalSettings(globalSettings); PluginManager::setSettings(settings); + using namespace Core; + Utils::AppInfo info; + info.author = Constants::IDE_AUTHOR; + info.year = Constants::IDE_YEAR; + info.displayVersion = Constants::IDE_VERSION_DISPLAY; + info.id = Constants::IDE_ID; + info.revision = Constants::IDE_REVISION_STR; + info.revisionUrl = Constants::IDE_REVISION_URL; + Utils::Internal::setAppInfo(info); + QTranslator translator; QTranslator qtTranslator; QStringList uiLanguages = QLocale::system().uiLanguages(); |