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"
+ "blue: " + cubeColor.blue
);
var modelOverlayProperties = {
textures: {
filename1: "http://url1",
filename2: "http://url2"
}
}
var modelOverlay = Overlays.addOverlay("model", modelOverlayProperties);
var textures = Overlays.getProperty(modelOverlay, "textures");
var textureValues = "";
for (key in textures) {
textureValues += "\n" + key + ": " + textures[key];
}
print("Model overlay textures =" + textureValues);
Overlays.deleteOverlay(modelOverlay);
// This model overlay example causes intermittent crashes in NetworkGeometry::setTextureWithNameToURL()
//var modelOverlayProperties = {
// 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 = "";
//for (key in textures) {
// textureValues += "\n" + key + ": " + textures[key];
//}
//print("Model overlay textures =" + textureValues);
//Overlays.deleteOverlay(modelOverlay);
print("Unknown overlay property =\n" + Overlays.getProperty(1000, "text")); // value = undefined
// 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);
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);
if (file.open(QIODevice::WriteOnly | QIODevice::Append | QIODevice::Text)) {
QTextStream out(&file);
out << message << "\n";
out << message;
}
}

View file

@ -82,7 +82,7 @@ QScriptValue Planar3DOverlay::getProperty(const QString& property) {
return vec2toScriptValue(_scriptEngine, _dimensions);
}
Base3DOverlay::getProperty(property);
return Base3DOverlay::getProperty(property);
}
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];
strftime(dateString, sizeof(dateString), DATE_STRING_FORMAT, localTime);
prefixString.append(QString(" [%1]").arg(dateString));
if (_shouldOutputPID) {
prefixString.append(QString(" [%1").arg(getpid()));