ervin added inline comments.

INLINE COMMENTS

> KConfigHeaderGenerator.cpp:252
>  
> -    // HACK: Use C-Style for add a comma in all but the last element,
> -    // just to make the source generated code equal to the old one.
> -    // When we are sure, revert this to a range-based-for and just add
> -    // a last comma, as it's valid c++.
> -    for (int i = 0, end = parseResult.signalList.size(); i < end; i++) {
> -        auto signal = parseResult.signalList.at(i);
> -        stream() << whitespace() << "  " << signalEnumName(signal.name) << " 
> = 0x" << hex << val;
> -        if (i != end-1) {
> -            stream() << ",\n";
> -        }
> -
> +    for (const auto signal : parseResult.signalList) {
> +        stream() << whitespace() << "  " << signalEnumName(signal.name) << " 
> = 0x" << hex << val << ",\n";

I lost track of constness here so I might be wrong, shouldn't this use qAsConst 
in this context?

REPOSITORY
  R237 KConfig

BRANCH
  remove_enum_hack

REVISION DETAIL
  https://phabricator.kde.org/D26876

To: tcanabrava, ervin, dfaure, apol
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns

Reply via email to