From 76a36dc78079853efe5f4ec7943192931edf9063 Mon Sep 17 00:00:00 2001 From: Adrian Suciu Date: Fri, 22 Mar 2024 17:55:51 +0200 Subject: [PATCH 1/3] tools: format.sh skip build folder Signed-off-by: Adrian Suciu --- tools/format.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tools/format.sh b/tools/format.sh index b7699396b1..0a38d7d33c 100755 --- a/tools/format.sh +++ b/tools/format.sh @@ -2,18 +2,19 @@ set -x SCOPY_REPO=$(git rev-parse --show-toplevel) +SKIP_BUILD="-not -path */build/*" IN_PLACE="-i" VERBOSE="--verbose" CLANG_FORMAT="clang-format-12" CMAKE_FORMAT="cmake-format" -find $SCOPY_REPO -type f -name "*.cpp" | xargs $CLANG_FORMAT $VERBOSE $IN_PLACE -find $SCOPY_REPO -type f -name "*.cc" | xargs $CLANG_FORMAT $VERBOSE $IN_PLACE -find $SCOPY_REPO -type f -name "*.hpp" | xargs $CLANG_FORMAT $VERBOSE $IN_PLACE -find $SCOPY_REPO -type f -name "*.h" | xargs $CLANG_FORMAT $VERBOSE $IN_PLACE -find $SCOPY_REPO -type f -name "CMakeLists.txt" | xargs $CMAKE_FORMAT $IN_PLACE -find $SCOPY_REPO -type f -name "*.cmake" | xargs $CMAKE_FORMAT $IN_PLACE +find $SCOPY_REPO $SKIP_BUILD -type f -name "*.cpp" | xargs $CLANG_FORMAT $VERBOSE $IN_PLACE +find $SCOPY_REPO $SKIP_BUILD -type f -name "*.cc" | xargs $CLANG_FORMAT $VERBOSE $IN_PLACE +find $SCOPY_REPO $SKIP_BUILD -type f -name "*.hpp" | xargs $CLANG_FORMAT $VERBOSE $IN_PLACE +find $SCOPY_REPO $SKIP_BUILD -type f -name "*.h" | xargs $CLANG_FORMAT $VERBOSE $IN_PLACE +find $SCOPY_REPO $SKIP_BUILD -type f -name "CMakeLists.txt" | xargs $CMAKE_FORMAT $IN_PLACE +find $SCOPY_REPO $SKIP_BUILD -type f -name "*.cmake" | xargs $CMAKE_FORMAT $IN_PLACE pushd $SCOPY_REPO/tools ./includemocs.sh popd From 7c349035ef5f8ec0c760c071728e4c3ed0ed5517 Mon Sep 17 00:00:00 2001 From: Adrian Suciu Date: Wed, 27 Mar 2024 12:20:32 +0200 Subject: [PATCH 2/3] tools/format.sh: update plugin/module list Signed-off-by: Adrian Suciu --- tools/includemocs.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/includemocs.sh b/tools/includemocs.sh index 599a3db073..a9ada88c71 100755 --- a/tools/includemocs.sh +++ b/tools/includemocs.sh @@ -1,8 +1,8 @@ #!/bin/bash set -x -scopymodules=("core" "pluginbase" "gui" "iioutil") -scopyplugins=("testplugin" "testplugin2" "swiot") +scopymodules=("core" "pluginbase" "gui" "iioutil" "iio-widgets" "gr-util") +scopyplugins=("testplugin" "testplugin2" "swiot" "adc" "pqm" "debugger" "datalogger" "regmap") for mod in ${scopymodules[@]};do echo ${mod} From 44f372e3dd61f7ecae8529478d8e3ca13c2be934 Mon Sep 17 00:00:00 2001 From: Adrian Suciu Date: Wed, 27 Mar 2024 12:23:05 +0200 Subject: [PATCH 3/3] tree: update with tools/format.sh according to new includemocs Signed-off-by: Adrian Suciu --- gr-util/src/grdeviceaddon.cpp | 2 ++ gr-util/src/grproxyblock.cpp | 2 ++ gr-util/src/grsignalpath.cpp | 2 ++ gr-util/src/grsignalsrc.cpp | 2 ++ gr-util/src/grtimechanneladdon.cpp | 2 ++ gr-util/src/grtimeplotaddon.cpp | 2 ++ gr-util/src/grtimeplotaddonsettings.cpp | 2 ++ gr-util/src/grtopblock.cpp | 2 ++ gr-util/src/measure.cpp | 2 ++ gr-util/src/measurementcontroller.cpp | 2 ++ gr-util/src/timechanneladdon.cpp | 2 ++ gui/src/basictracker.cpp | 2 ++ gui/src/cursorcontroller.cpp | 2 ++ gui/src/plotmagnifier.cpp | 2 ++ gui/src/plotnavigator.cpp | 2 ++ gui/src/plottracker.cpp | 2 ++ gui/src/plotzoomer.cpp | 2 ++ iio-widgets/src/datastrategy/cmdqchannelattrdatastrategy.cpp | 2 ++ iio-widgets/src/datastrategy/cmdqdeviceattrdatastrategy.cpp | 2 ++ 19 files changed, 38 insertions(+) diff --git a/gr-util/src/grdeviceaddon.cpp b/gr-util/src/grdeviceaddon.cpp index cbf46864cf..7b2cd9a5ac 100644 --- a/gr-util/src/grdeviceaddon.cpp +++ b/gr-util/src/grdeviceaddon.cpp @@ -192,3 +192,5 @@ void GRDeviceAddon::setBufferSize(uint32_t bufferSize) { m_src->setBuffersize(bu void GRDeviceAddon::registerChannel(GRTimeChannelAddon *ch) { m_channels.append(ch); } QList GRDeviceAddon::getRegisteredChannels() { return m_channels; } + +#include "moc_grdeviceaddon.cpp" diff --git a/gr-util/src/grproxyblock.cpp b/gr-util/src/grproxyblock.cpp index 974132ac64..b91e07b599 100644 --- a/gr-util/src/grproxyblock.cpp +++ b/gr-util/src/grproxyblock.cpp @@ -58,3 +58,5 @@ bool GRProxyBlock::built() { return (!start_blk.isEmpty()) || (end_blk != nullpt QList GRProxyBlock::getGrStartPoint() { return start_blk; } gr::basic_block_sptr GRProxyBlock::getGrEndPoint() { return end_blk; } + +#include "moc_grproxyblock.cpp" diff --git a/gr-util/src/grsignalpath.cpp b/gr-util/src/grsignalpath.cpp index 5f11b73222..bf660b568b 100644 --- a/gr-util/src/grsignalpath.cpp +++ b/gr-util/src/grsignalpath.cpp @@ -72,3 +72,5 @@ void GRSignalPath::disconnect_blk(GRTopBlock *top) QString GRSignalPath::name() const { return m_name; } QList GRSignalPath::path() { return list; } + +#include "moc_grsignalpath.cpp" diff --git a/gr-util/src/grsignalsrc.cpp b/gr-util/src/grsignalsrc.cpp index b58cbd4540..05c5937dae 100644 --- a/gr-util/src/grsignalsrc.cpp +++ b/gr-util/src/grsignalsrc.cpp @@ -65,3 +65,5 @@ void GRSignalSrc::destroy_blks(GRTopBlock *top) sig = nullptr; start_blk.clear(); } + +#include "moc_grsignalsrc.cpp" diff --git a/gr-util/src/grtimechanneladdon.cpp b/gr-util/src/grtimechanneladdon.cpp index a921021bfe..29c92ec80d 100644 --- a/gr-util/src/grtimechanneladdon.cpp +++ b/gr-util/src/grtimechanneladdon.cpp @@ -445,3 +445,5 @@ QPushButton *ImportChannelAddon::createForgetButton(QWidget *parent) } void ImportChannelAddon::onDeinit() {} + +#include "moc_grtimechanneladdon.cpp" diff --git a/gr-util/src/grtimeplotaddon.cpp b/gr-util/src/grtimeplotaddon.cpp index bc77188c3f..99e8036409 100644 --- a/gr-util/src/grtimeplotaddon.cpp +++ b/gr-util/src/grtimeplotaddon.cpp @@ -591,3 +591,5 @@ void GRTimePlotAddon::setFftWindow(int idx) } int GRTimePlotAddon::xMode() { return m_xmode; } + +#include "moc_grtimeplotaddon.cpp" diff --git a/gr-util/src/grtimeplotaddonsettings.cpp b/gr-util/src/grtimeplotaddonsettings.cpp index ae5bd08c10..111ddf0bb0 100644 --- a/gr-util/src/grtimeplotaddonsettings.cpp +++ b/gr-util/src/grtimeplotaddonsettings.cpp @@ -651,3 +651,5 @@ void GRTimePlotAddonSettings::showPlotLabels(bool b) QString GRTimePlotAddonSettings::getName() { return name; } QWidget *GRTimePlotAddonSettings::getWidget() { return widget; } + +#include "moc_grtimeplotaddonsettings.cpp" diff --git a/gr-util/src/grtopblock.cpp b/gr-util/src/grtopblock.cpp index 74947e0901..03d9b434ff 100644 --- a/gr-util/src/grtopblock.cpp +++ b/gr-util/src/grtopblock.cpp @@ -145,3 +145,5 @@ void GRTopBlock::connect(gr::basic_block_sptr src, int srcPort, gr::basic_block_ } gr::top_block_sptr GRTopBlock::getGrBlock() { return top; } + +#include "moc_grtopblock.cpp" diff --git a/gr-util/src/measure.cpp b/gr-util/src/measure.cpp index 527c3c37d0..2cf9968a46 100644 --- a/gr-util/src/measure.cpp +++ b/gr-util/src/measure.cpp @@ -1312,3 +1312,5 @@ double Statistic::max() const { return m_max; } double Statistic::numPushedData() const { return m_dataCount; } } // namespace scopy::grutil + +#include "moc_measure.cpp" diff --git a/gr-util/src/measurementcontroller.cpp b/gr-util/src/measurementcontroller.cpp index bb23b024ee..abbc4e8062 100644 --- a/gr-util/src/measurementcontroller.cpp +++ b/gr-util/src/measurementcontroller.cpp @@ -280,3 +280,5 @@ static const std::map icons_spect = { */ } // namespace scopy::grutil + +#include "moc_measurementcontroller.cpp" diff --git a/gr-util/src/timechanneladdon.cpp b/gr-util/src/timechanneladdon.cpp index 38079a2efb..396715e9dd 100644 --- a/gr-util/src/timechanneladdon.cpp +++ b/gr-util/src/timechanneladdon.cpp @@ -93,3 +93,5 @@ TimeChannelAddon::TimeChannelAddon(QString ch, PlotAddon *plotAddon, QPen pen, Q {} TimeChannelAddon::~TimeChannelAddon() {} + +#include "moc_timechanneladdon.cpp" diff --git a/gui/src/basictracker.cpp b/gui/src/basictracker.cpp index b6f47ad71d..5f258aca4b 100644 --- a/gui/src/basictracker.cpp +++ b/gui/src/basictracker.cpp @@ -149,3 +149,5 @@ bool BasicTracker::eventFilter(QObject *object, QEvent *event) return QwtWidgetOverlay::eventFilter(object, event); } + +#include "moc_basictracker.cpp" diff --git a/gui/src/cursorcontroller.cpp b/gui/src/cursorcontroller.cpp index afa3363da2..9fc603c1a3 100644 --- a/gui/src/cursorcontroller.cpp +++ b/gui/src/cursorcontroller.cpp @@ -188,3 +188,5 @@ void CursorController::cursorsSetVisible(bool visible) CursorSettings *CursorController::getCursorSettings() { return cursorSettings; } PlotCursors *CursorController::getPlotCursors() { return plotCursors; } + +#include "moc_cursorcontroller.cpp" diff --git a/gui/src/plotmagnifier.cpp b/gui/src/plotmagnifier.cpp index d95accd3a0..789f4e892a 100644 --- a/gui/src/plotmagnifier.cpp +++ b/gui/src/plotmagnifier.cpp @@ -280,3 +280,5 @@ void PlotMagnifier::zoomToBase() plot()->replot(); m_isZoomed = false; } + +#include "moc_plotmagnifier.cpp" diff --git a/gui/src/plotnavigator.cpp b/gui/src/plotnavigator.cpp index 6bddf0871b..e5942a2164 100644 --- a/gui/src/plotnavigator.cpp +++ b/gui/src/plotnavigator.cpp @@ -507,3 +507,5 @@ void PlotNavigator::syncPlotNavigators(PlotNavigator *pNav1, PlotNavigator *pNav } } } + +#include "moc_plotnavigator.cpp" diff --git a/gui/src/plottracker.cpp b/gui/src/plottracker.cpp index b63008bc54..892b17d0d8 100644 --- a/gui/src/plottracker.cpp +++ b/gui/src/plottracker.cpp @@ -82,3 +82,5 @@ void PlotTracker::onChannelSelected(PlotChannel *ch) } } } + +#include "moc_plottracker.cpp" diff --git a/gui/src/plotzoomer.cpp b/gui/src/plotzoomer.cpp index b587d15d7b..905624f570 100644 --- a/gui/src/plotzoomer.cpp +++ b/gui/src/plotzoomer.cpp @@ -237,3 +237,5 @@ void PlotZoomer::zoomToBase() plot()->replot(); m_isZoomed = false; } + +#include "moc_plotzoomer.cpp" diff --git a/iio-widgets/src/datastrategy/cmdqchannelattrdatastrategy.cpp b/iio-widgets/src/datastrategy/cmdqchannelattrdatastrategy.cpp index 05bd4089b9..781c25c551 100644 --- a/iio-widgets/src/datastrategy/cmdqchannelattrdatastrategy.cpp +++ b/iio-widgets/src/datastrategy/cmdqchannelattrdatastrategy.cpp @@ -129,3 +129,5 @@ void CmdQChannelAttrDataStrategy::optionalAttrReadFinished(Command *cmd) m_optionalDataRead = QString(currentOptValue); Q_EMIT sendData(m_dataRead, m_optionalDataRead); } + +#include "moc_cmdqchannelattrdatastrategy.cpp" diff --git a/iio-widgets/src/datastrategy/cmdqdeviceattrdatastrategy.cpp b/iio-widgets/src/datastrategy/cmdqdeviceattrdatastrategy.cpp index 3e5af43029..aea0ad388f 100644 --- a/iio-widgets/src/datastrategy/cmdqdeviceattrdatastrategy.cpp +++ b/iio-widgets/src/datastrategy/cmdqdeviceattrdatastrategy.cpp @@ -132,3 +132,5 @@ void CmdQDeviceAttrDataStrategy::optionalAttrReadFinished(Command *cmd) Q_EMIT sendData(m_dataRead, m_optionalDataRead); } + +#include "moc_cmdqdeviceattrdatastrategy.cpp"