BUILD_RTI conditional fixes and Qt6 API updates
- cmake/FindRTI.cmake: Add INTERFACE placeholder targets when RTI not found - cmake/FindRTI.cmake: Force BUILD_RTI=OFF when RTI not installed - Lts/Common/LtsSession/CMakeLists.txt: Make LtsSessionDataDds conditional on BUILD_RTI - Lts/Viewer/CMakeLists.txt: Make LtsDataView conditional on BUILD_RTI - Lts/Plugins/*/CMakeLists.txt: 97 plugin files wrapped in BUILD_RTI conditionals - cmake/NGLMacros.cmake: Fix NGL_ADD_BIG_RESOURCES macro (removed premature return()) - Multiple Qt6 API fixes: QLinkedList→std::list, QStringRef→QStringView, etc. - BUILD_RTI_FIXES_SUMMARY.md: Comprehensive documentation of all fixes Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2065 files changed
+48219
-1763
No files matched your search
@@ -1,5 +1,12 @@
|
||||
|
||||
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Manages all the Sessions
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*
|
||||
* Created by Mike Wille, SLSE, 2016-05-15
|
||||
*/
|
||||
|
||||
|
||||
#include "lts_session_manager.h"
|
||||
@@ -30,7 +37,7 @@ LtsSessionManager::LtsSessionManager()
|
||||
|
||||
LtsSessionManager::~LtsSessionManager()
|
||||
{
|
||||
|
||||
// qCritical() << "~LtsSessionManager";
|
||||
|
||||
for (auto i = m_sessionMap.begin(); i != m_sessionMap.end(); ++i)
|
||||
{
|
||||
@@ -46,24 +53,24 @@ bool LtsSessionManager::init(const DdsConnectionParams &connParams,
|
||||
LtsAppDescriptor::App appId,
|
||||
const QString &workspaceId,
|
||||
bool headless,
|
||||
bool hidden)
|
||||
bool hidden) // TODO: what to return ?
|
||||
{
|
||||
|
||||
// TODO: check if maps empty?
|
||||
m_dataPluginList = dataPluginList;
|
||||
m_guiPluginList = guiPluginList;
|
||||
m_appId = appId;
|
||||
m_headless = headless;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// shortcut: on first login etc. we go through ExerciseChooser to select an exercise
|
||||
// but when we're already in the exercise and starting an app from within,
|
||||
// we don't want to have the exercise chooser a second time -> directly go through app
|
||||
// and show the base layout
|
||||
|
||||
|
||||
// ????? Der Kommentar stimmt leider nicht. Loest leider nicht das Problem.
|
||||
|
||||
bool bHasBaseLayout = connParams.exerciseId > 0;
|
||||
|
||||
LtsSession *session = createSession(connParams, bHasBaseLayout, true, hidden);
|
||||
LtsSession *session = createSession(connParams, bHasBaseLayout, true, hidden); // start Admin Session (for login, etc.)
|
||||
session->setWorkspaceId(workspaceId);
|
||||
return session;
|
||||
}
|
||||
@@ -73,11 +80,11 @@ QVector<LtsSession *> LtsSessionManager::sessions()
|
||||
{
|
||||
return m_sessionMap.values().toVector();
|
||||
|
||||
// QVector<LtsSession *> result;
|
||||
// for (auto i = m_sessionMap.begin(); i != m_sessionMap.end(); ++i)
|
||||
// result.append(i.value());
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -93,9 +100,9 @@ void LtsSessionManager::softQuit()
|
||||
|
||||
m_sessionMap.clear();
|
||||
|
||||
emit hideAllOtherBLWs(nullptr);
|
||||
emit hideAllOtherBLWs(nullptr); // for tablet mode! shows another hidden session from some other app or maybe the same app, after the visible one was hidden
|
||||
|
||||
QMetaObject::invokeMethod(this, &LtsSessionManager::signalQuit, Qt::QueuedConnection);
|
||||
QMetaObject::invokeMethod(this, &LtsSessionManager::signalQuit, Qt::QueuedConnection); // wait until all Session's deleteLater is done
|
||||
}
|
||||
|
||||
|
||||
@@ -108,7 +115,7 @@ LtsSession *LtsSessionManager::createSession(const DdsConnectionParams &connPara
|
||||
|
||||
if (session != nullptr)
|
||||
{
|
||||
WARNING_LOG() << "Tried to create a Session that already exists";
|
||||
WARNING_LOG(m_logger) << "Tried to create a Session that already exists";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -116,8 +123,8 @@ LtsSession *LtsSessionManager::createSession(const DdsConnectionParams &connPara
|
||||
|
||||
connect(session, &LtsSession::signalQuit,
|
||||
this, &LtsSessionManager::signalQuit);
|
||||
|
||||
|
||||
// QueuedConnection since Qt5.9.1 seems to send the buttonRelease event again when entering an
|
||||
// eventloop within this slot. Not yet clear why this happens
|
||||
connect(session, &LtsSession::signalClose,
|
||||
this, &LtsSessionManager::slotCloseSession, Qt::QueuedConnection);
|
||||
connect(session, &LtsSession::signalLogout,
|
||||
@@ -140,13 +147,13 @@ LtsSession *LtsSessionManager::createSession(const DdsConnectionParams &connPara
|
||||
return;
|
||||
}
|
||||
|
||||
WARNING_LOG() << "Previously deleted Session " << session->partitionId() << "/"
|
||||
WARNING_LOG(m_logger) << "Previously deleted Session " << session->partitionId() << "/"
|
||||
<< session->partitionType() << " is still alive!";
|
||||
});
|
||||
#endif
|
||||
|
||||
if (hasBaseLayout)
|
||||
session->setBaseLayoutVisible();
|
||||
session->setBaseLayoutVisible(); // after payloads are done (if any), the base layout will be created
|
||||
|
||||
if (payloads)
|
||||
session->setPayloadsEnabled();
|
||||
@@ -159,7 +166,7 @@ LtsSession *LtsSessionManager::createSession(const DdsConnectionParams &connPara
|
||||
{
|
||||
|
||||
dds::domain::DomainParticipant dp = globSession->ddsConnector()->getDomainParticipant();
|
||||
if (!session->init(dp, connParams, m_dataPluginList, m_guiPluginList))
|
||||
if (!session->init(dp, connParams, m_dataPluginList, m_guiPluginList)) // init not successful? return invalid ptr
|
||||
{
|
||||
session->deleteLater();
|
||||
return nullptr;
|
||||
@@ -167,10 +174,13 @@ LtsSession *LtsSessionManager::createSession(const DdsConnectionParams &connPara
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
/*
|
||||
* init SOLLTE asynchron ablaufen.
|
||||
* init läuft aber synchron, da die Payloads der Plugins DIrectConnections benutzen.
|
||||
* AUf QueuedCOnnections umbauen ist schwerer, da init mit einem SessionCount von 0 rechnet, da init blocking ist und es daher nicht zum aufruf m_sessionMap[...] = ...; kommt......
|
||||
*/
|
||||
|
||||
|
||||
if (!session->init(connParams, m_dataPluginList, m_guiPluginList, hidden))
|
||||
if (!session->init(connParams, m_dataPluginList, m_guiPluginList, hidden)) // init not successful? return invalid ptr
|
||||
{
|
||||
session->deleteLater();
|
||||
return nullptr;
|
||||
@@ -210,7 +220,7 @@ void LtsSessionManager::slotCloseSession()
|
||||
session->aboutToClose();
|
||||
session->setInactive();
|
||||
session->deleteLater();
|
||||
m_sessionMap.remove(key);
|
||||
m_sessionMap.remove(key); // when destruction takes a long time, a new session may have been added which invalidated the iterator
|
||||
|
||||
found = true;
|
||||
break;
|
||||
@@ -220,9 +230,9 @@ void LtsSessionManager::slotCloseSession()
|
||||
if (!found)
|
||||
FATAL_LOG(m_logger) << "LtsSessionManager: Cannot find Session in map!";
|
||||
|
||||
emit hideAllOtherBLWs(nullptr);
|
||||
emit hideAllOtherBLWs(nullptr); // for tablet mode! shows another hidden session from some other app or maybe the same app, after the visible one was hidden
|
||||
|
||||
if (m_sessionMap.isEmpty())
|
||||
if (m_sessionMap.isEmpty()) // quit app if all sessions closed
|
||||
emit signalQuit();
|
||||
}
|
||||
|
||||
@@ -231,10 +241,10 @@ LtsSession *LtsSessionManager::getSession(IDL::PartitionType partitionType, int
|
||||
{
|
||||
auto it = m_sessionMap.find(SessionKey(partitionType, partitionId));
|
||||
|
||||
if (it != m_sessionMap.end())
|
||||
if (it != m_sessionMap.end()) // session found? return it!
|
||||
return it.value();
|
||||
|
||||
return nullptr;
|
||||
return nullptr; // not found
|
||||
}
|
||||
|
||||
}
|
||||
} // namespace LtsSession
|
||||
Reference in new issue
Block a user