Skip to content

refs #13914 - apply enforced language for non-project inputs in GUI#7627

Merged
firewave merged 2 commits intocppcheck-opensource:mainfrom
firewave:gui-enforced
Jun 30, 2025
Merged

refs #13914 - apply enforced language for non-project inputs in GUI#7627
firewave merged 2 commits intocppcheck-opensource:mainfrom
firewave:gui-enforced

Conversation

@firewave
Copy link
Copy Markdown
Collaborator

No description provided.

Comment thread gui/mainwindow.cpp
clearResults();
mUI->mResults->checkingStarted(1);
// TODO: apply enforcedLanguage
// TODO: apply enforcedLanguage?
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This is invoked by the Scratchpad which has it's own field for specifying the language so I think it should not be using the enforced language.

But I wonder if it relies on other project settings? If it does it would be inconsistent and we should remove that field for specifying a file name. If not it would have limited usability because it might require e.g. the standard or libraries to be set. But I guess that should get its own ticket and is not in the scope of this PR.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Comment thread gui/mainwindow.cpp
// TODO: split ErrorLogger from ThreadResult
// Initialize dummy ThreadResult as ErrorLogger
ThreadResult result;
result.setFiles(QStringList(filename));
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This was not necessary as this is just a dummy. Also the language is identified below.

Comment thread gui/mainwindow.cpp
std::list<FileWithDetails> fdetails = enrichFilesForAnalysis(fileNames, checkSettings);

mThread->setFiles(fileNames);
// TODO: lock UI here?
Copy link
Copy Markdown
Collaborator Author

@firewave firewave Jun 25, 2025

Choose a reason for hiding this comment

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

The UI is locked earlier in the other instance. Something to look into later (or to consider if ever fixing some issues with it).

@danmar
Copy link
Copy Markdown
Collaborator

danmar commented Jun 28, 2025

please look at the conflict.

@firewave
Copy link
Copy Markdown
Collaborator Author

please look at the conflict.

Done.

Comment thread gui/mainwindow.cpp
@firewave firewave merged commit 1cff895 into cppcheck-opensource:main Jun 30, 2025
53 checks passed
@firewave firewave deleted the gui-enforced branch June 30, 2025 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants