removed extraneous debug prints

This commit is contained in:
elisa-lj11 2016-08-19 11:32:13 -07:00
parent 4c434e875e
commit 8bc9a92429
5 changed files with 3 additions and 15 deletions

View file

@ -328,7 +328,6 @@ ScrollingWindow {
id: timer id: timer
} }
function uploadClicked(fileUrl) { function uploadClicked(fileUrl) {
console.log("Upload clicked url: " + fileUrl);
if (uploadOpen) { if (uploadOpen) {
return; return;
} }

View file

@ -49,7 +49,6 @@ Rectangle {
element.click();' element.click();'
onNewViewRequested: { onNewViewRequested: {
console.log("new view requested url");
var component = Qt.createComponent("Browser.qml"); var component = Qt.createComponent("Browser.qml");
var newWindow = component.createObject(desktop); var newWindow = component.createObject(desktop);
request.openIn(newWindow.webView); request.openIn(newWindow.webView);
@ -68,7 +67,6 @@ Rectangle {
onLinkHovered: { onLinkHovered: {
desktop.currentUrl = hoveredUrl desktop.currentUrl = hoveredUrl
console.log("my url in WebView: " + desktop.currentUrl)
if (File.isZippedFbx(desktop.currentUrl)) { if (File.isZippedFbx(desktop.currentUrl)) {
runJavaScript(simpleDownload, function(){console.log("ran the JS");}); runJavaScript(simpleDownload, function(){console.log("ran the JS");});
} }

View file

@ -51,7 +51,6 @@ WebEngineView {
onLoadingChanged: { onLoadingChanged: {
// Required to support clicking on "hifi://" links // Required to support clicking on "hifi://" links
console.log("loading change requested url");
if (WebEngineView.LoadStartedStatus == loadRequest.status) { if (WebEngineView.LoadStartedStatus == loadRequest.status) {
var url = loadRequest.url.toString(); var url = loadRequest.url.toString();
if (urlHandler.canHandleUrl(url)) { if (urlHandler.canHandleUrl(url)) {

View file

@ -80,7 +80,7 @@ OriginalDesktop.Desktop {
property string tempDir: "" property string tempDir: ""
function initWebviewProfileHandlers(profile) { function initWebviewProfileHandlers(profile) {
console.log("the webview url in desktop is: " + currentUrl); console.log("The webview url in desktop is: " + currentUrl);
if (webViewProfileSetup) return; if (webViewProfileSetup) return;
webViewProfileSetup = true; webViewProfileSetup = true;
@ -90,9 +90,8 @@ OriginalDesktop.Desktop {
tempDir = File.getTempDir(); tempDir = File.getTempDir();
console.log("Temp dir created: " + tempDir); console.log("Temp dir created: " + tempDir);
download.path = tempDir + "/" + adaptedPath; download.path = tempDir + "/" + adaptedPath;
console.log("Path where it should download: " + download.path); console.log("Path where object should download: " + download.path);
download.accept(); download.accept();
console.log("Download accept: " + download.state);
if (download.state === WebEngineDownloadItem.DownloadInterrupted) { if (download.state === WebEngineDownloadItem.DownloadInterrupted) {
console.log("download failed to complete"); console.log("download failed to complete");
} }
@ -100,8 +99,6 @@ OriginalDesktop.Desktop {
profile.downloadFinished.connect(function(download){ profile.downloadFinished.connect(function(download){
if (download.state === WebEngineDownloadItem.DownloadCompleted) { if (download.state === WebEngineDownloadItem.DownloadCompleted) {
console.log("Download Finished: " + download.state);
console.log("File object is: " + File);
File.runUnzip(download.path, currentUrl); File.runUnzip(download.path, currentUrl);
} else { } else {
console.log("The download was corrupted, state: " + download.state); console.log("The download was corrupted, state: " + download.state);

View file

@ -35,7 +35,6 @@ void FileScriptingInterface::runUnzip(QString path, QUrl url) {
qDebug() << "Url that was downloaded: " + url.toString(); qDebug() << "Url that was downloaded: " + url.toString();
qDebug() << "Path where download is saved: " + path; qDebug() << "Path where download is saved: " + path;
QString fileName = "/" + path.section("/", -1); QString fileName = "/" + path.section("/", -1);
qDebug() << "Filename to remove from temp path: " + fileName;
QString tempDir = path; QString tempDir = path;
tempDir.remove(fileName); tempDir.remove(fileName);
qDebug() << "Temporary directory at: " + tempDir; qDebug() << "Temporary directory at: " + tempDir;
@ -46,9 +45,8 @@ void FileScriptingInterface::runUnzip(QString path, QUrl url) {
QString file = unzipFile(path, tempDir); QString file = unzipFile(path, tempDir);
if (file != "") { if (file != "") {
qDebug() << "file to upload: " + file; qDebug() << "Object file to upload: " + file;
QUrl url = QUrl::fromLocalFile(file); QUrl url = QUrl::fromLocalFile(file);
qDebug() << "url from local file: " + url.toString();
emit unzipSuccess(url.toString()); emit unzipSuccess(url.toString());
} else { } else {
qDebug() << "unzip failed"; qDebug() << "unzip failed";
@ -73,7 +71,6 @@ bool FileScriptingInterface::isTempDir(QString tempDir) {
bool FileScriptingInterface::isZippedFbx(QUrl url) { bool FileScriptingInterface::isZippedFbx(QUrl url) {
if (url.toString().contains(".zip") && url.toString().contains("fbx")) return true; if (url.toString().contains(".zip") && url.toString().contains("fbx")) return true;
qDebug() << "This model is not a .fbx packaged in a .zip. Please try with another model.";
return false; return false;
} }
@ -108,9 +105,7 @@ QString FileScriptingInterface::unzipFile(QString path, QString tempDir) {
QDir dir(path); QDir dir(path);
QString dirName = dir.path(); QString dirName = dir.path();
qDebug() << "Zip directory is stored at: " + dirName;
QString target = tempDir + "/model_repo"; QString target = tempDir + "/model_repo";
qDebug() << "Target path: " + target;
QStringList list = JlCompress::extractDir(dirName, target); QStringList list = JlCompress::extractDir(dirName, target);
qDebug() << list; qDebug() << list;