mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-03 08:28:25 +00:00
Add constness in several places.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40338 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
8b6d6eecfd
commit
8c69aca339
@ -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);
|
||||
|
@ -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.
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user