forked from qt-creator/qt-creator
ModeManager: Remove unused constructor argument
Change-Id: I7856a832db61a27ab5fdabf79ff9a359acdb866a Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -1216,7 +1216,7 @@ void ICorePrivate::init()
|
||||
|
||||
QApplication::setStyle(new ManhattanStyle(baseName));
|
||||
|
||||
m_modeManager = new ModeManager(m_mainwindow, m_modeStack);
|
||||
m_modeManager = new ModeManager(m_modeStack);
|
||||
connect(m_modeStack, &FancyTabWidget::topAreaClicked, this, [](Qt::MouseButton, Qt::KeyboardModifiers modifiers) {
|
||||
if (modifiers & Qt::ShiftModifier) {
|
||||
QColor color = QColorDialog::getColor(StyleHelper::requestedBaseColor(), ICore::dialogParent());
|
||||
|
||||
@@ -68,7 +68,6 @@ struct ModeManagerPrivate
|
||||
void activateModeHelper(Id id);
|
||||
void extensionsInitializedHelper();
|
||||
|
||||
Internal::MainWindow *m_mainWindow;
|
||||
Internal::FancyTabWidget *m_modeStack;
|
||||
Internal::FancyActionBar *m_actionBar;
|
||||
QMap<QAction*, int> m_actions;
|
||||
@@ -101,12 +100,10 @@ void ModeManagerPrivate::showMenu(int index, QMouseEvent *event)
|
||||
m_modes.at(index)->menu()->popup(event->globalPosition().toPoint());
|
||||
}
|
||||
|
||||
ModeManager::ModeManager(Internal::MainWindow *mainWindow,
|
||||
Internal::FancyTabWidget *modeStack)
|
||||
ModeManager::ModeManager(Internal::FancyTabWidget *modeStack)
|
||||
{
|
||||
m_instance = this;
|
||||
d = new ModeManagerPrivate();
|
||||
d->m_mainWindow = mainWindow;
|
||||
d->m_modeStack = modeStack;
|
||||
d->m_oldCurrent = -1;
|
||||
d->m_actionBar = new Internal::FancyActionBar(modeStack);
|
||||
|
||||
@@ -21,7 +21,6 @@ class IMode;
|
||||
namespace Internal {
|
||||
class FancyTabWidget;
|
||||
class ICorePrivate;
|
||||
class MainWindow;
|
||||
}
|
||||
|
||||
class CORE_EXPORT ModeManager : public QObject
|
||||
@@ -60,7 +59,7 @@ signals:
|
||||
void currentModeChanged(Utils::Id mode, Utils::Id oldMode = {});
|
||||
|
||||
private:
|
||||
explicit ModeManager(Internal::MainWindow *mainWindow, Internal::FancyTabWidget *modeStack);
|
||||
explicit ModeManager(Internal::FancyTabWidget *modeStack);
|
||||
~ModeManager() override;
|
||||
|
||||
static void extensionsInitialized();
|
||||
@@ -71,7 +70,6 @@ private:
|
||||
|
||||
friend class ICore;
|
||||
friend class IMode;
|
||||
friend class Internal::MainWindow;
|
||||
friend class Internal::ICorePrivate;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user