diff options
author | Brad King <brad.king@kitware.com> | 2020-03-27 11:49:23 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-03-27 11:49:30 (GMT) |
commit | 7e3d81b1df9e2c192585d83300344546439e50bd (patch) | |
tree | befbf08daebf622c4b2bf4f3ac91afdc8a4459d6 /Source/CursesDialog | |
parent | ae96b772fa8c957dfc4cbb334f45874bd4043966 (diff) | |
parent | a7f2ff16a48486ec0ef5a1a2d73e13cf4106a50e (diff) | |
download | CMake-7e3d81b1df9e2c192585d83300344546439e50bd.zip CMake-7e3d81b1df9e2c192585d83300344546439e50bd.tar.gz CMake-7e3d81b1df9e2c192585d83300344546439e50bd.tar.bz2 |
Merge topic 'cmprop-state'
a7f2ff16a4 cmState::GetCacheEntryProperty: return cmProp
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4522
Diffstat (limited to 'Source/CursesDialog')
-rw-r--r-- | Source/CursesDialog/cmCursesCacheEntryComposite.cxx | 4 | ||||
-rw-r--r-- | Source/CursesDialog/cmCursesMainForm.cxx | 9 |
2 files changed, 7 insertions, 6 deletions
diff --git a/Source/CursesDialog/cmCursesCacheEntryComposite.cxx b/Source/CursesDialog/cmCursesCacheEntryComposite.cxx index 9a0d966..9250fbc 100644 --- a/Source/CursesDialog/cmCursesCacheEntryComposite.cxx +++ b/Source/CursesDialog/cmCursesCacheEntryComposite.cxx @@ -71,11 +71,11 @@ cmCursesCacheEntryComposite::cmCursesCacheEntryComposite( break; } case cmStateEnums::STRING: { - const char* stringsProp = state->GetCacheEntryProperty(key, "STRINGS"); + cmProp stringsProp = state->GetCacheEntryProperty(key, "STRINGS"); if (stringsProp) { auto ow = cm::make_unique<cmCursesOptionsWidget>(this->EntryWidth, 1, 1, 1); - for (std::string const& opt : cmExpandedList(stringsProp)) { + for (std::string const& opt : cmExpandedList(*stringsProp)) { ow->AddOption(opt); } ow->SetOption(*value); diff --git a/Source/CursesDialog/cmCursesMainForm.cxx b/Source/CursesDialog/cmCursesMainForm.cxx index 9670595..7752a68 100644 --- a/Source/CursesDialog/cmCursesMainForm.cxx +++ b/Source/CursesDialog/cmCursesMainForm.cxx @@ -407,9 +407,10 @@ void cmCursesMainForm::UpdateStatusBar(cm::optional<std::string> message) auto cmakeState = this->CMakeInstance->GetState(); cmProp existingValue = cmakeState->GetCacheEntryValue(labelValue); if (existingValue) { - auto help = cmakeState->GetCacheEntryProperty(labelValue, "HELPSTRING"); + cmProp help = + cmakeState->GetCacheEntryProperty(labelValue, "HELPSTRING"); if (help) { - bar += help; + bar += *help; } } } @@ -802,7 +803,7 @@ void cmCursesMainForm::HandleInput() cmCursesWidget* lbl = reinterpret_cast<cmCursesWidget*>( field_userptr(this->Fields[findex - 2])); const char* curField = lbl->GetValue(); - const char* helpString = nullptr; + cmProp helpString = nullptr; cmProp existingValue = this->CMakeInstance->GetState()->GetCacheEntryValue(curField); @@ -813,7 +814,7 @@ void cmCursesMainForm::HandleInput() if (helpString) { this->HelpMessage[1] = cmStrCat("Current option is: ", curField, '\n', - "Help string for this option is: ", helpString, '\n'); + "Help string for this option is: ", *helpString, '\n'); } else { this->HelpMessage[1] = ""; } |