From 557d1cdcb95afce289a9f24382ce149a8b09a846 2017-07-07 08:44:27 From: mperrinel Date: 2017-07-07 08:44:27 Subject: [PATCH] Correction clang format --- diff --git a/core/src/DataSource/DataSourceController.cpp b/core/src/DataSource/DataSourceController.cpp index c8e3848..bb87e87 100644 --- a/core/src/DataSource/DataSourceController.cpp +++ b/core/src/DataSource/DataSourceController.cpp @@ -27,14 +27,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(); } @@ -97,8 +97,8 @@ void DataSourceController::loadProductItem(const QUuid &dataSourceUid, 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/Variable/VariableCacheController.cpp b/core/src/Variable/VariableCacheController.cpp index 38b0af1..d043088 100644 --- a/core/src/Variable/VariableCacheController.cpp +++ b/core/src/Variable/VariableCacheController.cpp @@ -33,8 +33,8 @@ VariableCacheController::VariableCacheController(QObject *parent) void VariableCacheController::addDateTime(std::shared_ptr variable, const SqpDateTime &dateTime) { - qCInfo(LOG_VariableCacheController()) - << "VariableCacheController::addDateTime" << QThread::currentThread()->objectName(); + qCInfo(LOG_VariableCacheController()) << "VariableCacheController::addDateTime" + << QThread::currentThread()->objectName(); if (variable) { auto findVariableIte = impl->m_VariableToSqpDateTimeListMap.find(variable); if (findVariableIte == impl->m_VariableToSqpDateTimeListMap.end()) { @@ -107,8 +107,8 @@ VariableCacheController::provideNotInCacheDateTimeList(std::shared_ptr QVector VariableCacheController::dateCacheList(std::shared_ptr variable) const noexcept { - qCInfo(LOG_VariableCacheController()) - << "VariableCacheController::dateCacheList" << QThread::currentThread()->objectName(); + qCInfo(LOG_VariableCacheController()) << "VariableCacheController::dateCacheList" + << QThread::currentThread()->objectName(); try { return impl->m_VariableToSqpDateTimeListMap.at(variable); } @@ -218,8 +218,8 @@ void VariableCacheController::displayCache(std::shared_ptr variable) c { auto variableDateTimeList = impl->m_VariableToSqpDateTimeListMap.find(variable); if (variableDateTimeList != impl->m_VariableToSqpDateTimeListMap.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 995b1d0..0e58f7e 100644 --- a/core/src/Variable/VariableController.cpp +++ b/core/src/Variable/VariableController.cpp @@ -56,14 +56,14 @@ 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(); } VariableController::~VariableController() { - qCDebug(LOG_VariableController()) - << tr("VariableController destruction") << QThread::currentThread(); + qCDebug(LOG_VariableController()) << tr("VariableController destruction") + << QThread::currentThread(); this->waitForFinish(); } @@ -152,8 +152,8 @@ void VariableController::createVariable(const QString &name, void VariableController::onDateTimeOnSelection(const SqpDateTime &dateTime) { - qCDebug(LOG_VariableController()) - << "VariableController::onDateTimeOnSelection" << QThread::currentThread()->objectName(); + qCDebug(LOG_VariableController()) << "VariableController::onDateTimeOnSelection" + << QThread::currentThread()->objectName(); auto selectedRows = impl->m_VariableSelectionModel->selectedRows(); for (const auto &selectedRow : qAsConst(selectedRows)) { @@ -168,8 +168,8 @@ void VariableController::onDateTimeOnSelection(const SqpDateTime &dateTime) void VariableController::onRequestDataLoading(std::shared_ptr variable, const SqpDateTime &dateTime) { - qCDebug(LOG_VariableController()) - << "VariableController::onRequestDataLoading" << QThread::currentThread()->objectName(); + qCDebug(LOG_VariableController()) << "VariableController::onRequestDataLoading" + << QThread::currentThread()->objectName(); // we want to load data of the variable for the dateTime. // First we check if the cache contains some of them. // For the other, we ask the provider to give them. diff --git a/gui/src/Visualization/VisualizationGraphHelper.cpp b/gui/src/Visualization/VisualizationGraphHelper.cpp index 5c65bd9..8e5073d 100644 --- a/gui/src/Visualization/VisualizationGraphHelper.cpp +++ b/gui/src/Visualization/VisualizationGraphHelper.cpp @@ -37,8 +37,8 @@ QSharedPointer axisTicker(bool isTimeAxis) void updateScalarData(QCPAbstractPlottable *component, ScalarSeries &scalarSeries, const SqpDateTime &dateTime) { - qCInfo(LOG_VisualizationGraphHelper()) - << "TORM: updateScalarData" << QThread::currentThread()->objectName(); + qCInfo(LOG_VisualizationGraphHelper()) << "TORM: updateScalarData" + << QThread::currentThread()->objectName(); if (auto qcpGraph = dynamic_cast(component)) { // Clean the graph // NAIVE approch @@ -47,8 +47,8 @@ void updateScalarData(QCPAbstractPlottable *component, ScalarSeries &scalarSerie const auto xData = scalarSeries.xAxisData()->data(); const auto valuesData = scalarSeries.valuesData()->data(); const auto count = xData.count(); - qCInfo(LOG_VisualizationGraphHelper()) - << "TORM: Current points in cache" << xData.count(); + qCInfo(LOG_VisualizationGraphHelper()) << "TORM: Current points in cache" + << xData.count(); auto dataContainer = qcpGraph->data(); dataContainer->clear(); @@ -62,8 +62,8 @@ void updateScalarData(QCPAbstractPlottable *component, ScalarSeries &scalarSerie } } sqpDataContainer->sort(); - qCInfo(LOG_VisualizationGraphHelper()) - << "TORM: Current points displayed" << sqpDataContainer->size(); + qCInfo(LOG_VisualizationGraphHelper()) << "TORM: Current points displayed" + << sqpDataContainer->size(); } scalarSeries.unlock(); diff --git a/gui/src/Visualization/VisualizationGraphWidget.cpp b/gui/src/Visualization/VisualizationGraphWidget.cpp index 445085e..5af7fa8 100644 --- a/gui/src/Visualization/VisualizationGraphWidget.cpp +++ b/gui/src/Visualization/VisualizationGraphWidget.cpp @@ -177,8 +177,8 @@ void VisualizationGraphWidget::onGraphMenuRequested(const QPoint &pos) noexcept void VisualizationGraphWidget::onRangeChanged(const QCPRange &t1) { - qCDebug(LOG_VisualizationGraphWidget()) - << tr("VisualizationGraphWidget::onRangeChanged") << QThread::currentThread()->objectName(); + qCDebug(LOG_VisualizationGraphWidget()) << tr("VisualizationGraphWidget::onRangeChanged") + << QThread::currentThread()->objectName(); for (auto it = impl->m_VariableToPlotMultiMap.cbegin(); it != impl->m_VariableToPlotMultiMap.cend(); ++it) { diff --git a/gui/src/Visualization/qcustomplot.cpp b/gui/src/Visualization/qcustomplot.cpp index b7786cc..a9f6699 100644 --- a/gui/src/Visualization/qcustomplot.cpp +++ b/gui/src/Visualization/qcustomplot.cpp @@ -1049,9 +1049,8 @@ QCPLayer::~QCPLayer() mChildren.last()->setLayer(0); // removes itself from mChildren via removeChild() if (mParentPlot->currentLayer() == this) - qDebug() << Q_FUNC_INFO - << "The parent plot's mCurrentLayer will be a dangling pointer. " - "Should have been set to a valid layer or 0 beforehand."; + qDebug() << Q_FUNC_INFO << "The parent plot's mCurrentLayer will be a dangling pointer. " + "Should have been set to a valid layer or 0 beforehand."; } /*! @@ -1575,7 +1574,10 @@ 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 @@ -8483,9 +8485,8 @@ void QCPAxis::scaleRange(double factor, double center) mRange = newRange.sanitizedForLogScale(); } else - qDebug() << Q_FUNC_INFO - << "Center of scaling operation doesn't lie in same " - "logarithmic sign domain as range:" + qDebug() << Q_FUNC_INFO << "Center of scaling operation doesn't lie in same " + "logarithmic sign domain as range:" << center; } emit rangeChanged(mRange); @@ -9256,16 +9257,14 @@ 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); @@ -9571,16 +9570,14 @@ void QCPAxisPainterPrivate::placeTickLabel(QCPPainter *painter, double position, bool labelClippedByBorder = false; if (tickLabelSide == QCPAxis::lsOutside) { if (QCPAxis::orientation(type) == Qt::Horizontal) - labelClippedByBorder = finalPosition.x() - + (labelData.rotatedTotalBounds.width() - + labelData.rotatedTotalBounds.left()) + labelClippedByBorder = finalPosition.x() + (labelData.rotatedTotalBounds.width() + + labelData.rotatedTotalBounds.left()) > viewportRect.right() || finalPosition.x() + labelData.rotatedTotalBounds.left() < viewportRect.left(); else - labelClippedByBorder = finalPosition.y() - + (labelData.rotatedTotalBounds.height() - + labelData.rotatedTotalBounds.top()) + labelClippedByBorder = finalPosition.y() + (labelData.rotatedTotalBounds.height() + + labelData.rotatedTotalBounds.top()) > viewportRect.bottom() || finalPosition.y() + labelData.rotatedTotalBounds.top() < viewportRect.top(); @@ -12531,9 +12528,8 @@ double QCPAbstractItem::rectDistance(const QRectF &rect, const QPointF &pos, boo */ QPointF QCPAbstractItem::anchorPixelPosition(int anchorId) const { - qDebug() << Q_FUNC_INFO - << "called on item which shouldn't have any anchors (this method not " - "reimplemented). anchorId" + qDebug() << Q_FUNC_INFO << "called on item which shouldn't have any anchors (this method not " + "reimplemented). anchorId" << anchorId; return QPointF(); } @@ -13459,10 +13455,9 @@ void QCustomPlot::setOpenGl(bool enabled, int multisampling) setupPaintBuffers(); #else Q_UNUSED(enabled) - qDebug() << Q_FUNC_INFO - << "QCustomPlot can't use OpenGL because QCUSTOMPLOT_USE_OPENGL was " - "not defined during compilation (add 'DEFINES += " - "QCUSTOMPLOT_USE_OPENGL' to your qmake .pro file)"; + qDebug() << Q_FUNC_INFO << "QCustomPlot can't use OpenGL because QCUSTOMPLOT_USE_OPENGL was " + "not defined during compilation (add 'DEFINES += " + "QCUSTOMPLOT_USE_OPENGL' to your qmake .pro file)"; #endif } @@ -13819,9 +13814,8 @@ QCPGraph *QCustomPlot::addGraph(QCPAxis *keyAxis, QCPAxis *valueAxis) if (!valueAxis) valueAxis = yAxis; if (!keyAxis || !valueAxis) { - qDebug() << Q_FUNC_INFO - << "can't use default QCustomPlot xAxis or yAxis, because at least " - "one is invalid (has been deleted)"; + qDebug() << Q_FUNC_INFO << "can't use default QCustomPlot xAxis or yAxis, because at least " + "one is invalid (has been deleted)"; return 0; } if (keyAxis->parentPlot() != this || valueAxis->parentPlot() != this) { @@ -15243,9 +15237,8 @@ QCPAbstractPaintBuffer *QCustomPlot::createPaintBuffer() return new QCPPaintBufferGlPbuffer(viewport().size(), mBufferDevicePixelRatio, mOpenGlMultisamples); #else - qDebug() << Q_FUNC_INFO - << "OpenGL enabled even though no support for it compiled in, this " - "shouldn't have happened. Falling back to pixmap paint buffer."; + qDebug() << Q_FUNC_INFO << "OpenGL enabled even though no support for it compiled in, this " + "shouldn't have happened. Falling back to pixmap paint buffer."; return new QCPPaintBufferPixmap(viewport().size(), mBufferDevicePixelRatio); #endif } @@ -16476,9 +16469,8 @@ 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(); @@ -16487,9 +16479,8 @@ 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(); }