}
-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);
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.
}
-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));
}
-void GuiCompleter::updateInline(Cursor & cur, QString const & completion)
+void GuiCompleter::updateInline(Cursor const & cur, QString const & completion)
{
if (!cur.inset().inlineCompletionSupported(cur))
return;
}
-void GuiCompleter::updatePopup(Cursor & cur)
+void GuiCompleter::updatePopup(Cursor const & cur)
{
if (!cur.inset().completionSupported(cur))
return;
// 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;
}
-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();
}
-void GuiCompleter::showPopup(Cursor & cur)
+void GuiCompleter::showPopup(Cursor const & cur)
{
if (!popupPossible(cur))
return;
}
-void GuiCompleter::showInline(Cursor & cur)
+void GuiCompleter::showInline(Cursor const & cur)
{
if (!inlinePossible(cur))
return;
}
-void GuiCompleter::hideInline(Cursor & cur)
+void GuiCompleter::hideInline(Cursor const & cur)
{
gui_->bufferView().setInlineCompletion(cur, DocIterator(cur.buffer()), docstring());
inlineVisible_ = false;
///
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);