Commit 9beb8ea5 authored by Nikolai Kosjar's avatar Nikolai Kosjar
Browse files

CppEditor: Make test_FollowSymbolUnderCursor_QObject_connect more realistic providing the necessary definitions.

Currently this does not has any effect since function-like macros are
not expanded for the semantic document. This might change, therefore we
adapt this test.

Change-Id: I7de4fdecac7b7504da7389ab216b7349ea53d7be
Reviewed-by: default avatarErik Verbruggen <>
parent ea55d627
......@@ -1051,6 +1051,20 @@ void CppEditorPlugin::test_FollowSymbolUnderCursor_QObject_connect()
QFETCH(char, target);
QFETCH(bool, secondQObjectParam);
QByteArray source =
"#define QT_STRINGIFY2(x) #x\n"
"#define QT_STRINGIFY(x) QT_STRINGIFY2(x)\n"
"#define QLOCATION \"\\0\" __FILE__ \":\" QT_STRINGIFY(__LINE__)\n"
"const char *qFlagLocation(const char *) { return 0; }\n"
"#define SLOT(a) qFlagLocation(\"1\"#a QLOCATION)\n"
"#define SIGNAL(a) qFlagLocation(\"2\"#a QLOCATION)\n"
"#define slots\n"
"#define signals public\n"
"class QObject {};\n"
"void connect(QObject *, const char *, QObject *, const char *) {}\n"
"class Foo : public QObject\n"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment