mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-07 06:14:04 +02:00
Remove URL logging from JS and QML
This commit is contained in:
parent
05becb870f
commit
e80468e423
64 changed files with 73 additions and 165 deletions
|
@ -114,7 +114,6 @@ ScrollingWindow {
|
|||
sourceSize: Qt.size(width, height);
|
||||
verticalAlignment: Image.AlignVCenter;
|
||||
horizontalAlignment: Image.AlignHCenter
|
||||
onSourceChanged: console.log("Icon url: " + source)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -249,10 +248,6 @@ ScrollingWindow {
|
|||
root.loadingChanged(loadRequest.status);
|
||||
}
|
||||
|
||||
onIconChanged: {
|
||||
console.log("New icon: " + icon)
|
||||
}
|
||||
|
||||
onWindowCloseRequested: {
|
||||
root.destroy();
|
||||
}
|
||||
|
|
|
@ -80,8 +80,6 @@ ModalWindow {
|
|||
property int clickedButton: OriginalDialogs.StandardButton.NoButton;
|
||||
|
||||
Component.onCompleted: {
|
||||
console.log("Helper " + helper + " drives " + drives);
|
||||
|
||||
fileDialogItem.keyboardEnabled = HMD.active;
|
||||
|
||||
// HACK: The following lines force the model to initialize properly such that the go-up button
|
||||
|
@ -809,7 +807,6 @@ ModalWindow {
|
|||
}
|
||||
}
|
||||
|
||||
console.log("Selecting " + selection)
|
||||
selectedFile(selection);
|
||||
root.destroy();
|
||||
}
|
||||
|
|
|
@ -765,8 +765,7 @@ TabletModalWindow {
|
|||
return;
|
||||
}
|
||||
}
|
||||
|
||||
console.log("Selecting " + selection)
|
||||
|
||||
selectedFile(selection);
|
||||
root.destroy();
|
||||
}
|
||||
|
|
|
@ -22,8 +22,6 @@ Preference {
|
|||
|
||||
Component.onCompleted: {
|
||||
dataTextField.text = preference.value;
|
||||
console.log("MyAvatar modelName " + MyAvatar.getFullAvatarModelName())
|
||||
console.log("Application : " + ApplicationInterface)
|
||||
ApplicationInterface.fullAvatarURLChanged.connect(processNewAvatar);
|
||||
}
|
||||
|
||||
|
|
|
@ -70,7 +70,6 @@ Preference {
|
|||
dir: fileDialogHelper.pathToUrl(preference.value)
|
||||
});
|
||||
browser.selectedFile.connect(function(fileUrl){
|
||||
console.log(fileUrl);
|
||||
dataTextField.text = fileDialogHelper.urlToPath(fileUrl);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -81,16 +81,14 @@ Windows.ScrollingWindow {
|
|||
}
|
||||
|
||||
function doDeleteFile(paths) {
|
||||
console.log("Deleting " + paths);
|
||||
|
||||
Assets.deleteMappings(paths, function(err) {
|
||||
if (err) {
|
||||
console.log("Asset browser - error deleting paths: ", paths, err);
|
||||
console.log("Asset browser - error deleting paths: ", err);
|
||||
|
||||
box = errorMessageBox("There was an error deleting:\n" + paths + "\n" + err);
|
||||
box = errorMessageBox("There was an error deleting:\n" + err);
|
||||
box.selected.connect(reload);
|
||||
} else {
|
||||
console.log("Asset browser - finished deleting paths: ", paths);
|
||||
console.log("Asset browser - finished deleting paths");
|
||||
reload();
|
||||
}
|
||||
});
|
||||
|
@ -117,11 +115,11 @@ Windows.ScrollingWindow {
|
|||
|
||||
Assets.renameMapping(oldPath, newPath, function(err) {
|
||||
if (err) {
|
||||
console.log("Asset browser - error renaming: ", oldPath, "=>", newPath, " - error ", err);
|
||||
console.log("Asset browser - error renaming:", err);
|
||||
box = errorMessageBox("There was an error renaming:\n" + oldPath + " to " + newPath + "\n" + err);
|
||||
box.selected.connect(reload);
|
||||
} else {
|
||||
console.log("Asset browser - finished rename: ", oldPath, "=>", newPath);
|
||||
console.log("Asset browser - finished rename");
|
||||
}
|
||||
|
||||
reload();
|
||||
|
@ -280,7 +278,7 @@ Windows.ScrollingWindow {
|
|||
gravity = Vec3.multiply(Vec3.fromPolar(Math.PI / 2, 0), 0);
|
||||
}
|
||||
|
||||
print("Asset browser - adding asset " + url + " (" + name + ") to world.");
|
||||
print("Asset browser - adding asset " + name + " to world.");
|
||||
|
||||
// Entities.addEntity doesn't work from QML, so we use this.
|
||||
Entities.addModelEntity(name, url, "", shapeType, dynamic, collisionless, grabbable, addPosition, gravity);
|
||||
|
@ -426,7 +424,7 @@ Windows.ScrollingWindow {
|
|||
uploadProgressLabel.text = "In progress...";
|
||||
},
|
||||
function(err, path) {
|
||||
print(err, path);
|
||||
print(err);
|
||||
if (err === "") {
|
||||
uploadProgressLabel.text = "Upload Complete";
|
||||
timer.interval = 1000;
|
||||
|
@ -437,7 +435,7 @@ Windows.ScrollingWindow {
|
|||
uploadOpen = false;
|
||||
});
|
||||
timer.start();
|
||||
console.log("Asset Browser - finished uploading: ", fileUrl);
|
||||
console.log("Asset Browser - finished uploading");
|
||||
reload();
|
||||
} else {
|
||||
uploadSpinner.visible = false;
|
||||
|
@ -445,7 +443,7 @@ Windows.ScrollingWindow {
|
|||
uploadOpen = false;
|
||||
|
||||
if (err !== -1) {
|
||||
console.log("Asset Browser - error uploading: ", fileUrl, " - error ", err);
|
||||
console.log("Asset Browser - error uploading:", err);
|
||||
var box = errorMessageBox("There was an error uploading:\n" + fileUrl + "\n" + err);
|
||||
box.selected.connect(reload);
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ Rectangle {
|
|||
}
|
||||
}
|
||||
catch(err) {
|
||||
console.error(err);
|
||||
//console.error(err);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -133,7 +133,7 @@ Item {
|
|||
}
|
||||
onStatusChanged: {
|
||||
if (status == Image.Error) {
|
||||
console.log("source: " + source + ": failed to load " + hifiUrl);
|
||||
console.log("source: " + source + ": failed to load");
|
||||
source = defaultThumbnail;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -103,19 +103,14 @@ OriginalDesktop.Desktop {
|
|||
property bool autoAdd: false
|
||||
|
||||
function initWebviewProfileHandlers(profile) {
|
||||
console.log("The webview url in desktop is: " + currentUrl);
|
||||
downloadUrl = currentUrl;
|
||||
if (webViewProfileSetup) return;
|
||||
webViewProfileSetup = true;
|
||||
|
||||
profile.downloadRequested.connect(function(download){
|
||||
console.log("Download start: " + download.state);
|
||||
adaptedPath = File.convertUrlToPath(downloadUrl);
|
||||
tempDir = File.getTempDir();
|
||||
console.log("Temp dir created: " + tempDir);
|
||||
download.path = tempDir + "/" + adaptedPath;
|
||||
console.log("Path where object should download: " + download.path);
|
||||
console.log("Auto add: " + autoAdd);
|
||||
download.accept();
|
||||
if (download.state === WebEngineDownloadItem.DownloadInterrupted) {
|
||||
console.log("download failed to complete");
|
||||
|
|
|
@ -1287,7 +1287,7 @@ Rectangle {
|
|||
connectionsOnlineDot.visible = message.shouldShowDot;
|
||||
break;
|
||||
default:
|
||||
console.log('Unrecognized message:', JSON.stringify(message));
|
||||
console.log('Pal.qml: Unrecognized message');
|
||||
}
|
||||
}
|
||||
function sortModel() {
|
||||
|
|
|
@ -20,7 +20,7 @@ Item {
|
|||
// Public function for initiating an http request.
|
||||
// REQUIRES parent to be root to have sendToScript!
|
||||
function request(options, callback) {
|
||||
console.debug('HttpRequest', JSON.stringify(options));
|
||||
console.debug('HttpRequest');
|
||||
httpCalls[httpCounter] = callback;
|
||||
var message = {method: 'http.request', params: options, id: httpCounter++, jsonrpc: "2.0"};
|
||||
parent.sendToScript(message);
|
||||
|
@ -33,7 +33,7 @@ Item {
|
|||
return;
|
||||
}
|
||||
delete httpCalls[message.id];
|
||||
console.debug('HttpRequest response', JSON.stringify(message));
|
||||
console.debug('HttpRequest response');
|
||||
callback(message.error, message.response);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -362,7 +362,7 @@ Rectangle {
|
|||
spectatorCameraPreview.visible = message.setting;
|
||||
break;
|
||||
default:
|
||||
console.log('Unrecognized message from spectatorCamera.js:', JSON.stringify(message));
|
||||
console.log('Unrecognized message from spectatorCamera.js');
|
||||
}
|
||||
}
|
||||
signal sendToScript(var message);
|
||||
|
|
|
@ -246,7 +246,6 @@ Rectangle {
|
|||
anchors.right: parent.right
|
||||
onLinkActivated: {
|
||||
popup.showSpecifyWearableUrl(function(url) {
|
||||
console.debug('popup.showSpecifyWearableUrl: ', url);
|
||||
addWearable(root.avatarName, url);
|
||||
modified = true;
|
||||
});
|
||||
|
|
|
@ -29,9 +29,6 @@ Item {
|
|||
when: avatarUrl !== ''
|
||||
value: avatarUrl
|
||||
}
|
||||
onSourceChanged: {
|
||||
console.debug('avatarImage: source = ', source);
|
||||
}
|
||||
|
||||
visible: avatarImage.status !== Image.Loading && avatarImage.status !== Image.Error
|
||||
}
|
||||
|
|
|
@ -96,9 +96,6 @@ Rectangle {
|
|||
AvatarThumbnail {
|
||||
id: avatarThumbnail
|
||||
avatarUrl: avatarImageUrl
|
||||
onAvatarUrlChanged: {
|
||||
console.debug('CreateFavoritesDialog: onAvatarUrlChanged: ', avatarUrl);
|
||||
}
|
||||
|
||||
wearablesCount: avatarWearablesCount
|
||||
}
|
||||
|
|
|
@ -17,9 +17,6 @@ Rectangle {
|
|||
property alias dialogButtons: buttons
|
||||
|
||||
property string imageSource: null
|
||||
onImageSourceChanged: {
|
||||
console.debug('imageSource = ', imageSource)
|
||||
}
|
||||
|
||||
property string button1color: hifi.buttons.noneBorderlessGray;
|
||||
property string button1text: ''
|
||||
|
|
|
@ -1086,7 +1086,7 @@ Rectangle {
|
|||
refreshBuyUI();
|
||||
break;
|
||||
default:
|
||||
console.log('Unrecognized message from marketplaces.js:', JSON.stringify(message));
|
||||
console.log('Checkout.qml: Unrecognized message from marketplaces.js');
|
||||
}
|
||||
}
|
||||
signal sendToScript(var message);
|
||||
|
|
|
@ -1867,7 +1867,7 @@ Item {
|
|||
sendAssetStep.selectedRecipientUserName = message.userName;
|
||||
break;
|
||||
default:
|
||||
console.log('SendAsset: Unrecognized message from wallet.js:', JSON.stringify(message));
|
||||
console.log('SendAsset: Unrecognized message from wallet.js');
|
||||
}
|
||||
}
|
||||
signal sendSignalToParent(var msg);
|
||||
|
|
|
@ -597,7 +597,7 @@ Rectangle {
|
|||
resetCert(true);
|
||||
break;
|
||||
default:
|
||||
console.log('Unrecognized message from marketplaces.js:', JSON.stringify(message));
|
||||
console.log('InspectionCertificate.qml: Unrecognized message from marketplaces.js');
|
||||
}
|
||||
}
|
||||
signal sendToScript(var message);
|
||||
|
|
|
@ -1009,7 +1009,7 @@ Rectangle {
|
|||
try { // Not all calls to onFileOpenChanged() connect an event.
|
||||
Window.browseChanged.disconnect(onFileOpenChanged);
|
||||
} catch (e) {
|
||||
console.log('Purchases.qml ignoring', e);
|
||||
console.log('Purchases.qml ignoring');
|
||||
}
|
||||
if (filename) {
|
||||
Commerce.installApp(filename);
|
||||
|
@ -1070,7 +1070,7 @@ Rectangle {
|
|||
http.handleHttpResponse(message);
|
||||
break;
|
||||
default:
|
||||
console.log('Unrecognized message from marketplaces.js:', JSON.stringify(message));
|
||||
console.log('Purchases.qml: Unrecognized message from marketplaces.js');
|
||||
}
|
||||
}
|
||||
signal sendToScript(var message);
|
||||
|
|
|
@ -250,7 +250,7 @@ At the moment, there is currently no way to convert HFC to other currencies. Sta
|
|||
function fromScript(message) {
|
||||
switch (message.method) {
|
||||
default:
|
||||
console.log('Unrecognized message from wallet.js:', JSON.stringify(message));
|
||||
console.log('Help.qml: Unrecognized message from wallet.js');
|
||||
}
|
||||
}
|
||||
signal sendSignalToWallet(var msg);
|
||||
|
|
|
@ -183,7 +183,7 @@ Item {
|
|||
function fromScript(message) {
|
||||
switch (message.method) {
|
||||
default:
|
||||
console.log('Unrecognized message from wallet.js:', JSON.stringify(message));
|
||||
console.log('NeedsLogIn.qml: Unrecognized message from wallet.js');
|
||||
}
|
||||
}
|
||||
signal sendSignalToWallet(var msg);
|
||||
|
|
|
@ -799,7 +799,7 @@ Rectangle {
|
|||
}
|
||||
break;
|
||||
default:
|
||||
console.log('Unrecognized message from wallet.js:', JSON.stringify(message));
|
||||
console.log('Wallet.qml: Unrecognized message from wallet.js');
|
||||
}
|
||||
}
|
||||
signal sendToScript(var message);
|
||||
|
|
|
@ -130,17 +130,14 @@ ScrollingWindow {
|
|||
}
|
||||
|
||||
function loadScript(script) {
|
||||
console.log("Load script " + script);
|
||||
scripts.loadOneScript(script);
|
||||
}
|
||||
|
||||
function reloadScript(script) {
|
||||
console.log("Reload script " + script);
|
||||
scripts.stopScript(script, true);
|
||||
}
|
||||
|
||||
function stopScript(script) {
|
||||
console.log("Stop script " + script);
|
||||
scripts.stopScript(script);
|
||||
}
|
||||
|
||||
|
|
|
@ -81,16 +81,16 @@ Rectangle {
|
|||
}
|
||||
|
||||
function doDeleteFile(paths) {
|
||||
console.log("Deleting " + paths);
|
||||
console.log("Deleting paths");
|
||||
|
||||
Assets.deleteMappings(paths, function(err) {
|
||||
if (err) {
|
||||
console.log("Asset browser - error deleting paths: ", paths, err);
|
||||
console.log("Asset browser - error deleting paths: ", err);
|
||||
|
||||
box = errorMessageBox("There was an error deleting:\n" + paths + "\n" + err);
|
||||
box = errorMessageBox("There was an error deleting:\n" + err);
|
||||
box.selected.connect(reload);
|
||||
} else {
|
||||
console.log("Asset browser - finished deleting paths: ", paths);
|
||||
console.log("Asset browser - finished deleting paths");
|
||||
reload();
|
||||
}
|
||||
});
|
||||
|
@ -113,15 +113,10 @@ Rectangle {
|
|||
box.selected.connect(reload);
|
||||
}
|
||||
|
||||
console.log("Asset browser - renaming " + oldPath + " to " + newPath);
|
||||
|
||||
Assets.renameMapping(oldPath, newPath, function(err) {
|
||||
if (err) {
|
||||
console.log("Asset browser - error renaming: ", oldPath, "=>", newPath, " - error ", err);
|
||||
box = errorMessageBox("There was an error renaming:\n" + oldPath + " to " + newPath + "\n" + err);
|
||||
box.selected.connect(reload);
|
||||
} else {
|
||||
console.log("Asset browser - finished rename: ", oldPath, "=>", newPath);
|
||||
}
|
||||
|
||||
reload();
|
||||
|
@ -280,7 +275,7 @@ Rectangle {
|
|||
gravity = Vec3.multiply(Vec3.fromPolar(Math.PI / 2, 0), 0);
|
||||
}
|
||||
|
||||
print("Asset browser - adding asset " + url + " (" + name + ") to world.");
|
||||
print("Asset browser - adding asset " + name + " to world.");
|
||||
|
||||
// Entities.addEntity doesn't work from QML, so we use this.
|
||||
Entities.addModelEntity(name, url, "", shapeType, dynamic, collisionless, grabbable, addPosition, gravity);
|
||||
|
@ -426,7 +421,7 @@ Rectangle {
|
|||
uploadProgressLabel.text = "In progress...";
|
||||
},
|
||||
function(err, path) {
|
||||
print(err, path);
|
||||
print(err);
|
||||
if (err === "") {
|
||||
uploadProgressLabel.text = "Upload Complete";
|
||||
timer.interval = 1000;
|
||||
|
@ -437,7 +432,6 @@ Rectangle {
|
|||
uploadOpen = false;
|
||||
});
|
||||
timer.start();
|
||||
console.log("Asset Browser - finished uploading: ", fileUrl);
|
||||
reload();
|
||||
} else {
|
||||
uploadSpinner.visible = false;
|
||||
|
@ -445,7 +439,7 @@ Rectangle {
|
|||
uploadOpen = false;
|
||||
|
||||
if (err !== -1) {
|
||||
console.log("Asset Browser - error uploading: ", fileUrl, " - error ", err);
|
||||
console.log("Asset Browser - error uploading:", err);
|
||||
var box = errorMessageBox("There was an error uploading:\n" + fileUrl + "\n" + err);
|
||||
box.selected.connect(reload);
|
||||
}
|
||||
|
|
|
@ -116,17 +116,14 @@ Rectangle {
|
|||
}
|
||||
|
||||
function loadScript(script) {
|
||||
console.log("Load script " + script);
|
||||
scripts.loadOneScript(script);
|
||||
}
|
||||
|
||||
function reloadScript(script) {
|
||||
console.log("Reload script " + script);
|
||||
scripts.stopScript(script, true);
|
||||
}
|
||||
|
||||
function stopScript(script) {
|
||||
console.log("Stop script " + script);
|
||||
scripts.stopScript(script);
|
||||
}
|
||||
|
||||
|
@ -154,7 +151,6 @@ Rectangle {
|
|||
console.log("Stop all scripts");
|
||||
for (var index = 0; index < runningScriptsModel.count; index++) {
|
||||
var url = runningScriptsModel.get(index).url;
|
||||
console.log(url);
|
||||
var fileName = url.substring(url.lastIndexOf('/')+1);
|
||||
if (canEditScript(fileName)) {
|
||||
scripts.stopScript(url);
|
||||
|
|
|
@ -130,9 +130,9 @@ ListModel {
|
|||
// Check consistency and call processPage.
|
||||
function handlePage(error, response, cb) {
|
||||
var processed;
|
||||
console.debug('handlePage', listModelName, additionalFirstPageRequested, error, JSON.stringify(response));
|
||||
console.debug('handlePage', listModelName, additionalFirstPageRequested, error);
|
||||
function fail(message) {
|
||||
console.warn("Warning page fail", listModelName, JSON.stringify(message));
|
||||
console.warn("Warning page fail", listModelName);
|
||||
currentPageToRetrieve = -1;
|
||||
requestPending = false;
|
||||
delayedClear = false;
|
||||
|
|
|
@ -285,7 +285,7 @@ TabBar {
|
|||
selectTab(message.params.id);
|
||||
break;
|
||||
default:
|
||||
console.warn('Unrecognized message:', JSON.stringify(message));
|
||||
console.warn('EditTabView.qml: Unrecognized message');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -276,7 +276,7 @@ TabBar {
|
|||
selectTab(message.params.id);
|
||||
break;
|
||||
default:
|
||||
console.warn('Unrecognized message:', JSON.stringify(message));
|
||||
console.warn('EditToolsTabView.qml: Unrecognized message');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -68,8 +68,6 @@ Rectangle {
|
|||
signal canceled();
|
||||
|
||||
Component.onCompleted: {
|
||||
console.log("Helper " + helper + " drives " + drives);
|
||||
|
||||
fileDialogItem.keyboardEnabled = HMD.active;
|
||||
|
||||
// HACK: The following lines force the model to initialize properly such that the go-up button
|
||||
|
@ -762,7 +760,6 @@ Rectangle {
|
|||
}
|
||||
}
|
||||
|
||||
console.log("Selecting " + selection)
|
||||
selectedFile(selection);
|
||||
//root.destroy();
|
||||
}
|
||||
|
|
|
@ -72,7 +72,6 @@ Preference {
|
|||
});
|
||||
|
||||
browser.selectedFile.connect(function(fileUrl){
|
||||
console.log(fileUrl);
|
||||
dataTextField.text = fileDialogHelper.urlToPath(fileUrl);
|
||||
});
|
||||
|
||||
|
|
|
@ -68,7 +68,6 @@ getEntityUserData = function(id) {
|
|||
results = JSON.parse(properties.userData);
|
||||
} catch(err) {
|
||||
logDebug(err);
|
||||
logDebug(properties.userData);
|
||||
}
|
||||
}
|
||||
return results ? results : {};
|
||||
|
|
|
@ -693,7 +693,6 @@
|
|||
}
|
||||
|
||||
function onWebEventReceived(eventString) {
|
||||
print("received web event: " + JSON.stringify(eventString));
|
||||
if (typeof eventString === "string") {
|
||||
var event;
|
||||
try {
|
||||
|
|
|
@ -33,7 +33,6 @@ ENTITY_SPAWNER = function (properties) {
|
|||
|
||||
function makeEntity(properties) {
|
||||
var entity = Entities.addEntity(properties);
|
||||
// print("spawning entity: " + JSON.stringify(properties));
|
||||
|
||||
return {
|
||||
update: function (properties) {
|
||||
|
|
|
@ -37,7 +37,7 @@ var scripts = scriptData.filter(function (datum) { return datum.name !== 'defaul
|
|||
// If defaultScripts.js is running, we leave it running, because restarting it safely is a mess.
|
||||
var otherScripts = scripts.filter(function (path) { return path !== thisPath; });
|
||||
var numberLeftRunning = scriptData.length - otherScripts.length;
|
||||
print('initially running', otherScripts.length, 'scripts. Leaving', numberLeftRunning, 'and stopping', otherScripts);
|
||||
print('initially running', otherScripts.length, 'scripts. Leaving', numberLeftRunning, 'and stopping otherScripts');
|
||||
var typedEntities = {Light: [], ParticleEffect: []};
|
||||
var interestingTypes = Object.keys(typedEntities);
|
||||
var propertiedEntities = {dynamic: []};
|
||||
|
|
|
@ -132,7 +132,7 @@ function messageHandler(channel, messageString, senderID) {
|
|||
try {
|
||||
message = JSON.parse(messageString);
|
||||
} catch (e) {
|
||||
print(e);
|
||||
|
||||
}
|
||||
switch (message.key) {
|
||||
case "HELO":
|
||||
|
|
|
@ -107,7 +107,7 @@ function messageHandler(channel, messageString, senderID) {
|
|||
try {
|
||||
message = JSON.parse(messageString);
|
||||
} catch (e) {
|
||||
print(e);
|
||||
|
||||
}
|
||||
switch (message.key) {
|
||||
case "hello":
|
||||
|
@ -149,7 +149,7 @@ function messageHandler(channel, messageString, senderID) {
|
|||
Window.alert("Someone else is summoning avatars.");
|
||||
break;
|
||||
default:
|
||||
print("crowd-agent received unrecognized message:", messageString);
|
||||
print("crowd-agent received unrecognized message");
|
||||
}
|
||||
}
|
||||
Messages.subscribe(MESSAGE_CHANNEL);
|
||||
|
|
|
@ -73,7 +73,7 @@ function messageHandler(channel, messageString, senderID) {
|
|||
try {
|
||||
message = JSON.parse(messageString);
|
||||
} catch (e) {
|
||||
print(e);
|
||||
|
||||
}
|
||||
switch (message.key) {
|
||||
case "hello":
|
||||
|
@ -121,7 +121,7 @@ function messageHandler(channel, messageString, senderID) {
|
|||
Window.alert("Someone else is summoning avatars.");
|
||||
break;
|
||||
default:
|
||||
print("crowd summon.js received unrecognized message:", messageString);
|
||||
print("crowd summon.js received unrecognized message");
|
||||
}
|
||||
}
|
||||
Messages.subscribe(MESSAGE_CHANNEL);
|
||||
|
|
|
@ -327,8 +327,8 @@ describe("Assets", function () {
|
|||
expect(hash).toMatch(IS_ASSET_HASH_REGEX);
|
||||
context.definedHash = hash; // used in later tests
|
||||
context.definedContent = SAMPLE_CONTENTS;
|
||||
print('context.definedHash = ' + context.definedHash);
|
||||
print('context.definedContent = ' + context.definedContent);
|
||||
//print('context.definedHash = ' + context.definedHash);
|
||||
//print('context.definedContent = ' + context.definedContent);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
@ -339,7 +339,7 @@ describe("Assets", function () {
|
|||
if (error) error += ' ('+JSON.stringify([SAMPLE_FILE_PATH, context.definedHash])+')';
|
||||
expect(error).toBe(null);
|
||||
context.definedPath = SAMPLE_FILE_PATH;
|
||||
print('context.definedPath = ' + context.definedPath);
|
||||
//print('context.definedPath = ' + context.definedPath);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
// test module method exception being thrown within main constructor
|
||||
(function() {
|
||||
var apiMethod = Script.require('../exceptions/exceptionInFunction.js');
|
||||
print(Script.resolvePath(''), "apiMethod", apiMethod);
|
||||
print("apiMethod", apiMethod);
|
||||
// this next line throws from within apiMethod
|
||||
print(apiMethod());
|
||||
return {
|
||||
preload: function(uuid) {
|
||||
print("entityConstructorAPIException::preload -- never seen --", uuid, Script.resolvePath(''));
|
||||
print("entityConstructorAPIException::preload -- never seen --", uuid);
|
||||
},
|
||||
};
|
||||
});
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
var mod = Script.require('../exceptions/exception.js');
|
||||
return {
|
||||
preload: function(uuid) {
|
||||
print("entityConstructorRequireException::preload (never happens)", uuid, Script.resolvePath(''), mod);
|
||||
print("entityConstructorRequireException::preload (never happens)", uuid, mod);
|
||||
},
|
||||
};
|
||||
});
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
// test module method exception being thrown within preload
|
||||
(function() {
|
||||
var apiMethod = Script.require('../exceptions/exceptionInFunction.js');
|
||||
print(Script.resolvePath(''), "apiMethod", apiMethod);
|
||||
print("apiMethod", apiMethod);
|
||||
return {
|
||||
preload: function(uuid) {
|
||||
// this next line throws from within apiMethod
|
||||
print(apiMethod());
|
||||
print("entityPreloadAPIException::preload -- never seen --", uuid, Script.resolvePath(''));
|
||||
print("entityPreloadAPIException::preload -- never seen --", uuid);
|
||||
},
|
||||
};
|
||||
});
|
||||
|
|
|
@ -328,7 +328,6 @@ function instrumentTestrunner() {
|
|||
return base;
|
||||
}
|
||||
var rel = base.replace(/[^\/]+$/, id);
|
||||
console.info('rel', rel);
|
||||
return require.resolve(rel);
|
||||
},
|
||||
require: function(mod) {
|
||||
|
@ -338,13 +337,13 @@ function instrumentTestrunner() {
|
|||
Script.require.cache = require.cache;
|
||||
Script.require.resolve = function(mod) {
|
||||
if (mod === '.' || /^\.\.($|\/)/.test(mod)) {
|
||||
throw new Error("Cannot find module '"+mod+"' (is dir)");
|
||||
throw new Error("Cannot find module (is dir)");
|
||||
}
|
||||
var path = require.resolve(mod);
|
||||
// console.info('node-require-reoslved', mod, path);
|
||||
try {
|
||||
if (require('fs').lstatSync(path).isDirectory()) {
|
||||
throw new Error("Cannot find module '"+path+"' (is directory)");
|
||||
throw new Error("Cannot find module (is directory)");
|
||||
}
|
||||
// console.info('!path', path);
|
||||
} catch (e) {
|
||||
|
|
|
@ -128,12 +128,12 @@ describe('Script', function () {
|
|||
function run() {}
|
||||
function instrument_testrunner() {
|
||||
if (typeof describe === 'undefined') {
|
||||
print('instrumenting jasmine', Script.resolvePath(''));
|
||||
print('instrumenting jasmine');
|
||||
Script.include('../../libraries/jasmine/jasmine.js');
|
||||
Script.include('../../libraries/jasmine/hifi-boot.js');
|
||||
jasmine.getEnv().addReporter({ jasmineDone: Script.stop });
|
||||
run = function() {
|
||||
print('executing jasmine', Script.resolvePath(''));
|
||||
print('executing jasmine');
|
||||
jasmine.getEnv().execute();
|
||||
};
|
||||
}
|
||||
|
|
|
@ -124,7 +124,7 @@
|
|||
|
||||
function fromQml(message) {
|
||||
tokens = message.split(' ')
|
||||
print("Received '"+message+"' from hightlight.qml")
|
||||
print("Received message from QML")
|
||||
if (tokens[0]=="highlight") {
|
||||
currentSelectionName = tokens[1];
|
||||
print("Switching to highlight name "+currentSelectionName)
|
||||
|
|
|
@ -190,7 +190,6 @@
|
|||
|
||||
function fromQml(message) {
|
||||
tokens = message.split('*')
|
||||
//print("Received '"+message+"' from transition.qml")
|
||||
command = tokens[0].toLowerCase()
|
||||
if (command=="category") {
|
||||
editedCategory = parseInt(tokens[1])
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
|
||||
|
||||
function onWebEventReceived(event) {
|
||||
print("photobooth.js received a web event:" + event);
|
||||
print("photobooth.js received a web event");
|
||||
// Converts the event to a JavasScript Object
|
||||
if (typeof event === "string") {
|
||||
event = JSON.parse(event);
|
||||
|
|
|
@ -30,7 +30,6 @@ var TEST_ENTITY_NAME = "EntitySpawnTest";
|
|||
(function () {
|
||||
this.makeEntity = function (properties) {
|
||||
var entity = Entities.addEntity(properties);
|
||||
// print("spawning entity: " + JSON.stringify(properties));
|
||||
|
||||
return {
|
||||
update: function (properties) {
|
||||
|
|
|
@ -125,7 +125,6 @@
|
|||
Script.include("./test_physics_scene.js")
|
||||
|
||||
function fromQml(message) {
|
||||
print("fromQml: " + JSON.stringify(message))
|
||||
switch (message.method) {
|
||||
case "createScene":
|
||||
createScene();
|
||||
|
|
|
@ -165,7 +165,7 @@ function AppUi(properties) {
|
|||
var urlOfRequest = optionalParams.urlOfRequest;
|
||||
|
||||
if (error || (response.status !== 'success')) {
|
||||
print("Error: unable to get", urlOfRequest, error || response.status);
|
||||
print("Error: unable to complete request from URL. Error:", error || response.status);
|
||||
startNotificationTimer(indexOfRequest);
|
||||
return;
|
||||
}
|
||||
|
@ -180,7 +180,7 @@ function AppUi(properties) {
|
|||
} else {
|
||||
notificationData = that.notificationDataProcessPage[indexOfRequest](response);
|
||||
}
|
||||
console.debug(that.buttonName, that.notificationPollEndpoint[indexOfRequest],
|
||||
console.debug(that.buttonName,
|
||||
'truncated notification data for processing:',
|
||||
JSON.stringify(notificationData).substring(0, MAX_LOG_LENGTH_CHARACTERS));
|
||||
that.notificationPollCallback[indexOfRequest](notificationData);
|
||||
|
@ -226,8 +226,6 @@ function AppUi(properties) {
|
|||
}
|
||||
Settings.setValue(settingsKey, currentTimestamp);
|
||||
|
||||
console.debug(that.buttonName, 'polling for notifications at endpoint', url);
|
||||
|
||||
request({
|
||||
json: true,
|
||||
uri: url
|
||||
|
|
|
@ -75,9 +75,3 @@ module.exports = {
|
|||
httpRequest.send(options.body || null);
|
||||
}
|
||||
};
|
||||
|
||||
// ===========================================================================================
|
||||
// @function - debug logging
|
||||
function debug() {
|
||||
print('RequestModule | ' + [].slice.call(arguments).join(' '));
|
||||
}
|
||||
|
|
|
@ -320,7 +320,7 @@ function fromQml(message) { // messages are {method, params}, like json-rpc. See
|
|||
settings = getMyAvatarSettings();
|
||||
break;
|
||||
default:
|
||||
print('Unrecognized message from AvatarApp.qml:', JSON.stringify(message));
|
||||
print('Unrecognized message from AvatarApp.qml');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -540,7 +540,7 @@ function fromQml(message) {
|
|||
// Handled elsewhere, don't log.
|
||||
break;
|
||||
default:
|
||||
print('Unrecognized message from QML:', JSON.stringify(message));
|
||||
print('wallet.js: Unrecognized message from QML');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2334,11 +2334,7 @@ var PropertiesTool = function (opts) {
|
|||
return;
|
||||
}
|
||||
var i, properties, dY, diff, newPosition;
|
||||
if (data.type === "print") {
|
||||
if (data.message) {
|
||||
print(data.message);
|
||||
}
|
||||
} else if (data.type === "update") {
|
||||
if (data.type === "update") {
|
||||
selectionManager.saveProperties();
|
||||
if (selectionManager.selections.length > 1) {
|
||||
for (i = 0; i < selectionManager.selections.length; i++) {
|
||||
|
@ -2725,7 +2721,7 @@ entityListTool.webView.webEventReceived.connect(function(data) {
|
|||
try {
|
||||
data = JSON.parse(data);
|
||||
} catch(e) {
|
||||
print("edit.js: Error parsing JSON: " + e.name + " data " + data);
|
||||
print("edit.js: Error parsing JSON");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -1318,15 +1318,6 @@ var selectedEntityProperties;
|
|||
var lastEntityID = null;
|
||||
var createAppTooltip = new CreateAppTooltip();
|
||||
|
||||
function debugPrint(message) {
|
||||
EventBridge.emitWebEvent(
|
||||
JSON.stringify({
|
||||
type: "print",
|
||||
message: message
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* GENERAL PROPERTY/GROUP FUNCTIONS
|
||||
|
|
|
@ -546,18 +546,9 @@
|
|||
data = {};
|
||||
}
|
||||
|
||||
// Extract status message.
|
||||
if (data.hasOwnProperty("message") && data.message !== null) {
|
||||
statusMessage = data.message;
|
||||
console.log("Clara.io FBX: " + statusMessage);
|
||||
}
|
||||
|
||||
// Extract zip file URL.
|
||||
if (data.hasOwnProperty("files") && data.files.length > 0) {
|
||||
zipFileURL = data.files[0].url;
|
||||
if (zipFileURL.slice(-4) !== ".zip") {
|
||||
console.log(JSON.stringify(data)); // Data for debugging.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -587,15 +578,11 @@
|
|||
|
||||
var HTTP_OK = 200;
|
||||
if (this.status !== HTTP_OK) {
|
||||
statusMessage = "Zip file request terminated with " + this.status + " " + this.statusText;
|
||||
console.log("ERROR: Clara.io FBX: " + statusMessage);
|
||||
EventBridge.emitWebEvent(JSON.stringify({
|
||||
type: CLARA_IO_STATUS,
|
||||
status: statusMessage
|
||||
}));
|
||||
} else if (zipFileURL.slice(-4) !== ".zip") {
|
||||
statusMessage = "Error creating zip file for download.";
|
||||
console.log("ERROR: Clara.io FBX: " + statusMessage + ": " + zipFileURL);
|
||||
EventBridge.emitWebEvent(JSON.stringify({
|
||||
type: CLARA_IO_STATUS,
|
||||
status: (statusMessage + ": " + zipFileURL)
|
||||
|
@ -604,15 +591,12 @@
|
|||
EventBridge.emitWebEvent(JSON.stringify({
|
||||
type: CLARA_IO_DOWNLOAD
|
||||
}));
|
||||
console.log("Clara.io FBX: File download initiated for " + zipFileURL);
|
||||
}
|
||||
|
||||
xmlHttpRequest = null;
|
||||
}
|
||||
|
||||
isPreparing = true;
|
||||
|
||||
console.log("Clara.io FBX: Request zip file for " + uuid);
|
||||
EventBridge.emitWebEvent(JSON.stringify({
|
||||
type: CLARA_IO_STATUS,
|
||||
status: "Initiating download"
|
||||
|
|
|
@ -20,7 +20,7 @@ function requestJSON(url, callback) { // callback(data) if successfull. Logs oth
|
|||
uri: url
|
||||
}, function (error, response) {
|
||||
if (error || (response.status !== 'success')) {
|
||||
print("Error: unable to get", url, error || response.status);
|
||||
print("Error: unable to get URL", error || response.status);
|
||||
return;
|
||||
}
|
||||
callback(response.data);
|
||||
|
|
|
@ -218,7 +218,7 @@ EntityListTool = function(shouldUseEditTabletApp) {
|
|||
try {
|
||||
data = JSON.parse(data);
|
||||
} catch(e) {
|
||||
print("entityList.js: Error parsing JSON: " + e.name + " data " + data);
|
||||
print("entityList.js: Error parsing JSON");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ SelectionManager = (function() {
|
|||
try {
|
||||
messageParsed = JSON.parse(message);
|
||||
} catch (err) {
|
||||
print("ERROR: entitySelectionTool.handleEntitySelectionToolUpdates - got malformed message: " + message);
|
||||
print("ERROR: entitySelectionTool.handleEntitySelectionToolUpdates - got malformed message");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -102,7 +102,6 @@ getEntityUserData = function(id) {
|
|||
results = JSON.parse(properties.userData);
|
||||
} catch(err) {
|
||||
logDebug(err);
|
||||
logDebug(properties.userData);
|
||||
}
|
||||
}
|
||||
return results ? results : {};
|
||||
|
|
|
@ -653,7 +653,7 @@ var onQmlMessageReceived = function onQmlMessageReceived(message) {
|
|||
case 'giftAsset':
|
||||
break;
|
||||
default:
|
||||
print('Unrecognized message from Checkout.qml: ' + JSON.stringify(message));
|
||||
print('marketplaces.js: Unrecognized message from Checkout.qml');
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -326,7 +326,7 @@ function fromQml(message) { // messages are {method, params}, like json-rpc. See
|
|||
ui.messagesWaiting(shouldShowDot);
|
||||
break;
|
||||
default:
|
||||
print('Unrecognized message from Pal.qml:', JSON.stringify(message));
|
||||
print('Unrecognized message from Pal.qml');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -347,7 +347,7 @@ function requestJSON(url, callback) { // callback(data) if successfull. Logs oth
|
|||
uri: url
|
||||
}, function (error, response) {
|
||||
if (error || (response.status !== 'success')) {
|
||||
print("Error: unable to get", url, error || response.status);
|
||||
print("Error: unable to get request", error || response.status);
|
||||
return;
|
||||
}
|
||||
callback(response.data);
|
||||
|
|
|
@ -261,7 +261,6 @@ function onMessage(message) {
|
|||
}
|
||||
break;
|
||||
case 'removeFromStoryIDsToMaybeDelete':
|
||||
console.log("Facebook OR Twitter button clicked for story_id " + message.story_id);
|
||||
removeFromStoryIDsToMaybeDelete(message.story_id);
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -71,13 +71,13 @@
|
|||
try {
|
||||
var data = JSON.parse(props.userData);
|
||||
} catch(e) {
|
||||
debugPrint("unable to parse userData JSON string: " + props.userData);
|
||||
debugPrint("unable to parse userData JSON string");
|
||||
this.cleanup();
|
||||
return;
|
||||
}
|
||||
if (data.soundURL && !(soundURL === data.soundURL)) {
|
||||
soundURL = data.soundURL;
|
||||
debugPrint("Read ambient sound URL: " + soundURL);
|
||||
debugPrint("Read ambient sound URL");
|
||||
}
|
||||
if (data.range && !(range === data.range)) {
|
||||
range = data.range;
|
||||
|
@ -113,7 +113,7 @@
|
|||
ambientSound = SoundCache.getSound(soundURL);
|
||||
} else if (resource.state === Resource.State.FAILED) {
|
||||
resource.stateChanged.disconnect(onStateChanged);
|
||||
debugPrint("Failed to download ambient sound: " + soundURL);
|
||||
debugPrint("Failed to download ambient sound");
|
||||
}
|
||||
}
|
||||
resource.stateChanged.connect(onStateChanged);
|
||||
|
@ -151,7 +151,7 @@
|
|||
var data = JSON.parse(props.userData);
|
||||
data.disabled = !data.disabled;
|
||||
|
||||
debugPrint(hint + " -- triggering ambient sound " + (data.disabled ? "OFF" : "ON") + " (" + data.soundURL + ")");
|
||||
debugPrint(hint + " -- triggering ambient sound " + (data.disabled ? "OFF" : "ON"));
|
||||
|
||||
this.cleanup();
|
||||
|
||||
|
@ -236,7 +236,7 @@
|
|||
soundOptions.orientation = rotation;
|
||||
soundOptions.volume = volume;
|
||||
if (!soundPlaying && ambientSound && ambientSound.downloaded) {
|
||||
debugPrint("Starting ambient sound: " + soundURL + " (duration: " + ambientSound.duration + ")");
|
||||
debugPrint("Starting ambient sound: (duration: " + ambientSound.duration + ")");
|
||||
soundPlaying = Audio.playSound(ambientSound, soundOptions);
|
||||
} else if (soundPlaying && soundPlaying.playing) {
|
||||
soundPlaying.setOptions(soundOptions);
|
||||
|
@ -244,7 +244,7 @@
|
|||
} else if (soundPlaying && soundPlaying.playing && (distance > range * HYSTERESIS_FRACTION)) {
|
||||
soundPlaying.stop();
|
||||
soundPlaying = false;
|
||||
debugPrint("Out of range, stopping ambient sound: " + soundURL);
|
||||
debugPrint("Out of range, stopping ambient sound");
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue