tst_qnetworkinterface: Fix for case of zero interface

Change-Id: I3e43acf2e96635c39fcb366c8d161a9287af01b1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
bb10
Tuomas Heimonen 2018-06-29 12:11:54 +03:00
parent 6caaa050ab
commit 8c680ab469
1 changed files with 2 additions and 0 deletions

View File

@ -283,6 +283,8 @@ void tst_QNetworkInterface::interfaceFromXXX_data()
QTest::addColumn<QNetworkInterface>("iface");
QList<QNetworkInterface> allInterfaces = QNetworkInterface::allInterfaces();
if (allInterfaces.count() == 0)
QSKIP("No interfaces to test!");
foreach (QNetworkInterface iface, allInterfaces)
QTest::newRow(iface.name().toLocal8Bit()) << iface;
}