forked from qt-creator/qt-creator
TextEditorFactory use rvalue refs for creators
Change-Id: Ia54e86af1fff2da270d744526cc4a17021e48b20 Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com> Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
@@ -7341,29 +7341,29 @@ TextEditorFactory::~TextEditorFactory()
|
|||||||
delete d;
|
delete d;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TextEditorFactory::setDocumentCreator(const DocumentCreator &creator)
|
void TextEditorFactory::setDocumentCreator(DocumentCreator &&creator)
|
||||||
{
|
{
|
||||||
d->m_documentCreator = creator;
|
d->m_documentCreator = std::move(creator);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TextEditorFactory::setEditorWidgetCreator(const EditorWidgetCreator &creator)
|
void TextEditorFactory::setEditorWidgetCreator(EditorWidgetCreator &&creator)
|
||||||
{
|
{
|
||||||
d->m_widgetCreator = creator;
|
d->m_widgetCreator = std::move(creator);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TextEditorFactory::setEditorCreator(const EditorCreator &creator)
|
void TextEditorFactory::setEditorCreator(EditorCreator &&creator)
|
||||||
{
|
{
|
||||||
d->m_editorCreator = creator;
|
d->m_editorCreator = std::move(creator);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TextEditorFactory::setIndenterCreator(const IndenterCreator &creator)
|
void TextEditorFactory::setIndenterCreator(IndenterCreator &&creator)
|
||||||
{
|
{
|
||||||
d->m_indenterCreator = creator;
|
d->m_indenterCreator = std::move(creator);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TextEditorFactory::setSyntaxHighlighterCreator(const SyntaxHighLighterCreator &creator)
|
void TextEditorFactory::setSyntaxHighlighterCreator(SyntaxHighLighterCreator &&creator)
|
||||||
{
|
{
|
||||||
d->m_syntaxHighlighterCreator = creator;
|
d->m_syntaxHighlighterCreator = std::move(creator);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TextEditorFactory::setUseGenericHighlighter(bool enabled)
|
void TextEditorFactory::setUseGenericHighlighter(bool enabled)
|
||||||
@@ -7371,9 +7371,9 @@ void TextEditorFactory::setUseGenericHighlighter(bool enabled)
|
|||||||
d->m_useGenericHighlighter = enabled;
|
d->m_useGenericHighlighter = enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TextEditorFactory::setAutoCompleterCreator(const AutoCompleterCreator &creator)
|
void TextEditorFactory::setAutoCompleterCreator(AutoCompleterCreator &&creator)
|
||||||
{
|
{
|
||||||
d->m_autoCompleterCreator = creator;
|
d->m_autoCompleterCreator = std::move(creator);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TextEditorFactory::setEditorActionHandlers(Id contextId, uint optionalActions)
|
void TextEditorFactory::setEditorActionHandlers(Id contextId, uint optionalActions)
|
||||||
|
|||||||
@@ -652,13 +652,13 @@ public:
|
|||||||
typedef std::function<Indenter *()> IndenterCreator;
|
typedef std::function<Indenter *()> IndenterCreator;
|
||||||
typedef std::function<AutoCompleter *()> AutoCompleterCreator;
|
typedef std::function<AutoCompleter *()> AutoCompleterCreator;
|
||||||
|
|
||||||
void setDocumentCreator(const DocumentCreator &creator);
|
void setDocumentCreator(DocumentCreator &&creator);
|
||||||
void setEditorWidgetCreator(const EditorWidgetCreator &creator);
|
void setEditorWidgetCreator(EditorWidgetCreator &&creator);
|
||||||
void setEditorCreator(const EditorCreator &creator);
|
void setEditorCreator(EditorCreator &&creator);
|
||||||
void setIndenterCreator(const IndenterCreator &creator);
|
void setIndenterCreator(IndenterCreator &&creator);
|
||||||
void setSyntaxHighlighterCreator(const SyntaxHighLighterCreator &creator);
|
void setSyntaxHighlighterCreator(SyntaxHighLighterCreator &&creator);
|
||||||
void setUseGenericHighlighter(bool enabled);
|
void setUseGenericHighlighter(bool enabled);
|
||||||
void setAutoCompleterCreator(const AutoCompleterCreator &creator);
|
void setAutoCompleterCreator(AutoCompleterCreator &&creator);
|
||||||
|
|
||||||
void setEditorActionHandlers(Core::Id contextId, uint optionalActions);
|
void setEditorActionHandlers(Core::Id contextId, uint optionalActions);
|
||||||
void setEditorActionHandlers(uint optionalActions);
|
void setEditorActionHandlers(uint optionalActions);
|
||||||
|
|||||||
Reference in New Issue
Block a user