Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Qt 5.12.3 to work around macOS issues. #1558

Draft
wants to merge 48 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
125841a
Remove the HiFiAC codec
daleglass Sep 27, 2020
61ba1f3
Reinstate partial backwards compatibility with Qt 5.12.3
JulianGro Dec 30, 2021
2275c61
Use Qt 5.12.3 for macOS to work around issue https://github.com/virca…
JulianGro Dec 30, 2021
058b903
Fix Qt 5.12.3 type errors
ctrlaltdavid Dec 30, 2021
28c736e
Add old Qt packages for manual selection.
JulianGro Dec 31, 2021
5a09064
Add metaverse server field on the login screen
Apr 11, 2021
b5258ea
Fix height, tabbing, and other stuff
Apr 11, 2021
3d0c5e2
Fix some anchors and add logging
Apr 12, 2021
d2f8780
Tell the AccountManager that the auth URL changed
Apr 12, 2021
d2f0583
Remove duplicate setAuthURL declaration
Dec 18, 2021
4e399ed
Merge remote-tracking branch 'origin/master' into remove-hifiac
ksuprynowicz Jan 18, 2022
bf48bf0
Merge branch 'vircadia:master' into tell-accountmanager-url-changed
ksuprynowicz Jan 18, 2022
ee77811
Fixed build error due to lack of hifiac
ksuprynowicz Jan 18, 2022
30806ce
Inform AccountManager about metaverse server change
ksuprynowicz Jan 22, 2022
000166b
Update Metaverse server URL on focus change
ksuprynowicz Jan 22, 2022
7db3017
Adding "Places" application
AleziaKurdis Jan 23, 2022
53d1824
Replace "Explore" by "Places" application.
AleziaKurdis Jan 23, 2022
df68f5c
Merge branch 'master' into remove-hifiac
ksuprynowicz Jan 23, 2022
e2d7e55
Merge branch 'master' into tell-accountmanager-url-changed
ksuprynowicz Jan 23, 2022
a91e026
Copyright Adjustment
AleziaKurdis Jan 23, 2022
f8083ee
Copyright adjustment
AleziaKurdis Jan 23, 2022
7af288c
Update domain-server/resources/describe-settings.json
daleglass Jan 27, 2022
3bda3af
typo on function name filterSearchField
AleziaKurdis Jan 28, 2022
b262546
Merge pull request #1 from overte-org/remove-hifiac
ksuprynowicz Jan 28, 2022
8ff6e9a
Merge pull request #3 from AleziaKurdis/feature/Places-app
ksuprynowicz Jan 28, 2022
dc29dc4
Clear password on metaverse server change
ksuprynowicz Jan 28, 2022
6a81255
Merge branch 'tell-accountmanager-url-changed' of https://github.com/…
ksuprynowicz Jan 28, 2022
e6b78fd
Merge pull request #2 from overte-org/tell-accountmanager-url-changed
ksuprynowicz Jan 28, 2022
0e69da9
update teh MS for Overte
AleziaKurdis Jan 31, 2022
79ecad6
Merge pull request #5 from AleziaKurdis/fix/OverteInFederation
ksuprynowicz Feb 5, 2022
f97b1df
Ressources rebranding for Overte
AleziaKurdis Feb 6, 2022
990b4f2
Replace by brand-banner.svg
AleziaKurdis Feb 6, 2022
9b1958e
Replaced by brand-logo.svg
AleziaKurdis Feb 6, 2022
ae3f241
Delete VircadiaLogo.fbx
AleziaKurdis Feb 6, 2022
b10d7af
Delete vircadia.png
AleziaKurdis Feb 6, 2022
43b5e83
Delete vircadia-logo-1880.png
AleziaKurdis Feb 6, 2022
c6f1e64
Updated some URLs, rebranded documentation and changed default metave…
ksuprynowicz Feb 9, 2022
1ab6f17
Replaced the rest of metaverse addresses
ksuprynowicz Feb 10, 2022
55dac33
Merge remote-tracking branch 'origin/master' into overte_rebranding
ksuprynowicz Feb 10, 2022
c214d56
Rebranded Resources for the installer
AleziaKurdis Feb 11, 2022
026cc62
New Overte logo in a better size and spacing
AleziaKurdis Feb 12, 2022
1191168
Fix server-console and ICE server address
ksuprynowicz Feb 12, 2022
2400bc9
Adjustment for Logo ratio
AleziaKurdis Feb 12, 2022
bd457cc
Revert "Adjustment for Logo ratio"
ksuprynowicz Feb 12, 2022
ceb5456
Logo ratio adjustment
AleziaKurdis Feb 12, 2022
7e6fcda
Merge pull request #13 from AleziaKurdis/overte_rebranding
ksuprynowicz Feb 18, 2022
92907bd
Clean up Qt compatibility code
JulianGro Feb 19, 2022
0e8e691
Merge branch 'master' into macOS_old_Qt
JulianGro Feb 19, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/master_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ jobs:
echo "CMAKE_EXTRA=-DVIRCADIA_CPU_ARCHITECTURE= -DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED=OFF -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DOPENSSL_LIBRARIES=/usr/local/opt/openssl/lib -G Xcode" >> $GITHUB_ENV
echo "::set-output name=symbols_archive::${BUILD_NUMBER}-${{ matrix.build_type }}-mac-symbols.zip"
echo "APP_TARGET_NAME=Vircadia" >> $GITHUB_ENV
# Build with old Qt to work around incompatibility with newer Qt versions and macOSXSDK10.12. See https://github.com/vircadia/vircadia/issues/1516
echo "VIRCADIA_USE_QT_VERSION=5.12.3" >> $GITHUB_ENV
fi
# Windows build variables
if [ "${{ matrix.os }}" = "windows-latest" ]; then
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pr_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ jobs:
echo "CMAKE_EXTRA=-DVIRCADIA_CPU_ARCHITECTURE= -DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -DCLIENT_ONLY=1 -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED=OFF -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DOPENSSL_LIBRARIES=/usr/local/opt/openssl/lib -G Xcode" >> $GITHUB_ENV
fi
echo "APP_TARGET_NAME=Vircadia" >> $GITHUB_ENV
# Build with old Qt to work around incompatibility with newer Qt versions and macOSXSDK10.12. See https://github.com/vircadia/vircadia/issues/1516
echo "VIRCADIA_USE_QT_VERSION=5.12.3" >> $GITHUB_ENV
fi
# Windows build variables
if [ "${{ matrix.os }}" = "windows-latest" ]; then
Expand Down
7 changes: 7 additions & 0 deletions BUILD_OSX.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ You will need version `10.12` of the macOS SDK for building, otherwise you may h
cp -rp ~/Downloads/MacOSX10.12.sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/
```

When using macOSXSDK10.12, you also need to use an older Qt package to avoid compatibility issues on Big Sur and newer.
To do this, set the appropriate environment variable:
```bash
VIRCADIA_USE_QT_VERSION=5.12.3
```
See https://github.com/vircadia/vircadia/issues/1516.

### OpenSSL

Assuming you've installed OpenSSL using the homebrew instructions above, you'll need to set `OPENSSL_ROOT_DIR` so CMake can find your installations.
Expand Down
5 changes: 5 additions & 0 deletions assignment-client/src/audio/AvatarAudioStream.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@ class AvatarAudioStream : public PositionalAudioStream {
AvatarAudioStream(bool isStereo, int numStaticJitterFrames = -1);

private:
#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
AvatarAudioStream(const AvatarAudioStream&);
AvatarAudioStream& operator= (const AvatarAudioStream&);
#else
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest adding a new header/source file, something like QtCompatibility.h, and implementing some of the functionality there. That'll result in a smaller and cleaner patch. For instance, something like this:

#ifndef Q_DISABLE_COPY
    #define Q_DISABLE_COPY(className) \
        className(const className &) = delete;\
        className &operator=(const className &) = delete;
#endif

And with just that, things get smaller and nicer.

Q_DISABLE_COPY(AvatarAudioStream)
#endif

int parseStreamProperties(PacketType type, const QByteArray& packetAfterSeqNum, int& numAudioSamples) override;
};
Expand Down
4 changes: 4 additions & 0 deletions assignment-client/src/avatars/AvatarMixer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1062,7 +1062,11 @@ void AvatarMixer::parseDomainServerSettings(const QJsonObject& domainSettings) {

static const QString AVATAR_WHITELIST_OPTION = "avatar_whitelist";
_slaveSharedData.skeletonURLWhitelist = avatarMixerGroupObject[AVATAR_WHITELIST_OPTION]
#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
.toString().split(',', QString::KeepEmptyParts);
#else
.toString().split(',', Qt::KeepEmptyParts);
#endif

static const QString REPLACEMENT_AVATAR_OPTION = "replacement_avatar";
_slaveSharedData.skeletonReplacementURL = avatarMixerGroupObject[REPLACEMENT_AVATAR_OPTION]
Expand Down
6 changes: 3 additions & 3 deletions domain-server/src/NodeConnectionData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ NodeConnectionData NodeConnectionData::fromDataStream(QDataStream& dataStream, c

dataStream >> newHeader.lastPingTimestamp;

SocketType publicSocketType, localSocketType;
quint8 publicSocketType, localSocketType;
JulianGro marked this conversation as resolved.
Show resolved Hide resolved
dataStream >> newHeader.nodeType
>> publicSocketType >> newHeader.publicSockAddr >> localSocketType >> newHeader.localSockAddr
>> newHeader.interestList >> newHeader.placeName;
newHeader.publicSockAddr.setType(publicSocketType);
newHeader.localSockAddr.setType(localSocketType);
newHeader.publicSockAddr.setType((SocketType)publicSocketType);
newHeader.localSockAddr.setType((SocketType)localSocketType);

// For WebRTC connections, the user client's signaling channel WebSocket address is used instead of the actual data
// channel's address.
Expand Down
20 changes: 20 additions & 0 deletions interface/src/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3261,12 +3261,20 @@ void Application::initializeUi() {
auto newValidator = [=](const QUrl& url) -> bool {
QString whitelistPrefix = "[WHITELIST ENTITY SCRIPTS]";
QList<QString> safeURLS = { "" };
#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
safeURLS += qEnvironmentVariable("EXTRA_WHITELIST").trimmed().split(QRegExp("\\s*,\\s*"), QString::SkipEmptyParts);
#else
safeURLS += qEnvironmentVariable("EXTRA_WHITELIST").trimmed().split(QRegExp("\\s*,\\s*"), Qt::SkipEmptyParts);
#endif

// PULL SAFEURLS FROM INTERFACE.JSON Settings

QVariant raw = Setting::Handle<QVariant>("private/settingsSafeURLS").get();
#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
QStringList settingsSafeURLS = raw.toString().trimmed().split(QRegExp("\\s*[,\r\n]+\\s*"), QString::SkipEmptyParts);
#else
QStringList settingsSafeURLS = raw.toString().trimmed().split(QRegExp("\\s*[,\r\n]+\\s*"), Qt::SkipEmptyParts);
#endif
safeURLS += settingsSafeURLS;

// END PULL SAFEURLS FROM INTERFACE.JSON Settings
Expand Down Expand Up @@ -8843,19 +8851,31 @@ void Application::initPlugins(const QStringList& arguments) {
parser.parse(arguments);

if (parser.isSet(display)) {
#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
auto preferredDisplays = parser.value(display).split(',', QString::SkipEmptyParts);
#else
auto preferredDisplays = parser.value(display).split(',', Qt::SkipEmptyParts);
#endif
qInfo() << "Setting prefered display plugins:" << preferredDisplays;
PluginManager::getInstance()->setPreferredDisplayPlugins(preferredDisplays);
}

if (parser.isSet(disableDisplays)) {
#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
auto disabledDisplays = parser.value(disableDisplays).split(',', QString::SkipEmptyParts);
#else
auto disabledDisplays = parser.value(disableDisplays).split(',', Qt::SkipEmptyParts);
#endif
qInfo() << "Disabling following display plugins:" << disabledDisplays;
PluginManager::getInstance()->disableDisplays(disabledDisplays);
}

if (parser.isSet(disableInputs)) {
#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
auto disabledInputs = parser.value(disableInputs).split(',', QString::SkipEmptyParts);
#else
auto disabledInputs = parser.value(disableInputs).split(',', Qt::SkipEmptyParts);
#endif
qInfo() << "Disabling following input plugins:" << disabledInputs;
PluginManager::getInstance()->disableInputs(disabledInputs);
}
Expand Down
8 changes: 8 additions & 0 deletions interface/src/Application.h
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,11 @@ private slots:

EntityTreePointer _entityClipboard;

#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
mutable QMutex _viewMutex { QMutex::Recursive };
#else
mutable QRecursiveMutex _viewMutex;
#endif
ViewFrustum _viewFrustum; // current state of view frustum, perspective, orientation, etc.
ViewFrustum _displayViewFrustum;

Expand Down Expand Up @@ -774,7 +778,11 @@ private slots:
bool _isMissingSequenceNumbers { false };

void checkChangeCursor();
#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
mutable QMutex _changeCursorLock { QMutex::Recursive };
#else
mutable QRecursiveMutex _changeCursorLock;
#endif
Qt::CursorShape _desiredCursor{ Qt::BlankCursor };
bool _cursorNeedsChanging { false };

Expand Down
5 changes: 5 additions & 0 deletions interface/src/avatar/MyHead.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@ class MyHead : public Head {
void simulate(float deltaTime) override;

private:
#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
MyHead(const Head&);
MyHead& operator= (const MyHead&);
#else
Q_DISABLE_COPY(MyHead)
#endif
};

#endif // hifi_MyHead_h
4 changes: 4 additions & 0 deletions interface/src/graphics/GraphicsEngine.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,11 @@ class GraphicsEngine {

protected:

#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
mutable QMutex _renderArgsMutex{ QMutex::Recursive };
#else
mutable QRecursiveMutex _renderArgsMutex;
#endif
AppRenderArgs _appRenderArgs;

RateCounter<500> _renderLoopCounter;
Expand Down
4 changes: 4 additions & 0 deletions interface/src/ui/overlays/Overlays.h
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,11 @@ public slots:
private:
void cleanupOverlaysToDelete();

#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
mutable QMutex _mutex { QMutex::Recursive };
#else
mutable QRecursiveMutex _mutex;
#endif
QMap<QUuid, Overlay::Pointer> _overlays;
QList<Overlay::Pointer> _overlaysToDelete;

Expand Down
5 changes: 5 additions & 0 deletions libraries/animation/src/AnimNodeLoader.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,12 @@ protected slots:
QSharedPointer<Resource> _resource;

private:
#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
AnimNodeLoader(const AnimNodeLoader&) = delete;
AnimNodeLoader& operator=(const AnimNodeLoader&) = delete;
#else
Q_DISABLE_COPY(AnimNodeLoader)
#endif
};

#endif // hifi_AnimNodeLoader
10 changes: 10 additions & 0 deletions libraries/animation/src/AnimRandomSwitch.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,12 @@ class AnimRandomSwitch : public AnimNode {
std::vector<Transition> _transitions;

private:
#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
RandomSwitchState(const RandomSwitchState&) = delete;
RandomSwitchState& operator=(const RandomSwitchState&) = delete;
#else
Q_DISABLE_COPY(RandomSwitchState)
#endif
};

public:
Expand Down Expand Up @@ -179,7 +184,12 @@ class AnimRandomSwitch : public AnimNode {
QString _lastPlayedState;

private:
#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
AnimRandomSwitch(const AnimRandomSwitch&) = delete;
AnimRandomSwitch& operator=(const AnimRandomSwitch&) = delete;
#else
Q_DISABLE_COPY(AnimRandomSwitch)
#endif
};

#endif // hifi_AnimRandomSwitch_h
10 changes: 10 additions & 0 deletions libraries/animation/src/AnimStateMachine.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,12 @@ class AnimStateMachine : public AnimNode {
std::vector<Transition> _transitions;

private:
#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
State(const State&) = delete;
State& operator=(const State&) = delete;
#else
Q_DISABLE_COPY(State)
#endif
};

public:
Expand Down Expand Up @@ -150,7 +155,12 @@ class AnimStateMachine : public AnimNode {
QString _currentStateVar;

private:
#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
AnimStateMachine(const AnimStateMachine&) = delete;
AnimStateMachine& operator=(const AnimStateMachine&) = delete;
#else
Q_DISABLE_COPY(AnimStateMachine)
#endif
};

#endif // hifi_AnimStateMachine_h
5 changes: 5 additions & 0 deletions libraries/audio/src/AudioInjectorManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,12 @@ private slots:
bool wouldExceedLimits();

AudioInjectorManager() { createThread(); }
#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
AudioInjectorManager(const AudioInjectorManager&) = delete;
AudioInjectorManager& operator=(const AudioInjectorManager&) = delete;
#else
Q_DISABLE_COPY(AudioInjectorManager)
#endif

void createThread();

Expand Down
5 changes: 5 additions & 0 deletions libraries/audio/src/InjectedAudioStream.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@ class InjectedAudioStream : public PositionalAudioStream {
virtual const QUuid& getStreamIdentifier() const override { return _streamIdentifier; }

private:
#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
InjectedAudioStream(const InjectedAudioStream&);
InjectedAudioStream& operator= (const InjectedAudioStream&);
#else
Q_DISABLE_COPY(InjectedAudioStream)
#endif

AudioStreamStats getAudioStreamStats() const override;
int parseStreamProperties(PacketType type, const QByteArray& packetAfterSeqNum, int& numAudioSamples) override;
Expand Down
5 changes: 5 additions & 0 deletions libraries/avatars/src/AvatarData.h
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -1887,7 +1887,12 @@ public slots:
virtual void clearAvatarGrabData(const QUuid& grabID);

private:
#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
AvatarData(const AvatarData&);
AvatarData& operator= (const AvatarData&);
#else
Q_DISABLE_COPY(AvatarData)
#endif

friend void avatarStateFromFrame(const QByteArray& frameData, AvatarData* _avatar);
static QUrl _defaultFullAvatarModelUrl;
Expand Down
5 changes: 5 additions & 0 deletions libraries/avatars/src/HeadData.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,12 @@ class HeadData {
AvatarData* _owningAvatar;

private:
#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
HeadData(const HeadData&);
HeadData& operator= (const HeadData&);
#else
Q_DISABLE_COPY(HeadData)
#endif

void setHeadOrientation(const glm::quat& orientation);
};
Expand Down
13 changes: 13 additions & 0 deletions libraries/controllers/src/controllers/UserInputMapper.cpp
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,11 @@ Mapping::Pointer UserInputMapper::newMapping(const QString& mappingName) {
// if (request->getResult() == ResourceRequest::Success) {
// result = parseMapping(QString(request->getData()));
// } else {
// #if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
// qCWarning(controllers) << "Failed to load mapping url <" << jsonUrl << ">" << endl;
// #else
// qCWarning(controllers) << "Failed to load mapping url <" << jsonUrl << ">" << Qt::endl;
// #endif
// }
// request->deleteLater();
// }
Expand Down Expand Up @@ -1177,13 +1181,22 @@ Mapping::Pointer UserInputMapper::parseMapping(const QString& json) {
if (doc.isNull()) {
qCDebug(controllers) << "Invalid JSON...\n";
qCDebug(controllers) << error.errorString();
#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
qCDebug(controllers) << "JSON was:\n" << json << endl;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we could do something like:

 #if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
     #define VEndl endl
 #else
     #define VEndl Qt::endl
 #endif

#else
qCDebug(controllers) << "JSON was:\n" << json << Qt::endl;
#endif
return Mapping::Pointer();
}

if (!doc.isObject()) {
#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
qWarning() << "Mapping json Document is not an object" << endl;
qCDebug(controllers) << "JSON was:\n" << json << endl;
#else
qWarning() << "Mapping json Document is not an object" << Qt::endl;
qCDebug(controllers) << "JSON was:\n" << json << Qt::endl;
#endif
return Mapping::Pointer();
}
return parseMapping(doc.object());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,11 @@ protected slots:
// application specific position, when it's in desktop mode, the reticle position will simply move
// the system mouse.
glm::vec2 _reticlePositionInHMD { 0.0f, 0.0f };
#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
mutable QMutex _reticleLock { QMutex::Recursive };
#else
mutable QRecursiveMutex _reticleLock;
#endif

QPointF _lastKnownRealMouse;
bool _ignoreMouseMove { false };
Expand Down
6 changes: 6 additions & 0 deletions libraries/embedded-webserver/src/HTTPConnection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,15 @@ HTTPConnection::HTTPConnection(QTcpSocket* socket, HTTPManager* parentManager) :
_socket->setParent(this);

// connect initial slots
#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
connect(socket, SIGNAL(readyRead()), SLOT(readRequest()));
connect(socket, SIGNAL(error(QAbstractSocket::SocketError)), SLOT(deleteLater()));
connect(socket, SIGNAL(disconnected()), SLOT(deleteLater()));
#else
connect(socket, &QAbstractSocket::readyRead, this, &HTTPConnection::readRequest);
connect(socket, &QAbstractSocket::errorOccurred, this, &HTTPConnection::deleteLater);
connect(socket, &QAbstractSocket::disconnected, this, &HTTPConnection::deleteLater);
#endif
}

HTTPConnection::~HTTPConnection() {
Expand Down
8 changes: 8 additions & 0 deletions libraries/entities/src/EntitySimulation.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ const int DIRTY_SIMULATION_FLAGS =

class EntitySimulation : public QObject, public std::enable_shared_from_this<EntitySimulation> {
public:
#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
EntitySimulation() : _mutex(QMutex::Recursive), _nextExpiry(std::numeric_limits<uint64_t>::max()), _entityTree(nullptr) { }
#else
EntitySimulation() : _mutex(), _nextExpiry(std::numeric_limits<uint64_t>::max()), _entityTree(nullptr) { }
#endif
virtual ~EntitySimulation() { setEntityTree(nullptr); }

inline EntitySimulationPointer getThisPointer() const {
Expand Down Expand Up @@ -90,7 +94,11 @@ class EntitySimulation : public QObject, public std::enable_shared_from_this<Ent
void callUpdateOnEntitiesThatNeedIt(uint64_t now);
virtual void sortEntitiesThatMoved();

#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
QMutex _mutex{ QMutex::Recursive };
#else
QRecursiveMutex _mutex;
#endif

SetOfEntities _entitiesToSort; // entities moved by simulation (and might need resort in EntityTree)
SetOfEntities _simpleKinematicEntities; // entities undergoing non-colliding kinematic motion
Expand Down
Loading