Fix default CMake generator setting.
ClosedPublic

Authored by arrowd on Dec 20 2015, 1:50 PM.

Details

Summary

Make it an int option that denote an index of selected generator in static generators list.

Diff Detail

Repository
R32 KDevelop
Branch
5.0
Lint
No Linters Available
Unit
No Unit Test Coverage
arrowd updated this revision to Diff 1559.Dec 20 2015, 1:50 PM
arrowd retitled this revision from to Fix default CMake generator setting..
arrowd updated this object.
arrowd edited the test plan for this revision. (Show Details)
Restricted Application added a subscriber: kdevelop-devel. · View Herald TranscriptDec 20 2015, 1:50 PM
arrowd added a project: KDevelop.
kfunk added a subscriber: kfunk.Dec 20 2015, 2:25 PM

Looks good to me in general.

Please add BUG: 356875 to commit message.

projectbuilders/cmakebuilder/cmakebuilderpreferences.cpp
46–47
46–47

Style: const QString&, same in other locations

55

I think you can remove the default, apply, reset overrides here now completely(?)

kfunk added inline comments.Dec 20 2015, 2:27 PM
projectbuilders/cmakebuilder/cmakebuilder.h
63

Style: Return QStringList by value (default style with implicitly shared types, such as QList)

kfunk added a comment.Dec 20 2015, 2:29 PM

Another find, sorry.

projectbuilders/cmakebuilder/cmakebuilder.cpp
84

Hm. And move that to supportedGenerators function. Remove the static generatorNames variable.

Hint: You'd add *new* items each time the CMakeBuilder ctor runs (plugin might be unloaded + loaded again).

arrowd updated this revision to Diff 1560.Dec 20 2015, 2:47 PM

Don't fill generatorNames multiple times.
Remove overrides in CMakeBuilderPreferences.
Style fixes.

arrowd updated this revision to Diff 1561.Dec 20 2015, 3:04 PM

Get rid of static QStringList.
Use foreach instead of Q_FOREACH.

kfunk accepted this revision.Dec 20 2015, 3:12 PM
kfunk added a reviewer: kfunk.

Rest LGTM

projectbuilders/cmakebuilder/cmakebuilder.cpp
269

Remove const

This revision is now accepted and ready to land.Dec 20 2015, 3:12 PM
arrowd updated this revision to Diff 1562.Dec 20 2015, 3:19 PM
arrowd edited edge metadata.

Remove const.

This revision was automatically updated to reflect the committed changes.