Skip to content

ci: add clazy#33

Closed
Nerixyz wants to merge 7 commits intomasterfrom
ci/clazy
Closed

ci: add clazy#33
Nerixyz wants to merge 7 commits intomasterfrom
ci/clazy

Conversation

@Nerixyz
Copy link
Owner

@Nerixyz Nerixyz commented Nov 18, 2025

No description provided.

@Nerixyz Nerixyz added the no changelog entry needed no changelog entry needed label Nov 18, 2025
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

else
{
backgroundColor = QColor("#404040");
backgroundColor = QColor("#404040"); // test

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: The QColor ctor taking RGB int value is cheaper than one taking string literals [clazy-qcolor-from-literal]

Suggested change
backgroundColor = QColor("#404040"); // test
backgroundColor = QColor(0x404040); // test

backgroundColor = QColor("#4A273D");
}
{ // o
backgroundColor = QColor("#4A273D"); // xd

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: The QColor ctor taking RGB int value is cheaper than one taking string literals [clazy-qcolor-from-literal]

Suggested change
backgroundColor = QColor("#4A273D"); // xd
backgroundColor = QColor(0x4A273D); // xd

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

else
{
backgroundColor = QColor("#404040");
backgroundColor = QColor("#404040"); // test
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: The QColor ctor taking RGB int value is cheaper than one taking string literals [clazy-qcolor-from-literal]

Suggested change
backgroundColor = QColor("#404040"); // test
backgroundColor = QColor(0x404040); // test

Nerixyz and others added 6 commits December 4, 2025 22:33
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

},
this->signalHolder_);

this->menu_.addAction(
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: Pass a context object as 2nd addAction parameter [clazy-connect-3arg-lambda]

    this->menu_.addAction(
    ^

this->signalHolder_);

this->menu_.addAction(
"Popup Tab",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: QString(const char*) being called [clazy-qstring-allocations]

Suggested change
"Popup Tab",
QStringLiteral("Popup Tab"),

this->menu_.addAction(
"Popup Tab",
getApp()->getHotkeys()->getDisplaySequence(HotkeyCategory::Window,
"popup", {{"window"}}),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: QString(const char*) being called [clazy-qstring-allocations]

Suggested change
"popup", {{"window"}}),
QStringLiteral("popup"), {{"window"}}),

}
});

this->menu_.addAction("Duplicate Tab", [this]() {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: Pass a context object as 2nd addAction parameter [clazy-connect-3arg-lambda]

    this->menu_.addAction("Duplicate Tab", [this]() {
    ^

}
});

this->menu_.addAction("Duplicate Tab", [this]() {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: QString(const char*) being called [clazy-qstring-allocations]

Suggested change
this->menu_.addAction("Duplicate Tab", [this]() {
this->menu_.addAction(QStringLiteral("Duplicate Tab"), [this]() {

[this, beforeSelectedName]() {
auto reply = QMessageBox::question(
this, "Close Visible Tabs to " + beforeSelectedName,
"Are you sure you want to close all visible tabs to the " +
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: QString(const char*) being called [clazy-qstring-allocations]

src/widgets/helper/NotebookTab.cpp:226:

-                         beforeSelectedName.toLower() + "?",
+                         beforeSelectedName.toLower() + QLatin1String("?"),

});

this->closeTabsAfterSelectedAction_ =
this->closeMultipleTabsMenu_->addAction(
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: Pass a context object as 2nd addAction parameter [clazy-connect-3arg-lambda]

        this->closeMultipleTabsMenu_->addAction(
        ^


this->closeTabsAfterSelectedAction_ =
this->closeMultipleTabsMenu_->addAction(
"Close Visible Tabs to " + afterSelectedName,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: QString(const char*) being called [clazy-qstring-allocations]

Suggested change
"Close Visible Tabs to " + afterSelectedName,
QLatin1String("Close Visible Tabs to ") + afterSelectedName,

"Close Visible Tabs to " + afterSelectedName,
[this, afterSelectedName]() {
auto reply = QMessageBox::question(
this, "Close Visible Tabs to " + afterSelectedName,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: QString(const char*) being called [clazy-qstring-allocations]

Suggested change
this, "Close Visible Tabs to " + afterSelectedName,
this, QLatin1String("Close Visible Tabs to ") + afterSelectedName,

[this, afterSelectedName]() {
auto reply = QMessageBox::question(
this, "Close Visible Tabs to " + afterSelectedName,
"Are you sure you want to close all visible tabs to the " +
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: QString(const char*) being called [clazy-qstring-allocations]

src/widgets/helper/NotebookTab.cpp:271:

-                         afterSelectedName + "?",
+                         afterSelectedName + QLatin1String("?"),

@Nerixyz Nerixyz closed this Dec 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no changelog entry needed no changelog entry needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants