From 18a51f0732a3276fbe314433a090efafeb6e22d4 Mon Sep 17 00:00:00 2001 From: Charles Yin Date: Wed, 25 Jan 2012 13:48:46 +1000 Subject: Add dummy test column for data driven test in qmltest Normally, data driven test with QTest requires add columns before adding new data rows, otherwise QTest might results into warning or error. However, qmltest does the data driven test in its own way so no columns info needed. So add a dummy column here to make QTest happy. Task-number:QTBUG-23845 Change-Id: I1bfed663fa7b58d71e0cf898db6bd8ae61dae46b Reviewed-by: Rohan McGovern Reviewed-by: Robin Burchell --- src/qmltest/quicktestresult.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/qmltest/quicktestresult.cpp') diff --git a/src/qmltest/quicktestresult.cpp b/src/qmltest/quicktestresult.cpp index a1fd7ba464..102aa787f9 100644 --- a/src/qmltest/quicktestresult.cpp +++ b/src/qmltest/quicktestresult.cpp @@ -343,6 +343,9 @@ void QuickTestResult::initTestTable() Q_D(QuickTestResult); delete d->table; d->table = new QTestTable; + //qmltest does not really need the column for data driven test + //add this to avoid warnings. + d->table->addColumn(qMetaTypeId(), "qmltest_dummy_data_column"); } void QuickTestResult::clearTestTable() -- cgit v1.2.3