mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 00:36:47 +02:00
Merge branch 'master' of github.com:highfidelity/hifi into import-av-entities
This commit is contained in:
commit
195d96bd43
10 changed files with 67 additions and 19 deletions
|
@ -892,6 +892,10 @@ Rectangle {
|
||||||
} else {
|
} else {
|
||||||
root.activeView = "checkoutSuccess";
|
root.activeView = "checkoutSuccess";
|
||||||
}
|
}
|
||||||
|
root.balanceReceived = false;
|
||||||
|
root.purchasesReceived = false;
|
||||||
|
commerce.inventory();
|
||||||
|
commerce.balance();
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
@ -39,7 +39,7 @@ Item {
|
||||||
sendToParent({method: "needsLogIn"});
|
sendToParent({method: "needsLogIn"});
|
||||||
} else if (walletStatus === 3) {
|
} else if (walletStatus === 3) {
|
||||||
commerce.getSecurityImage();
|
commerce.getSecurityImage();
|
||||||
} else {
|
} else if (walletStatus > 3) {
|
||||||
console.log("ERROR in EmulatedMarketplaceHeader.qml: Unknown wallet status: " + walletStatus);
|
console.log("ERROR in EmulatedMarketplaceHeader.qml: Unknown wallet status: " + walletStatus);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,6 +36,8 @@ Item {
|
||||||
property string itemHref;
|
property string itemHref;
|
||||||
property int displayedItemCount;
|
property int displayedItemCount;
|
||||||
property int itemEdition;
|
property int itemEdition;
|
||||||
|
property int numberSold;
|
||||||
|
property int limitedRun;
|
||||||
|
|
||||||
property string originalStatusText;
|
property string originalStatusText;
|
||||||
property string originalStatusColor;
|
property string originalStatusColor;
|
||||||
|
@ -50,7 +52,6 @@ Item {
|
||||||
statusText.text = "CONFIRMED!";
|
statusText.text = "CONFIRMED!";
|
||||||
statusText.color = hifi.colors.blueAccent;
|
statusText.color = hifi.colors.blueAccent;
|
||||||
confirmedTimer.start();
|
confirmedTimer.start();
|
||||||
root.purchaseStatusChanged = false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,6 +61,7 @@ Item {
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
statusText.text = root.originalStatusText;
|
statusText.text = root.originalStatusText;
|
||||||
statusText.color = root.originalStatusColor;
|
statusText.color = root.originalStatusColor;
|
||||||
|
root.purchaseStatusChanged = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -203,7 +205,7 @@ Item {
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: statusContainer;
|
id: statusContainer;
|
||||||
visible: root.purchaseStatus === "pending" || root.purchaseStatus === "invalidated";
|
visible: root.purchaseStatus === "pending" || root.purchaseStatus === "invalidated" || root.purchaseStatusChanged;
|
||||||
anchors.left: itemName.left;
|
anchors.left: itemName.left;
|
||||||
anchors.top: certificateContainer.bottom;
|
anchors.top: certificateContainer.bottom;
|
||||||
anchors.topMargin: 8;
|
anchors.topMargin: 8;
|
||||||
|
@ -222,6 +224,8 @@ Item {
|
||||||
"PENDING..."
|
"PENDING..."
|
||||||
} else if (root.purchaseStatus === "invalidated") {
|
} else if (root.purchaseStatus === "invalidated") {
|
||||||
"INVALIDATED"
|
"INVALIDATED"
|
||||||
|
} else if (root.numberSold !== -1) {
|
||||||
|
("Sales: " + root.numberSold + "/" + (root.limitedRun === -1 ? "INFTY" : root.limitedRun))
|
||||||
} else {
|
} else {
|
||||||
""
|
""
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,8 +81,10 @@ Rectangle {
|
||||||
if (result.status !== 'success') {
|
if (result.status !== 'success') {
|
||||||
console.log("Failed to get purchases", result.message);
|
console.log("Failed to get purchases", result.message);
|
||||||
} else {
|
} else {
|
||||||
|
var inventoryResult = processInventoryResult(result.data.assets);
|
||||||
|
|
||||||
purchasesModel.clear();
|
purchasesModel.clear();
|
||||||
purchasesModel.append(result.data.assets);
|
purchasesModel.append(inventoryResult);
|
||||||
|
|
||||||
if (previousPurchasesModel.count !== 0) {
|
if (previousPurchasesModel.count !== 0) {
|
||||||
checkIfAnyItemStatusChanged();
|
checkIfAnyItemStatusChanged();
|
||||||
|
@ -93,7 +95,7 @@ Rectangle {
|
||||||
purchasesModel.setProperty(i, "statusChanged", false);
|
purchasesModel.setProperty(i, "statusChanged", false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
previousPurchasesModel.append(result.data.assets);
|
previousPurchasesModel.append(inventoryResult);
|
||||||
|
|
||||||
buildFilteredPurchasesModel();
|
buildFilteredPurchasesModel();
|
||||||
|
|
||||||
|
@ -428,6 +430,8 @@ Rectangle {
|
||||||
purchaseStatus: status;
|
purchaseStatus: status;
|
||||||
purchaseStatusChanged: statusChanged;
|
purchaseStatusChanged: statusChanged;
|
||||||
itemEdition: model.edition_number;
|
itemEdition: model.edition_number;
|
||||||
|
numberSold: model.number_sold;
|
||||||
|
limitedRun: model.limited_run;
|
||||||
displayedItemCount: model.displayedItemCount;
|
displayedItemCount: model.displayedItemCount;
|
||||||
anchors.topMargin: 12;
|
anchors.topMargin: 12;
|
||||||
anchors.bottomMargin: 12;
|
anchors.bottomMargin: 12;
|
||||||
|
@ -590,6 +594,17 @@ Rectangle {
|
||||||
// FUNCTION DEFINITIONS START
|
// FUNCTION DEFINITIONS START
|
||||||
//
|
//
|
||||||
|
|
||||||
|
function processInventoryResult(inventory) {
|
||||||
|
for (var i = 0; i < inventory.length; i++) {
|
||||||
|
if (inventory[i].status.length > 1) {
|
||||||
|
console.log("WARNING: Inventory result index " + i + " has a status of length >1!")
|
||||||
|
}
|
||||||
|
inventory[i].status = inventory[i].status[0];
|
||||||
|
inventory[i].categories = inventory[i].categories.join(';');
|
||||||
|
}
|
||||||
|
return inventory;
|
||||||
|
}
|
||||||
|
|
||||||
function populateDisplayedItemCounts() {
|
function populateDisplayedItemCounts() {
|
||||||
var itemCountDictionary = {};
|
var itemCountDictionary = {};
|
||||||
var currentItemId;
|
var currentItemId;
|
||||||
|
|
|
@ -197,6 +197,8 @@ Item {
|
||||||
height: 50;
|
height: 50;
|
||||||
echoMode: TextInput.Password;
|
echoMode: TextInput.Password;
|
||||||
placeholderText: "passphrase";
|
placeholderText: "passphrase";
|
||||||
|
activeFocusOnPress: true;
|
||||||
|
activeFocusOnTab: true;
|
||||||
|
|
||||||
onFocusChanged: {
|
onFocusChanged: {
|
||||||
root.keyboardRaised = focus;
|
root.keyboardRaised = focus;
|
||||||
|
@ -206,8 +208,8 @@ Item {
|
||||||
anchors.fill: parent;
|
anchors.fill: parent;
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
parent.focus = true;
|
|
||||||
root.keyboardRaised = true;
|
root.keyboardRaised = true;
|
||||||
|
mouse.accepted = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -797,8 +797,8 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
|
||||||
installNativeEventFilter(&MyNativeEventFilter::getInstance());
|
installNativeEventFilter(&MyNativeEventFilter::getInstance());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
_logger = new FileLogger(this); // After setting organization name in order to get correct directory
|
|
||||||
|
_logger = new FileLogger(this);
|
||||||
qInstallMessageHandler(messageHandler);
|
qInstallMessageHandler(messageHandler);
|
||||||
|
|
||||||
QFontDatabase::addApplicationFont(PathUtils::resourcesPath() + "styles/Inconsolata.otf");
|
QFontDatabase::addApplicationFont(PathUtils::resourcesPath() + "styles/Inconsolata.otf");
|
||||||
|
@ -814,6 +814,13 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
|
||||||
(new DeadlockWatchdogThread())->start();
|
(new DeadlockWatchdogThread())->start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set File Logger Session UUID
|
||||||
|
auto avatarManager = DependencyManager::get<AvatarManager>();
|
||||||
|
auto myAvatar = avatarManager ? avatarManager->getMyAvatar() : nullptr;
|
||||||
|
auto accountManager = DependencyManager::get<AccountManager>();
|
||||||
|
|
||||||
|
_logger->setSessionID(accountManager->getSessionID());
|
||||||
|
|
||||||
if (steamClient) {
|
if (steamClient) {
|
||||||
qCDebug(interfaceapp) << "[VERSION] SteamVR buildID:" << steamClient->getSteamVRBuildID();
|
qCDebug(interfaceapp) << "[VERSION] SteamVR buildID:" << steamClient->getSteamVRBuildID();
|
||||||
}
|
}
|
||||||
|
@ -930,8 +937,6 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
|
||||||
// send a location update immediately
|
// send a location update immediately
|
||||||
discoverabilityManager->updateLocation();
|
discoverabilityManager->updateLocation();
|
||||||
|
|
||||||
auto myAvatar = getMyAvatar();
|
|
||||||
|
|
||||||
connect(nodeList.data(), &NodeList::nodeAdded, this, &Application::nodeAdded);
|
connect(nodeList.data(), &NodeList::nodeAdded, this, &Application::nodeAdded);
|
||||||
connect(nodeList.data(), &NodeList::nodeKilled, this, &Application::nodeKilled);
|
connect(nodeList.data(), &NodeList::nodeKilled, this, &Application::nodeKilled);
|
||||||
connect(nodeList.data(), &NodeList::nodeActivated, this, &Application::nodeActivated);
|
connect(nodeList.data(), &NodeList::nodeActivated, this, &Application::nodeActivated);
|
||||||
|
@ -942,9 +947,6 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
|
||||||
// you might think we could just do this in NodeList but we only want this connection for Interface
|
// you might think we could just do this in NodeList but we only want this connection for Interface
|
||||||
connect(nodeList.data(), &NodeList::limitOfSilentDomainCheckInsReached, nodeList.data(), &NodeList::reset);
|
connect(nodeList.data(), &NodeList::limitOfSilentDomainCheckInsReached, nodeList.data(), &NodeList::reset);
|
||||||
|
|
||||||
// connect to appropriate slots on AccountManager
|
|
||||||
auto accountManager = DependencyManager::get<AccountManager>();
|
|
||||||
|
|
||||||
auto dialogsManager = DependencyManager::get<DialogsManager>();
|
auto dialogsManager = DependencyManager::get<DialogsManager>();
|
||||||
connect(accountManager.data(), &AccountManager::authRequired, dialogsManager.data(), &DialogsManager::showLoginDialog);
|
connect(accountManager.data(), &AccountManager::authRequired, dialogsManager.data(), &DialogsManager::showLoginDialog);
|
||||||
connect(accountManager.data(), &AccountManager::usernameChanged, this, &Application::updateWindowTitle);
|
connect(accountManager.data(), &AccountManager::usernameChanged, this, &Application::updateWindowTitle);
|
||||||
|
@ -2100,7 +2102,6 @@ Application::~Application() {
|
||||||
_octreeProcessor.terminate();
|
_octreeProcessor.terminate();
|
||||||
_entityEditSender.terminate();
|
_entityEditSender.terminate();
|
||||||
|
|
||||||
|
|
||||||
DependencyManager::destroy<AvatarManager>();
|
DependencyManager::destroy<AvatarManager>();
|
||||||
DependencyManager::destroy<AnimationCache>();
|
DependencyManager::destroy<AnimationCache>();
|
||||||
DependencyManager::destroy<FramebufferCache>();
|
DependencyManager::destroy<FramebufferCache>();
|
||||||
|
|
|
@ -40,6 +40,7 @@
|
||||||
#include "scripting/HMDScriptingInterface.h"
|
#include "scripting/HMDScriptingInterface.h"
|
||||||
#include "scripting/AssetMappingsScriptingInterface.h"
|
#include "scripting/AssetMappingsScriptingInterface.h"
|
||||||
#include "scripting/MenuScriptingInterface.h"
|
#include "scripting/MenuScriptingInterface.h"
|
||||||
|
#include "scripting/SettingsScriptingInterface.h"
|
||||||
#include <Preferences.h>
|
#include <Preferences.h>
|
||||||
#include <ScriptEngines.h>
|
#include <ScriptEngines.h>
|
||||||
#include "FileDialogHelper.h"
|
#include "FileDialogHelper.h"
|
||||||
|
@ -243,6 +244,7 @@ void Web3DOverlay::setupQmlSurface() {
|
||||||
_webSurface->getSurfaceContext()->setContextProperty("InputConfiguration", DependencyManager::get<InputConfiguration>().data());
|
_webSurface->getSurfaceContext()->setContextProperty("InputConfiguration", DependencyManager::get<InputConfiguration>().data());
|
||||||
_webSurface->getSurfaceContext()->setContextProperty("SoundCache", DependencyManager::get<SoundCache>().data());
|
_webSurface->getSurfaceContext()->setContextProperty("SoundCache", DependencyManager::get<SoundCache>().data());
|
||||||
_webSurface->getSurfaceContext()->setContextProperty("MenuInterface", MenuScriptingInterface::getInstance());
|
_webSurface->getSurfaceContext()->setContextProperty("MenuInterface", MenuScriptingInterface::getInstance());
|
||||||
|
_webSurface->getSurfaceContext()->setContextProperty("Settings", SettingsScriptingInterface::getInstance());
|
||||||
|
|
||||||
_webSurface->getSurfaceContext()->setContextProperty("pathToFonts", "../../");
|
_webSurface->getSurfaceContext()->setContextProperty("pathToFonts", "../../");
|
||||||
|
|
||||||
|
|
|
@ -381,7 +381,7 @@ class AvatarData : public QObject, public SpatiallyNestable {
|
||||||
|
|
||||||
Q_PROPERTY(QStringList jointNames READ getJointNames)
|
Q_PROPERTY(QStringList jointNames READ getJointNames)
|
||||||
|
|
||||||
Q_PROPERTY(QUuid sessionUUID READ getSessionUUID)
|
Q_PROPERTY(QUuid sessionUUID READ getSessionUUID NOTIFY sessionUUIDChanged)
|
||||||
|
|
||||||
Q_PROPERTY(glm::mat4 sensorToWorldMatrix READ getSensorToWorldMatrix)
|
Q_PROPERTY(glm::mat4 sensorToWorldMatrix READ getSensorToWorldMatrix)
|
||||||
Q_PROPERTY(glm::mat4 controllerLeftHandMatrix READ getControllerLeftHandMatrix)
|
Q_PROPERTY(glm::mat4 controllerLeftHandMatrix READ getControllerLeftHandMatrix)
|
||||||
|
@ -670,13 +670,19 @@ public:
|
||||||
signals:
|
signals:
|
||||||
void displayNameChanged();
|
void displayNameChanged();
|
||||||
void lookAtSnappingChanged(bool enabled);
|
void lookAtSnappingChanged(bool enabled);
|
||||||
|
void sessionUUIDChanged();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void sendAvatarDataPacket();
|
void sendAvatarDataPacket();
|
||||||
void sendIdentityPacket();
|
void sendIdentityPacket();
|
||||||
|
|
||||||
void setJointMappingsFromNetworkReply();
|
void setJointMappingsFromNetworkReply();
|
||||||
void setSessionUUID(const QUuid& sessionUUID) { setID(sessionUUID); }
|
void setSessionUUID(const QUuid& sessionUUID) {
|
||||||
|
if (sessionUUID != getID()) {
|
||||||
|
setID(sessionUUID);
|
||||||
|
emit sessionUUIDChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
virtual glm::quat getAbsoluteJointRotationInObjectFrame(int index) const override;
|
virtual glm::quat getAbsoluteJointRotationInObjectFrame(int index) const override;
|
||||||
virtual glm::vec3 getAbsoluteJointTranslationInObjectFrame(int index) const override;
|
virtual glm::vec3 getAbsoluteJointTranslationInObjectFrame(int index) const override;
|
||||||
|
|
|
@ -26,7 +26,6 @@ class FilePersistThread : public GenericQueueThread < QString > {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
FilePersistThread(const FileLogger& logger);
|
FilePersistThread(const FileLogger& logger);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void rollingLogFile(QString newFilename);
|
void rollingLogFile(QString newFilename);
|
||||||
|
|
||||||
|
@ -42,12 +41,14 @@ private:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static const QString FILENAME_FORMAT = "hifi-log_%1_%2.txt";
|
static const QString FILENAME_FORMAT = "hifi-log_%1%2.txt";
|
||||||
static const QString DATETIME_FORMAT = "yyyy-MM-dd_hh.mm.ss";
|
static const QString DATETIME_FORMAT = "yyyy-MM-dd_hh.mm.ss";
|
||||||
static const QString LOGS_DIRECTORY = "Logs";
|
static const QString LOGS_DIRECTORY = "Logs";
|
||||||
static const QString IPADDR_WILDCARD = "[0-9]*.[0-9]*.[0-9]*.[0-9]*";
|
static const QString IPADDR_WILDCARD = "[0-9]*.[0-9]*.[0-9]*.[0-9]*";
|
||||||
static const QString DATETIME_WILDCARD = "20[0-9][0-9]-[0,1][0-9]-[0-3][0-9]_[0-2][0-9].[0-6][0-9].[0-6][0-9]";
|
static const QString DATETIME_WILDCARD = "20[0-9][0-9]-[0,1][0-9]-[0-3][0-9]_[0-2][0-9].[0-6][0-9].[0-6][0-9]";
|
||||||
static const QString FILENAME_WILDCARD = "hifi-log_" + IPADDR_WILDCARD + "_" + DATETIME_WILDCARD + ".txt";
|
static const QString FILENAME_WILDCARD = "hifi-log_" + IPADDR_WILDCARD + "_" + DATETIME_WILDCARD + ".txt";
|
||||||
|
static QUuid SESSION_ID;
|
||||||
|
|
||||||
// Max log size is 512 KB. We send log files to our crash reporter, so we want to keep this relatively
|
// Max log size is 512 KB. We send log files to our crash reporter, so we want to keep this relatively
|
||||||
// small so it doesn't go over the 2MB zipped limit for all of the files we send.
|
// small so it doesn't go over the 2MB zipped limit for all of the files we send.
|
||||||
static const qint64 MAX_LOG_SIZE = 512 * 1024;
|
static const qint64 MAX_LOG_SIZE = 512 * 1024;
|
||||||
|
@ -62,7 +63,13 @@ QString getLogRollerFilename() {
|
||||||
QString result = FileUtils::standardPath(LOGS_DIRECTORY);
|
QString result = FileUtils::standardPath(LOGS_DIRECTORY);
|
||||||
QHostAddress clientAddress = getGuessedLocalAddress();
|
QHostAddress clientAddress = getGuessedLocalAddress();
|
||||||
QDateTime now = QDateTime::currentDateTime();
|
QDateTime now = QDateTime::currentDateTime();
|
||||||
result.append(QString(FILENAME_FORMAT).arg(clientAddress.toString(), now.toString(DATETIME_FORMAT)));
|
QString fileSessionID;
|
||||||
|
|
||||||
|
if (!SESSION_ID.isNull()) {
|
||||||
|
fileSessionID = "_" + SESSION_ID.toString().replace("{", "").replace("}", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
result.append(QString(FILENAME_FORMAT).arg(now.toString(DATETIME_FORMAT), fileSessionID));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -142,6 +149,12 @@ FileLogger::~FileLogger() {
|
||||||
_persistThreadInstance->terminate();
|
_persistThreadInstance->terminate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FileLogger::setSessionID(const QUuid& message) {
|
||||||
|
// This is for the output of log files. Once the application is first started,
|
||||||
|
// this function runs and grabs the AccountManager Session ID and saves it here.
|
||||||
|
SESSION_ID = message;
|
||||||
|
}
|
||||||
|
|
||||||
void FileLogger::addMessage(const QString& message) {
|
void FileLogger::addMessage(const QString& message) {
|
||||||
_persistThreadInstance->queueItem(message);
|
_persistThreadInstance->queueItem(message);
|
||||||
emit logReceived(message);
|
emit logReceived(message);
|
||||||
|
|
|
@ -26,6 +26,7 @@ public:
|
||||||
|
|
||||||
QString getFilename() const { return _fileName; }
|
QString getFilename() const { return _fileName; }
|
||||||
virtual void addMessage(const QString&) override;
|
virtual void addMessage(const QString&) override;
|
||||||
|
virtual void setSessionID(const QUuid&);
|
||||||
virtual QString getLogData() override;
|
virtual QString getLogData() override;
|
||||||
virtual void locateLog() override;
|
virtual void locateLog() override;
|
||||||
virtual void sync() override;
|
virtual void sync() override;
|
||||||
|
|
Loading…
Reference in a new issue