[SOLVED] Maximum amount of warnings exceeded. Use -maxwarnings to override

Issue

I’m running a big unit test based on QTest and during the test process, it’s stopping with error:

QSYSTEM: ClassXyzTest::xyzTest() Maximum amount of warnings exceeded. Use -maxwarnings to override.

I’ve got some debugs in the code to have more information about operation progress etc., but I don’t see warnings during compilation.

I tried set in Project -> Command line arguments argument -maxwarnings 0 without success. 0 value should be unlimited – More details

Solution

If you are using QTest::qExec function to run your test, make sure that you are passing arguments from your test app’s main function to the QTest::qExec.

int main(argc, char **argv)
{
    MyTestObject test1;
    QTest::qExec(&test1, argc, argv);
}

Answered By – ololuki

Answer Checked By – Jay B. (BugsFixing Admin)

Leave a Reply

Your email address will not be published. Required fields are marked *