Skip to content

Commit 5e20f70

Browse files
committed
Fix #758 - Properly encode path to QUrl when trying to display results
My two cents: NEVER USE special characters for files or directory names. Nor space. Limit all file names to numbers ([0-9]) letters ([a-zA-Z]), and "-", "_" and "." You'll live a a much happier life generally.
1 parent 2722e3e commit 5e20f70

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/openstudio_lib/ResultsTabView.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,6 @@ void ResultsView::populateComboBox(const std::vector<openstudio::path>& reports)
301301
QString fullPathString = toQString(report);
302302

303303
QFile file(fullPathString);
304-
fullPathString.prepend("file:///");
305304

306305
if (openstudio::toString(report.filename()) == "eplustbl.html" || openstudio::toString(report.filename()) == "eplustbl.htm") {
307306

@@ -360,7 +359,7 @@ void ResultsView::comboBoxChanged(int index) {
360359

361360
m_progressBar->setError(false);
362361

363-
QUrl url(filename);
362+
QUrl url = QUrl::fromLocalFile(filename);
364363
m_view->load(url);
365364
}
366365

0 commit comments

Comments
 (0)