Expect tst_QSettings::ctor(native) failures on Mac OS X
The default constructor for QSettings does not set NoAccess status, even if the organization domain, organization name, and application name are empty. Instead of trying to fix QSettings, keep the existing behavior, and test for it. Failures from tst_QSettings no longer need to be ignored, so mac:CONFIG+=insignificant_test has been removed from the .pro file. Task-number: QTBUG-22745 Change-Id: Ic9f8b6821c483c217e1ef2ece704be2da169e340 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
This commit is contained in:
parent
4cf0deef73
commit
2c3b2b4703
@ -6,5 +6,4 @@ RESOURCES += qsettings.qrc
|
||||
|
||||
win32-msvc*:LIBS += advapi32.lib
|
||||
|
||||
mac: CONFIG += insignificant_test # QTBUG-22745
|
||||
win32: CONFIG += insignificant_test # QTBUG-24145
|
||||
|
@ -580,6 +580,9 @@ void tst_QSettings::ctor()
|
||||
QCoreApplication::instance()->setOrganizationName("");
|
||||
QCoreApplication::instance()->setApplicationName("");
|
||||
QSettings settings;
|
||||
#ifdef Q_OS_MAC
|
||||
QEXPECT_FAIL("native", "Default settings on Mac are valid, despite organization domain, name, and app name being null", Continue);
|
||||
#endif
|
||||
QCOMPARE(settings.status(), QSettings::AccessError);
|
||||
QCoreApplication::instance()->setOrganizationName("software.org");
|
||||
QCoreApplication::instance()->setApplicationName("KillerAPP");
|
||||
@ -592,6 +595,9 @@ void tst_QSettings::ctor()
|
||||
}
|
||||
|
||||
QSettings settings(format, QSettings::UserScope, "", "");
|
||||
#ifdef Q_OS_MAC
|
||||
QEXPECT_FAIL("native", "Default settings on Mac are valid, despite organization domain, name, and app name being null", Continue);
|
||||
#endif
|
||||
QCOMPARE(settings.status(), QSettings::AccessError);
|
||||
QSettings settings2(format, QSettings::UserScope, "software.org", "KillerAPP");
|
||||
QCOMPARE(settings2.status(), QSettings::NoError);
|
||||
|
Loading…
Reference in New Issue
Block a user