Skip to content

Commit b78bc42

Browse files
christianrauchchristian-rauch
authored andcommitted
ignore "range-loop-detach"
1 parent 302c5e7 commit b78bc42

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

src/project_manager/ros_package_wizard.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ Core::BaseFileWizard *ROSPackageWizard::create(const Core::WizardDialogParameter
255255
m_wizard->setProjectDirectory(rosProject->projectDirectory());
256256
m_wizard->setPath(defaultPath);
257257

258-
for (QWizardPage *p : m_wizard->extensionPages())
258+
for (QWizardPage *p : m_wizard->extensionPages()) // clazy:exclude=range-loop-detach
259259
m_wizard->addPage(p);
260260

261261
return m_wizard;

src/project_manager/ros_project_wizard.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ Core::BaseFileWizard *ROSProjectWizard::create(const Core::WizardDialogParameter
243243
Q_UNUSED(parameters);
244244
ROSProjectWizardDialog *wizard = new ROSProjectWizardDialog(this);
245245

246-
for (QWizardPage *p : wizard->extensionPages())
246+
for (QWizardPage *p : wizard->extensionPages()) // clazy:exclude=range-loop-detach
247247
wizard->addPage(p);
248248

249249
return wizard;
@@ -291,7 +291,7 @@ bool ROSProjectWizard::postGenerateFiles(const QWizard *w, const Core::Generated
291291
QSharedPointer<ROSSettings> ros_settings = ROSProjectPlugin::instance()->settings();
292292
TextEditor::CodeStylePool *code_style_pool = TextEditor::TextEditorSettings::codeStylePool(CppEditor::Constants::CPP_SETTINGS_ID);
293293

294-
for (const auto& code_style : code_style_pool->codeStyles()) {
294+
for (const auto& code_style : code_style_pool->codeStyles()) { // clazy:exclude=range-loop-detach
295295
if (ros_settings->default_code_style == code_style->displayName()) {
296296
ProjectExplorer::EditorConfiguration *editorConfiguration = project->editorConfiguration();
297297
TextEditor::ICodeStylePreferences *codeStylePreferences = editorConfiguration->codeStyle(CppEditor::Constants::CPP_SETTINGS_ID);

src/project_manager/ros_run_configuration.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ ROSRunWorker::ROSRunWorker(RunControl *runControl) : RunWorker(runControl)
125125

126126
void ROSRunWorker::start()
127127
{
128-
for (RunStep *rs : qobject_cast<ROSRunConfiguration *>(runControl()->target()->activeRunConfiguration())->stepList()->steps())
128+
for (RunStep *rs : qobject_cast<ROSRunConfiguration *>(runControl()->target()->activeRunConfiguration())->stepList()->steps()) // clazy:exclude=range-loop-detach
129129
{
130130
if (rs->enabled() == true && rs->id() != ROSProjectManager::Constants::ROS_ATTACH_TO_NODE_ID)
131131
{
@@ -152,7 +152,7 @@ ROSDebugRunWorker::ROSDebugRunWorker(RunControl *runControl) : Debugger::Debugge
152152
void ROSDebugRunWorker::start()
153153
{
154154
bool found = false;
155-
for (RunStep *rs : qobject_cast<ROSRunConfiguration *>(runControl()->target()->activeRunConfiguration())->stepList()->steps())
155+
for (RunStep *rs : qobject_cast<ROSRunConfiguration *>(runControl()->target()->activeRunConfiguration())->stepList()->steps()) // clazy:exclude=range-loop-detach
156156
{
157157
if (rs->enabled() == true && rs->id() == Constants::ROS_ATTACH_TO_NODE_ID)
158158
{
@@ -181,7 +181,7 @@ void ROSDebugRunWorker::start()
181181
if (found)
182182
{
183183
// Now that the watcher is started run all of the other steps
184-
for (RunStep *rs : qobject_cast<ROSRunConfiguration *>(runControl()->target()->activeRunConfiguration())->stepList()->steps())
184+
for (RunStep *rs : qobject_cast<ROSRunConfiguration *>(runControl()->target()->activeRunConfiguration())->stepList()->steps()) // clazy:exclude=range-loop-detach
185185
{
186186
if (rs->enabled() == true && rs->id() != ROSProjectManager::Constants::ROS_ATTACH_TO_NODE_ID)
187187
{
@@ -219,7 +219,7 @@ void ROSDebugRunWorker::findProcess()
219219
m_timeElapsed += 10;
220220
const QString &appName = Utils::FileUtils::normalizedPathName(m_debugTargetPath);
221221
Utils::ProcessInfo fallback;
222-
for (const Utils::ProcessInfo &p : Utils::ProcessInfo::processInfoList()) {
222+
for (const Utils::ProcessInfo &p : Utils::ProcessInfo::processInfoList()) { // clazy:exclude=range-loop-detach
223223
if (Utils::FileUtils::normalizedPathName(p.executable) == appName) {
224224
Core::MessageManager::writeSilently(tr("[ROS] Attaching to process: %1.").arg(appName));
225225
pidFound(p);

src/project_manager/ros_settings_page.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ ROSSettings::ROSSettings()
5454
{
5555
QDir ros_opt(ros_path.toFSPathString());
5656
ros_opt.setFilter(QDir::NoDotAndDotDot | QDir::Dirs);
57-
for (const QString &entry : ros_opt.entryList())
57+
for (const QString &entry : ros_opt.entryList()) // clazy:exclude=range-loop-detach
5858
{
5959
Utils::FilePath path = Utils::FilePath::fromString(QLatin1String(ROSProjectManager::Constants::ROS_INSTALL_DIRECTORY));
6060
path = path.pathAppended(entry);
@@ -131,12 +131,12 @@ ROSSettingsWidget::ROSSettingsWidget() :
131131
// TODO: Add python support
132132
TextEditor::CodeStylePool *code_style_pool = TextEditor::TextEditorSettings::codeStylePool(CppEditor::Constants::CPP_SETTINGS_ID);
133133

134-
for (const auto& code_style : code_style_pool->builtInCodeStyles()) {
134+
for (const auto& code_style : code_style_pool->builtInCodeStyles()) { // clazy:exclude=range-loop-detach
135135
QString name = code_style->displayName() + " [built-in]";
136136
m_available_code_styles[name] = code_style->displayName();
137137
}
138138

139-
for (const auto& code_style : code_style_pool->customCodeStyles()) {
139+
for (const auto& code_style : code_style_pool->customCodeStyles()) { // clazy:exclude=range-loop-detach
140140
QString name = code_style->displayName();
141141
if (name != "Global")
142142
m_available_code_styles[name] = name;

0 commit comments

Comments
 (0)