aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/scxmleditor
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2023-06-21 15:12:46 +0200
committerEike Ziller <eike.ziller@qt.io>2023-06-26 06:57:46 +0000
commitdff9e1463bfebe803af0c696222b6eeb04857c26 (patch)
tree71a130bb73c65d88c0e87fdd06d0f06495c6670c /src/plugins/scxmleditor
parent27302694ab794d8437b6feac4095ad34fa43ed24 (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/plugins/scxmleditor')
-rw-r--r--src/plugins/scxmleditor/common/mainwidget.cpp2
-rw-r--r--src/plugins/scxmleditor/plugin_interface/scxmldocument.cpp8
-rw-r--r--src/plugins/scxmleditor/scxmleditor.qbs2
3 files changed, 3 insertions, 9 deletions
diff --git a/src/plugins/scxmleditor/common/mainwidget.cpp b/src/plugins/scxmleditor/common/mainwidget.cpp
index 8cd7618944e..795e183bd67 100644
--- a/src/plugins/scxmleditor/common/mainwidget.cpp
+++ b/src/plugins/scxmleditor/common/mainwidget.cpp
@@ -51,8 +51,6 @@
#include <QStandardPaths>
#include <QXmlStreamWriter>
-#include <app/app_version.h>
-
#include <coreplugin/icore.h>
#include <coreplugin/minisplitter.h>
diff --git a/src/plugins/scxmleditor/plugin_interface/scxmldocument.cpp b/src/plugins/scxmleditor/plugin_interface/scxmldocument.cpp
index e85a516cf11..4ee7ebc6197 100644
--- a/src/plugins/scxmleditor/plugin_interface/scxmldocument.cpp
+++ b/src/plugins/scxmleditor/plugin_interface/scxmldocument.cpp
@@ -13,8 +13,6 @@
#include <QXmlStreamReader>
#include <QXmlStreamWriter>
-#include <app/app_version.h>
-
using namespace ScxmlEditor::PluginInterface;
ScxmlDocument::ScxmlDocument(const QString &fileName, QObject *parent)
@@ -62,7 +60,7 @@ void ScxmlDocument::clear(bool createRoot)
if (createRoot) {
pushRootTag(createScxmlTag());
- rootTag()->setAttribute("qt:editorversion", QLatin1String(Core::Constants::IDE_VERSION_LONG));
+ rootTag()->setAttribute("qt:editorversion", QCoreApplication::applicationVersion());
auto ns = new ScxmlNamespace("qt", "http://www.qt.io/2015/02/scxml-ext");
ns->setTagVisibility("editorInfo", false);
@@ -207,7 +205,7 @@ bool ScxmlDocument::load(QIODevice *io)
// Check editorversion
m_hasLayouted = rootTag()->hasAttribute("qt:editorversion");
- rootTag()->setAttribute("qt:editorversion", QLatin1String(Core::Constants::IDE_VERSION_LONG));
+ rootTag()->setAttribute("qt:editorversion", QCoreApplication::applicationVersion());
}
}
@@ -363,7 +361,7 @@ void ScxmlDocument::load(const QString &fileName)
// If loading doesn't work, create root tag here
if (m_rootTags.isEmpty()) {
pushRootTag(createScxmlTag());
- rootTag()->setAttribute("qt:editorversion", QLatin1String(Core::Constants::IDE_VERSION_LONG));
+ rootTag()->setAttribute("qt:editorversion", QCoreApplication::applicationVersion());
}
auto ns = new ScxmlNamespace("qt", "http://www.qt.io/2015/02/scxml-ext");
diff --git a/src/plugins/scxmleditor/scxmleditor.qbs b/src/plugins/scxmleditor/scxmleditor.qbs
index 39340d8764c..d8457e6e1a3 100644
--- a/src/plugins/scxmleditor/scxmleditor.qbs
+++ b/src/plugins/scxmleditor/scxmleditor.qbs
@@ -11,8 +11,6 @@ QtcPlugin {
Depends { name: "ProjectExplorer" }
Depends { name: "QtSupport" }
- Depends { name: "app_version_header" }
-
cpp.includePaths: base.concat([
".",
common.prefix,