Fix build on Visual C++ 2010.

Visual C++ 2010 throws an internal compiler error trying to compile
kconfigtest, since 5f4dc2973f. I couldn't figure out a non-intrusive
code tweak that would work around the ICE, so I had to skip compiling
this particular initialization code on this particular compiler version,
and skip running the test that relies on it (testEnums).

The dummy=42 entry is so that the config group isn't empty,
which makes testGroupCopyTo and testReparent still run and pass,
so we don't need to skip them.

REVIEW:118852
wilder
Nicolás Alvarez 12 years ago
parent d213cf146e
commit 55c055470a
  1. 11
      autotests/kconfigtest.cpp

@ -166,10 +166,15 @@ void KConfigTest::initTestCase()
cg.writePathEntry("homepathescape", HOMEPATHESCAPE);
cg = KConfigGroup(&sc, "Enum Types");
#if _MSC_VER == 1600
cg.writeEntry("dummy", 42);
#else
//Visual C++ 2010 throws an Internal Compiler Error here
cg.writeEntry("enum-10", Tens);
cg.writeEntry("enum-100", Hundreds);
cg.writeEntry("flags-bit0", Flags(bit0));
cg.writeEntry("flags-bit0-bit1", Flags(bit0 | bit1));
#endif
cg = KConfigGroup(&sc, "ParentGroup");
KConfigGroup cg1(&cg, "SubGroup1");
@ -560,6 +565,12 @@ void KConfigTest::testComplex()
void KConfigTest::testEnums()
{
//Visual C++ 2010 (compiler version 16.0) throws an Internal Compiler Error
//when compiling the code in initTestCase that creates these KConfig entries,
//so we can't run this test
#if _MSC_VER == 1600
QSKIP("Visual C++ 2010 can't compile this test");
#endif
KConfig sc(TEST_SUBDIR "kconfigtest");
KConfigGroup sc3(&sc, "Enum Types");

Loading…
Cancel
Save