forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -6,7 +6,6 @@
|
||||
#include "cppeditorplugin.h"
|
||||
#include "cppeditortr.h"
|
||||
|
||||
#include <app/app_version.h>
|
||||
#include <coreplugin/icore.h>
|
||||
#include <coreplugin/editormanager/editormanager.h>
|
||||
#include <projectexplorer/project.h>
|
||||
@@ -20,6 +19,7 @@
|
||||
#include <QComboBox>
|
||||
#include <QCoreApplication>
|
||||
#include <QFile>
|
||||
#include <QGuiApplication>
|
||||
#include <QLineEdit>
|
||||
#include <QLocale>
|
||||
#include <QSettings>
|
||||
@@ -435,7 +435,8 @@ void CppFileSettingsWidget::slotEdit()
|
||||
if (path.isEmpty())
|
||||
return;
|
||||
FileSaver saver(path, QIODevice::Text);
|
||||
saver.write(Tr::tr(licenseTemplateTemplate).arg(Core::Constants::IDE_DISPLAY_NAME).toUtf8());
|
||||
saver.write(
|
||||
Tr::tr(licenseTemplateTemplate).arg(QGuiApplication::applicationDisplayName()).toUtf8());
|
||||
if (!saver.finalize(this))
|
||||
return;
|
||||
setLicenseTemplatePath(path);
|
||||
|
||||
Reference in New Issue
Block a user