fix a problem with Qt slots immediately followed by signals
This commit is contained in:
parent
2670525b4f
commit
cce4303f28
|
@ -10357,6 +10357,7 @@ void Tokenizer::simplifyQtSignalsSlots()
|
|||
tok2->str(tok2->str() + ":");
|
||||
tok2->deleteNext();
|
||||
tok2->deleteNext();
|
||||
tok2 = tok2->previous();
|
||||
}
|
||||
else if (Token::Match(tok2->next(), "signals|Q_SIGNALS :"))
|
||||
{
|
||||
|
|
|
@ -5646,6 +5646,24 @@ private:
|
|||
"}";
|
||||
|
||||
ASSERT_EQUALS(result2, tokenizeAndStringify(code2,false));
|
||||
|
||||
const char code3[] = "class MyObject : public QObject {"
|
||||
" MyObject() {}"
|
||||
" ~MyObject() {}"
|
||||
" public slots:"
|
||||
" signals:"
|
||||
" void test() {}"
|
||||
"};";
|
||||
const char result3 [] = "class MyObject : public QObject { "
|
||||
"MyObject ( ) { } "
|
||||
"~ MyObject ( ) { } "
|
||||
"public: "
|
||||
"protected: "
|
||||
"void test ( ) { } "
|
||||
"} ;";
|
||||
|
||||
ASSERT_EQUALS(result3, tokenizeAndStringify(code3,false));
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
}
|
||||
|
||||
void sql()
|
||||
|
|
Loading…
Reference in New Issue