forked from qt-creator/qt-creator
EditorManager: Use non-static member initialization
And initialize some members that were not really initialized before. Change-Id: I2c32187c406774595b1575fdfb6d1a4f1116f478 Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
This commit is contained in:
@@ -192,7 +192,6 @@ EditorFactoryLike *findById(Id id)
|
||||
|
||||
EditorManagerPrivate::EditorManagerPrivate(QObject *parent) :
|
||||
QObject(parent),
|
||||
m_autoSaveTimer(0),
|
||||
m_revertToSavedAction(new QAction(EditorManager::tr("Revert to Saved"), this)),
|
||||
m_saveAction(new QAction(this)),
|
||||
m_saveAsAction(new QAction(this)),
|
||||
@@ -216,13 +215,7 @@ EditorManagerPrivate::EditorManagerPrivate(QObject *parent) :
|
||||
m_closeAllEditorsExceptVisibleContextAction(new QAction(EditorManager::tr("Close All Except Visible"), this)),
|
||||
m_openGraphicalShellAction(new QAction(FileUtils::msgGraphicalShellAction(), this)),
|
||||
m_openTerminalAction(new QAction(FileUtils::msgTerminalAction(), this)),
|
||||
m_findInDirectoryAction(new QAction(FileUtils::msgFindInDirectory(), this)),
|
||||
m_windowPopup(0),
|
||||
m_reloadSetting(IDocument::AlwaysAsk),
|
||||
m_autoSaveEnabled(true),
|
||||
m_autoSaveInterval(5),
|
||||
m_warnBeforeOpeningBigFilesEnabled(true),
|
||||
m_bigFileSizeLimitInMB(5)
|
||||
m_findInDirectoryAction(new QAction(FileUtils::msgFindInDirectory(), this))
|
||||
{
|
||||
d = this;
|
||||
}
|
||||
|
||||
@@ -197,7 +197,7 @@ private:
|
||||
QPointer<IEditor> m_currentEditor;
|
||||
QPointer<IEditor> m_scheduledCurrentEditor;
|
||||
QPointer<EditorView> m_currentView;
|
||||
QTimer *m_autoSaveTimer;
|
||||
QTimer *m_autoSaveTimer = nullptr;
|
||||
|
||||
// actions
|
||||
QAction *m_revertToSavedAction;
|
||||
@@ -233,24 +233,24 @@ private:
|
||||
QAction *m_openGraphicalShellAction;
|
||||
QAction *m_openTerminalAction;
|
||||
QAction *m_findInDirectoryAction;
|
||||
DocumentModel::Entry *m_contextMenuEntry;
|
||||
IEditor *m_contextMenuEditor;
|
||||
DocumentModel::Entry *m_contextMenuEntry = nullptr;
|
||||
IEditor *m_contextMenuEditor = nullptr;
|
||||
|
||||
OpenEditorsWindow *m_windowPopup;
|
||||
OpenEditorsWindow *m_windowPopup = nullptr;
|
||||
|
||||
QMap<QString, QVariant> m_editorStates;
|
||||
OpenEditorsViewFactory *m_openEditorsFactory;
|
||||
OpenEditorsViewFactory *m_openEditorsFactory = nullptr;
|
||||
|
||||
IDocument::ReloadSetting m_reloadSetting;
|
||||
IDocument::ReloadSetting m_reloadSetting = IDocument::AlwaysAsk;
|
||||
|
||||
EditorManager::WindowTitleHandler m_titleAdditionHandler;
|
||||
EditorManager::WindowTitleHandler m_titleVcsTopicHandler;
|
||||
|
||||
bool m_autoSaveEnabled;
|
||||
int m_autoSaveInterval;
|
||||
bool m_autoSaveEnabled = true;
|
||||
int m_autoSaveInterval = 5;
|
||||
|
||||
bool m_warnBeforeOpeningBigFilesEnabled;
|
||||
int m_bigFileSizeLimitInMB;
|
||||
bool m_warnBeforeOpeningBigFilesEnabled = true;
|
||||
int m_bigFileSizeLimitInMB = 5;
|
||||
|
||||
QString m_placeholderText;
|
||||
QList<std::function<bool(IEditor *)>> m_closeEditorListeners;
|
||||
|
||||
Reference in New Issue
Block a user