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/QtDialog | |
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/QtDialog')
-rw-r--r-- | Source/QtDialog/QCMake.cxx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Source/QtDialog/QCMake.cxx b/Source/QtDialog/QCMake.cxx index 2543215..776af81 100644 --- a/Source/QtDialog/QCMake.cxx +++ b/Source/QtDialog/QCMake.cxx @@ -306,8 +306,9 @@ QCMakePropertyList QCMake::properties() const QCMakeProperty prop; prop.Key = QString::fromLocal8Bit(key.c_str()); - prop.Help = - QString::fromLocal8Bit(state->GetCacheEntryProperty(key, "HELPSTRING")); + if (cmProp hs = state->GetCacheEntryProperty(key, "HELPSTRING")) { + prop.Help = QString::fromLocal8Bit(hs->c_str()); + } prop.Value = QString::fromLocal8Bit(cachedValue->c_str()); prop.Advanced = state->GetCacheEntryPropertyAsBool(key, "ADVANCED"); if (t == cmStateEnums::BOOL) { @@ -319,10 +320,10 @@ QCMakePropertyList QCMake::properties() const prop.Type = QCMakeProperty::FILEPATH; } else if (t == cmStateEnums::STRING) { prop.Type = QCMakeProperty::STRING; - const char* stringsProperty = - state->GetCacheEntryProperty(key, "STRINGS"); + cmProp stringsProperty = state->GetCacheEntryProperty(key, "STRINGS"); if (stringsProperty) { - prop.Strings = QString::fromLocal8Bit(stringsProperty).split(";"); + prop.Strings = + QString::fromLocal8Bit(stringsProperty->c_str()).split(";"); } } |