Clean up stale comments and blank lines in FTC/FTS and nglapplication unit-test

Drop the Qt6-migration explanatory comments (rtiddsgen setter notes,
Log4Qt/BUILDING_NGLLOGGER notes, the INTERFACE-to-STATIC note, the
return_loan comment block) and the stray blank lines. No code changes:
this is the state the last full green run (build + 22/22 ctest +
coverage + DEB) was built from.
This commit is contained in:
berrux-dev committed 2026-11-21 09:25:55 +01:00
1 parent e8d7aa7bd6
commit b1662eddfa
10 files changed
+3 -104

No files matched your search

@@ -20,11 +20,9 @@
#include <QObject>
#include <QMetaMethod>
#include <QTimer>
#include <queue>
#include <future>
namespace FTC
{
template <class C>
@@ -114,7 +112,6 @@ public:
preInit();
}
~GenericFtcImpl()
{
Q_ASSERT(!m_dying);
@@ -154,8 +151,6 @@ public:
}
}
struct ClassicRequest
{
connext::WriteSample<RequestTopic> sample;
@@ -164,14 +159,12 @@ public:
int uniqueId = 0;
};
bool requestDataClassic(const RequestTopic &requestTopic,
const char *replySlot,
const char *errorSlot,
int &uniqueId) override
{
Q_ASSERT(!m_dying);
ClassicRequest request;
if (!checkSlots(request, replySlot, errorSlot))
return false;
@@ -180,19 +173,14 @@ public:
uniqueId = request.uniqueId;
createThread();
{
std::lock_guard<std::mutex> l(m_requestMutex);
m_classicRequests.push(request);
}
runThread();
return true;
}
template<typename ReplyTopic>
struct ModernRequest
{
@@ -201,14 +189,11 @@ public:
Request2 *requestWatcher;
};
std::future<ReplyTopic> requestDataModern(const RequestTopic &requestTopic, Request2 *requestWatcher) override
{
Q_ASSERT(!m_dying);
std::promise<ReplyTopic> promise;
std::future<ReplyTopic> future = promise.get_future();
connext::WriteSample<RequestTopic> sample;
sample.set_data(requestTopic);
@@ -220,7 +205,6 @@ public:
}
runThread();
return future;
}
@@ -231,36 +215,28 @@ private:
return QString::fromUtf8(TopicNameHelper::functionTopicName());
}
int partitionId() const override
{
return m_partitionId;
}
QString partitionType() const override
{
return QString::fromStdString(m_partitionType);
}
std::unique_ptr<connext::Requester<RequestTopic, ReplyTopic> > requester; // in-thread!
void cleanupThread() override // in-thread!
{
// called in-thread while thread is preparing to immediately shut down (after this call) and cleans everything that was created also in-thread
requester.reset();
}
void threadDone() override
{
// called after the thread is done and before any new threads may be created
// that's why there's no need to lock the mutex here
// NOTE: not called on ctor!
// NOTE: no need to lock as there is no thread anymore at this point
for (; !m_modernRequests.empty(); m_modernRequests.pop())
{
ModernRequest<ReplyTopic> &request = m_modernRequests.front();
@@ -278,7 +254,6 @@ private:
}
}
void work() override // in-thread!
{
try
@@ -291,8 +266,7 @@ private:
{
fprintf(stderr, "[!] GenericFtc::work: called while marked as no work available! run? %d (%s)\n", isRun(), threadName().toStdString().c_str());
}
setWorkAvailable(false); // NOTE: no need to lock as we're inside the thread and it is guaranteed that we don't hit the condition wait while writing to the variable
// lock
setWorkAvailable(false);
{
std::lock_guard<std::mutex> l(m_requestMutex);
@@ -371,14 +345,12 @@ private:
}
}
template <typename T, typename std::enable_if<HasStatusFunction<T>::value, int>::type = 0>
static inline bool isInProgress(const connext::Sample<T> &reply)
{
return (reply.data().replyState() == Core::FtReplyState::InProgress);
}
template <typename T, typename std::enable_if<!HasStatusFunction<T>::value, int>::type = 0>
static inline bool isInProgress(const connext::Sample<T> &)
{
@@ -500,10 +472,6 @@ private:
QTimer::singleShot(0, request.requestWatcher, &Request2::finished);
return;
/* No need to call replies.return_loan();
* the destructor takes care of doing it every time replies goes out of scope
*/
}
}
// -------------------------------------------------------------------------------------------------------------
@@ -557,7 +525,6 @@ private:
}
// -------------------------------------------------------------------------------------------------------------
// for classic requests:
QObject *m_objToInform;
int m_uniqueId { 0 };