summaryrefslogtreecommitdiffstats
path: root/Source/QtDialog
diff options
context:
space:
mode:
authorVitaly Stakhovsky <vvs31415@gitlab.org>2020-03-17 16:00:00 (GMT)
committerVitaly Stakhovsky <vvs31415@gitlab.org>2020-03-17 16:09:20 (GMT)
commitbd891335432a5797a0415ebf35a6f22adba96684 (patch)
tree9d142b17e1750641d311d9f7fe2f11a4b7a52913 /Source/QtDialog
parentbee0100396d4b0dad7204125606e6baf26b79e38 (diff)
downloadCMake-bd891335432a5797a0415ebf35a6f22adba96684.zip
CMake-bd891335432a5797a0415ebf35a6f22adba96684.tar.gz
CMake-bd891335432a5797a0415ebf35a6f22adba96684.tar.bz2
cmState::GetCacheEntryValue: return cmProp
Diffstat (limited to 'Source/QtDialog')
-rw-r--r--Source/QtDialog/QCMake.cxx23
1 files changed, 11 insertions, 12 deletions
diff --git a/Source/QtDialog/QCMake.cxx b/Source/QtDialog/QCMake.cxx
index c3e9c84..eaf50f2 100644
--- a/Source/QtDialog/QCMake.cxx
+++ b/Source/QtDialog/QCMake.cxx
@@ -100,29 +100,28 @@ void QCMake::setBinaryDirectory(const QString& _dir)
QCMakePropertyList props = this->properties();
emit this->propertiesChanged(props);
- const char* homeDir = state->GetCacheEntryValue("CMAKE_HOME_DIRECTORY");
+ cmProp homeDir = state->GetCacheEntryValue("CMAKE_HOME_DIRECTORY");
if (homeDir) {
- setSourceDirectory(QString::fromLocal8Bit(homeDir));
+ setSourceDirectory(QString::fromLocal8Bit(homeDir->c_str()));
}
- const char* gen = state->GetCacheEntryValue("CMAKE_GENERATOR");
+ cmProp gen = state->GetCacheEntryValue("CMAKE_GENERATOR");
if (gen) {
const std::string* extraGen =
state->GetInitializedCacheValue("CMAKE_EXTRA_GENERATOR");
std::string curGen =
cmExternalMakefileProjectGenerator::CreateFullGeneratorName(
- gen, extraGen ? *extraGen : "");
+ *gen, extraGen ? *extraGen : "");
this->setGenerator(QString::fromLocal8Bit(curGen.c_str()));
}
- const char* platform =
- state->GetCacheEntryValue("CMAKE_GENERATOR_PLATFORM");
+ cmProp platform = state->GetCacheEntryValue("CMAKE_GENERATOR_PLATFORM");
if (platform) {
- this->setPlatform(QString::fromLocal8Bit(platform));
+ this->setPlatform(QString::fromLocal8Bit(platform->c_str()));
}
- const char* toolset = state->GetCacheEntryValue("CMAKE_GENERATOR_TOOLSET");
+ cmProp toolset = state->GetCacheEntryValue("CMAKE_GENERATOR_TOOLSET");
if (toolset) {
- this->setToolset(QString::fromLocal8Bit(toolset));
+ this->setToolset(QString::fromLocal8Bit(toolset->c_str()));
}
checkOpenPossible();
@@ -303,17 +302,17 @@ QCMakePropertyList QCMake::properties() const
continue;
}
- const char* cachedValue = state->GetCacheEntryValue(key);
+ cmProp cachedValue = state->GetCacheEntryValue(key);
QCMakeProperty prop;
prop.Key = QString::fromLocal8Bit(key.c_str());
prop.Help =
QString::fromLocal8Bit(state->GetCacheEntryProperty(key, "HELPSTRING"));
- prop.Value = QString::fromLocal8Bit(cachedValue);
+ prop.Value = QString::fromLocal8Bit(cachedValue->c_str());
prop.Advanced = state->GetCacheEntryPropertyAsBool(key, "ADVANCED");
if (t == cmStateEnums::BOOL) {
prop.Type = QCMakeProperty::BOOL;
- prop.Value = cmIsOn(cachedValue);
+ prop.Value = cmIsOn(*cachedValue);
} else if (t == cmStateEnums::PATH) {
prop.Type = QCMakeProperty::PATH;
} else if (t == cmStateEnums::FILEPATH) {