diff --git a/libraries/script-engine/src/ScriptEngines.cpp b/libraries/script-engine/src/ScriptEngines.cpp index a53ad32e46..668b9aa3a2 100644 --- a/libraries/script-engine/src/ScriptEngines.cpp +++ b/libraries/script-engine/src/ScriptEngines.cpp @@ -44,21 +44,9 @@ ScriptEngines::ScriptEngines() QUrl normalizeScriptURL(const QUrl& rawScriptURL) { if (rawScriptURL.scheme() == "file") { - qDebug() << "+"; - qDebug() << "+"; - qDebug() << "+"; - QUrl fullNormal = rawScriptURL; QUrl defaultScriptLoc = defaultScriptsLocation(); - // #ifdef Q_OS_LINUX - // #else - // // Force lowercase on file scripts because of drive letter weirdness. - // if (rawScriptURL.isLocalFile()) { - // fullNormal.setPath(fullNormal.path()); // .toLower()); - // } - // #endif - // if this url is something "beneath" the default script url, replace the local path with ~ if (fullNormal.scheme() == defaultScriptLoc.scheme() && fullNormal.host() == defaultScriptLoc.host() && @@ -76,35 +64,20 @@ QUrl normalizeScriptURL(const QUrl& rawScriptURL) { QUrl expandScriptUrl(const QUrl& rawScriptURL) { QUrl normalizedScriptURL = normalizeScriptURL(rawScriptURL); - - qDebug() << "expandScriptUrl in = " << rawScriptURL; - if (normalizedScriptURL.scheme() == "http" || normalizedScriptURL.scheme() == "https" || normalizedScriptURL.scheme() == "atp") { - - qDebug() << "expandScriptUrl out(net) = " << normalizedScriptURL; - return normalizedScriptURL; } else if (normalizedScriptURL.scheme() == "file") { if (normalizedScriptURL.path().startsWith("/~/")) { QUrl url = normalizedScriptURL; - qDebug() << "in expand, normalizedScriptURL = " << normalizedScriptURL; QStringList splitPath = url.path().split("/"); QUrl defaultScriptsLoc = defaultScriptsLocation(); url.setPath(defaultScriptsLoc.path() + "/" + splitPath.mid(2).join("/")); // 2 to skip the slashes in /~/ - - qDebug() << "expandScriptUrl out(file 0) = " << url; - return url; } - - qDebug() << "expandScriptUrl out(file 1) = " << normalizedScriptURL; - return normalizedScriptURL; } else { - qDebug() << "expandScriptUrl out(bad scheme) = " << normalizedScriptURL; - return QUrl(""); } } diff --git a/libraries/script-engine/src/ScriptsModel.cpp b/libraries/script-engine/src/ScriptsModel.cpp index b89da63cea..0ad2ad01a7 100644 --- a/libraries/script-engine/src/ScriptsModel.cpp +++ b/libraries/script-engine/src/ScriptsModel.cpp @@ -40,7 +40,7 @@ TreeNodeBase::TreeNodeBase(TreeNodeFolder* parent, const QString& name, TreeNode TreeNodeScript::TreeNodeScript(const QString& localPath, const QString& fullPath, ScriptOrigin origin) : TreeNodeBase(NULL, localPath.split("/").last(), TREE_NODE_TYPE_SCRIPT), _localPath(localPath), - _fullPath(fullPath), + _fullPath(expandScriptUrl(QUrl(fullPath)).toString()), _origin(origin) { }; @@ -163,10 +163,6 @@ void ScriptsModel::requestDefaultFiles(QString marker) { if (localDir.endsWith("/")) { localDirPartCount--; } - qDebug() << "|"; - qDebug() << "|"; - qDebug() << "|"; - qDebug() << localDir; #ifdef Q_OS_WIN localDirPartCount++; // one for the drive letter #endif