mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 19:29:54 +02:00
code feedback
This commit is contained in:
parent
f0d486a6a5
commit
d68415c47c
7 changed files with 14 additions and 28 deletions
|
@ -16,7 +16,7 @@ import QtQuick 2.5
|
||||||
import QtGraphicalEffects 1.0
|
import QtGraphicalEffects 1.0
|
||||||
import "toolbars"
|
import "toolbars"
|
||||||
import "../styles-uit"
|
import "../styles-uit"
|
||||||
import "models" as HifiModels
|
import "qrc:////qml//hifi//models" as HifiModels // Absolute path so the same code works everywhere.
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
id: root;
|
id: root;
|
||||||
|
@ -136,23 +136,4 @@ Column {
|
||||||
unhoverThunk: function () { hovered = false }
|
unhoverThunk: function () { hovered = false }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* WTF is this?
|
|
||||||
NumberAnimation {
|
|
||||||
id: anim;
|
|
||||||
target: scroll;
|
|
||||||
property: "contentX";
|
|
||||||
duration: 250;
|
|
||||||
}
|
|
||||||
function scrollToIndex(index) {
|
|
||||||
anim.running = false;
|
|
||||||
var pos = scroll.contentX;
|
|
||||||
var destPos;
|
|
||||||
scroll.positionViewAtIndex(index, ListView.Contain);
|
|
||||||
destPos = scroll.contentX;
|
|
||||||
anim.from = pos;
|
|
||||||
anim.to = destPos;
|
|
||||||
scroll.currentIndex = index;
|
|
||||||
anim.running = true;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@ import Qt.labs.settings 1.0
|
||||||
import "../styles-uit"
|
import "../styles-uit"
|
||||||
import "../controls-uit" as HifiControlsUit
|
import "../controls-uit" as HifiControlsUit
|
||||||
import "../controls" as HifiControls
|
import "../controls" as HifiControls
|
||||||
import "models" as HifiModels
|
import "qrc:////qml//hifi//models" as HifiModels // Absolute path so the same code works everywhere.
|
||||||
|
|
||||||
// references HMD, Users, UserActivityLogger from root context
|
// references HMD, Users, UserActivityLogger from root context
|
||||||
|
|
||||||
|
@ -1238,7 +1238,10 @@ Rectangle {
|
||||||
reloadNearby.color = 2;
|
reloadNearby.color = 2;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'inspectionCertificate_resetCert': // HRS FIXME what's this about?
|
case 'inspectionCertificate_resetCert':
|
||||||
|
// marketplaces.js sends out a signal to QML with that method when the tablet screen changes and it's not changed to a commerce-related screen.
|
||||||
|
// We want it to only be handled by the InspectionCertificate.qml, but there's not an easy way of doing that.
|
||||||
|
// As a part of a "cleanup inspectionCertificate_resetCert" ticket, we'll have to figure out less logspammy way of doing what has to be done.
|
||||||
break;
|
break;
|
||||||
case 'http.response':
|
case 'http.response':
|
||||||
http.handleHttpResponse(message);
|
http.handleHttpResponse(message);
|
||||||
|
|
|
@ -19,7 +19,7 @@ import "../../../../styles-uit"
|
||||||
import "../../../../controls-uit" as HifiControlsUit
|
import "../../../../controls-uit" as HifiControlsUit
|
||||||
import "../../../../controls" as HifiControls
|
import "../../../../controls" as HifiControls
|
||||||
import "../" as HifiCommerceCommon
|
import "../" as HifiCommerceCommon
|
||||||
import "../../../models" as HifiModels
|
import "qrc:////qml//hifi//models" as HifiModels // Absolute path so the same code works everywhere.
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
HifiConstants { id: hifi; }
|
HifiConstants { id: hifi; }
|
||||||
|
|
|
@ -16,7 +16,7 @@ import QtQuick 2.5
|
||||||
import "../../../styles-uit"
|
import "../../../styles-uit"
|
||||||
import "../../../controls-uit" as HifiControlsUit
|
import "../../../controls-uit" as HifiControlsUit
|
||||||
import "../../../controls" as HifiControls
|
import "../../../controls" as HifiControls
|
||||||
import "../../models" as HifiModels
|
import "qrc:////qml//hifi//models" as HifiModels // Absolute path so the same code works everywhere.
|
||||||
import "../wallet" as HifiWallet
|
import "../wallet" as HifiWallet
|
||||||
import "../common" as HifiCommerceCommon
|
import "../common" as HifiCommerceCommon
|
||||||
import "../inspectionCertificate" as HifiInspectionCertificate
|
import "../inspectionCertificate" as HifiInspectionCertificate
|
||||||
|
@ -600,7 +600,7 @@ Rectangle {
|
||||||
itemEdition: model.edition_number;
|
itemEdition: model.edition_number;
|
||||||
numberSold: model.number_sold;
|
numberSold: model.number_sold;
|
||||||
limitedRun: model.limited_run;
|
limitedRun: model.limited_run;
|
||||||
displayedItemCount: 999// For now (and maybe longer), we're going to display all the edition numbers.
|
displayedItemCount: 999; // For now (and maybe longer), we're going to display all the edition numbers.
|
||||||
cardBackVisible: model.cardBackVisible || false;
|
cardBackVisible: model.cardBackVisible || false;
|
||||||
isInstalled: model.isInstalled || false;
|
isInstalled: model.isInstalled || false;
|
||||||
wornEntityID: model.wornEntityID;
|
wornEntityID: model.wornEntityID;
|
||||||
|
|
|
@ -779,7 +779,8 @@ Rectangle {
|
||||||
http.handleHttpResponse(message);
|
http.handleHttpResponse(message);
|
||||||
break;
|
break;
|
||||||
case 'palIsStale':
|
case 'palIsStale':
|
||||||
case 'avatarDisconnected': // HRS FIXME. What are these about?
|
case 'avatarDisconnected':
|
||||||
|
// Because we don't have "channels" for sending messages to a specific QML object, the messages are broadcast to all QML Items. If an Item of yours happens to be visible when some script sends a message with a method you don't expect, you'll get "Unrecognized message..." logs.
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
console.log('Unrecognized message from wallet.js:', JSON.stringify(message));
|
console.log('Unrecognized message from wallet.js:', JSON.stringify(message));
|
||||||
|
|
|
@ -18,7 +18,7 @@ import QtQuick.Controls 2.2
|
||||||
import "../../../styles-uit"
|
import "../../../styles-uit"
|
||||||
import "../../../controls-uit" as HifiControlsUit
|
import "../../../controls-uit" as HifiControlsUit
|
||||||
import "../../../controls" as HifiControls
|
import "../../../controls" as HifiControls
|
||||||
import "../../models" as HifiModels
|
import "qrc:////qml//hifi//models" as HifiModels // Absolute path so the same code works everywhere.
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
HifiConstants { id: hifi; }
|
HifiConstants { id: hifi; }
|
||||||
|
@ -229,6 +229,7 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Either add to pending, or to result.
|
// Either add to pending, or to result.
|
||||||
|
// Note that you only see a page of pending stuff until you scroll...
|
||||||
data.history.forEach(function (item) {
|
data.history.forEach(function (item) {
|
||||||
if (item.status === 'pending') {
|
if (item.status === 'pending') {
|
||||||
pending.count++;
|
pending.count++;
|
||||||
|
|
|
@ -55,7 +55,7 @@ Item {
|
||||||
retrievedAtLeastOnePage = false;
|
retrievedAtLeastOnePage = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Processing one page.
|
// Page processing.
|
||||||
|
|
||||||
// Override to return one property of data, and/or to transform the elements. Must return an array of model elements.
|
// Override to return one property of data, and/or to transform the elements. Must return an array of model elements.
|
||||||
property var processPage: function (data) { return data; }
|
property var processPage: function (data) { return data; }
|
||||||
|
|
Loading…
Reference in a new issue