MinimizableInfoBars: Remove dependency on CppToolsSettings

They were only used in the info bars, so move them there.

Change-Id: I584c98c70d1db2a5b741842da9d629469f0de73c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Eike Ziller
2022-05-03 11:01:24 +02:00
parent 5790905d6e
commit 2d6a36742b
6 changed files with 52 additions and 45 deletions

View File

@@ -48,8 +48,9 @@ public:
using ActionCreator = std::function<QAction *(QWidget *widget)>;
public:
explicit MinimizableInfoBars(Utils::InfoBar &infoBar, QObject *parent = nullptr);
explicit MinimizableInfoBars(Utils::InfoBar &infoBar);
void setSettingsGroup(const QString &settingsGroup);
void createShowInfoBarActions(const ActionCreator &actionCreator) const;
void processHasProjectPart(bool hasProjectPart);
@@ -57,12 +58,19 @@ public:
private:
void createActions();
QString settingsKey(const QString &id) const;
bool showHeaderErrorInfoBar() const;
void setShowHeaderErrorInfoBar(bool show);
bool showNoProjectInfoBar() const;
void setShowNoProjectInfoBar(bool show);
void updateNoProjectConfiguration();
void addNoProjectConfigurationEntry(const Utils::Id &id);
private:
Utils::InfoBar &m_infoBar;
QString m_settingsGroup;
QHash<Utils::Id, QAction *> m_actions;
bool m_hasProjectPart = true;