forked from qt-creator/qt-creator
Core: Initialize all members in FindToolbar
Use C++11 member initialization. Change-Id: Ib4db2fc9354658a0a4969c18f2857678cb49bdae Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
3044d0f7cb
commit
b427ac706b
@@ -68,15 +68,8 @@ FindToolBar::FindToolBar(FindPlugin *plugin, CurrentDocumentFind *currentDocumen
|
||||
m_currentDocumentFind(currentDocumentFind),
|
||||
m_findCompleter(new QCompleter(this)),
|
||||
m_replaceCompleter(new QCompleter(this)),
|
||||
m_enterFindStringAction(0),
|
||||
m_findNextAction(0),
|
||||
m_findPreviousAction(0),
|
||||
m_replaceAction(0),
|
||||
m_replaceNextAction(0),
|
||||
m_replacePreviousAction(0),
|
||||
m_findIncrementalTimer(this), m_findStepTimer(this),
|
||||
m_useFakeVim(false),
|
||||
m_eventFiltersInstalled(false)
|
||||
m_findIncrementalTimer(this),
|
||||
m_findStepTimer(this)
|
||||
{
|
||||
//setup ui
|
||||
m_ui.setupUi(this);
|
||||
@@ -393,7 +386,7 @@ void FindToolBar::updateGlobalActions()
|
||||
m_findInDocumentAction->setEnabled(enabled || (toolBarHasFocus() && isEnabled()));
|
||||
m_findNextSelectedAction->setEnabled(enabled);
|
||||
m_findPreviousSelectedAction->setEnabled(enabled);
|
||||
if (QApplication::clipboard()->supportsFindBuffer())
|
||||
if (m_enterFindStringAction)
|
||||
m_enterFindStringAction->setEnabled(enabled);
|
||||
m_findNextAction->setEnabled(enabled);
|
||||
m_findPreviousAction->setEnabled(enabled);
|
||||
|
||||
@@ -156,41 +156,41 @@ private:
|
||||
void updateIcons();
|
||||
void updateFlagMenus();
|
||||
|
||||
FindPlugin *m_plugin;
|
||||
CurrentDocumentFind *m_currentDocumentFind;
|
||||
FindPlugin *m_plugin = nullptr;
|
||||
CurrentDocumentFind *m_currentDocumentFind = nullptr;
|
||||
Ui::FindWidget m_ui;
|
||||
QCompleter *m_findCompleter;
|
||||
QCompleter *m_replaceCompleter;
|
||||
QAction *m_goToCurrentFindAction;
|
||||
QAction *m_findInDocumentAction;
|
||||
QAction *m_findNextSelectedAction;
|
||||
QAction *m_findPreviousSelectedAction;
|
||||
QAction *m_enterFindStringAction;
|
||||
QAction *m_findNextAction;
|
||||
QAction *m_findPreviousAction;
|
||||
QAction *m_replaceAction;
|
||||
QAction *m_replaceNextAction;
|
||||
QAction *m_replacePreviousAction;
|
||||
QAction *m_replaceAllAction;
|
||||
QAction *m_caseSensitiveAction;
|
||||
QAction *m_wholeWordAction;
|
||||
QAction *m_regularExpressionAction;
|
||||
QAction *m_preserveCaseAction;
|
||||
QCompleter *m_findCompleter = nullptr;
|
||||
QCompleter *m_replaceCompleter = nullptr;
|
||||
QAction *m_goToCurrentFindAction = nullptr;
|
||||
QAction *m_findInDocumentAction = nullptr;
|
||||
QAction *m_findNextSelectedAction = nullptr;
|
||||
QAction *m_findPreviousSelectedAction = nullptr;
|
||||
QAction *m_enterFindStringAction = nullptr;
|
||||
QAction *m_findNextAction = nullptr;
|
||||
QAction *m_findPreviousAction = nullptr;
|
||||
QAction *m_replaceAction = nullptr;
|
||||
QAction *m_replaceNextAction = nullptr;
|
||||
QAction *m_replacePreviousAction = nullptr;
|
||||
QAction *m_replaceAllAction = nullptr;
|
||||
QAction *m_caseSensitiveAction = nullptr;
|
||||
QAction *m_wholeWordAction = nullptr;
|
||||
QAction *m_regularExpressionAction = nullptr;
|
||||
QAction *m_preserveCaseAction = nullptr;
|
||||
|
||||
QAction *m_localFindNextAction;
|
||||
QAction *m_localFindPreviousAction;
|
||||
QAction *m_localReplaceAction;
|
||||
QAction *m_localReplaceNextAction;
|
||||
QAction *m_localReplacePreviousAction;
|
||||
QAction *m_localReplaceAllAction;
|
||||
QAction *m_localFindNextAction = nullptr;
|
||||
QAction *m_localFindPreviousAction = nullptr;
|
||||
QAction *m_localReplaceAction = nullptr;
|
||||
QAction *m_localReplaceNextAction = nullptr;
|
||||
QAction *m_localReplacePreviousAction = nullptr;
|
||||
QAction *m_localReplaceAllAction = nullptr;
|
||||
|
||||
FindFlags m_findFlags;
|
||||
|
||||
QTimer m_findIncrementalTimer;
|
||||
QTimer m_findStepTimer;
|
||||
IFindSupport::Result m_lastResult;
|
||||
bool m_useFakeVim;
|
||||
bool m_eventFiltersInstalled;
|
||||
IFindSupport::Result m_lastResult = IFindSupport::NotYetFound;
|
||||
bool m_useFakeVim = false;
|
||||
bool m_eventFiltersInstalled = false;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
Reference in New Issue
Block a user