Merge branch 'master' of github.com:highfidelity/hifi into infinite-scroll

This commit is contained in:
howard-stearns 2018-06-07 16:14:57 -07:00
commit 2761688d39
8 changed files with 22 additions and 17 deletions

View file

@ -163,7 +163,6 @@ Item {
Rectangle {
id: contextCard;
z: 2;
anchors.left: parent.left;
anchors.leftMargin: 30;
anchors.top: parent.top;
@ -337,7 +336,6 @@ Item {
Rectangle {
id: permissionExplanationCard;
z: 1;
anchors.left: parent.left;
anchors.leftMargin: 30;
anchors.top: parent.top;
@ -596,8 +594,8 @@ Item {
anchors.fill: parent;
hoverEnabled: enabled;
onClicked: {
contextCard.z = 1;
permissionExplanationCard.z = 0;
contextCard.visible = true;
permissionExplanationCard.visible = false;
root.sendToPurchases({ method: 'flipCard' });
}
onEntered: {
@ -779,8 +777,8 @@ Item {
noPermissionGlyph.color = hifi.colors.redAccent;
}
onClicked: {
contextCard.z = 0;
permissionExplanationCard.z = 1;
contextCard.visible = false;
permissionExplanationCard.visible = true;
root.sendToPurchases({ method: 'flipCard' });
}
}

View file

@ -314,6 +314,7 @@ Wallet::Wallet() {
auto nodeList = DependencyManager::get<NodeList>();
auto ledger = DependencyManager::get<Ledger>();
auto& packetReceiver = nodeList->getPacketReceiver();
_passphrase = new QString("");
packetReceiver.registerListener(PacketType::ChallengeOwnership, this, "handleChallengeOwnershipPacket");
packetReceiver.registerListener(PacketType::ChallengeOwnershipRequest, this, "handleChallengeOwnershipPacket");
@ -365,6 +366,10 @@ Wallet::~Wallet() {
if (_securityImage) {
delete _securityImage;
}
if (_passphrase) {
delete _passphrase;
}
}
bool Wallet::setPassphrase(const QString& passphrase) {

View file

@ -78,7 +78,7 @@ private:
QByteArray _salt;
QByteArray _iv;
QByteArray _ckey;
QString* _passphrase { new QString("") };
QString* _passphrase { nullptr };
bool _isOverridingServer { false };
bool writeWallet(const QString& newPassphrase = QString(""));

View file

@ -40,9 +40,10 @@ bool readOctreeFile(QString path, QJsonDocument* doc) {
}
bool OctreeUtils::RawOctreeData::readOctreeDataInfoFromJSON(QJsonObject root) {
if (root.contains("Id") && root.contains("DataVersion")) {
if (root.contains("Id") && root.contains("DataVersion") && root.contains("Version")) {
id = root["Id"].toVariant().toUuid();
version = root["DataVersion"].toInt();
dataVersion = root["DataVersion"].toInt();
version = root["Version"].toInt();
}
readSubclassData(root);
return true;
@ -76,11 +77,10 @@ bool OctreeUtils::RawOctreeData::readOctreeDataInfoFromFile(QString path) {
}
QByteArray OctreeUtils::RawOctreeData::toByteArray() {
const auto protocolVersion = (int)versionForPacketType((PacketTypeEnum::Value)dataPacketType());
QJsonObject obj {
{ "DataVersion", QJsonValue((qint64)version) },
{ "DataVersion", QJsonValue((qint64)dataVersion) },
{ "Id", QJsonValue(id.toString()) },
{ "Version", protocolVersion },
{ "Version", QJsonValue((qint64)version) },
};
writeSubclassData(obj);
@ -111,8 +111,8 @@ PacketType OctreeUtils::RawOctreeData::dataPacketType() const {
void OctreeUtils::RawOctreeData::resetIdAndVersion() {
id = QUuid::createUuid();
version = OctreeUtils::INITIAL_VERSION;
qDebug() << "Reset octree data to: " << id << version;
dataVersion = OctreeUtils::INITIAL_VERSION;
qDebug() << "Reset octree data to: " << id << dataVersion;
}
void OctreeUtils::RawEntityData::readSubclassData(const QJsonObject& root) {

View file

@ -28,6 +28,7 @@ constexpr Version INITIAL_VERSION = 0;
class RawOctreeData {
public:
QUuid id { QUuid() };
Version dataVersion { -1 };
Version version { -1 };
virtual PacketType dataPacketType() const;

View file

@ -179,8 +179,8 @@ bool OctreePersistThread::process() {
OctreeUtils::RawOctreeData data;
if (data.readOctreeDataInfoFromFile(_filename)) {
qDebug() << "Setting entity version info to: " << data.id << data.version;
_tree->setOctreeVersionInfo(data.id, data.version);
qDebug() << "Setting entity version info to: " << data.id << data.dataVersion;
_tree->setOctreeVersionInfo(data.id, data.dataVersion);
}
bool persistentFileRead;

View file

@ -47,7 +47,7 @@ static_assert(
const char* SDL2Manager::NAME = "SDL2";
const char* SDL2Manager::SDL2_ID_STRING = "SDL2";
const bool DEFAULT_ENABLED = false;
const bool DEFAULT_ENABLED = true;
SDL_JoystickID SDL2Manager::getInstanceId(SDL_GameController* controller) {
SDL_Joystick* joystick = SDL_GameControllerGetJoystick(controller);

View file

@ -295,6 +295,7 @@ function printToPolaroid(image_url) {
"description": "Printed from Snaps",
"modelURL": POLAROID_MODEL_URL,
"dimensions": { "x": 0.5667, "y": 0.0212, "z": 0.4176 },
"position": model_pos,
"rotation": model_rot,