mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 03:17:06 +02:00
Correct usage of the test script URL.
This commit is contained in:
parent
1f691edf0d
commit
aef5ea0936
1 changed files with 6 additions and 1 deletions
|
@ -1022,7 +1022,12 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
|
||||||
for (int i = 0; i < args.size() - 1; ++i) {
|
for (int i = 0; i < args.size() - 1; ++i) {
|
||||||
if (args.at(i) == TEST_SCRIPT && (i + 1) < args.size()) {
|
if (args.at(i) == TEST_SCRIPT && (i + 1) < args.size()) {
|
||||||
QString testScriptPath = args.at(i + 1);
|
QString testScriptPath = args.at(i + 1);
|
||||||
if (QFileInfo(testScriptPath).exists()) {
|
|
||||||
|
// If the URL scheme is "http(s)" then use as is, else - treat it as a local file
|
||||||
|
// This is done so as not break previous command line scripts
|
||||||
|
if (testScriptPath.left(4) == "http") {
|
||||||
|
setProperty(hifi::properties::TEST, QUrl::fromUserInput(testScriptPath));
|
||||||
|
} else if (QFileInfo(testScriptPath).exists()) {
|
||||||
setProperty(hifi::properties::TEST, QUrl::fromLocalFile(testScriptPath));
|
setProperty(hifi::properties::TEST, QUrl::fromLocalFile(testScriptPath));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue