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:
Nikita Baryshnikov
2015-03-20 15:33:42 +03:00
parent 9790d8aa00
commit 2be30c27ac
2 changed files with 18 additions and 18 deletions

View File

@@ -7341,29 +7341,29 @@ TextEditorFactory::~TextEditorFactory()
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)
@@ -7371,9 +7371,9 @@ void TextEditorFactory::setUseGenericHighlighter(bool 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)