Skip to content
Snippets Groups Projects
Commit 8056fefd authored by Burak Hançerli's avatar Burak Hançerli :headphones:
Browse files

QDS-11104 Move warning messages to console logs

parent b39b2836
No related branches found
Tags 0.8.39
1 merge request!8QDS-11104 Move warning messages to console logs
Pipeline #63851 passed
......@@ -369,15 +369,15 @@ void DesignViewer::printLog(const QString &message)
void DesignViewer::printWarn(const QString &message)
{
QString escaped = message;
escaped.replace("'", "\'");
escaped.replace("\n", "\\n");
emscripten_run_script("alert('" + escaped.toUtf8() + "');");
fprintf(stderr, "WARNING:%s\n", qPrintable(message));
}
void DesignViewer::printError(const QString &message, const QString &fileName, int line)
{
printWarn(message);
QString escaped = message;
escaped.replace("'", "\'");
escaped.replace("\n", "\\n");
emscripten_run_script("alert('" + escaped.toUtf8() + "');");
emscripten_run_script("location.hash = ''; location.reload();");
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment