mirror of
https://github.com/overte-org/overte.git
synced 2025-04-25 13:53:38 +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
|
||||
int highPriorityMessageCount;
|
||||
quint32 highPriorityMessageCount;
|
||||
_incomingPacketStream >> highPriorityMessageCount;
|
||||
int newHighPriorityMessages = highPriorityMessageCount - _receivedHighPriorityMessages;
|
||||
for (int i = 0; i < highPriorityMessageCount; i++) {
|
||||
for (quint32 i = 0; i < highPriorityMessageCount; i++) {
|
||||
QVariant data;
|
||||
_inputStream >> data;
|
||||
if (i >= _receivedHighPriorityMessages) {
|
||||
|
@ -193,7 +193,7 @@ void DatagramSequencer::receivedDatagram(const QByteArray& datagram) {
|
|||
// read the reliable data, if any
|
||||
quint32 reliableChannels;
|
||||
_incomingPacketStream >> reliableChannels;
|
||||
for (int i = 0; i < reliableChannels; i++) {
|
||||
for (quint32 i = 0; i < reliableChannels; i++) {
|
||||
quint32 channelIndex;
|
||||
_incomingPacketStream >> channelIndex;
|
||||
getReliableInputChannel(channelIndex)->readData(_incomingPacketStream);
|
||||
|
@ -664,7 +664,7 @@ void ReliableChannel::readData(QDataStream& in) {
|
|||
quint32 segments;
|
||||
in >> segments;
|
||||
bool readSome = false;
|
||||
for (int i = 0; i < segments; i++) {
|
||||
for (quint32 i = 0; i < segments; i++) {
|
||||
quint32 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));
|
||||
}
|
||||
|
||||
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 {
|
||||
return other.minimum.x >= minimum.x && other.maximum.x <= maximum.x &&
|
||||
other.minimum.y >= minimum.y && other.maximum.y <= maximum.y &&
|
||||
|
@ -322,8 +328,7 @@ void ParameterizedURLEditor::continueUpdatingParameters() {
|
|||
QMetaProperty widgetProperty = widgetMetaObject->property(widgetMetaObject->indexOfProperty(valuePropertyName));
|
||||
widgetProperty.write(widget, _url.getParameters().value(parameter.name));
|
||||
if (widgetProperty.hasNotifySignal()) {
|
||||
connect(widget, QByteArray(SIGNAL()).append(widgetProperty.notifySignal().methodSignature()),
|
||||
SLOT(updateURL()));
|
||||
connect(widget, signal(widgetProperty.notifySignal().methodSignature()), 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)
|
||||
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.
|
||||
class Box {
|
||||
STREAMABLE
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include <QVBoxLayout>
|
||||
|
||||
#include "Bitstream.h"
|
||||
#include "MetavoxelUtil.h"
|
||||
#include "SharedObject.h"
|
||||
|
||||
SharedObject::SharedObject() : _referenceCount(0) {
|
||||
|
@ -204,8 +205,7 @@ void SharedObjectEditor::updateType() {
|
|||
QMetaProperty widgetProperty = widgetMetaObject->property(widgetMetaObject->indexOfProperty(valuePropertyName));
|
||||
widgetProperty.write(widget, property.read(newObject));
|
||||
if (widgetProperty.hasNotifySignal()) {
|
||||
connect(widget, QByteArray(SIGNAL()).append(widgetProperty.notifySignal().methodSignature()),
|
||||
SLOT(propertyChanged()));
|
||||
connect(widget, signal(widgetProperty.notifySignal().methodSignature()), SLOT(propertyChanged()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue