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:
@@ -10,14 +10,13 @@
|
||||
#include "coreplugintr.h"
|
||||
#include "icore.h"
|
||||
|
||||
#include <app/app_version.h>
|
||||
|
||||
#include <utils/hostosinfo.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/stringutils.h>
|
||||
|
||||
#include <QAction>
|
||||
#include <QEvent>
|
||||
#include <QGuiApplication>
|
||||
#include <QMenu>
|
||||
#include <QWidget>
|
||||
#include <QWindowStateChangeEvent>
|
||||
@@ -188,7 +187,7 @@ void WindowList::updateTitle(QWidget *window)
|
||||
QTC_ASSERT(index >= 0, return);
|
||||
QTC_ASSERT(index < m_windowActions.size(), return);
|
||||
QString title = window->windowTitle();
|
||||
if (title.endsWith(QStringLiteral("- ") + Constants::IDE_DISPLAY_NAME))
|
||||
if (title.endsWith(QStringLiteral("- ") + QGuiApplication::applicationDisplayName()))
|
||||
title.chop(12);
|
||||
m_windowActions.at(index)->setText(Utils::quoteAmpersands(title.trimmed()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user