diff --git a/core/include/Common/spimpl.h b/core/include/Common/spimpl.h index b4d5e04..7f6e8be 100644 --- a/core/include/Common/spimpl.h +++ b/core/include/Common/spimpl.h @@ -89,8 +89,9 @@ using default_copier_t = typename default_copier::type; template struct is_default_manageable - : public std::integral_constant >::value - && std::is_same >::value> { + : public std::integral_constant >::value + && std::is_same >::value> { }; } @@ -131,10 +132,11 @@ public: } template - impl_ptr(U *u, typename std::enable_if::value - && is_default_manageable::value, - dummy_t_>::type - = dummy_t_()) SPIMPL_NOEXCEPT + impl_ptr(U *u, + typename std::enable_if::value + && is_default_manageable::value, + dummy_t_>::type + = dummy_t_()) SPIMPL_NOEXCEPT : impl_ptr(u, &details::default_delete, &details::default_copy) { } @@ -151,12 +153,12 @@ public: #ifdef SPIMPL_HAS_AUTO_PTR template - impl_ptr(std::auto_ptr &&u, typename std::enable_if::value - && is_default_manageable::value, - dummy_t_>::type - = dummy_t_()) SPIMPL_NOEXCEPT - : ptr_(u.release(), &details::default_delete), - copier_(&details::default_copy) + impl_ptr(std::auto_ptr &&u, + typename std::enable_if::value + && is_default_manageable::value, + dummy_t_>::type + = dummy_t_()) SPIMPL_NOEXCEPT : ptr_(u.release(), &details::default_delete), + copier_(&details::default_copy) { } #endif diff --git a/core/src/DataSource/DataSourceController.cpp b/core/src/DataSource/DataSourceController.cpp index 81adfb3..aa862c8 100644 --- a/core/src/DataSource/DataSourceController.cpp +++ b/core/src/DataSource/DataSourceController.cpp @@ -64,14 +64,14 @@ public: DataSourceController::DataSourceController(QObject *parent) : impl{spimpl::make_unique_impl()} { - qCDebug(LOG_DataSourceController()) << tr("DataSourceController construction") - << QThread::currentThread(); + qCDebug(LOG_DataSourceController()) + << tr("DataSourceController construction") << QThread::currentThread(); } DataSourceController::~DataSourceController() { - qCDebug(LOG_DataSourceController()) << tr("DataSourceController destruction") - << QThread::currentThread(); + qCDebug(LOG_DataSourceController()) + << tr("DataSourceController destruction") << QThread::currentThread(); this->waitForFinish(); } @@ -161,8 +161,8 @@ QVariantList DataSourceController::productsDataForMimeData(const QByteArray &mim void DataSourceController::initialize() { - qCDebug(LOG_DataSourceController()) << tr("DataSourceController init") - << QThread::currentThread(); + qCDebug(LOG_DataSourceController()) + << tr("DataSourceController init") << QThread::currentThread(); impl->m_WorkingMutex.lock(); qCDebug(LOG_DataSourceController()) << tr("DataSourceController init END"); } diff --git a/core/src/Network/NetworkController.cpp b/core/src/Network/NetworkController.cpp index dcaacc6..002a47a 100644 --- a/core/src/Network/NetworkController.cpp +++ b/core/src/Network/NetworkController.cpp @@ -64,8 +64,8 @@ void NetworkController::onProcessRequested(std::shared_ptr requ impl->unlock(); } - qCDebug(LOG_NetworkController()) << tr("NetworkController onReplyFinished END") - << QThread::currentThread() << reply; + qCDebug(LOG_NetworkController()) + << tr("NetworkController onReplyFinished END") << QThread::currentThread() << reply; }; auto onReplyProgress = [reply, request, this](qint64 bytesRead, qint64 totalBytes) { @@ -73,9 +73,9 @@ void NetworkController::onProcessRequested(std::shared_ptr requ // NOTE: a totalbytes of 0 can happened when a request has been aborted if (totalBytes > 0) { double progress = (bytesRead * 100.0) / totalBytes; - qCDebug(LOG_NetworkController()) << tr("NetworkController onReplyProgress") << progress - << QThread::currentThread() << request.get() << reply - << bytesRead << totalBytes; + qCDebug(LOG_NetworkController()) + << tr("NetworkController onReplyProgress") << progress << QThread::currentThread() + << request.get() << reply << bytesRead << totalBytes; impl->lockRead(); auto it = impl->m_NetworkReplyToId.find(reply); if (it != impl->m_NetworkReplyToId.cend()) { @@ -87,8 +87,8 @@ void NetworkController::onProcessRequested(std::shared_ptr requ impl->unlock(); } - qCDebug(LOG_NetworkController()) << tr("NetworkController onReplyProgress END") - << QThread::currentThread() << reply; + qCDebug(LOG_NetworkController()) + << tr("NetworkController onReplyProgress END") << QThread::currentThread() << reply; } }; @@ -125,8 +125,8 @@ void NetworkController::finalize() void NetworkController::onReplyCanceled(QUuid identifier) { auto findReply = [identifier](const auto &entry) { return identifier == entry.second; }; - qCDebug(LOG_NetworkController()) << tr("NetworkController onReplyCanceled") - << QThread::currentThread() << identifier; + qCDebug(LOG_NetworkController()) + << tr("NetworkController onReplyCanceled") << QThread::currentThread() << identifier; impl->lockRead(); @@ -138,8 +138,8 @@ void NetworkController::onReplyCanceled(QUuid identifier) << QThread::currentThread() << identifier; it->first->abort(); } - qCDebug(LOG_NetworkController()) << tr("NetworkController onReplyCanceled END") - << QThread::currentThread(); + qCDebug(LOG_NetworkController()) + << tr("NetworkController onReplyCanceled END") << QThread::currentThread(); } void NetworkController::waitForFinish() diff --git a/core/src/Variable/Variable.cpp b/core/src/Variable/Variable.cpp index 8d68fa0..3eb44df 100644 --- a/core/src/Variable/Variable.cpp +++ b/core/src/Variable/Variable.cpp @@ -265,8 +265,8 @@ QVector Variable::provideNotInCacheRangeList(const SqpRange &range) co notInCache << SqpRange{impl->m_CacheRange.m_TEnd, range.m_TEnd}; } else { - qCCritical(LOG_Variable()) << tr("Detection of unknown case.") - << QThread::currentThread(); + qCCritical(LOG_Variable()) + << tr("Detection of unknown case.") << QThread::currentThread(); } } } @@ -305,8 +305,8 @@ QVector Variable::provideInCacheRangeList(const SqpRange &range) const inCache << impl->m_CacheRange; } else { - qCCritical(LOG_Variable()) << tr("Detection of unknown case.") - << QThread::currentThread(); + qCCritical(LOG_Variable()) + << tr("Detection of unknown case.") << QThread::currentThread(); } } } @@ -339,8 +339,8 @@ QVector Variable::provideNotInCacheRangeList(const SqpRange &oldRange, notInCache << SqpRange{oldRange.m_TEnd, nextRange.m_TEnd}; } else { - qCCritical(LOG_Variable()) << tr("Detection of unknown case.") - << QThread::currentThread(); + qCCritical(LOG_Variable()) + << tr("Detection of unknown case.") << QThread::currentThread(); } } } @@ -378,8 +378,8 @@ QVector Variable::provideInCacheRangeList(const SqpRange &oldRange, inCache << oldRange; } else { - qCCritical(LOG_Variable()) << tr("Detection of unknown case.") - << QThread::currentThread(); + qCCritical(LOG_Variable()) + << tr("Detection of unknown case.") << QThread::currentThread(); } } } diff --git a/core/src/Variable/VariableAcquisitionWorker.cpp b/core/src/Variable/VariableAcquisitionWorker.cpp index 479293a..f77a6e6 100644 --- a/core/src/Variable/VariableAcquisitionWorker.cpp +++ b/core/src/Variable/VariableAcquisitionWorker.cpp @@ -53,8 +53,8 @@ VariableAcquisitionWorker::VariableAcquisitionWorker(QObject *parent) VariableAcquisitionWorker::~VariableAcquisitionWorker() { - qCInfo(LOG_VariableAcquisitionWorker()) << tr("VariableAcquisitionWorker destruction") - << QThread::currentThread(); + qCInfo(LOG_VariableAcquisitionWorker()) + << tr("VariableAcquisitionWorker destruction") << QThread::currentThread(); this->waitForFinish(); } @@ -71,8 +71,8 @@ QUuid VariableAcquisitionWorker::pushVariableRequest(QUuid varRequestId, QUuid v // Request creation auto acqRequest = AcquisitionRequest{}; - qCDebug(LOG_VariableAcquisitionWorker()) << tr("PushVariableRequest ") << vIdentifier - << varRequestId; + qCDebug(LOG_VariableAcquisitionWorker()) + << tr("PushVariableRequest ") << vIdentifier << varRequestId; acqRequest.m_VarRequestId = varRequestId; acqRequest.m_vIdentifier = vIdentifier; acqRequest.m_DataProviderParameters = parameters; @@ -150,8 +150,8 @@ void VariableAcquisitionWorker::abortProgressRequested(QUuid vIdentifier) void VariableAcquisitionWorker::onVariableRetrieveDataInProgress(QUuid acqIdentifier, double progress) { - qCDebug(LOG_VariableAcquisitionWorker()) << tr("TORM: onVariableRetrieveDataInProgress ") - << acqIdentifier << progress; + qCDebug(LOG_VariableAcquisitionWorker()) + << tr("TORM: onVariableRetrieveDataInProgress ") << acqIdentifier << progress; impl->lockRead(); auto aIdToARit = impl->m_AcqIdentifierToAcqRequestMap.find(acqIdentifier); if (aIdToARit != impl->m_AcqIdentifierToAcqRequestMap.cend()) { @@ -176,16 +176,16 @@ void VariableAcquisitionWorker::onVariableRetrieveDataInProgress(QUuid acqIdenti void VariableAcquisitionWorker::onVariableAcquisitionFailed(QUuid acqIdentifier) { - qCDebug(LOG_VariableAcquisitionWorker()) << tr("onVariableAcquisitionFailed") - << QThread::currentThread(); + qCDebug(LOG_VariableAcquisitionWorker()) + << tr("onVariableAcquisitionFailed") << QThread::currentThread(); impl->lockRead(); auto it = impl->m_AcqIdentifierToAcqRequestMap.find(acqIdentifier); if (it != impl->m_AcqIdentifierToAcqRequestMap.cend()) { auto request = it->second; impl->unlock(); - qCDebug(LOG_VariableAcquisitionWorker()) << tr("onVariableAcquisitionFailed") - << acqIdentifier << request.m_vIdentifier - << QThread::currentThread(); + qCDebug(LOG_VariableAcquisitionWorker()) + << tr("onVariableAcquisitionFailed") << acqIdentifier << request.m_vIdentifier + << QThread::currentThread(); emit variableCanceledRequested(request.m_vIdentifier); } else { @@ -198,8 +198,8 @@ void VariableAcquisitionWorker::onVariableDataAcquired(QUuid acqIdentifier, std::shared_ptr dataSeries, SqpRange dataRangeAcquired) { - qCDebug(LOG_VariableAcquisitionWorker()) << tr("TORM: onVariableDataAcquired on range ") - << acqIdentifier << dataRangeAcquired; + qCDebug(LOG_VariableAcquisitionWorker()) + << tr("TORM: onVariableDataAcquired on range ") << acqIdentifier << dataRangeAcquired; impl->lockWrite(); auto aIdToARit = impl->m_AcqIdentifierToAcqRequestMap.find(acqIdentifier); if (aIdToARit != impl->m_AcqIdentifierToAcqRequestMap.cend()) { @@ -270,8 +270,8 @@ void VariableAcquisitionWorker::onExecuteRequest(QUuid acqIdentifier) void VariableAcquisitionWorker::initialize() { - qCDebug(LOG_VariableAcquisitionWorker()) << tr("VariableAcquisitionWorker init") - << QThread::currentThread(); + qCDebug(LOG_VariableAcquisitionWorker()) + << tr("VariableAcquisitionWorker init") << QThread::currentThread(); impl->m_WorkingMutex.lock(); qCDebug(LOG_VariableAcquisitionWorker()) << tr("VariableAcquisitionWorker init END"); } diff --git a/core/src/Variable/VariableCacheController.cpp b/core/src/Variable/VariableCacheController.cpp index fd1e836..9edc77c 100644 --- a/core/src/Variable/VariableCacheController.cpp +++ b/core/src/Variable/VariableCacheController.cpp @@ -30,8 +30,8 @@ VariableCacheController::VariableCacheController(QObject *parent) void VariableCacheController::addDateTime(std::shared_ptr variable, const SqpRange &dateTime) { - qCDebug(LOG_VariableCacheController()) << "VariableCacheController::addDateTime" - << QThread::currentThread()->objectName(); + qCDebug(LOG_VariableCacheController()) + << "VariableCacheController::addDateTime" << QThread::currentThread()->objectName(); if (variable) { auto findVariableIte = impl->m_VariableToSqpRangeListMap.find(variable); if (findVariableIte == impl->m_VariableToSqpRangeListMap.end()) { @@ -104,8 +104,8 @@ VariableCacheController::provideNotInCacheDateTimeList(std::shared_ptr QVector VariableCacheController::dateCacheList(std::shared_ptr variable) const noexcept { - qCDebug(LOG_VariableCacheController()) << "VariableCacheController::dateCacheList" - << QThread::currentThread()->objectName(); + qCDebug(LOG_VariableCacheController()) + << "VariableCacheController::dateCacheList" << QThread::currentThread()->objectName(); try { return impl->m_VariableToSqpRangeListMap.at(variable); } @@ -215,8 +215,8 @@ void VariableCacheController::displayCache(std::shared_ptr variable) c { auto variableDateTimeList = impl->m_VariableToSqpRangeListMap.find(variable); if (variableDateTimeList != impl->m_VariableToSqpRangeListMap.end()) { - qCInfo(LOG_VariableCacheController()) << tr("VariableCacheController::displayCache") - << variableDateTimeList->second; + qCInfo(LOG_VariableCacheController()) + << tr("VariableCacheController::displayCache") << variableDateTimeList->second; } else { qCWarning(LOG_VariableCacheController()) diff --git a/core/src/Variable/VariableController.cpp b/core/src/Variable/VariableController.cpp index 0a6fbb1..91184da 100644 --- a/core/src/Variable/VariableController.cpp +++ b/core/src/Variable/VariableController.cpp @@ -165,8 +165,8 @@ struct VariableController::VariableControllerPrivate { VariableController::VariableController(QObject *parent) : QObject{parent}, impl{spimpl::make_unique_impl(this)} { - qCDebug(LOG_VariableController()) << tr("VariableController construction") - << QThread::currentThread(); + qCDebug(LOG_VariableController()) + << tr("VariableController construction") << QThread::currentThread(); connect(impl->m_VariableModel, &VariableModel::abortProgessRequested, this, &VariableController::onAbortProgressRequested); @@ -193,8 +193,8 @@ VariableController::VariableController(QObject *parent) VariableController::~VariableController() { - qCDebug(LOG_VariableController()) << tr("VariableController destruction") - << QThread::currentThread(); + qCDebug(LOG_VariableController()) + << tr("VariableController destruction") << QThread::currentThread(); this->waitForFinish(); } @@ -361,8 +361,8 @@ VariableController::createVariable(const QString &name, const QVariantHash &meta void VariableController::onDateTimeOnSelection(const SqpRange &dateTime) { // NOTE: Even if acquisition request is aborting, the graphe range will be changed - qCDebug(LOG_VariableController()) << "VariableController::onDateTimeOnSelection" - << QThread::currentThread()->objectName(); + qCDebug(LOG_VariableController()) + << "VariableController::onDateTimeOnSelection" << QThread::currentThread()->objectName(); auto selectedRows = impl->m_VariableSelectionModel->selectedRows(); // NOTE we only permit the time modification for one variable @@ -483,9 +483,9 @@ void VariableController::onAbortAcquisitionRequested(QUuid vIdentifier) void VariableController::onAddSynchronizationGroupId(QUuid synchronizationGroupId) { - qCDebug(LOG_VariableController()) << "TORM: VariableController::onAddSynchronizationGroupId" - << QThread::currentThread()->objectName() - << synchronizationGroupId; + qCDebug(LOG_VariableController()) + << "TORM: VariableController::onAddSynchronizationGroupId" + << QThread::currentThread()->objectName() << synchronizationGroupId; auto vSynchroGroup = std::make_shared(); impl->m_GroupIdToVariableSynchronizationGroupMap.insert( std::make_pair(synchronizationGroupId, vSynchroGroup)); @@ -500,8 +500,8 @@ void VariableController::onAddSynchronized(std::shared_ptr variable, QUuid synchronizationGroupId) { - qCDebug(LOG_VariableController()) << "TORM: VariableController::onAddSynchronized" - << synchronizationGroupId; + qCDebug(LOG_VariableController()) + << "TORM: VariableController::onAddSynchronized" << synchronizationGroupId; auto varToVarIdIt = impl->m_VariableToIdentifierMap.find(variable); if (varToVarIdIt != impl->m_VariableToIdentifierMap.cend()) { auto groupIdToVSGIt @@ -565,9 +565,9 @@ void VariableController::onRequestDataLoading(QVector } auto varRequestId = QUuid::createUuid(); - qCDebug(LOG_VariableController()) << "VariableController::onRequestDataLoading" - << QThread::currentThread()->objectName() << varRequestId - << range << synchronise; + qCDebug(LOG_VariableController()) + << "VariableController::onRequestDataLoading" << QThread::currentThread()->objectName() + << varRequestId << range << synchronise; if (!synchronise) { auto varIds = std::list{}; @@ -577,8 +577,8 @@ void VariableController::onRequestDataLoading(QVector } impl->m_VarGroupIdToVarIds.insert(std::make_pair(varRequestId, varIds)); for (const auto &var : variables) { - qCDebug(LOG_VariableController()) << "processRequest for" << var->name() << varRequestId - << varIds.size(); + qCDebug(LOG_VariableController()) + << "processRequest for" << var->name() << varRequestId << varIds.size(); impl->processRequest(var, range, varRequestId); } } @@ -603,8 +603,8 @@ void VariableController::onRequestDataLoading(QVector // Don't process already processed var if (var != nullptr) { - qCDebug(LOG_VariableController()) << "processRequest synchro for" << var->name() - << varRequestId; + qCDebug(LOG_VariableController()) + << "processRequest synchro for" << var->name() << varRequestId; auto vSyncRangeRequested = variables.contains(var) ? range @@ -706,26 +706,26 @@ void VariableController::VariableControllerPrivate::processRequest(std::shared_p switch (varHandler->m_State) { case VariableRequestHandlerState::OFF: { - qCDebug(LOG_VariableController()) << tr("Process Request OFF") - << varRequest.m_RangeRequested - << varRequest.m_CacheRangeRequested; + qCDebug(LOG_VariableController()) + << tr("Process Request OFF") << varRequest.m_RangeRequested + << varRequest.m_CacheRangeRequested; varHandler->m_RunningVarRequest = varRequest; varHandler->m_State = VariableRequestHandlerState::RUNNING; executeVarRequest(var, varRequest); break; } case VariableRequestHandlerState::RUNNING: { - qCDebug(LOG_VariableController()) << tr("Process Request RUNNING") - << varRequest.m_RangeRequested - << varRequest.m_CacheRangeRequested; + qCDebug(LOG_VariableController()) + << tr("Process Request RUNNING") << varRequest.m_RangeRequested + << varRequest.m_CacheRangeRequested; varHandler->m_State = VariableRequestHandlerState::PENDING; varHandler->m_PendingVarRequest = varRequest; break; } case VariableRequestHandlerState::PENDING: { - qCDebug(LOG_VariableController()) << tr("Process Request PENDING") - << varRequest.m_RangeRequested - << varRequest.m_CacheRangeRequested; + qCDebug(LOG_VariableController()) + << tr("Process Request PENDING") << varRequest.m_RangeRequested + << varRequest.m_CacheRangeRequested; auto variableGroupIdToCancel = varHandler->m_PendingVarRequest.m_VariableGroupId; cancelVariableRequest(variableGroupIdToCancel); // Cancel variable can make state downgrade @@ -762,8 +762,8 @@ VariableController::VariableControllerPrivate::findVariable(QUuid vIdentifier) std::shared_ptr VariableController::VariableControllerPrivate::retrieveDataSeries( const QVector acqDataPacketVector) { - qCDebug(LOG_VariableController()) << tr("TORM: retrieveDataSeries acqDataPacketVector size") - << acqDataPacketVector.size(); + qCDebug(LOG_VariableController()) + << tr("TORM: retrieveDataSeries acqDataPacketVector size") << acqDataPacketVector.size(); std::shared_ptr dataSeries; if (!acqDataPacketVector.isEmpty()) { dataSeries = acqDataPacketVector[0].m_DateSeries; @@ -780,8 +780,8 @@ void VariableController::VariableControllerPrivate::registerProvider( std::shared_ptr provider) { if (m_ProviderSet.find(provider) == m_ProviderSet.end()) { - qCDebug(LOG_VariableController()) << tr("Registering of a new provider") - << provider->objectName(); + qCDebug(LOG_VariableController()) + << tr("Registering of a new provider") << provider->objectName(); m_ProviderSet.insert(provider); connect(provider.get(), &IDataProvider::dataProvided, m_VariableAcquisitionWorker.get(), &VariableAcquisitionWorker::onVariableDataAcquired); @@ -816,8 +816,8 @@ QUuid VariableController::VariableControllerPrivate::acceptVariableRequest( // Element traité, on a déjà toutes les données necessaires auto varGroupId = varHandler->m_RunningVarRequest.m_VariableGroupId; - qCDebug(LOG_VariableController()) << "Variable::acceptVariableRequest" << varGroupId - << m_VarGroupIdToVarIds.size(); + qCDebug(LOG_VariableController()) + << "Variable::acceptVariableRequest" << varGroupId << m_VarGroupIdToVarIds.size(); return varHandler->m_RunningVarRequest.m_VariableGroupId; } @@ -837,8 +837,8 @@ void VariableController::VariableControllerPrivate::updateVariables(QUuid varReq auto &varIds = varGroupIdToVarIdsIt->second; auto varIdsEnd = varIds.end(); bool processVariableUpdate = true; - qCDebug(LOG_VariableController()) << "VariableControllerPrivate::updateVariables" - << varRequestId << varIds.size(); + qCDebug(LOG_VariableController()) + << "VariableControllerPrivate::updateVariables" << varRequestId << varIds.size(); for (auto varIdsIt = varIds.begin(); (varIdsIt != varIdsEnd) && processVariableUpdate; ++varIdsIt) { auto itVarHandler = m_VarIdToVarRequestHandler.find(*varIdsIt); @@ -856,15 +856,15 @@ void VariableController::VariableControllerPrivate::updateVariables(QUuid varReq auto &varRequest = itVarHandler->second->m_RunningVarRequest; var->setRange(varRequest.m_RangeRequested); var->setCacheRange(varRequest.m_CacheRangeRequested); - qCDebug(LOG_VariableController()) << tr("1: onDataProvided") - << varRequest.m_RangeRequested - << varRequest.m_CacheRangeRequested; - qCDebug(LOG_VariableController()) << tr("2: onDataProvided var points before") - << var->nbPoints() - << varRequest.m_DataSeries->nbPoints(); + qCDebug(LOG_VariableController()) + << tr("1: onDataProvided") << varRequest.m_RangeRequested + << varRequest.m_CacheRangeRequested; + qCDebug(LOG_VariableController()) + << tr("2: onDataProvided var points before") << var->nbPoints() + << varRequest.m_DataSeries->nbPoints(); var->mergeDataSeries(varRequest.m_DataSeries); - qCDebug(LOG_VariableController()) << tr("3: onDataProvided var points after") - << var->nbPoints(); + qCDebug(LOG_VariableController()) + << tr("3: onDataProvided var points after") << var->nbPoints(); emit var->updated(); qCDebug(LOG_VariableController()) << tr("Update OK"); diff --git a/core/src/Visualization/VisualizationController.cpp b/core/src/Visualization/VisualizationController.cpp index 0f4d9fd..e6c5e98 100644 --- a/core/src/Visualization/VisualizationController.cpp +++ b/core/src/Visualization/VisualizationController.cpp @@ -18,21 +18,21 @@ public: VisualizationController::VisualizationController(QObject *parent) : impl{spimpl::make_unique_impl()} { - qCDebug(LOG_VisualizationController()) << tr("VisualizationController construction") - << QThread::currentThread(); + qCDebug(LOG_VisualizationController()) + << tr("VisualizationController construction") << QThread::currentThread(); } VisualizationController::~VisualizationController() { - qCDebug(LOG_VisualizationController()) << tr("VisualizationController destruction") - << QThread::currentThread(); + qCDebug(LOG_VisualizationController()) + << tr("VisualizationController destruction") << QThread::currentThread(); this->waitForFinish(); } void VisualizationController::initialize() { - qCDebug(LOG_VisualizationController()) << tr("VisualizationController init") - << QThread::currentThread(); + qCDebug(LOG_VisualizationController()) + << tr("VisualizationController init") << QThread::currentThread(); impl->m_WorkingMutex.lock(); qCDebug(LOG_VisualizationController()) << tr("VisualizationController init END"); } diff --git a/core/tests/Data/TestOptionalAxis.cpp b/core/tests/Data/TestOptionalAxis.cpp index 201495a..38980ab 100644 --- a/core/tests/Data/TestOptionalAxis.cpp +++ b/core/tests/Data/TestOptionalAxis.cpp @@ -110,8 +110,8 @@ void TestOptionalAxis::testSize_data() QTest::newRow("data1") << axis({}) << 0; QTest::newRow("data2") << axis({1, 2, 3}) << 3; QTest::newRow("data3") << axis({1, 2, 3, 4}) << 4; - QTest::newRow("data4 (axis not defined)") << OptionalAxis{} - << 0; // Expects 0 for undefined axis + QTest::newRow("data4 (axis not defined)") + << OptionalAxis{} << 0; // Expects 0 for undefined axis } void TestOptionalAxis::testSize() @@ -134,8 +134,8 @@ void TestOptionalAxis::testUnit_data() QTest::newRow("data1") << axis(Unit{"Hz"}) << Unit{"Hz"}; QTest::newRow("data2") << axis(Unit{"t", true}) << Unit{"t", true}; - QTest::newRow("data3 (axis not defined)") << OptionalAxis{} - << Unit{}; // Expects default unit for undefined axis + QTest::newRow("data3 (axis not defined)") + << OptionalAxis{} << Unit{}; // Expects default unit for undefined axis } void TestOptionalAxis::testUnit() diff --git a/core/tests/Data/TestScalarSeries.cpp b/core/tests/Data/TestScalarSeries.cpp index a79fa76..c4eb065 100644 --- a/core/tests/Data/TestScalarSeries.cpp +++ b/core/tests/Data/TestScalarSeries.cpp @@ -173,18 +173,18 @@ void TestScalarSeries::testMergeWithVector_data() { testMergeDifferentTypes_struct(); - QTest::newRow("mergeVectorInScalar") << ScalarBuilder{} - .setX({1., 2., 3., 4., 5.}) - .setValues({100., 200., 300., 400., 500.}) - .build() - << VectorBuilder{} - .setX({6., 7., 8., 9., 10.}) - .setXValues({600., 700., 800., 900., 1000.}) - .setYValues({610., 710., 810., 910., 1010.}) - .setZValues({620., 720., 820., 920., 1020.}) - .build() - << DataContainer{1., 2., 3., 4., 5.} - << DataContainer{100., 200., 300., 400., 500.}; + QTest::newRow("mergeVectorInScalar") + << ScalarBuilder{} + .setX({1., 2., 3., 4., 5.}) + .setValues({100., 200., 300., 400., 500.}) + .build() + << VectorBuilder{} + .setX({6., 7., 8., 9., 10.}) + .setXValues({600., 700., 800., 900., 1000.}) + .setYValues({610., 710., 810., 910., 1010.}) + .setZValues({620., 720., 820., 920., 1020.}) + .build() + << DataContainer{1., 2., 3., 4., 5.} << DataContainer{100., 200., 300., 400., 500.}; } void TestScalarSeries::testMergeWithVector() @@ -278,12 +278,12 @@ void TestScalarSeries::testPurge_data() .build() << 2. << 4. << DataContainer{2., 3., 4.} << std::vector{{200., 300., 400.}}; - QTest::newRow("purgeScalar1 (min/max swap)") << ScalarBuilder{} - .setX({1., 2., 3., 4., 5.}) - .setValues({100., 200., 300., 400., 500.}) - .build() - << 4. << 2. << DataContainer{2., 3., 4.} - << std::vector{{200., 300., 400.}}; + QTest::newRow("purgeScalar1 (min/max swap)") + << ScalarBuilder{} + .setX({1., 2., 3., 4., 5.}) + .setValues({100., 200., 300., 400., 500.}) + .build() + << 4. << 2. << DataContainer{2., 3., 4.} << std::vector{{200., 300., 400.}}; QTest::newRow("purgeScalar2") << ScalarBuilder{} .setX({1., 2., 3., 4., 5.}) .setValues({100., 200., 300., 400., 500.}) @@ -324,12 +324,12 @@ void TestScalarSeries::testXAxisRange_data() .build() << -1. << 3.2 << DataContainer{1., 2., 3.} << DataContainer{100., 200., 300.}; - QTest::newRow("xAxisRange1 (min/max swap)") << ScalarBuilder{} - .setX({1., 2., 3., 4., 5.}) - .setValues({100., 200., 300., 400., 500.}) - .build() - << 3.2 << -1. << DataContainer{1., 2., 3.} - << DataContainer{100., 200., 300.}; + QTest::newRow("xAxisRange1 (min/max swap)") + << ScalarBuilder{} + .setX({1., 2., 3., 4., 5.}) + .setValues({100., 200., 300., 400., 500.}) + .build() + << 3.2 << -1. << DataContainer{1., 2., 3.} << DataContainer{100., 200., 300.}; QTest::newRow("xAxisRange2") << ScalarBuilder{} .setX({1., 2., 3., 4., 5.}) .setValues({100., 200., 300., 400., 500.}) @@ -401,10 +401,10 @@ void TestScalarSeries::testValuesBounds_data() .setValues({100., 200., 300., 400., 500.}) .build() << 5.1 << 6. << false << nan << nan; - QTest::newRow("scalarBounds5") << ScalarBuilder{}.setX({1.}).setValues({100.}).build() << 0. - << 2. << true << 100. << 100.; - QTest::newRow("scalarBounds6") << ScalarBuilder{}.setX({}).setValues({}).build() << 0. << 2. - << false << nan << nan; + QTest::newRow("scalarBounds5") + << ScalarBuilder{}.setX({1.}).setValues({100.}).build() << 0. << 2. << true << 100. << 100.; + QTest::newRow("scalarBounds6") + << ScalarBuilder{}.setX({}).setValues({}).build() << 0. << 2. << false << nan << nan; // Tests with NaN values: NaN values are not included in min/max search QTest::newRow("scalarBounds7") << ScalarBuilder{} diff --git a/core/tests/Data/TestTwoDimArrayData.cpp b/core/tests/Data/TestTwoDimArrayData.cpp index b608a98..d644a47 100644 --- a/core/tests/Data/TestTwoDimArrayData.cpp +++ b/core/tests/Data/TestTwoDimArrayData.cpp @@ -87,8 +87,8 @@ void TestTwoDimArrayData::testCtor_data() << true << Container{{1., 2., 3., 4., 5.}, {6., 7., 8., 9., 10.}, {11., 12., 13., 14., 15.}}; - QTest::newRow("invalidInput (invalid data size") << InputData{{1., 2., 3., 4., 5., 6., 7.}, 3} - << false << Container{{}, {}, {}}; + QTest::newRow("invalidInput (invalid data size") + << InputData{{1., 2., 3., 4., 5., 6., 7.}, 3} << false << Container{{}, {}, {}}; QTest::newRow("invalidInput (less than two components") << flatten(Container{{1., 2., 3., 4., 5.}}) << false << Container{{}, {}, {}}; } diff --git a/core/tests/Variable/TestVariableSync.cpp b/core/tests/Variable/TestVariableSync.cpp index 9a0e0de..4c3238c 100644 --- a/core/tests/Variable/TestVariableSync.cpp +++ b/core/tests/Variable/TestVariableSync.cpp @@ -400,8 +400,8 @@ void testSyncOnVarCase1() // Go back to initial range moveOp(initialRange, initialRange, 300); - QTest::newRow("syncOnVarCase1") << syncId << initialRange << std::move(creations) - << std::move(iterations); + QTest::newRow("syncOnVarCase1") + << syncId << initialRange << std::move(creations) << std::move(iterations); } } diff --git a/gui/src/Visualization/VisualizationGraphWidget.cpp b/gui/src/Visualization/VisualizationGraphWidget.cpp index b2e770c..edc9dec 100644 --- a/gui/src/Visualization/VisualizationGraphWidget.cpp +++ b/gui/src/Visualization/VisualizationGraphWidget.cpp @@ -307,9 +307,9 @@ void VisualizationGraphWidget::onGraphMenuRequested(const QPoint &pos) noexcept void VisualizationGraphWidget::onRangeChanged(const QCPRange &t1, const QCPRange &t2) { - qCDebug(LOG_VisualizationGraphWidget()) << tr("TORM: VisualizationGraphWidget::onRangeChanged") - << QThread::currentThread()->objectName() << "DoAcqui" - << impl->m_DoAcquisition; + qCDebug(LOG_VisualizationGraphWidget()) + << tr("TORM: VisualizationGraphWidget::onRangeChanged") + << QThread::currentThread()->objectName() << "DoAcqui" << impl->m_DoAcquisition; auto graphRange = SqpRange{t1.lower, t1.upper}; auto oldGraphRange = SqpRange{t2.lower, t2.upper}; diff --git a/gui/src/Visualization/VisualizationZoneWidget.cpp b/gui/src/Visualization/VisualizationZoneWidget.cpp index f32c34d..e433bd5 100644 --- a/gui/src/Visualization/VisualizationZoneWidget.cpp +++ b/gui/src/Visualization/VisualizationZoneWidget.cpp @@ -185,10 +185,10 @@ VisualizationGraphWidget *VisualizationZoneWidget::createGraph(std::shared_ptrenableAcquisition(false); - qCDebug(LOG_VisualizationZoneWidget()) << tr("TORM: Range before: ") - << graphChild->graphRange(); - qCDebug(LOG_VisualizationZoneWidget()) << tr("TORM: Range after : ") - << graphChildRange; + qCDebug(LOG_VisualizationZoneWidget()) + << tr("TORM: Range before: ") << graphChild->graphRange(); + qCDebug(LOG_VisualizationZoneWidget()) + << tr("TORM: Range after : ") << graphChildRange; qCDebug(LOG_VisualizationZoneWidget()) << tr("TORM: child dt") << graphChildRange.m_TEnd - graphChildRange.m_TStart; graphChild->setGraphRange(graphChildRange); diff --git a/gui/src/Visualization/qcustomplot.cpp b/gui/src/Visualization/qcustomplot.cpp index 5be83c0..5ecb630 100644 --- a/gui/src/Visualization/qcustomplot.cpp +++ b/gui/src/Visualization/qcustomplot.cpp @@ -1574,10 +1574,7 @@ void QCPLayerable::applyAntialiasingHint(QCPPainter *painter, bool localAntialia \see initializeParentPlot */ -void QCPLayerable::parentPlotInitialized(QCustomPlot *parentPlot) -{ - Q_UNUSED(parentPlot) -} +void QCPLayerable::parentPlotInitialized(QCustomPlot *parentPlot){Q_UNUSED(parentPlot)} /*! \internal @@ -9394,14 +9391,16 @@ void QCPAxisPainterPrivate::draw(QCPPainter *painter) painter->setBrush(QBrush(basePen.color())); QCPVector2D baseLineVector(baseLine.dx(), baseLine.dy()); if (lowerEnding.style() != QCPLineEnding::esNone) - lowerEnding.draw(painter, QCPVector2D(baseLine.p1()) - - baseLineVector.normalized() * lowerEnding.realLength() - * (lowerEnding.inverted() ? -1 : 1), + lowerEnding.draw(painter, + QCPVector2D(baseLine.p1()) + - baseLineVector.normalized() * lowerEnding.realLength() + * (lowerEnding.inverted() ? -1 : 1), -baseLineVector); if (upperEnding.style() != QCPLineEnding::esNone) - upperEnding.draw(painter, QCPVector2D(baseLine.p2()) - + baseLineVector.normalized() * upperEnding.realLength() - * (upperEnding.inverted() ? -1 : 1), + upperEnding.draw(painter, + QCPVector2D(baseLine.p2()) + + baseLineVector.normalized() * upperEnding.realLength() + * (upperEnding.inverted() ? -1 : 1), baseLineVector); painter->setAntialiasing(antialiasingBackup); @@ -16630,8 +16629,9 @@ void QCPColorGradient::updateColorBuffer() hue -= 1.0; if (useAlpha) { const QRgb rgb - = QColor::fromHsvF(hue, (1 - t) * lowHsv.saturationF() - + t * highHsv.saturationF(), + = QColor::fromHsvF(hue, + (1 - t) * lowHsv.saturationF() + + t * highHsv.saturationF(), (1 - t) * lowHsv.valueF() + t * highHsv.valueF()) .rgb(); const float alpha = (1 - t) * lowHsv.alphaF() + t * highHsv.alphaF(); @@ -16640,8 +16640,9 @@ void QCPColorGradient::updateColorBuffer() } else { mColorBuffer[i] - = QColor::fromHsvF(hue, (1 - t) * lowHsv.saturationF() - + t * highHsv.saturationF(), + = QColor::fromHsvF(hue, + (1 - t) * lowHsv.saturationF() + + t * highHsv.saturationF(), (1 - t) * lowHsv.valueF() + t * highHsv.valueF()) .rgb(); } @@ -19998,12 +19999,14 @@ void QCPColorScale::update(UpdatePhase phase) switch (phase) { case upMargins: { if (mType == QCPAxis::atBottom || mType == QCPAxis::atTop) { - setMaximumSize(QWIDGETSIZE_MAX, mBarWidth + mAxisRect.data()->margins().top() - + mAxisRect.data()->margins().bottom() - + margins().top() + margins().bottom()); - setMinimumSize(0, mBarWidth + mAxisRect.data()->margins().top() - + mAxisRect.data()->margins().bottom() + margins().top() - + margins().bottom()); + setMaximumSize(QWIDGETSIZE_MAX, + mBarWidth + mAxisRect.data()->margins().top() + + mAxisRect.data()->margins().bottom() + margins().top() + + margins().bottom()); + setMinimumSize(0, + mBarWidth + mAxisRect.data()->margins().top() + + mAxisRect.data()->margins().bottom() + margins().top() + + margins().bottom()); } else { setMaximumSize(mBarWidth + mAxisRect.data()->margins().left() diff --git a/plugins/amda/src/AmdaProvider.cpp b/plugins/amda/src/AmdaProvider.cpp index 1d91a89..dfe9296 100644 --- a/plugins/amda/src/AmdaProvider.cpp +++ b/plugins/amda/src/AmdaProvider.cpp @@ -105,8 +105,8 @@ void AmdaProvider::requestDataLoading(QUuid acqIdentifier, const DataProviderPar const auto times = parameters.m_Times; const auto data = parameters.m_Data; for (const auto &dateTime : qAsConst(times)) { - qCDebug(LOG_AmdaProvider()) << tr("TORM AmdaProvider::requestDataLoading ") << acqIdentifier - << dateTime; + qCDebug(LOG_AmdaProvider()) + << tr("TORM AmdaProvider::requestDataLoading ") << acqIdentifier << dateTime; this->retrieveData(acqIdentifier, dateTime, data); diff --git a/plugins/amda/tests/TestAmdaParser.cpp b/plugins/amda/tests/TestAmdaParser.cpp index d2779a2..e2023f9 100644 --- a/plugins/amda/tests/TestAmdaParser.cpp +++ b/plugins/amda/tests/TestAmdaParser.cpp @@ -142,14 +142,14 @@ void TestAmdaParser::testReadJson_data() QTest::newRow("Valid file") << QStringLiteral("ValidFile1.json") << validResults1(); // Invalid files - QTest::newRow("Invalid file (unexisting file)") << QStringLiteral("UnexistingFile.json") - << invalidResults(); - QTest::newRow("Invalid file (two root objects)") << QStringLiteral("TwoRootsFile.json") - << invalidResults(); - QTest::newRow("Invalid file (wrong root key)") << QStringLiteral("WrongRootKey.json") - << invalidResults(); - QTest::newRow("Invalid file (wrong root type)") << QStringLiteral("WrongRootType.json") - << invalidResults(); + QTest::newRow("Invalid file (unexisting file)") + << QStringLiteral("UnexistingFile.json") << invalidResults(); + QTest::newRow("Invalid file (two root objects)") + << QStringLiteral("TwoRootsFile.json") << invalidResults(); + QTest::newRow("Invalid file (wrong root key)") + << QStringLiteral("WrongRootKey.json") << invalidResults(); + QTest::newRow("Invalid file (wrong root type)") + << QStringLiteral("WrongRootType.json") << invalidResults(); } void TestAmdaParser::testReadJson() diff --git a/plugins/mockplugin/src/CosinusProvider.cpp b/plugins/mockplugin/src/CosinusProvider.cpp index c222340..dedcac3 100644 --- a/plugins/mockplugin/src/CosinusProvider.cpp +++ b/plugins/mockplugin/src/CosinusProvider.cpp @@ -226,9 +226,9 @@ std::shared_ptr CosinusProvider::retrieveData(QUuid acqIdentifier, progress = currentProgress; emit dataProvidedProgress(acqIdentifier, progress); - qCDebug(LOG_CosinusProvider()) << "TORM: CosinusProvider::retrieveData" - << QThread::currentThread()->objectName() - << progress; + qCDebug(LOG_CosinusProvider()) + << "TORM: CosinusProvider::retrieveData" + << QThread::currentThread()->objectName() << progress; // NOTE: Try to use multithread if possible } } @@ -252,8 +252,8 @@ void CosinusProvider::requestDataLoading(QUuid acqIdentifier, { // TODO: Add Mutex m_VariableToEnableProvider[acqIdentifier] = true; - qCDebug(LOG_CosinusProvider()) << "TORM: CosinusProvider::requestDataLoading" - << QThread::currentThread()->objectName(); + qCDebug(LOG_CosinusProvider()) + << "TORM: CosinusProvider::requestDataLoading" << QThread::currentThread()->objectName(); // NOTE: Try to use multithread if possible const auto times = parameters.m_Times;