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:
Eike Ziller
2023-06-21 15:12:46 +02:00
parent 27302694ab
commit dff9e1463b
96 changed files with 375 additions and 384 deletions

View File

@@ -15,7 +15,6 @@ Project {
Depends { name: "QtSupport" }
Depends { name: "TextEditor" }
Depends { name: "Utils" }
Depends { name: "app_version_header" }
files: [
"android_global.h", "androidtr.h",

View File

@@ -6,8 +6,6 @@
#include "androidpotentialkit.h"
#include "androidtr.h"
#include <app/app_version.h>
#include <coreplugin/coreicons.h>
#include <coreplugin/icore.h>
@@ -22,10 +20,10 @@
#include <utils/utilsicons.h>
#include <QGridLayout>
#include <QGuiApplication>
#include <QLabel>
#include <QPushButton>
namespace Android::Internal {
class AndroidPotentialKitWidget : public Utils::DetailsWidget
@@ -83,7 +81,7 @@ AndroidPotentialKitWidget::AndroidPotentialKitWidget(QWidget *parent)
auto label = new QLabel;
label->setText(Tr::tr("%1 needs additional settings to enable Android support."
" You can configure those settings in the Options dialog.")
.arg(Core::Constants::IDE_DISPLAY_NAME));
.arg(QGuiApplication::applicationDisplayName()));
label->setWordWrap(true);
layout->addWidget(label, 0, 0, 1, 2);

View File

@@ -7,8 +7,6 @@
#include "androidtoolchain.h"
#include "androidtr.h"
#include <app/app_version.h>
#include <projectexplorer/buildsystem.h>
#include <projectexplorer/kitinformation.h>
#include <projectexplorer/project.h>

View File

@@ -7,8 +7,6 @@
#include "androidsdkmodel.h"
#include "androidtr.h"
#include <app/app_version.h>
#include <utils/async.h>
#include <utils/layoutbuilder.h>
#include <utils/outputformatter.h>
@@ -18,6 +16,7 @@
#include <QAbstractButton>
#include <QDialogButtonBox>
#include <QGridLayout>
#include <QGuiApplication>
#include <QLabel>
#include <QLineEdit>
#include <QLoggingCategory>
@@ -282,8 +281,8 @@ void AndroidSdkManagerWidget::installEssentials()
Tr::tr("Android SDK Changes"),
Tr::tr("%1 cannot find the following essential packages: \"%2\".\n"
"Install them manually after the current operation is done.\n")
.arg(Core::Constants::IDE_DISPLAY_NAME)
.arg(m_sdkModel->missingEssentials().join("\", \"")));
.arg(QGuiApplication::applicationDisplayName(),
m_sdkModel->missingEssentials().join("\", \"")));
}
onApplyButton(Tr::tr("Android SDK installation is missing necessary packages. "
"Do you want to install the missing packages?"));