From kde-commits Fri Jun 17 08:18:10 2016 From: Simon St James Date: Fri, 17 Jun 2016 08:18:10 +0000 To: kde-commits Subject: [ktexteditor] src/vimode/emulatedcommandbar: Minor tweaks. Message-Id: X-MARC-Message: https://marc.info/?l=kde-commits&m=146615218222809 Git commit 27f511300cc58536714bfd833a2d18f9ca877c85 by Simon St James. Committed on 17/06/2016 at 08:14. Pushed by sstjames into branch 'master'. Minor tweaks. M +3 -3 src/vimode/emulatedcommandbar/activemode.h M +7 -6 src/vimode/emulatedcommandbar/emulatedcommandbar.h M +1 -1 src/vimode/emulatedcommandbar/matchhighlighter.cpp M +1 -1 src/vimode/emulatedcommandbar/matchhighlighter.h http://commits.kde.org/ktexteditor/27f511300cc58536714bfd833a2d18f9ca877c85 diff --git a/src/vimode/emulatedcommandbar/activemode.h b/src/vimode/emulat= edcommandbar/activemode.h index bc419ea..308b44d 100644 --- a/src/vimode/emulatedcommandbar/activemode.h +++ b/src/vimode/emulatedcommandbar/activemode.h @@ -24,7 +24,7 @@ class ActiveMode public: ActiveMode(EmulatedCommandBar* emulatedCommandBar, MatchHighlighter* m= atchHighlighter) : m_emulatedCommandBar(emulatedCommandBar), - m_matchHighligher(matchHighlighter) + m_matchHighligher(matchHighlighter) { } virtual ~ActiveMode() =3D 0; @@ -46,9 +46,9 @@ protected: void close(bool wasAborted); void closeWithStatusMessage(const QString& exitStatusMessage); void startCompletion(const CompletionStartParams& completionStartParam= s); - EmulatedCommandBar *m_emulatedCommandBar; + EmulatedCommandBar *m_emulatedCommandBar =3D nullptr; private: - MatchHighlighter *m_matchHighligher; + MatchHighlighter *m_matchHighligher =3D nullptr; }; } #endif diff --git a/src/vimode/emulatedcommandbar/emulatedcommandbar.h b/src/vimod= e/emulatedcommandbar/emulatedcommandbar.h index 09d4485..aaf70d0 100644 --- a/src/vimode/emulatedcommandbar/emulatedcommandbar.h +++ b/src/vimode/emulatedcommandbar/emulatedcommandbar.h @@ -73,9 +73,9 @@ private: InputModeManager *m_viInputModeManager; bool m_isActive =3D false; Mode m_mode =3D NoMode; - KTextEditor::ViewPrivate *m_view; - QLineEdit *m_edit; - QLabel *m_barTypeIndicator; + KTextEditor::ViewPrivate *m_view =3D nullptr; + QLineEdit *m_edit =3D nullptr; + QLabel *m_barTypeIndicator =3D nullptr; void showBarTypeIndicator(Mode mode); bool m_wasAborted =3D true; bool m_suspendEditEventFiltering =3D false; @@ -87,16 +87,18 @@ private: = friend class ActiveMode; QScopedPointer m_matchHighligher; + QScopedPointer m_completer; + QScopedPointer m_interactiveSedReplaceMode; QScopedPointer m_searchMode; QScopedPointer m_commandMode; = - void moveCursorTo(const KTextEditor::Cursor &cursorPos); - void switchToMode(ActiveMode *newMode); ActiveMode *m_currentMode =3D nullptr; = + void moveCursorTo(const KTextEditor::Cursor &cursorPos); + bool barHandledKeypress(const QKeyEvent* keyEvent); void insertRegisterContents(const QKeyEvent *keyEvent); bool eventFilter(QObject *object, QEvent *event) Q_DECL_OVERRIDE; @@ -104,7 +106,6 @@ private: void deleteWordCharsToLeftOfCursor(); bool deleteNonWordCharsToLeftOfCursor(); = - void closed() Q_DECL_OVERRIDE; void closeWithStatusMessage(const QString& exitStatusMessage); QTimer *m_exitStatusMessageDisplayHideTimer; diff --git a/src/vimode/emulatedcommandbar/matchhighlighter.cpp b/src/vimod= e/emulatedcommandbar/matchhighlighter.cpp index a05b6c8..ad25779 100644 --- a/src/vimode/emulatedcommandbar/matchhighlighter.cpp +++ b/src/vimode/emulatedcommandbar/matchhighlighter.cpp @@ -7,7 +7,7 @@ using namespace KateVi; = MatchHighlighter::MatchHighlighter ( KTextEditor::ViewPrivate* view ) -: m_view(view) + : m_view(view) { updateMatchHighlightAttrib(); m_highlightedMatch =3D m_view->doc()->newMovingRange(KTextEditor::Rang= e::invalid(), Kate::TextRange::DoNotExpand); m_highlightedMatch->setView(m_view); // Show only in this view. diff --git a/src/vimode/emulatedcommandbar/matchhighlighter.h b/src/vimode/= emulatedcommandbar/matchhighlighter.h index e160ea8..0a6c170 100644 --- a/src/vimode/emulatedcommandbar/matchhighlighter.h +++ b/src/vimode/emulatedcommandbar/matchhighlighter.h @@ -24,7 +24,7 @@ public: private Q_SLOTS: void updateMatchHighlightAttrib(); private: - KTextEditor::ViewPrivate *m_view; + KTextEditor::ViewPrivate *m_view =3D nullptr; KTextEditor::Attribute::Ptr m_highlightMatchAttribute; KTextEditor::MovingRange *m_highlightedMatch; };