diff options
author | Jarek Kobus <jaroslaw.kobus@qt.io> | 2022-05-24 10:54:44 +0200 |
---|---|---|
committer | Jarek Kobus <jaroslaw.kobus@qt.io> | 2022-05-25 07:14:40 +0000 |
commit | 9508ee134781a11e72ac38180e07d16b8fb135dd (patch) | |
tree | 9e55a8c75de121339cd88c14cefa2beb13581e24 /src/libs/utils/minimizableinfobars.h | |
parent | 4ad8fb80c641cd6fceb237c82f0bee4651620417 (diff) |
Utils: More forward declarations / drop unused headers [L-O]
Round 1 - focus on headers.
For classes with initial in range [L-O].
Try to keep the same separators between different kind of headers.
Drop changes to NameValueDictionary for now, as apparently
environmentfwd.h is broken currently. It looks we can't
forward declare the argument T inside QList<T> - the type
must be complete.
Change-Id: If26e88357a2ffbb91a79c4d003046443d98d5673
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'src/libs/utils/minimizableinfobars.h')
-rw-r--r-- | src/libs/utils/minimizableinfobars.h | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/src/libs/utils/minimizableinfobars.h b/src/libs/utils/minimizableinfobars.h index 2087343d66..1150e5b4cb 100644 --- a/src/libs/utils/minimizableinfobars.h +++ b/src/libs/utils/minimizableinfobars.h @@ -28,16 +28,19 @@ #include "utils_global.h" #include "id.h" -#include "infobar.h" -#include <QAction> #include <QHash> #include <QObject> #include <functional> +QT_FORWARD_DECLARE_CLASS(QAction) + namespace Utils { +class InfoBar; +class InfoBarEntry; + class QTCREATOR_UTILS_EXPORT MinimizableInfoBars : public QObject { Q_OBJECT @@ -46,32 +49,32 @@ public: using ActionCreator = std::function<QAction *(QWidget *widget)>; public: - explicit MinimizableInfoBars(Utils::InfoBar &infoBar); + explicit MinimizableInfoBars(InfoBar &infoBar); void setSettingsGroup(const QString &settingsGroup); - void setPossibleInfoBarEntries(const QList<Utils::InfoBarEntry> &entries); + void setPossibleInfoBarEntries(const QList<InfoBarEntry> &entries); void createShowInfoBarActions(const ActionCreator &actionCreator) const; - void setInfoVisible(const Utils::Id &id, bool visible); + void setInfoVisible(const Id &id, bool visible); private: void createActions(); - QString settingsKey(const Utils::Id &id) const; - bool showInInfoBar(const Utils::Id &id) const; - void setShowInInfoBar(const Utils::Id &id, bool show); + QString settingsKey(const Id &id) const; + bool showInInfoBar(const Id &id) const; + void setShowInInfoBar(const Id &id, bool show); - void updateInfo(const Utils::Id &id); + void updateInfo(const Id &id); - void showInfoBar(const Utils::Id &id); + void showInfoBar(const Id &id); private: - Utils::InfoBar &m_infoBar; + InfoBar &m_infoBar; QString m_settingsGroup; - QHash<Utils::Id, QAction *> m_actions; - QHash<Utils::Id, bool> m_isInfoVisible; - QHash<Utils::Id, Utils::InfoBarEntry> m_infoEntries; + QHash<Id, QAction *> m_actions; + QHash<Id, bool> m_isInfoVisible; + QHash<Id, InfoBarEntry> m_infoEntries; }; } // namespace Utils |