Auto status change to "Under Review"
@@ -8,7 +8,7 | |||||
8 | #include <QObject> |
|
8 | #include <QObject> | |
9 | #include <QUuid> |
|
9 | #include <QUuid> | |
10 |
|
10 | |||
11 |
#include <Data/Sqp |
|
11 | #include <Data/SqpRange.h> | |
12 |
|
12 | |||
13 | #include <QLoggingCategory> |
|
13 | #include <QLoggingCategory> | |
14 |
|
14 |
@@ -8,7 +8,7 Q_LOGGING_CATEGORY(LOG_VariableAcquisitionWorker, "VariableAcquisitionWorker") | |||||
8 |
|
8 | |||
9 | struct VariableAcquisitionWorker::VariableAcquisitionWorkerPrivate { |
|
9 | struct VariableAcquisitionWorker::VariableAcquisitionWorkerPrivate { | |
10 |
|
10 | |||
11 |
std::unordered_map<std::shared_ptr<Variable>, QVector<Sqp |
|
11 | std::unordered_map<std::shared_ptr<Variable>, QVector<SqpRange> > | |
12 | m_VariableToSqpDateTimeListMap; |
|
12 | m_VariableToSqpDateTimeListMap; | |
13 | }; |
|
13 | }; | |
14 |
|
14 |
@@ -26,8 +26,8 struct VariableController::VariableControllerPrivate { | |||||
26 | { |
|
26 | { | |
27 | } |
|
27 | } | |
28 |
|
28 | |||
29 |
QVector<Sqp |
|
29 | QVector<SqpRange> provideNotInCacheDateTimeList(std::shared_ptr<Variable> variable, | |
30 |
|
|
30 | const SqpRange &dateTime); | |
31 |
|
31 | |||
32 | QMutex m_WorkingMutex; |
|
32 | QMutex m_WorkingMutex; | |
33 | /// Variable model. The VariableController has the ownership |
|
33 | /// Variable model. The VariableController has the ownership | |
@@ -246,10 +246,10 void VariableController::waitForFinish() | |||||
246 | } |
|
246 | } | |
247 |
|
247 | |||
248 |
|
248 | |||
249 |
QVector<Sqp |
|
249 | QVector<SqpRange> VariableController::VariableControllerPrivate::provideNotInCacheDateTimeList( | |
250 |
std::shared_ptr<Variable> variable, const Sqp |
|
250 | std::shared_ptr<Variable> variable, const SqpRange &dateTime) | |
251 | { |
|
251 | { | |
252 |
auto notInCache = QVector<Sqp |
|
252 | auto notInCache = QVector<SqpRange>{}; | |
253 |
|
253 | |||
254 | if (!variable->contains(dateTime)) { |
|
254 | if (!variable->contains(dateTime)) { | |
255 | auto vDateTime = variable->dateTime(); |
|
255 | auto vDateTime = variable->dateTime(); | |
@@ -257,14 +257,14 QVector<SqpDateTime> VariableController::VariableControllerPrivate::provideNotIn | |||||
257 | notInCache << dateTime; |
|
257 | notInCache << dateTime; | |
258 | } |
|
258 | } | |
259 | else if (dateTime.m_TStart < vDateTime.m_TStart && dateTime.m_TEnd <= vDateTime.m_TEnd) { |
|
259 | else if (dateTime.m_TStart < vDateTime.m_TStart && dateTime.m_TEnd <= vDateTime.m_TEnd) { | |
260 |
notInCache << Sqp |
|
260 | notInCache << SqpRange{dateTime.m_TStart, vDateTime.m_TStart}; | |
261 | } |
|
261 | } | |
262 | else if (dateTime.m_TStart < vDateTime.m_TStart && dateTime.m_TEnd > vDateTime.m_TEnd) { |
|
262 | else if (dateTime.m_TStart < vDateTime.m_TStart && dateTime.m_TEnd > vDateTime.m_TEnd) { | |
263 |
notInCache << Sqp |
|
263 | notInCache << SqpRange{dateTime.m_TStart, vDateTime.m_TStart} | |
264 |
<< Sqp |
|
264 | << SqpRange{vDateTime.m_TEnd, dateTime.m_TStart}; | |
265 | } |
|
265 | } | |
266 | else if (dateTime.m_TStart < vDateTime.m_TEnd) { |
|
266 | else if (dateTime.m_TStart < vDateTime.m_TEnd) { | |
267 |
notInCache << Sqp |
|
267 | notInCache << SqpRange{vDateTime.m_TEnd, dateTime.m_TStart}; | |
268 | } |
|
268 | } | |
269 | else { |
|
269 | else { | |
270 | qCCritical(LOG_VariableController()) << tr("Detection of unknown case.") |
|
270 | qCCritical(LOG_VariableController()) << tr("Detection of unknown case.") |
General Comments 1
You need to be logged in to leave comments.
Login now