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
76};76};
77 77
78static std::string getFileContent(std::string fileName, std::string defaultContent = std::string()) {78static 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));
80 if (customFile.open(QIODevice::ReadOnly)) {80 if (customFile.open(QIODevice::ReadOnly)) {
81 return customFile.readAll().toStdString();81 return customFile.readAll().toStdString();
82 }82 }
83 qWarning() << "DebugDeferredBuffer::getFileContent(): Could not open"83 qWarning() << "DebugDeferredBuffer::getFileContent(): Could not open"
84 << QUrl(QString::fromStdString(fileName)).toLocalFile();84 << QString::fromStdString(fileName);
85 return defaultContent;85 return defaultContent;
86}86}
87 87
@@ -89,9 +89,9 @@ static std::string getFileContent(std::string fileName, std::string defaultConte · 1 unmodified line
89DebugDeferredBuffer::DebugDeferredBuffer() {89DebugDeferredBuffer::DebugDeferredBuffer() {
90 // TODO REMOVE: Temporary until UI90 // TODO REMOVE: Temporary until UI
91 static const auto DESKTOP_PATH = QStandardPaths::writableLocation(QStandardPaths::DesktopLocation);91 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";
93 CustomPipeline pipeline;93 CustomPipeline pipeline;
94 pipeline.info = QFileInfo(DESKTOP_PATH + "/custom.slh");94 pipeline.info = QFileInfo(QString::fromStdString(CUSTOM_FILE));
95 _customPipelines.emplace(CUSTOM_FILE, pipeline);95 _customPipelines.emplace(CUSTOM_FILE, pipeline);
96}96}
97 97

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