Skip to content

refactor: const params, if-inits, structured bindings, remove redunda…

8c026bb
Select commit
Loading
Failed to load commit list.
Draft

fix: SonarCloud quality gate issues #9793

refactor: const params, if-inits, structured bindings, remove redunda…
8c026bb
Select commit
Loading
Failed to load commit list.
SonarQubeCloud / SonarCloud Code Analysis failed Apr 4, 2026 in 17m 19s

Quality Gate failed

Failed conditions
70.7% Coverage on New Code (required ≥ 80%)
B Maintainability Rating on New Code (required ≥ A)
1 New Bugs (required ≤ 0)
49 New Code Smells (required ≤ 0)
E Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Annotations

Check warning on line 1791 in src/gui/folder.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Unmodified variable "keepBtn" of type "class QPushButton *" should be const-qualified.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ1Xip_6V80h1QdmH4tj&open=AZ1Xip_6V80h1QdmH4tj&pullRequest=9793

Check warning on line 655 in src/gui/folder.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Unmodified variable "relativePath" of type "class QStringView" should be const-qualified.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ1Xip_6V80h1QdmH4tT&open=AZ1Xip_6V80h1QdmH4tT&pullRequest=9793

Check warning on line 956 in src/gui/folder.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace with the version of "std::ranges::none_of" that takes a range.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ1Xip_6V80h1QdmH4tV&open=AZ1Xip_6V80h1QdmH4tV&pullRequest=9793

Check warning on line 1791 in src/gui/folder.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Make the type of this variable a pointer-to-const. The current type of "keepBtn" is "class QPushButton *".

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ1Xip_6V80h1QdmH4tg&open=AZ1Xip_6V80h1QdmH4tg&pullRequest=9793

Check warning on line 116 in src/libsync/discoveryphase.h

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Complete the task associated to this "TODO" comment.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ1XS-Rp0oCGqJGnDPlP&open=AZ1XS-Rp0oCGqJGnDPlP&pullRequest=9793

Check warning on line 447 in src/gui/folder.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Rename this identifier to be shorter or equal to 31 characters.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ1Xip_6V80h1QdmH4tK&open=AZ1Xip_6V80h1QdmH4tK&pullRequest=9793

Check warning on line 1606 in src/gui/folder.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

implicit conversion loses integer precision: 'qsizetype' (aka 'long long') to 'int'

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ1Xip_6V80h1QdmH4tH&open=AZ1Xip_6V80h1QdmH4tH&pullRequest=9793

Check failure on line 669 in src/gui/folder.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this code to not nest more than 3 if|for|do|while|switch statements.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ1Xip_6V80h1QdmH4tP&open=AZ1Xip_6V80h1QdmH4tP&pullRequest=9793

Check warning on line 340 in src/gui/folder.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Rename this identifier to be shorter or equal to 31 characters.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ1Xip_6V80h1QdmH4tJ&open=AZ1Xip_6V80h1QdmH4tJ&pullRequest=9793

Check failure on line 1785 in src/gui/folder.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace the use of "new" with an operation that automatically manages the memory.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ1Xip_6V80h1QdmH4ti&open=AZ1Xip_6V80h1QdmH4ti&pullRequest=9793

Check failure on line 715 in src/gui/folder.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this code to not nest more than 3 if|for|do|while|switch statements.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ1Xip_6V80h1QdmH4tR&open=AZ1Xip_6V80h1QdmH4tR&pullRequest=9793

Check warning on line 1026 in src/gui/folder.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

This function should be declared "const".

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ1Xip_6V80h1QdmH4tX&open=AZ1Xip_6V80h1QdmH4tX&pullRequest=9793

Check warning on line 1191 in src/libsync/discovery.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

This lambda has 70 lines, which is greater than the 20 lines authorized. Split it into several lambdas or functions, or make it a named function.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ1UAuI2IWkl5vUdwlRE&open=AZ1UAuI2IWkl5vUdwlRE&pullRequest=9793

Check failure on line 1695 in src/gui/folder.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace the use of "new" with an operation that automatically manages the memory.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ1Xip_6V80h1QdmH4tf&open=AZ1Xip_6V80h1QdmH4tf&pullRequest=9793

Check warning on line 1339 in src/libsync/syncengine.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace this loop with a "std::erase_if" call.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ1UAuBuIWkl5vUdwlQe&open=AZ1UAuBuIWkl5vUdwlQe&pullRequest=9793

Check warning on line 660 in src/gui/folder.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use the init-statement to declare "pinState" inside the if statement.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ1Xip_6V80h1QdmH4tM&open=AZ1Xip_6V80h1QdmH4tM&pullRequest=9793

Check warning on line 276 in src/libsync/propagateupload.h

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove the default value for parameter "errorString" since the base class does not have a default value.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ1U99bBhfkhwAWlg7GG&open=AZ1U99bBhfkhwAWlg7GG&pullRequest=9793

Check warning on line 1249 in src/gui/folder.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace this declaration by a structured binding declaration.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ1Xip_6V80h1QdmH4tZ&open=AZ1Xip_6V80h1QdmH4tZ&pullRequest=9793

Check warning on line 950 in src/gui/folder.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace the redundant type with "auto".

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ1Xip_6V80h1QdmH4tU&open=AZ1Xip_6V80h1QdmH4tU&pullRequest=9793

Check failure on line 648 in src/gui/folder.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this function to reduce its Cognitive Complexity from 52 to the 25 allowed.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ1Xip_6V80h1QdmH4tN&open=AZ1Xip_6V80h1QdmH4tN&pullRequest=9793

Check warning on line 1634 in src/gui/folder.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Unmodified variable "excludeItemFileInfo" of type "class QFileInfo" should be const-qualified.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ1Xip_6V80h1QdmH4tb&open=AZ1Xip_6V80h1QdmH4tb&pullRequest=9793

Check failure on line 661 in src/gui/folder.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this code to not nest more than 3 if|for|do|while|switch statements.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ1Xip_6V80h1QdmH4tO&open=AZ1Xip_6V80h1QdmH4tO&pullRequest=9793

Check warning on line 888 in src/libsync/syncengine.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Extract this nested code block into a separate function.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ1UAuBuIWkl5vUdwlQS&open=AZ1UAuBuIWkl5vUdwlQS&pullRequest=9793

Check warning on line 1258 in src/gui/folder.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Extract this nested conditional operator into an independent statement.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ1Xip_6V80h1QdmH4ta&open=AZ1Xip_6V80h1QdmH4ta&pullRequest=9793

Check warning on line 1686 in src/gui/folder.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Unmodified variable "statusCode" of type "int" should be const-qualified.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ1Xip_6V80h1QdmH4te&open=AZ1Xip_6V80h1QdmH4te&pullRequest=9793