Skip to content

Commit

Permalink
Gui: Fix some linter warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Nov 8, 2024
1 parent c6d47c8 commit 94c4ba1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Gui/TaskElementColors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ class ElementColors::Private: public Gui::SelectionGate
explicit Private(ViewProviderDocumentObject* vp, const char* element = "")
: ui(new Ui_TaskElementColors())
, vp(vp)
, vpParent(vp)
, vpDoc(vp->getDocument())
, editElement(element)
{
vpDoc = vp->getDocument();
vpParent = vp;
auto doc = Application::Instance->editDocument();
if (doc) {
auto editVp = doc->getInEdit(&vpParent, &editSub);
Expand Down Expand Up @@ -164,7 +164,7 @@ class ElementColors::Private: public Gui::SelectionGate
}

for (auto& v : vp->getElementColors(sub)) {
auto it = elements.find(v.first.c_str());
auto it = elements.find(v.first);
if (it != elements.end()) {
if (push) {
items.push_back(it->second);
Expand Down Expand Up @@ -195,10 +195,9 @@ class ElementColors::Private: public Gui::SelectionGate
for (int i = 0; i < count; ++i) {
auto item = ui->elementList->item(i);
auto color = item->data(Qt::UserRole).value<QColor>();
std::string sub = qPrintable(item->data(Qt::UserRole + 1).value<QString>());
info.emplace(
qPrintable(item->data(Qt::UserRole + 1).value<QString>()),
App::Color(color.redF(), color.greenF(), color.blueF(), 1.0 - color.alphaF()));
App::Color(color.redF(), color.greenF(), color.blueF(), 1.0F - color.alphaF()));
}
if (!App::GetApplication().getActiveTransaction()) {
App::GetApplication().setActiveTransaction("Set colors");
Expand Down Expand Up @@ -622,8 +621,9 @@ TaskElementColors::~TaskElementColors() = default;
void TaskElementColors::open()
{}

void TaskElementColors::clicked(int)
void TaskElementColors::clicked(int id)
{
Q_UNUSED(id)
}

bool TaskElementColors::accept()
Expand Down

0 comments on commit 94c4ba1

Please sign in to comment.