Correct grammar of missing Q_OBJECT macro warning.

Change-Id: Ifb84220285e38ce6940595035ca9fe012c350b79
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
This commit is contained in:
Mitch Curtis 2014-06-21 11:27:01 +02:00
parent 0f2ed80a0c
commit ffdba0459b
2 changed files with 7 additions and 1 deletions

View File

@ -788,7 +788,7 @@ void Moc::parse()
if (!def.hasQObject && !def.hasQGadget)
error("Class declarations lacks Q_OBJECT macro.");
error("Class declaration lacks Q_OBJECT macro.");
// Add meta tags to the plugin meta data:
if (!def.pluginData.iid.isEmpty())

View File

@ -1828,6 +1828,12 @@ void tst_Moc::warnings_data()
<< QString("IGNORE_ALL_STDOUT")
<< QString(":3: Warning: Macro argument mismatch.\n:4: Warning: Macro argument mismatch.");
QTest::newRow("Class declaration lacks Q_OBJECT macro.")
<< QByteArray("class X : public QObject \n { \n public slots: \n void foo() {} \n };")
<< QStringList()
<< 1
<< QString()
<< QString("standard input:5: Error: Class declaration lacks Q_OBJECT macro.");
}
void tst_Moc::warnings()