From 55c055470aa4f8e153688c7720811c6413d71346 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Alvarez?= Date: Sat, 21 Jun 2014 01:36:04 -0300 Subject: 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 --- autotests/kconfigtest.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/autotests/kconfigtest.cpp b/autotests/kconfigtest.cpp index a8482b70..b621ac55 100644 --- a/autotests/kconfigtest.cpp +++ b/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"); -- cgit v1.2.1