-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix bug when cloning a story with windows #643
Changes from all commits
bb90b54
a8a1afd
2be851c
f5ace69
73ffc0b
fcbf16b
1b845aa
ca4d511
9c7b27b
e5679e7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -108,7 +108,7 @@ bool MeasureManager::waitForStarted(int msec) { | |
int current = 0; | ||
while (!success && current < numTries) { | ||
QNetworkRequest request(thisUrl); | ||
request.setHeader(QNetworkRequest::ContentTypeHeader, "json"); | ||
request.setHeader(QNetworkRequest::ContentTypeHeader, "application/json"); | ||
|
||
QNetworkAccessManager manager; | ||
|
||
|
@@ -463,7 +463,7 @@ std::vector<measure::OSArgument> MeasureManager::getArguments(const BCLMeasure& | |
QString data = QString(R"json({"measure_dir": "%1", "osm_path": "%2"})json").arg(toQString(t_measure.directory()), toQString(m_tempModelPath)); | ||
|
||
QNetworkRequest request(thisUrl); | ||
request.setHeader(QNetworkRequest::ContentTypeHeader, "json"); | ||
request.setHeader(QNetworkRequest::ContentTypeHeader, "application/json"); | ||
|
||
QNetworkAccessManager manager; | ||
|
||
|
@@ -579,6 +579,10 @@ boost::optional<measure::OSArgument> MeasureManager::getArgument(const measure:: | |
Json::Value choiceValues = argument.get("choice_values", Json::Value(Json::arrayValue)); | ||
Json::Value choiceDisplayNames = argument.get("choice_display_names", Json::Value(Json::arrayValue)); | ||
|
||
if (choiceValues.empty()) { | ||
choiceValues = argument.get("choices_values", Json::Value(Json::arrayValue)); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a bug in the OS repo, there is a typo of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I fixed it already in NREL/OpenStudio#5046 but it wasn't selected for 3.7.0 official... I specifically asked for it to be included but it was too last minute |
||
} | ||
|
||
Json::ArrayIndex n = choiceValues.size(); | ||
if (n != choiceDisplayNames.size()) { | ||
choiceDisplayNames = choiceValues; | ||
|
@@ -836,7 +840,7 @@ bool MeasureManager::reset() { | |
QString data = QString("{}"); | ||
|
||
QNetworkRequest request(thisUrl); | ||
request.setHeader(QNetworkRequest::ContentTypeHeader, "json"); | ||
request.setHeader(QNetworkRequest::ContentTypeHeader, "application/json"); | ||
|
||
QNetworkAccessManager manager; | ||
|
||
|
@@ -876,7 +880,7 @@ bool MeasureManager::checkForLocalBCLUpdates() { | |
QString data = QString("{}"); | ||
|
||
QNetworkRequest request(thisUrl); | ||
request.setHeader(QNetworkRequest::ContentTypeHeader, "json"); | ||
request.setHeader(QNetworkRequest::ContentTypeHeader, "application/json"); | ||
|
||
QNetworkAccessManager manager; | ||
|
||
|
@@ -917,7 +921,7 @@ bool MeasureManager::checkForUpdates(const openstudio::path& measureDir, bool fo | |
QString(R"json({"measure_dir": "%1", "force_reload": "%2"})json").arg(toQString(measureDir), force ? QString("true") : QString("false")); | ||
|
||
QNetworkRequest request(thisUrl); | ||
request.setHeader(QNetworkRequest::ContentTypeHeader, "json"); | ||
request.setHeader(QNetworkRequest::ContentTypeHeader, "application/json"); | ||
|
||
QNetworkAccessManager manager; | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jmarrec what do you think about this? For some reason when I run the app from the installer it can't find the measure manager. Is there some reason the new measure manager is only listening to localhost and not 127.0.0.1? I always thought the two were the same for IPv4.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're on windows I assume (edit: I see MINGW64, so yes)? I kinda just gave up trying to make both localhost and 127.0.0.0 work on windows... It's a limitation of the cpprestsdk afaik. https://github.com/NREL/OpenStudio/blob/05c60768c1e1057083ce644d49711f7377f8ce1e/src/cli/MeasureManager.cpp#L563-L569