[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [ktexteditor] src/vimode/emulatedcommandbar: Minor tweaks.
From:       Simon St James <kdedevel () etotheipiplusone ! com>
Date:       2016-06-17 8:18:10
Message-ID: E1bDoyg-0002ZN-NR () scm ! kde ! org
[Download RAW message or body]

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/emulatedcommandbar/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* \
matchHighlighter)  : m_emulatedCommandBar(emulatedCommandBar),
-    m_matchHighligher(matchHighlighter)
+      m_matchHighligher(matchHighlighter)
     {
     }
     virtual ~ActiveMode() = 0;
@@ -46,9 +46,9 @@ protected:
     void close(bool wasAborted);
     void closeWithStatusMessage(const QString& exitStatusMessage);
     void startCompletion(const CompletionStartParams& completionStartParams);
-    EmulatedCommandBar *m_emulatedCommandBar;
+    EmulatedCommandBar *m_emulatedCommandBar = nullptr;
 private:
-    MatchHighlighter *m_matchHighligher;
+    MatchHighlighter *m_matchHighligher = nullptr;
 };
 }
 #endif
diff --git a/src/vimode/emulatedcommandbar/emulatedcommandbar.h \
b/src/vimode/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 = false;
     Mode m_mode = NoMode;
-    KTextEditor::ViewPrivate *m_view;
-    QLineEdit *m_edit;
-    QLabel *m_barTypeIndicator;
+    KTextEditor::ViewPrivate *m_view = nullptr;
+    QLineEdit *m_edit = nullptr;
+    QLabel *m_barTypeIndicator = nullptr;
     void showBarTypeIndicator(Mode mode);
     bool m_wasAborted = true;
     bool m_suspendEditEventFiltering = false;
@@ -87,16 +87,18 @@ private:
 
     friend class ActiveMode;
     QScopedPointer<MatchHighlighter> m_matchHighligher;
+
     QScopedPointer<Completer> m_completer;
+
     QScopedPointer<InteractiveSedReplaceMode> m_interactiveSedReplaceMode;
     QScopedPointer<SearchMode> m_searchMode;
     QScopedPointer<CommandMode> m_commandMode;
 
-    void moveCursorTo(const KTextEditor::Cursor &cursorPos);
-
     void switchToMode(ActiveMode *newMode);
     ActiveMode *m_currentMode = 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/vimode/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 = \
m_view->doc()->newMovingRange(KTextEditor::Range::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 = nullptr;
     KTextEditor::Attribute::Ptr m_highlightMatchAttribute;
     KTextEditor::MovingRange *m_highlightedMatch;
 };


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic