aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cppeditor/cppdoxygen_test.cpp
diff options
context:
space:
mode:
authorNikolai Kosjar <nikolai.kosjar@theqtcompany.com>2014-12-10 12:54:38 +0100
committerErik Verbruggen <erik.verbruggen@theqtcompany.com>2014-12-19 10:24:38 +0100
commit613304edfc6e18ae382f4662ffef78706870499f (patch)
treeeb779531ad8feb335d2d768de89071a738b593bc /src/plugins/cppeditor/cppdoxygen_test.cpp
parentfb8e3b99632674062cd517947a157d5aa34489dc (diff)
CppEditor: Fix test_doxygen_comments_no_leading_asterisks
The settings from the test were not set. Change-Id: I0e241ee1a60e4c4804c9e3e6819cbf0ecaa80d3d Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Diffstat (limited to 'src/plugins/cppeditor/cppdoxygen_test.cpp')
-rw-r--r--src/plugins/cppeditor/cppdoxygen_test.cpp15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/plugins/cppeditor/cppdoxygen_test.cpp b/src/plugins/cppeditor/cppdoxygen_test.cpp
index 3cd9a13f3b..3d3b7e0d5a 100644
--- a/src/plugins/cppeditor/cppdoxygen_test.cpp
+++ b/src/plugins/cppeditor/cppdoxygen_test.cpp
@@ -69,7 +69,7 @@ class DoxygenTestCase : public Internal::Tests::TestCase
public:
/// The '|' in the input denotes the cursor position.
DoxygenTestCase(const QByteArray &original, const QByteArray &expected,
- CppTools::CommentsSettings *injectedSettings = 0)
+ CppTools::CommentsSettings *settings = 0)
{
QVERIFY(succeededSoFar());
@@ -86,10 +86,10 @@ public:
&testDocument.m_editorWidget));
closeEditorAtEndOfTestCase(testDocument.m_editor);
- if (injectedSettings) {
+ if (settings) {
auto *cts = CppTools::CppToolsSettings::instance();
oldSettings.reset(new CppTools::CommentsSettings(cts->commentsSettings()));
- injectSettings(injectedSettings);
+ cts->setCommentsSettings(*settings);
}
// We want to test documents that start with a comment. By default, the
@@ -118,14 +118,7 @@ public:
~DoxygenTestCase()
{
if (oldSettings)
- injectSettings(oldSettings.data());
- }
-
- static void injectSettings(CppTools::CommentsSettings *injection)
- {
- auto *cts = CppTools::CppToolsSettings::instance();
- QVERIFY(QMetaObject::invokeMethod(cts, "commentsSettingsChanged", Qt::DirectConnection,
- Q_ARG(CppTools::CommentsSettings, *injection)));
+ CppTools::CppToolsSettings::instance()->setCommentsSettings(*oldSettings);
}
};