diff options
Diffstat (limited to 'Source/QtDialog')
-rw-r--r-- | Source/QtDialog/CMakeSetup.cxx | 6 | ||||
-rw-r--r-- | Source/QtDialog/QCMake.cxx | 11 |
2 files changed, 8 insertions, 9 deletions
diff --git a/Source/QtDialog/CMakeSetup.cxx b/Source/QtDialog/CMakeSetup.cxx index ee81a7d..9d928b2 100644 --- a/Source/QtDialog/CMakeSetup.cxx +++ b/Source/QtDialog/CMakeSetup.cxx @@ -201,8 +201,7 @@ int main(int argc, char** argv) cmSystemTools::CollapseFullPath(args[1].toLocal8Bit().data()); // check if argument is a directory containing CMakeCache.txt - std::string buildFilePath = - cmSystemTools::CollapseFullPath("CMakeCache.txt", filePath.c_str()); + std::string buildFilePath = cmStrCat(filePath, "/CMakeCache.txt"); // check if argument is a CMakeCache.txt file if (cmSystemTools::GetFilenameName(filePath) == "CMakeCache.txt" && @@ -211,8 +210,7 @@ int main(int argc, char** argv) } // check if argument is a directory containing CMakeLists.txt - std::string srcFilePath = - cmSystemTools::CollapseFullPath("CMakeLists.txt", filePath.c_str()); + std::string srcFilePath = cmStrCat(filePath, "/CMakeLists.txt"); if (cmSystemTools::FileExists(buildFilePath.c_str())) { dialog.setBinaryDirectory(QString::fromLocal8Bit( 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(";"); } } |