mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-07-23 12:34:48 +02:00
Merge branch 'master' of https://github.com/highfidelity/hifi into skin
This commit is contained in:
commit
93eb60801a
8 changed files with 37 additions and 23 deletions
|
@ -3,9 +3,10 @@ Please read the [general build guide](BUILD.md) for information on dependencies
|
||||||
###Homebrew
|
###Homebrew
|
||||||
[Homebrew](http://brew.sh/) is an excellent package manager for OS X. It makes install of all High Fidelity dependencies very simple.
|
[Homebrew](http://brew.sh/) is an excellent package manager for OS X. It makes install of all High Fidelity dependencies very simple.
|
||||||
|
|
||||||
brew install cmake openssl qt5
|
brew tap homebrew/versions
|
||||||
|
brew install cmake openssl qt55
|
||||||
|
|
||||||
We no longer require install of qt5 via our [homebrew formulas repository](https://github.com/highfidelity/homebrew-formulas). Versions of Qt that are 5.5.x and above provide a mechanism to disable the wireless scanning we previously had a custom patch for.
|
We no longer require install of qt5 via our [homebrew formulas repository](https://github.com/highfidelity/homebrew-formulas). Versions of Qt that are 5.5.x provide a mechanism to disable the wireless scanning we previously had a custom patch for.
|
||||||
|
|
||||||
###OpenSSL and Qt
|
###OpenSSL and Qt
|
||||||
|
|
||||||
|
|
|
@ -128,7 +128,7 @@ void DomainGatekeeper::updateNodePermissions() {
|
||||||
QList<SharedNodePointer> nodesToKill;
|
QList<SharedNodePointer> nodesToKill;
|
||||||
|
|
||||||
auto limitedNodeList = DependencyManager::get<LimitedNodeList>();
|
auto limitedNodeList = DependencyManager::get<LimitedNodeList>();
|
||||||
limitedNodeList->eachNodeBreakable([this, limitedNodeList, &nodesToKill](const SharedNodePointer& node){
|
limitedNodeList->eachNode([this, limitedNodeList, &nodesToKill](const SharedNodePointer& node){
|
||||||
QString username = node->getPermissions().getUserName();
|
QString username = node->getPermissions().getUserName();
|
||||||
NodePermissions userPerms(username);
|
NodePermissions userPerms(username);
|
||||||
|
|
||||||
|
@ -167,8 +167,6 @@ void DomainGatekeeper::updateNodePermissions() {
|
||||||
// hang up on this node
|
// hang up on this node
|
||||||
nodesToKill << node;
|
nodesToKill << node;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
foreach (auto node, nodesToKill) {
|
foreach (auto node, nodesToKill) {
|
||||||
|
@ -264,7 +262,6 @@ SharedNodePointer DomainGatekeeper::processAgentConnectRequest(const NodeConnect
|
||||||
qDebug() << "user-permissions: no username, so:" << userPerms;
|
qDebug() << "user-permissions: no username, so:" << userPerms;
|
||||||
} else if (verifyUserSignature(username, usernameSignature, nodeConnection.senderSockAddr)) {
|
} else if (verifyUserSignature(username, usernameSignature, nodeConnection.senderSockAddr)) {
|
||||||
// they are sent us a username and the signature verifies it
|
// they are sent us a username and the signature verifies it
|
||||||
userPerms.setUserName(username);
|
|
||||||
if (_server->_settingsManager.havePermissionsForName(username)) {
|
if (_server->_settingsManager.havePermissionsForName(username)) {
|
||||||
// we have specific permissions for this user.
|
// we have specific permissions for this user.
|
||||||
userPerms = _server->_settingsManager.getPermissionsForName(username);
|
userPerms = _server->_settingsManager.getPermissionsForName(username);
|
||||||
|
@ -274,6 +271,7 @@ SharedNodePointer DomainGatekeeper::processAgentConnectRequest(const NodeConnect
|
||||||
userPerms |= _server->_settingsManager.getStandardPermissionsForName(NodePermissions::standardNameLoggedIn);
|
userPerms |= _server->_settingsManager.getStandardPermissionsForName(NodePermissions::standardNameLoggedIn);
|
||||||
qDebug() << "user-permissions: user is logged in, so:" << userPerms;
|
qDebug() << "user-permissions: user is logged in, so:" << userPerms;
|
||||||
}
|
}
|
||||||
|
userPerms.setUserName(username);
|
||||||
} else {
|
} else {
|
||||||
// they sent us a username, but it didn't check out
|
// they sent us a username, but it didn't check out
|
||||||
requestUserPublicKey(username);
|
requestUserPublicKey(username);
|
||||||
|
|
|
@ -199,7 +199,7 @@ FocusScope {
|
||||||
anchors.leftMargin: hifi.dimensions.textPadding
|
anchors.leftMargin: hifi.dimensions.textPadding
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
id: popupText
|
id: popupText
|
||||||
text: listView.model[index]
|
text: listView.model[index] ? listView.model[index] : ""
|
||||||
size: hifi.fontSizes.textFieldInput
|
size: hifi.fontSizes.textFieldInput
|
||||||
color: hifi.colors.baseGray
|
color: hifi.colors.baseGray
|
||||||
}
|
}
|
||||||
|
|
|
@ -186,7 +186,12 @@ ModalWindow {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (helper.urlToPath(folder).toLowerCase() !== helper.urlToPath(fileTableModel.folder).toLowerCase()) {
|
if (helper.urlToPath(folder).toLowerCase() !== helper.urlToPath(fileTableModel.folder).toLowerCase()) {
|
||||||
|
if (root.selectDirectory) {
|
||||||
|
currentSelection.text = currentText !== "This PC" ? currentText : "";
|
||||||
|
d.currentSelectionUrl = helper.pathToUrl(currentText);
|
||||||
|
}
|
||||||
fileTableModel.folder = folder;
|
fileTableModel.folder = folder;
|
||||||
|
fileTableView.forceActiveFocus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -212,9 +217,11 @@ ModalWindow {
|
||||||
function update() {
|
function update() {
|
||||||
var row = fileTableView.currentRow;
|
var row = fileTableView.currentRow;
|
||||||
|
|
||||||
openButton.text = root.selectDirectory && row === -1 ? "Choose" : "Open"
|
|
||||||
|
|
||||||
if (row === -1) {
|
if (row === -1) {
|
||||||
|
if (!root.selectDirectory) {
|
||||||
|
currentSelection.text = "";
|
||||||
|
currentSelectionIsFolder = false;
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -445,12 +452,6 @@ ModalWindow {
|
||||||
|
|
||||||
onSortIndicatorOrderChanged: { updateSort(); }
|
onSortIndicatorOrderChanged: { updateSort(); }
|
||||||
|
|
||||||
onActiveFocusChanged: {
|
|
||||||
if (activeFocus && currentRow == -1) {
|
|
||||||
fileTableView.selection.select(0)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
itemDelegate: Item {
|
itemDelegate: Item {
|
||||||
clip: true
|
clip: true
|
||||||
|
|
||||||
|
@ -607,6 +608,12 @@ ModalWindow {
|
||||||
readOnly: !root.saveDialog
|
readOnly: !root.saveDialog
|
||||||
activeFocusOnTab: !readOnly
|
activeFocusOnTab: !readOnly
|
||||||
onActiveFocusChanged: if (activeFocus) { selectAll(); }
|
onActiveFocusChanged: if (activeFocus) { selectAll(); }
|
||||||
|
onTextChanged: {
|
||||||
|
if (root.saveDialog && text !== "") {
|
||||||
|
fileTableView.selection.clear();
|
||||||
|
fileTableView.currentRow = -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
onAccepted: okAction.trigger();
|
onAccepted: okAction.trigger();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -652,7 +659,7 @@ ModalWindow {
|
||||||
|
|
||||||
Action {
|
Action {
|
||||||
id: okAction
|
id: okAction
|
||||||
text: root.saveDialog ? "Save" : (root.selectDirectory ? "Choose" : "Open")
|
text: currentSelection.text ? (root.selectDirectory && fileTableView.currentRow === -1 ? "Choose" : (root.saveDialog ? "Save" : "Open")) : "Open"
|
||||||
enabled: currentSelection.text || !root.selectDirectory && d.currentSelectionIsFolder ? true : false
|
enabled: currentSelection.text || !root.selectDirectory && d.currentSelectionIsFolder ? true : false
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
if (!root.selectDirectory && !d.currentSelectionIsFolder
|
if (!root.selectDirectory && !d.currentSelectionIsFolder
|
||||||
|
@ -676,7 +683,6 @@ ModalWindow {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Handle the ambiguity between different cases
|
// Handle the ambiguity between different cases
|
||||||
// * typed name (with or without extension)
|
// * typed name (with or without extension)
|
||||||
// * full path vs relative vs filename only
|
// * full path vs relative vs filename only
|
||||||
|
|
|
@ -1463,6 +1463,12 @@ bool EntityTree::readFromMap(QVariantMap& map) {
|
||||||
QVariantList entitiesQList = map["Entities"].toList();
|
QVariantList entitiesQList = map["Entities"].toList();
|
||||||
QScriptEngine scriptEngine;
|
QScriptEngine scriptEngine;
|
||||||
|
|
||||||
|
if (entitiesQList.length() == 0) {
|
||||||
|
// Empty map or invalidly formed file.
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool success = true;
|
||||||
foreach (QVariant entityVariant, entitiesQList) {
|
foreach (QVariant entityVariant, entitiesQList) {
|
||||||
// QVariantMap --> QScriptValue --> EntityItemProperties --> Entity
|
// QVariantMap --> QScriptValue --> EntityItemProperties --> Entity
|
||||||
QVariantMap entityMap = entityVariant.toMap();
|
QVariantMap entityMap = entityVariant.toMap();
|
||||||
|
@ -1480,9 +1486,10 @@ bool EntityTree::readFromMap(QVariantMap& map) {
|
||||||
EntityItemPointer entity = addEntity(entityItemID, properties);
|
EntityItemPointer entity = addEntity(entityItemID, properties);
|
||||||
if (!entity) {
|
if (!entity) {
|
||||||
qCDebug(entities) << "adding Entity failed:" << entityItemID << properties.getType();
|
qCDebug(entities) << "adding Entity failed:" << entityItemID << properties.getType();
|
||||||
|
success = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
void EntityTree::resetClientEditStats() {
|
void EntityTree::resetClientEditStats() {
|
||||||
|
|
|
@ -543,7 +543,9 @@ void NodeList::processDomainServerList(QSharedPointer<ReceivedMessage> message)
|
||||||
setSessionUUID(newUUID);
|
setSessionUUID(newUUID);
|
||||||
|
|
||||||
// pull the permissions/right/privileges for this node out of the stream
|
// pull the permissions/right/privileges for this node out of the stream
|
||||||
packetStream >> _permissions;
|
NodePermissions newPermissions;
|
||||||
|
packetStream >> newPermissions;
|
||||||
|
setPermissions(newPermissions);
|
||||||
|
|
||||||
// pull each node in the packet
|
// pull each node in the packet
|
||||||
while (packetStream.device()->pos() < message->getSize()) {
|
while (packetStream.device()->pos() < message->getSize()) {
|
||||||
|
|
|
@ -1863,9 +1863,9 @@ bool Octree::readJSONFromStream(unsigned long streamLength, QDataStream& inputSt
|
||||||
QJsonDocument asDocument = QJsonDocument::fromJson(jsonBuffer);
|
QJsonDocument asDocument = QJsonDocument::fromJson(jsonBuffer);
|
||||||
QVariant asVariant = asDocument.toVariant();
|
QVariant asVariant = asDocument.toVariant();
|
||||||
QVariantMap asMap = asVariant.toMap();
|
QVariantMap asMap = asVariant.toMap();
|
||||||
readFromMap(asMap);
|
bool success = readFromMap(asMap);
|
||||||
delete[] rawData;
|
delete[] rawData;
|
||||||
return true;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Octree::writeToFile(const char* fileName, OctreeElementPointer element, QString persistAsFileType) {
|
void Octree::writeToFile(const char* fileName, OctreeElementPointer element, QString persistAsFileType) {
|
||||||
|
|
|
@ -1222,7 +1222,7 @@ function handeMenuEvent(menuItem) {
|
||||||
Window.alert("No entities have been selected.");
|
Window.alert("No entities have been selected.");
|
||||||
} else {
|
} else {
|
||||||
var filename = "entities__" + Window.location.hostname + ".svo.json";
|
var filename = "entities__" + Window.location.hostname + ".svo.json";
|
||||||
filename = Window.save("Select where to save", filename, "*.json")
|
filename = Window.save("Select Where to Save", filename, "*.json")
|
||||||
if (filename) {
|
if (filename) {
|
||||||
var success = Clipboard.exportEntities(filename, selectionManager.selections);
|
var success = Clipboard.exportEntities(filename, selectionManager.selections);
|
||||||
if (!success) {
|
if (!success) {
|
||||||
|
@ -1234,7 +1234,7 @@ function handeMenuEvent(menuItem) {
|
||||||
|
|
||||||
var importURL = null;
|
var importURL = null;
|
||||||
if (menuItem == "Import Entities") {
|
if (menuItem == "Import Entities") {
|
||||||
var fullPath = Window.browse("Select models to import", "", "*.json");
|
var fullPath = Window.browse("Select Model to Import", "", "*.json");
|
||||||
if (fullPath) {
|
if (fullPath) {
|
||||||
importURL = "file:///" + fullPath;
|
importURL = "file:///" + fullPath;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue