mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-16 22:30:42 +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 {
|
||||
root.activeView = "checkoutSuccess";
|
||||
}
|
||||
root.balanceReceived = false;
|
||||
root.purchasesReceived = false;
|
||||
commerce.inventory();
|
||||
commerce.balance();
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
@ -39,7 +39,7 @@ Item {
|
|||
sendToParent({method: "needsLogIn"});
|
||||
} else if (walletStatus === 3) {
|
||||
commerce.getSecurityImage();
|
||||
} else {
|
||||
} else if (walletStatus > 3) {
|
||||
console.log("ERROR in EmulatedMarketplaceHeader.qml: Unknown wallet status: " + walletStatus);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,6 +36,8 @@ Item {
|
|||
property string itemHref;
|
||||
property int displayedItemCount;
|
||||
property int itemEdition;
|
||||
property int numberSold;
|
||||
property int limitedRun;
|
||||
|
||||
property string originalStatusText;
|
||||
property string originalStatusColor;
|
||||
|
@ -50,7 +52,6 @@ Item {
|
|||
statusText.text = "CONFIRMED!";
|
||||
statusText.color = hifi.colors.blueAccent;
|
||||
confirmedTimer.start();
|
||||
root.purchaseStatusChanged = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -60,6 +61,7 @@ Item {
|
|||
onTriggered: {
|
||||
statusText.text = root.originalStatusText;
|
||||
statusText.color = root.originalStatusColor;
|
||||
root.purchaseStatusChanged = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -203,7 +205,7 @@ Item {
|
|||
|
||||
Item {
|
||||
id: statusContainer;
|
||||
visible: root.purchaseStatus === "pending" || root.purchaseStatus === "invalidated";
|
||||
visible: root.purchaseStatus === "pending" || root.purchaseStatus === "invalidated" || root.purchaseStatusChanged;
|
||||
anchors.left: itemName.left;
|
||||
anchors.top: certificateContainer.bottom;
|
||||
anchors.topMargin: 8;
|
||||
|
@ -222,6 +224,8 @@ Item {
|
|||
"PENDING..."
|
||||
} else if (root.purchaseStatus === "invalidated") {
|
||||
"INVALIDATED"
|
||||
} else if (root.numberSold !== -1) {
|
||||
("Sales: " + root.numberSold + "/" + (root.limitedRun === -1 ? "INFTY" : root.limitedRun))
|
||||
} else {
|
||||
""
|
||||
}
|
||||
|
|
|
@ -81,8 +81,10 @@ Rectangle {
|
|||
if (result.status !== 'success') {
|
||||
console.log("Failed to get purchases", result.message);
|
||||
} else {
|
||||
var inventoryResult = processInventoryResult(result.data.assets);
|
||||
|
||||
purchasesModel.clear();
|
||||
purchasesModel.append(result.data.assets);
|
||||
purchasesModel.append(inventoryResult);
|
||||
|
||||
if (previousPurchasesModel.count !== 0) {
|
||||
checkIfAnyItemStatusChanged();
|
||||
|
@ -93,7 +95,7 @@ Rectangle {
|
|||
purchasesModel.setProperty(i, "statusChanged", false);
|
||||
}
|
||||
}
|
||||
previousPurchasesModel.append(result.data.assets);
|
||||
previousPurchasesModel.append(inventoryResult);
|
||||
|
||||
buildFilteredPurchasesModel();
|
||||
|
||||
|
@ -428,6 +430,8 @@ Rectangle {
|
|||
purchaseStatus: status;
|
||||
purchaseStatusChanged: statusChanged;
|
||||
itemEdition: model.edition_number;
|
||||
numberSold: model.number_sold;
|
||||
limitedRun: model.limited_run;
|
||||
displayedItemCount: model.displayedItemCount;
|
||||
anchors.topMargin: 12;
|
||||
anchors.bottomMargin: 12;
|
||||
|
@ -590,6 +594,17 @@ Rectangle {
|
|||
// 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() {
|
||||
var itemCountDictionary = {};
|
||||
var currentItemId;
|
||||
|
|
|
@ -197,6 +197,8 @@ Item {
|
|||
height: 50;
|
||||
echoMode: TextInput.Password;
|
||||
placeholderText: "passphrase";
|
||||
activeFocusOnPress: true;
|
||||
activeFocusOnTab: true;
|
||||
|
||||
onFocusChanged: {
|
||||
root.keyboardRaised = focus;
|
||||
|
@ -206,8 +208,8 @@ Item {
|
|||
anchors.fill: parent;
|
||||
|
||||
onClicked: {
|
||||
parent.focus = true;
|
||||
root.keyboardRaised = true;
|
||||
mouse.accepted = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -797,8 +797,8 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
|
|||
installNativeEventFilter(&MyNativeEventFilter::getInstance());
|
||||
#endif
|
||||
|
||||
_logger = new FileLogger(this); // After setting organization name in order to get correct directory
|
||||
|
||||
|
||||
_logger = new FileLogger(this);
|
||||
qInstallMessageHandler(messageHandler);
|
||||
|
||||
QFontDatabase::addApplicationFont(PathUtils::resourcesPath() + "styles/Inconsolata.otf");
|
||||
|
@ -814,6 +814,13 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
|
|||
(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) {
|
||||
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
|
||||
discoverabilityManager->updateLocation();
|
||||
|
||||
auto myAvatar = getMyAvatar();
|
||||
|
||||
connect(nodeList.data(), &NodeList::nodeAdded, this, &Application::nodeAdded);
|
||||
connect(nodeList.data(), &NodeList::nodeKilled, this, &Application::nodeKilled);
|
||||
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
|
||||
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>();
|
||||
connect(accountManager.data(), &AccountManager::authRequired, dialogsManager.data(), &DialogsManager::showLoginDialog);
|
||||
connect(accountManager.data(), &AccountManager::usernameChanged, this, &Application::updateWindowTitle);
|
||||
|
@ -2100,7 +2102,6 @@ Application::~Application() {
|
|||
_octreeProcessor.terminate();
|
||||
_entityEditSender.terminate();
|
||||
|
||||
|
||||
DependencyManager::destroy<AvatarManager>();
|
||||
DependencyManager::destroy<AnimationCache>();
|
||||
DependencyManager::destroy<FramebufferCache>();
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
#include "scripting/HMDScriptingInterface.h"
|
||||
#include "scripting/AssetMappingsScriptingInterface.h"
|
||||
#include "scripting/MenuScriptingInterface.h"
|
||||
#include "scripting/SettingsScriptingInterface.h"
|
||||
#include <Preferences.h>
|
||||
#include <ScriptEngines.h>
|
||||
#include "FileDialogHelper.h"
|
||||
|
@ -243,6 +244,7 @@ void Web3DOverlay::setupQmlSurface() {
|
|||
_webSurface->getSurfaceContext()->setContextProperty("InputConfiguration", DependencyManager::get<InputConfiguration>().data());
|
||||
_webSurface->getSurfaceContext()->setContextProperty("SoundCache", DependencyManager::get<SoundCache>().data());
|
||||
_webSurface->getSurfaceContext()->setContextProperty("MenuInterface", MenuScriptingInterface::getInstance());
|
||||
_webSurface->getSurfaceContext()->setContextProperty("Settings", SettingsScriptingInterface::getInstance());
|
||||
|
||||
_webSurface->getSurfaceContext()->setContextProperty("pathToFonts", "../../");
|
||||
|
||||
|
|
|
@ -381,7 +381,7 @@ class AvatarData : public QObject, public SpatiallyNestable {
|
|||
|
||||
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 controllerLeftHandMatrix READ getControllerLeftHandMatrix)
|
||||
|
@ -670,13 +670,19 @@ public:
|
|||
signals:
|
||||
void displayNameChanged();
|
||||
void lookAtSnappingChanged(bool enabled);
|
||||
void sessionUUIDChanged();
|
||||
|
||||
public slots:
|
||||
void sendAvatarDataPacket();
|
||||
void sendIdentityPacket();
|
||||
|
||||
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::vec3 getAbsoluteJointTranslationInObjectFrame(int index) const override;
|
||||
|
|
|
@ -26,7 +26,6 @@ class FilePersistThread : public GenericQueueThread < QString > {
|
|||
Q_OBJECT
|
||||
public:
|
||||
FilePersistThread(const FileLogger& logger);
|
||||
|
||||
signals:
|
||||
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 LOGS_DIRECTORY = "Logs";
|
||||
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 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
|
||||
// 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;
|
||||
|
@ -62,7 +63,13 @@ QString getLogRollerFilename() {
|
|||
QString result = FileUtils::standardPath(LOGS_DIRECTORY);
|
||||
QHostAddress clientAddress = getGuessedLocalAddress();
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -142,6 +149,12 @@ FileLogger::~FileLogger() {
|
|||
_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) {
|
||||
_persistThreadInstance->queueItem(message);
|
||||
emit logReceived(message);
|
||||
|
|
|
@ -26,6 +26,7 @@ public:
|
|||
|
||||
QString getFilename() const { return _fileName; }
|
||||
virtual void addMessage(const QString&) override;
|
||||
virtual void setSessionID(const QUuid&);
|
||||
virtual QString getLogData() override;
|
||||
virtual void locateLog() override;
|
||||
virtual void sync() override;
|
||||
|
|
Loading…
Reference in a new issue