diff options
author | hjk <hjk@theqtcompany.com> | 2016-03-25 20:00:19 +0100 |
---|---|---|
committer | hjk <hjk@theqtcompany.com> | 2016-04-08 10:38:49 +0000 |
commit | 5e47d35fcd8c750afc6d0453165066f969e282c2 (patch) | |
tree | 573b5af9c6a8759cb41cc8c4185856846038b201 /src/plugins/coreplugin/modemanager.h | |
parent | ed7d5e0d626505a4880d57738ef0403632ed7014 (diff) | |
download | qt-creator-5e47d35fcd8c750afc6d0453165066f969e282c2.tar.gz |
Use Core::Id in ModeManager interface
Makes it more uniform to use and allows placeholder widget
creation to be independent of mode creations.
Change-Id: I4021bc9db7f8c78f0374c0cc3b3331506959afe4
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Diffstat (limited to 'src/plugins/coreplugin/modemanager.h')
-rw-r--r-- | src/plugins/coreplugin/modemanager.h | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/plugins/coreplugin/modemanager.h b/src/plugins/coreplugin/modemanager.h index 324684bdd7..8f5dbdbba7 100644 --- a/src/plugins/coreplugin/modemanager.h +++ b/src/plugins/coreplugin/modemanager.h @@ -25,7 +25,7 @@ #pragma once -#include <coreplugin/core_global.h> +#include <coreplugin/id.h> #include <QObject> QT_BEGIN_NAMESPACE @@ -34,9 +34,6 @@ QT_END_NAMESPACE namespace Core { -class Id; -class IMode; - namespace Internal { class MainWindow; class FancyTabWidget; @@ -49,8 +46,7 @@ class CORE_EXPORT ModeManager : public QObject public: static ModeManager *instance(); - static IMode *currentMode(); - static IMode *mode(Id id); + static Id currentMode(); static void addAction(QAction *action, int priority); static void addProjectSelector(QAction *action); @@ -63,10 +59,10 @@ public slots: static void setModeSelectorVisible(bool visible); signals: - void currentModeAboutToChange(Core::IMode *mode); + void currentModeAboutToChange(Core::Id mode); // the default argument '=0' is important for connects without the oldMode argument. - void currentModeChanged(Core::IMode *mode, Core::IMode *oldMode = 0); + void currentModeChanged(Core::Id mode, Core::Id oldMode = Core::Id()); private: explicit ModeManager(Internal::MainWindow *mainWindow, Internal::FancyTabWidget *modeStack); |