diff --git a/src/plugins/clangrefactoring/clangqueryexampletexteditorwidget.cpp b/src/plugins/clangrefactoring/clangqueryexampletexteditorwidget.cpp index 19273d5edeaf0e4940b37b5f63332667ba428821..79ff5576b926235d1ffdb6ca4d69203ac21f8dbc 100644 --- a/src/plugins/clangrefactoring/clangqueryexampletexteditorwidget.cpp +++ b/src/plugins/clangrefactoring/clangqueryexampletexteditorwidget.cpp @@ -36,6 +36,7 @@ ClangQueryExampleTextEditorWidget::ClangQueryExampleTextEditorWidget(QWidget *pa { m_syntaxHighlighter = new ClangQueryExampleHighlighter; textDocument()->setSyntaxHighlighter(m_syntaxHighlighter); + textDocument()->setPlainText("class Foo {\n void function() { int local; }\n int field;\n};"); } ClangQueryExampleHighlighter *ClangQueryExampleTextEditorWidget::syntaxHighlighter() const diff --git a/src/plugins/clangrefactoring/clangqueryprojectsfindfilter.ui b/src/plugins/clangrefactoring/clangqueryprojectsfindfilter.ui index 9fbad01f0bfcfa0d5279e3f1d75827aec67053a8..819fae485db705e7cf5b1c0fdf1214cd63215e02 100644 --- a/src/plugins/clangrefactoring/clangqueryprojectsfindfilter.ui +++ b/src/plugins/clangrefactoring/clangqueryprojectsfindfilter.ui @@ -6,14 +6,29 @@ 0 0 - 1241 - 471 + 512 + 390 + + + 1 + 1 + + + + + 512 + 0 + + Form + + QLayout::SetMinimumSize + 0 @@ -30,20 +45,32 @@ - 0 + 1 3 + + class Foo { void function() { int x; } }; + - 0 + 1 1 + + + 700 + 0 + + + + functionDecl() + diff --git a/src/plugins/clangrefactoring/clangquerytexteditorwidget.cpp b/src/plugins/clangrefactoring/clangquerytexteditorwidget.cpp index 2d0552680c9b81d135c1718bb268d33bdb793b3a..e24d6eab5e43d825f09086d0c08fe693152f16c2 100644 --- a/src/plugins/clangrefactoring/clangquerytexteditorwidget.cpp +++ b/src/plugins/clangrefactoring/clangquerytexteditorwidget.cpp @@ -38,6 +38,7 @@ ClangQueryTextEditorWidget::ClangQueryTextEditorWidget(QWidget *parent) m_hoverHandler(std::make_unique(m_syntaxHighlighter)) { textDocument()->setSyntaxHighlighter(m_syntaxHighlighter); + textDocument()->setPlainText("functionDecl()"); addHoverHandler(m_hoverHandler.get()); }