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:
Orgad Shaneh
2016-03-13 19:26:14 +02:00
committed by Orgad Shaneh
parent 3044d0f7cb
commit b427ac706b
2 changed files with 31 additions and 38 deletions

View File

@@ -68,15 +68,8 @@ FindToolBar::FindToolBar(FindPlugin *plugin, CurrentDocumentFind *currentDocumen
m_currentDocumentFind(currentDocumentFind), m_currentDocumentFind(currentDocumentFind),
m_findCompleter(new QCompleter(this)), m_findCompleter(new QCompleter(this)),
m_replaceCompleter(new QCompleter(this)), m_replaceCompleter(new QCompleter(this)),
m_enterFindStringAction(0), m_findIncrementalTimer(this),
m_findNextAction(0), m_findStepTimer(this)
m_findPreviousAction(0),
m_replaceAction(0),
m_replaceNextAction(0),
m_replacePreviousAction(0),
m_findIncrementalTimer(this), m_findStepTimer(this),
m_useFakeVim(false),
m_eventFiltersInstalled(false)
{ {
//setup ui //setup ui
m_ui.setupUi(this); m_ui.setupUi(this);
@@ -393,7 +386,7 @@ void FindToolBar::updateGlobalActions()
m_findInDocumentAction->setEnabled(enabled || (toolBarHasFocus() && isEnabled())); m_findInDocumentAction->setEnabled(enabled || (toolBarHasFocus() && isEnabled()));
m_findNextSelectedAction->setEnabled(enabled); m_findNextSelectedAction->setEnabled(enabled);
m_findPreviousSelectedAction->setEnabled(enabled); m_findPreviousSelectedAction->setEnabled(enabled);
if (QApplication::clipboard()->supportsFindBuffer()) if (m_enterFindStringAction)
m_enterFindStringAction->setEnabled(enabled); m_enterFindStringAction->setEnabled(enabled);
m_findNextAction->setEnabled(enabled); m_findNextAction->setEnabled(enabled);
m_findPreviousAction->setEnabled(enabled); m_findPreviousAction->setEnabled(enabled);

View File

@@ -156,41 +156,41 @@ private:
void updateIcons(); void updateIcons();
void updateFlagMenus(); void updateFlagMenus();
FindPlugin *m_plugin; FindPlugin *m_plugin = nullptr;
CurrentDocumentFind *m_currentDocumentFind; CurrentDocumentFind *m_currentDocumentFind = nullptr;
Ui::FindWidget m_ui; Ui::FindWidget m_ui;
QCompleter *m_findCompleter; QCompleter *m_findCompleter = nullptr;
QCompleter *m_replaceCompleter; QCompleter *m_replaceCompleter = nullptr;
QAction *m_goToCurrentFindAction; QAction *m_goToCurrentFindAction = nullptr;
QAction *m_findInDocumentAction; QAction *m_findInDocumentAction = nullptr;
QAction *m_findNextSelectedAction; QAction *m_findNextSelectedAction = nullptr;
QAction *m_findPreviousSelectedAction; QAction *m_findPreviousSelectedAction = nullptr;
QAction *m_enterFindStringAction; QAction *m_enterFindStringAction = nullptr;
QAction *m_findNextAction; QAction *m_findNextAction = nullptr;
QAction *m_findPreviousAction; QAction *m_findPreviousAction = nullptr;
QAction *m_replaceAction; QAction *m_replaceAction = nullptr;
QAction *m_replaceNextAction; QAction *m_replaceNextAction = nullptr;
QAction *m_replacePreviousAction; QAction *m_replacePreviousAction = nullptr;
QAction *m_replaceAllAction; QAction *m_replaceAllAction = nullptr;
QAction *m_caseSensitiveAction; QAction *m_caseSensitiveAction = nullptr;
QAction *m_wholeWordAction; QAction *m_wholeWordAction = nullptr;
QAction *m_regularExpressionAction; QAction *m_regularExpressionAction = nullptr;
QAction *m_preserveCaseAction; QAction *m_preserveCaseAction = nullptr;
QAction *m_localFindNextAction; QAction *m_localFindNextAction = nullptr;
QAction *m_localFindPreviousAction; QAction *m_localFindPreviousAction = nullptr;
QAction *m_localReplaceAction; QAction *m_localReplaceAction = nullptr;
QAction *m_localReplaceNextAction; QAction *m_localReplaceNextAction = nullptr;
QAction *m_localReplacePreviousAction; QAction *m_localReplacePreviousAction = nullptr;
QAction *m_localReplaceAllAction; QAction *m_localReplaceAllAction = nullptr;
FindFlags m_findFlags; FindFlags m_findFlags;
QTimer m_findIncrementalTimer; QTimer m_findIncrementalTimer;
QTimer m_findStepTimer; QTimer m_findStepTimer;
IFindSupport::Result m_lastResult; IFindSupport::Result m_lastResult = IFindSupport::NotYetFound;
bool m_useFakeVim; bool m_useFakeVim = false;
bool m_eventFiltersInstalled; bool m_eventFiltersInstalled = false;
}; };
} // namespace Internal } // namespace Internal