mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 10:43:45 +02:00
Fix warnings about creating QObjects with parents in different thread
This commit is contained in:
parent
63279f4525
commit
416852c0cd
3 changed files with 10 additions and 6 deletions
|
@ -713,9 +713,13 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
|
||||||
updateHeartbeat();
|
updateHeartbeat();
|
||||||
|
|
||||||
// setup a timer for domain-server check ins
|
// setup a timer for domain-server check ins
|
||||||
QTimer* domainCheckInTimer = new QTimer(nodeList.data());
|
QTimer* domainCheckInTimer = new QTimer(this);
|
||||||
connect(domainCheckInTimer, &QTimer::timeout, nodeList.data(), &NodeList::sendDomainServerCheckIn);
|
connect(domainCheckInTimer, &QTimer::timeout, nodeList.data(), &NodeList::sendDomainServerCheckIn);
|
||||||
domainCheckInTimer->start(DOMAIN_SERVER_CHECK_IN_MSECS);
|
domainCheckInTimer->start(DOMAIN_SERVER_CHECK_IN_MSECS);
|
||||||
|
connect(this, &QCoreApplication::aboutToQuit, [domainCheckInTimer] {
|
||||||
|
domainCheckInTimer->stop();
|
||||||
|
domainCheckInTimer->deleteLater();
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
auto audioIO = DependencyManager::get<AudioClient>();
|
auto audioIO = DependencyManager::get<AudioClient>();
|
||||||
|
|
|
@ -178,6 +178,11 @@ void GLBackend::init() {
|
||||||
int swapInterval = wglGetSwapIntervalEXT();
|
int swapInterval = wglGetSwapIntervalEXT();
|
||||||
qCDebug(gpugllogging, "V-Sync is %s\n", (swapInterval > 0 ? "ON" : "OFF"));
|
qCDebug(gpugllogging, "V-Sync is %s\n", (swapInterval > 0 ? "ON" : "OFF"));
|
||||||
}*/
|
}*/
|
||||||
|
#endif
|
||||||
|
#if THREADED_TEXTURE_BUFFERING
|
||||||
|
// This has to happen on the main thread in order to give the thread
|
||||||
|
// pool a reasonable parent object
|
||||||
|
GLVariableAllocationSupport::TransferJob::startBufferingThread();
|
||||||
#endif
|
#endif
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -461,11 +461,6 @@ void GLVariableAllocationSupport::updateMemoryPressure() {
|
||||||
|
|
||||||
if (newState != _memoryPressureState) {
|
if (newState != _memoryPressureState) {
|
||||||
_memoryPressureState = newState;
|
_memoryPressureState = newState;
|
||||||
#if THREADED_TEXTURE_BUFFERING
|
|
||||||
if (MemoryPressureState::Transfer == _memoryPressureState) {
|
|
||||||
TransferJob::startBufferingThread();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
// Clear the existing queue
|
// Clear the existing queue
|
||||||
_transferQueue = WorkQueue();
|
_transferQueue = WorkQueue();
|
||||||
_promoteQueue = WorkQueue();
|
_promoteQueue = WorkQueue();
|
||||||
|
|
Loading…
Reference in a new issue