diff options
author | Martin Duffy <martin.duffy@kitware.com> | 2023-03-22 17:11:21 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-03-29 14:41:19 (GMT) |
commit | 19305afd8a2a46925b1a880de68f7be0ad1f3091 (patch) | |
tree | cdef4417cd852c2a5dd85886df4ff61d7fd2e653 /Source/QtDialog/QCMake.cxx | |
parent | 6b08358e17f5b85ad04ab512e4b6e39e989cea35 (diff) | |
download | CMake-19305afd8a2a46925b1a880de68f7be0ad1f3091.zip CMake-19305afd8a2a46925b1a880de68f7be0ad1f3091.tar.gz CMake-19305afd8a2a46925b1a880de68f7be0ad1f3091.tar.bz2 |
presets: Improve JSON parser and error messages
Diffstat (limited to 'Source/QtDialog/QCMake.cxx')
-rw-r--r-- | Source/QtDialog/QCMake.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/QtDialog/QCMake.cxx b/Source/QtDialog/QCMake.cxx index ea02f98..6ed24ca 100644 --- a/Source/QtDialog/QCMake.cxx +++ b/Source/QtDialog/QCMake.cxx @@ -33,7 +33,6 @@ QCMake::QCMake(QObject* p) qRegisterMetaType<QCMakePropertyList>(); qRegisterMetaType<QProcessEnvironment>(); qRegisterMetaType<QVector<QCMakePreset>>(); - qRegisterMetaType<cmCMakePresetsGraph::ReadFileResult>(); cmSystemTools::DisableRunCommandOutput(); cmSystemTools::SetRunCommandHideConsole(true); @@ -530,9 +529,11 @@ void QCMake::loadPresets() { auto result = this->CMakePresetsGraph.ReadProjectPresets( this->SourceDirectory.toStdString(), true); - if (result != this->LastLoadPresetsResult && - result != cmCMakePresetsGraph::ReadFileResult::READ_OK) { - emit this->presetLoadError(this->SourceDirectory, result); + if (result != this->LastLoadPresetsResult && !result) { + emit this->presetLoadError( + this->SourceDirectory, + QString::fromStdString( + this->CMakePresetsGraph.parseState.GetErrorMessage(false))); } this->LastLoadPresetsResult = result; |