mirror of
https://github.com/overte-org/overte.git
synced 2025-04-25 23:16:20 +02:00
Incorporated fixes for warnings that Brad reported on Windows.
This commit is contained in:
parent
d48b7b8ede
commit
200a2d77c2
4 changed files with 16 additions and 8 deletions
|
@ -175,10 +175,10 @@ void DatagramSequencer::receivedDatagram(const QByteArray& datagram) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// read and dispatch the high-priority messages
|
// read and dispatch the high-priority messages
|
||||||
int highPriorityMessageCount;
|
quint32 highPriorityMessageCount;
|
||||||
_incomingPacketStream >> highPriorityMessageCount;
|
_incomingPacketStream >> highPriorityMessageCount;
|
||||||
int newHighPriorityMessages = highPriorityMessageCount - _receivedHighPriorityMessages;
|
int newHighPriorityMessages = highPriorityMessageCount - _receivedHighPriorityMessages;
|
||||||
for (int i = 0; i < highPriorityMessageCount; i++) {
|
for (quint32 i = 0; i < highPriorityMessageCount; i++) {
|
||||||
QVariant data;
|
QVariant data;
|
||||||
_inputStream >> data;
|
_inputStream >> data;
|
||||||
if (i >= _receivedHighPriorityMessages) {
|
if (i >= _receivedHighPriorityMessages) {
|
||||||
|
@ -193,7 +193,7 @@ void DatagramSequencer::receivedDatagram(const QByteArray& datagram) {
|
||||||
// read the reliable data, if any
|
// read the reliable data, if any
|
||||||
quint32 reliableChannels;
|
quint32 reliableChannels;
|
||||||
_incomingPacketStream >> reliableChannels;
|
_incomingPacketStream >> reliableChannels;
|
||||||
for (int i = 0; i < reliableChannels; i++) {
|
for (quint32 i = 0; i < reliableChannels; i++) {
|
||||||
quint32 channelIndex;
|
quint32 channelIndex;
|
||||||
_incomingPacketStream >> channelIndex;
|
_incomingPacketStream >> channelIndex;
|
||||||
getReliableInputChannel(channelIndex)->readData(_incomingPacketStream);
|
getReliableInputChannel(channelIndex)->readData(_incomingPacketStream);
|
||||||
|
@ -664,7 +664,7 @@ void ReliableChannel::readData(QDataStream& in) {
|
||||||
quint32 segments;
|
quint32 segments;
|
||||||
in >> segments;
|
in >> segments;
|
||||||
bool readSome = false;
|
bool readSome = false;
|
||||||
for (int i = 0; i < segments; i++) {
|
for (quint32 i = 0; i < segments; i++) {
|
||||||
quint32 offset, size;
|
quint32 offset, size;
|
||||||
in >> offset >> size;
|
in >> offset >> size;
|
||||||
|
|
||||||
|
|
|
@ -141,6 +141,12 @@ QUuid readSessionID(const QByteArray& data, const SharedNodePointer& sendingNode
|
||||||
return QUuid::fromRfc4122(QByteArray::fromRawData(data.constData() + headerSize, UUID_BYTES));
|
return QUuid::fromRfc4122(QByteArray::fromRawData(data.constData() + headerSize, UUID_BYTES));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QByteArray signal(const char* signature) {
|
||||||
|
static QByteArray prototype = SIGNAL(dummyMethod());
|
||||||
|
QByteArray signal = prototype;
|
||||||
|
return signal.replace("dummyMethod()", signature);
|
||||||
|
}
|
||||||
|
|
||||||
bool Box::contains(const Box& other) const {
|
bool Box::contains(const Box& other) const {
|
||||||
return other.minimum.x >= minimum.x && other.maximum.x <= maximum.x &&
|
return other.minimum.x >= minimum.x && other.maximum.x <= maximum.x &&
|
||||||
other.minimum.y >= minimum.y && other.maximum.y <= maximum.y &&
|
other.minimum.y >= minimum.y && other.maximum.y <= maximum.y &&
|
||||||
|
@ -322,8 +328,7 @@ void ParameterizedURLEditor::continueUpdatingParameters() {
|
||||||
QMetaProperty widgetProperty = widgetMetaObject->property(widgetMetaObject->indexOfProperty(valuePropertyName));
|
QMetaProperty widgetProperty = widgetMetaObject->property(widgetMetaObject->indexOfProperty(valuePropertyName));
|
||||||
widgetProperty.write(widget, _url.getParameters().value(parameter.name));
|
widgetProperty.write(widget, _url.getParameters().value(parameter.name));
|
||||||
if (widgetProperty.hasNotifySignal()) {
|
if (widgetProperty.hasNotifySignal()) {
|
||||||
connect(widget, QByteArray(SIGNAL()).append(widgetProperty.notifySignal().methodSignature()),
|
connect(widget, signal(widgetProperty.notifySignal().methodSignature()), SLOT(updateURL()));
|
||||||
SLOT(updateURL()));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,6 +33,9 @@ class NetworkProgram;
|
||||||
/// \return the session ID, or a null ID if invalid (in which case a warning will be logged)
|
/// \return the session ID, or a null ID if invalid (in which case a warning will be logged)
|
||||||
QUuid readSessionID(const QByteArray& data, const SharedNodePointer& sendingNode, int& headerPlusIDSize);
|
QUuid readSessionID(const QByteArray& data, const SharedNodePointer& sendingNode, int& headerPlusIDSize);
|
||||||
|
|
||||||
|
/// Performs the runtime equivalent of Qt's SIGNAL macro, which is to attach a prefix to the signature.
|
||||||
|
QByteArray signal(const char* signature);
|
||||||
|
|
||||||
/// A streamable axis-aligned bounding box.
|
/// A streamable axis-aligned bounding box.
|
||||||
class Box {
|
class Box {
|
||||||
STREAMABLE
|
STREAMABLE
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
#include <QVBoxLayout>
|
#include <QVBoxLayout>
|
||||||
|
|
||||||
#include "Bitstream.h"
|
#include "Bitstream.h"
|
||||||
|
#include "MetavoxelUtil.h"
|
||||||
#include "SharedObject.h"
|
#include "SharedObject.h"
|
||||||
|
|
||||||
SharedObject::SharedObject() : _referenceCount(0) {
|
SharedObject::SharedObject() : _referenceCount(0) {
|
||||||
|
@ -204,8 +205,7 @@ void SharedObjectEditor::updateType() {
|
||||||
QMetaProperty widgetProperty = widgetMetaObject->property(widgetMetaObject->indexOfProperty(valuePropertyName));
|
QMetaProperty widgetProperty = widgetMetaObject->property(widgetMetaObject->indexOfProperty(valuePropertyName));
|
||||||
widgetProperty.write(widget, property.read(newObject));
|
widgetProperty.write(widget, property.read(newObject));
|
||||||
if (widgetProperty.hasNotifySignal()) {
|
if (widgetProperty.hasNotifySignal()) {
|
||||||
connect(widget, QByteArray(SIGNAL()).append(widgetProperty.notifySignal().methodSignature()),
|
connect(widget, signal(widgetProperty.notifySignal().methodSignature()), SLOT(propertyChanged()));
|
||||||
SLOT(propertyChanged()));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue