TextEditor: Use new setup pattern for the finders

The FindInFiles definition cannot go yet to the .cpp yet as there
are some exported functions.

Change-Id: I2d2f02ae80b560e3147f461fcbee0fa62b8085a3
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
hjk
2024-01-26 15:43:08 +01:00
parent 66b50438d8
commit 524167a936
7 changed files with 81 additions and 75 deletions

View File

@@ -67,10 +67,6 @@ const char kCurrentDocumentWordUnderCursor[] = "CurrentDocument:WordUnderCursor"
class TextEditorPluginPrivate : public QObject
{
public:
FindInFiles findInFilesFilter;
FindInCurrentFile findInCurrentFileFilter;
FindInOpenFiles findInOpenFilesFilter;
MarkdownEditorFactory markdownEditorFactory;
JsonEditorFactory jsonEditorFactory;
};
@@ -122,6 +118,10 @@ void TextEditorPlugin::initialize()
setupBookmarkView();
setupBookmarkFilter();
setupFindInFiles(this);
setupFindInCurrentFile();
setupFindInOpenFiles();
d = new TextEditorPluginPrivate;
Context context(TextEditor::Constants::C_TEXTEDITOR);