]> git.lyx.org Git - features.git/commitdiff
Add constness in several places.
authorRichard Heck <rgheck@comcast.net>
Fri, 2 Dec 2011 22:41:33 +0000 (22:41 +0000)
committerRichard Heck <rgheck@comcast.net>
Fri, 2 Dec 2011 22:41:33 +0000 (22:41 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40338 a592a061-630c-0410-9148-cb99ea01b6c8

src/BufferView.cpp
src/BufferView.h
src/frontends/qt4/GuiCompleter.cpp
src/frontends/qt4/GuiCompleter.h

index 5b604c0e7bb93a87932fe44614009ccf4058ee2b..139b99796c2486b11a657423adae727a76e24758 100644 (file)
@@ -3027,7 +3027,7 @@ bool samePar(DocIterator const & a, DocIterator const & b)
 }
 
 
-void BufferView::setInlineCompletion(Cursor & cur, DocIterator const & pos, 
+void BufferView::setInlineCompletion(Cursor const & cur, DocIterator const & pos, 
        docstring const & completion, size_t uniqueChars)
 {
        uniqueChars = min(completion.size(), uniqueChars);
index fa85195b52afb71e707516441a2c2da33d4452ce..f24af0d21ed5cdf0b465173377f572d5592822cc 100644 (file)
@@ -194,7 +194,7 @@ public:
        void resetInlineCompletionPos();
        /// set the inline completion postfix and its position in the buffer.
        /// Updates the updateFlags in \c cur.
-       void setInlineCompletion(Cursor & cur, DocIterator const & pos,
+       void setInlineCompletion(Cursor const & cur, DocIterator const & pos,
                docstring const & completion, size_t uniqueChars = 0);
 
        /// translate and insert a character, using the correct keymap.
index 4e9f9eaa5da123f0401e3ca7c410a0c384090d8f..06ed395221ddec7e2e2f611b57cb9a902e88a05a 100644 (file)
@@ -341,7 +341,7 @@ void GuiCompleter::updateVisibility(bool start, bool keep)
 }
 
 
-void GuiCompleter::updatePrefix(Cursor & cur)
+void GuiCompleter::updatePrefix(Cursor const & cur)
 {
        // get new prefix. Do nothing if unchanged
        QString newPrefix = toqstr(cur.inset().completionPrefix(cur));
@@ -380,7 +380,7 @@ void GuiCompleter::updatePrefix(Cursor & cur)
 }
 
 
-void GuiCompleter::updateInline(Cursor & cur, QString const & completion)
+void GuiCompleter::updateInline(Cursor const & cur, QString const & completion)
 {
        if (!cur.inset().inlineCompletionSupported(cur))
                return;
@@ -401,7 +401,7 @@ void GuiCompleter::updateInline(Cursor & cur, QString const & completion)
 }
 
 
-void GuiCompleter::updatePopup(Cursor & cur)
+void GuiCompleter::updatePopup(Cursor const & cur)
 {
        if (!cur.inset().completionSupported(cur))
                return;
@@ -459,7 +459,7 @@ void GuiCompleter::updateAvailability()
        // visible yet, i.e. especially if automatic completion is disabled.
        if (inlineVisible() || popupVisible())
                return;
-       Cursor & cur = gui_->bufferView().cursor();
+       Cursor const & cur = gui_->bufferView().cursor();
        if (!popupPossible(cur) && !inlinePossible(cur))
                return;
        
@@ -467,7 +467,7 @@ void GuiCompleter::updateAvailability()
 }
        
 
-void GuiCompleter::updateModel(Cursor & cur, bool popupUpdate, bool inlineUpdate)
+void GuiCompleter::updateModel(Cursor const & cur, bool popupUpdate, bool inlineUpdate)
 {
        // value which should be kept selected
        QString old = currentCompletion();
@@ -521,7 +521,7 @@ void GuiCompleter::updateModel(Cursor & cur, bool popupUpdate, bool inlineUpdate
 }
 
 
-void GuiCompleter::showPopup(Cursor & cur)
+void GuiCompleter::showPopup(Cursor const & cur)
 {
        if (!popupPossible(cur))
                return;
@@ -558,7 +558,7 @@ void GuiCompleter::asyncHidePopup()
 }
 
 
-void GuiCompleter::showInline(Cursor & cur)
+void GuiCompleter::showInline(Cursor const & cur)
 {
        if (!inlinePossible(cur))
                return;
@@ -567,7 +567,7 @@ void GuiCompleter::showInline(Cursor & cur)
 }
 
 
-void GuiCompleter::hideInline(Cursor & cur)
+void GuiCompleter::hideInline(Cursor const & cur)
 {
        gui_->bufferView().setInlineCompletion(cur, DocIterator(cur.buffer()), docstring());
        inlineVisible_ = false;
index 5900f7c08c4996538803aaa9977ece688af5e686..5e96ac3c68a21bb0e2b374b148e0b8d2194c9760 100644 (file)
@@ -101,21 +101,21 @@ private:
        ///
        void setCurrentCompletion(QString const & s);
        ///
-       void showPopup(Cursor & cur);
+       void showPopup(Cursor const & cur);
        ///
-       void showInline(Cursor & cur);
+       void showInline(Cursor const & cur);
        ///
        void hidePopup(Cursor & cur);
        ///
-       void hideInline(Cursor & cur);
+       void hideInline(Cursor const & cur);
        ///
-       void updatePopup(Cursor & cur);
+       void updatePopup(Cursor const & cur);
        ///
-       void updateInline(Cursor & cur, QString const & completion);
+       void updateInline(Cursor const & cur, QString const & completion);
        ///
-       void updatePrefix(Cursor & cur);
+       void updatePrefix(Cursor const & cur);
        ///
-       void updateModel(Cursor & cur, bool popupUpdate, bool inlineUpdate);
+       void updateModel(Cursor const & cur, bool popupUpdate, bool inlineUpdate);
        ///
        bool eventFilter(QObject * watched, QEvent * event);