History

Fix file shader file lookup on windows

Atlante45 committed 10 years ago

Commit 78b805a1 parent c0a675d1 file · +4 −4Browse files

Showing the changes to libraries/render-utils/src/DebugDeferredBuffer.cpp (1 of 1 file). Show all

Unified · Split

libraries/render-utils/src/DebugDeferredBuffer.cpp+4−4
@@ -76,12 +76,12 @@ static const std::string DEEFAULT_CUSTOM_SHADER { · 75 unmodified lines
7676 };
7777
7878 static std::string getFileContent(std::string fileName, std::string defaultContent = std::string()) {
79− QFile customFile(QUrl(QString::fromStdString(fileName)).toLocalFile());
79+ QFile customFile(QString::fromStdString(fileName));
8080 if (customFile.open(QIODevice::ReadOnly)) {
8181 return customFile.readAll().toStdString();
8282 }
8383 qWarning() << "DebugDeferredBuffer::getFileContent(): Could not open"
84− << QUrl(QString::fromStdString(fileName)).toLocalFile();
84+ << QString::fromStdString(fileName);
8585 return defaultContent;
8686 }
8787
@@ -89,9 +89,9 @@ static std::string getFileContent(std::string fileName, std::string defaultConte · 1 unmodified line
8989 DebugDeferredBuffer::DebugDeferredBuffer() {
9090 // TODO REMOVE: Temporary until UI
9191 static const auto DESKTOP_PATH = QStandardPaths::writableLocation(QStandardPaths::DesktopLocation);
92− static const auto CUSTOM_FILE = "file://" + DESKTOP_PATH.toStdString() + "/custom.slh";
92+ static const auto CUSTOM_FILE = DESKTOP_PATH.toStdString() + "/custom.slh";
9393 CustomPipeline pipeline;
94− pipeline.info = QFileInfo(DESKTOP_PATH + "/custom.slh");
94+ pipeline.info = QFileInfo(QString::fromStdString(CUSTOM_FILE));
9595 _customPipelines.emplace(CUSTOM_FILE, pipeline);
9696 }
9797

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t