Merge branch 'master' of https://github.com/highfidelity/hifi into persistThreadImprovements

This commit is contained in:
ZappoMan 2014-11-14 11:34:37 -08:00
commit c33272bcd8
5 changed files with 22 additions and 17 deletions

View file

@ -194,20 +194,23 @@ print("Cube overlay color =\n"
+ "green: " + cubeColor.green + "\n" + "green: " + cubeColor.green + "\n"
+ "blue: " + cubeColor.blue + "blue: " + cubeColor.blue
); );
var modelOverlayProperties = {
textures: { // This model overlay example causes intermittent crashes in NetworkGeometry::setTextureWithNameToURL()
filename1: "http://url1", //var modelOverlayProperties = {
filename2: "http://url2" // textures: {
} // filename1: HIFI_PUBLIC_BUCKET + "images/testing-swatches.svg",
} // filename2: HIFI_PUBLIC_BUCKET + "images/hifi-interface-tools.svg"
var modelOverlay = Overlays.addOverlay("model", modelOverlayProperties); // }
var textures = Overlays.getProperty(modelOverlay, "textures"); //}
var textureValues = ""; //var modelOverlay = Overlays.addOverlay("model", modelOverlayProperties);
for (key in textures) { //var textures = Overlays.getProperty(modelOverlay, "textures");
textureValues += "\n" + key + ": " + textures[key]; //var textureValues = "";
} //for (key in textures) {
print("Model overlay textures =" + textureValues); // textureValues += "\n" + key + ": " + textures[key];
Overlays.deleteOverlay(modelOverlay); //}
//print("Model overlay textures =" + textureValues);
//Overlays.deleteOverlay(modelOverlay);
print("Unknown overlay property =\n" + Overlays.getProperty(1000, "text")); // value = undefined print("Unknown overlay property =\n" + Overlays.getProperty(1000, "text")); // value = undefined
// When our script shuts down, we should clean up all of our overlays // When our script shuts down, we should clean up all of our overlays

View file

@ -124,7 +124,7 @@ void messageHandler(QtMsgType type, const QMessageLogContext& context, const QSt
QString logMessage = LogHandler::getInstance().printMessage((LogMsgType) type, context, message); QString logMessage = LogHandler::getInstance().printMessage((LogMsgType) type, context, message);
if (!logMessage.isEmpty()) { if (!logMessage.isEmpty()) {
Application::getInstance()->getLogger()->addMessage(qPrintable(logMessage)); Application::getInstance()->getLogger()->addMessage(qPrintable(logMessage + "\n"));
} }
} }

View file

@ -41,7 +41,7 @@ void FileLogger::addMessage(QString message) {
QFile file(_fileName); QFile file(_fileName);
if (file.open(QIODevice::WriteOnly | QIODevice::Append | QIODevice::Text)) { if (file.open(QIODevice::WriteOnly | QIODevice::Append | QIODevice::Text)) {
QTextStream out(&file); QTextStream out(&file);
out << message << "\n"; out << message;
} }
} }

View file

@ -82,7 +82,7 @@ QScriptValue Planar3DOverlay::getProperty(const QString& property) {
return vec2toScriptValue(_scriptEngine, _dimensions); return vec2toScriptValue(_scriptEngine, _dimensions);
} }
Base3DOverlay::getProperty(property); return Base3DOverlay::getProperty(property);
} }
bool Planar3DOverlay::findRayIntersection(const glm::vec3& origin, const glm::vec3& direction, bool Planar3DOverlay::findRayIntersection(const glm::vec3& origin, const glm::vec3& direction,

View file

@ -119,6 +119,8 @@ QString LogHandler::printMessage(LogMsgType type, const QMessageLogContext& cont
char dateString[100]; char dateString[100];
strftime(dateString, sizeof(dateString), DATE_STRING_FORMAT, localTime); strftime(dateString, sizeof(dateString), DATE_STRING_FORMAT, localTime);
prefixString.append(QString(" [%1]").arg(dateString));
if (_shouldOutputPID) { if (_shouldOutputPID) {
prefixString.append(QString(" [%1").arg(getpid())); prefixString.append(QString(" [%1").arg(getpid()));