summaryrefslogtreecommitdiff
path: root/src/tools/cplusplus-update-frontend/cplusplus-update-frontend.cpp
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@digia.com>2013-03-11 12:02:08 +0100
committerChristian Kandeler <christian.kandeler@digia.com>2013-03-11 14:47:14 +0100
commit5977b6db20b3003fa4d4390453b7c19760db2670 (patch)
treefee9f797880bd0a42b36939c9046dfceca25d37c /src/tools/cplusplus-update-frontend/cplusplus-update-frontend.cpp
parent9f7a1e3d65a62616da4da82920e347fe0c332a87 (diff)
downloadqt-creator-5977b6db20b3003fa4d4390453b7c19760db2670.tar.gz
ProjectExplorer: Make fromMap() public in BuildConfiguration.
And also in DeployConfiguration. Rationale: Consider this typical use case of a deploy configuration factory that can create several deploy configurations for a specific target. ProjectExplorer::DeployConfiguration *MyFactory::restore(map) { ProjectExplorer::DeployConfiguration *dc = 0; id = idFromMap(map) if (id == myDcId_1()) dc = new MyDcId_1; else if (id == myDcId_2()) dc = new MyDcId_2; ... else if (id == myDcId_n()) dc = new MyDcId_n; if (dc) dc->fromMap(map); return dc; } This does currently not compile, forcing us to introduce n variables and calling fromMap() n times. In addition, we either have to make the factory a friend of all the deploy configurations or add a public fromMap() function into all of them, even if they don't add any functionality, or introduce some other type of silly boiler-plate code. All of this becomes unnecessary when fromMap() is public in the parent class. Note also that fromMap() is public in the inheritance root (ProjectConfiguration) as well as in RunConfiguration. Change-Id: I4c6431bba2500e2434c487c316e30ddb259fa2b5 Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Diffstat (limited to 'src/tools/cplusplus-update-frontend/cplusplus-update-frontend.cpp')
0 files changed, 0 insertions, 0 deletions