Bug 436712 - kconfig_compiler generates invalid code
Summary: kconfig_compiler generates invalid code
Status: REPORTED
Alias: None
Product: frameworks-kconfig
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Matthew Dawson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-06 22:47 UTC by Nicolas Fella
Modified: 2022-06-12 18:32 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Fella 2021-05-06 22:47:11 UTC
Consider this .kcfg file:

<?xml version="1.0" encoding="UTF-8"?>
<kcfg xmlns="http://www.kde.org/standards/kcfg/1.0"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0
      http://www.kde.org/standards/kcfg/1.0/kcfg.xsd" >
  <kcfgfile name="foo" />
  <group name="General">
    <entry name="Bar" type="Enum">
      <choices>
          <choice name="Bla" value="bla" />
       </choices>
     </entry>
  </group>
</kcfg>

and this .kcfgc:

File=foo.kcfg
ClassName=FooSettings
Mutators=true
GenerateProperties=true

The build fails with

foosettings.cpp:23:12: error: no member named 'setValueForChoice' in 'KConfigCompilerSignallingItem'
  itemBar->setValueForChoice(QStringLiteral( "Bla" ), QStringLiteral( "bla" ));