summaryrefslogtreecommitdiffstats
path: root/Source/QtDialog
diff options
context:
space:
mode:
authorVitaly Stakhovsky <vvs31415@gitlab.org>2020-03-25 18:00:00 (GMT)
committerVitaly Stakhovsky <vvs31415@gitlab.org>2020-03-25 18:46:52 (GMT)
commita7f2ff16a48486ec0ef5a1a2d73e13cf4106a50e (patch)
tree91964f0266720537aae09ce0f42b8daa2107dba2 /Source/QtDialog
parentea54f8d44199502d6d02369ea0a2de4e9ef8c1ca (diff)
downloadCMake-a7f2ff16a48486ec0ef5a1a2d73e13cf4106a50e.zip
CMake-a7f2ff16a48486ec0ef5a1a2d73e13cf4106a50e.tar.gz
CMake-a7f2ff16a48486ec0ef5a1a2d73e13cf4106a50e.tar.bz2
cmState::GetCacheEntryProperty: return cmProp
Diffstat (limited to 'Source/QtDialog')
-rw-r--r--Source/QtDialog/QCMake.cxx11
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(";");
}
}