gui: update copyright message in about dialog

This commit is contained in:
Daniel Marjamäki 2018-01-14 15:46:20 +01:00
parent 3704aa98d0
commit af26f00e04
3 changed files with 22 additions and 21 deletions

View File

@ -78,7 +78,7 @@
<item> <item>
<widget class="QLabel" name="mCopyright"> <widget class="QLabel" name="mCopyright">
<property name="text"> <property name="text">
<string>Copyright © 2007-2017 Cppcheck team.</string> <string>Copyright © 2007-2018 Cppcheck team.</string>
</property> </property>
<property name="wordWrap"> <property name="wordWrap">
<bool>true</bool> <bool>true</bool>

View File

@ -1942,26 +1942,27 @@ void Tokenizer::simplifyRoundCurlyParentheses()
void Tokenizer::simplifySQL() void Tokenizer::simplifySQL()
{ {
for (Token *tok = list.front(); tok; tok = tok->next()) { for (Token *tok = list.front(); tok; tok = tok->next()) {
if (Token::simpleMatch(tok, "__CPPCHECK_EMBEDDED_SQL_EXEC__ SQL")) { if (!Token::simpleMatch(tok, "__CPPCHECK_EMBEDDED_SQL_EXEC__ SQL"))
const Token *end = findSQLBlockEnd(tok); continue;
if (end == nullptr)
syntaxError(nullptr);
const std::string instruction = tok->stringifyList(end); const Token *end = findSQLBlockEnd(tok);
// delete all tokens until the embedded SQL block end if (end == nullptr)
Token::eraseTokens(tok, end); syntaxError(nullptr);
// insert "asm ( "instruction" ) ;" const std::string instruction = tok->stringifyList(end);
tok->str("asm"); // delete all tokens until the embedded SQL block end
// it can happen that 'end' is NULL when wrong code is inserted Token::eraseTokens(tok, end);
if (!tok->next())
tok->insertToken(";"); // insert "asm ( "instruction" ) ;"
tok->insertToken(")"); tok->str("asm");
tok->insertToken("\"" + instruction + "\""); // it can happen that 'end' is NULL when wrong code is inserted
tok->insertToken("("); if (!tok->next())
// jump to ';' and continue tok->insertToken(";");
tok = tok->tokAt(3); tok->insertToken(")");
} tok->insertToken("\"" + instruction + "\"");
tok->insertToken("(");
// jump to ';' and continue
tok = tok->tokAt(3);
} }
} }
@ -10058,7 +10059,7 @@ void Tokenizer::SimplifyNamelessRValueReferences()
} }
} }
const Token *Tokenizer::findSQLBlockEnd(const Token *tokSQLStart) const const Token *Tokenizer::findSQLBlockEnd(const Token *tokSQLStart)
{ {
const Token *tokLastEnd = nullptr; const Token *tokLastEnd = nullptr;
for (const Token *tok = tokSQLStart->tokAt(2); tok != nullptr; tok = tok->next()) { for (const Token *tok = tokSQLStart->tokAt(2); tok != nullptr; tok = tok->next()) {

View File

@ -719,7 +719,7 @@ private:
void printUnknownTypes() const; void printUnknownTypes() const;
/** Find end of SQL (or PL/SQL) block */ /** Find end of SQL (or PL/SQL) block */
const Token *findSQLBlockEnd(const Token *tokSQLStart) const; static const Token *findSQLBlockEnd(const Token *tokSQLStart);
public: public: