Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 30, 2025

Conversation

firewave
Copy link
Collaborator

No description provided.

@@ -720,7 +722,7 @@ void MainWindow::analyzeCode(const QString& code, const QString& filename)
checkLockDownUI();
clearResults();
mUI->mResults->checkingStarted(1);
// TODO: apply enforcedLanguage
// TODO: apply enforcedLanguage?
Copy link
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
Collaborator Author

Choose a reason for hiding this comment

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

// Initialize dummy ThreadResult as ErrorLogger
ThreadResult result;
result.setFiles(QStringList(filename));
Copy link
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.


mThread->setFiles(fileNames);
// TODO: lock UI here?
Copy link
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
Owner

danmar commented Jun 28, 2025

please look at the conflict.

@firewave
Copy link
Collaborator Author

please look at the conflict.

Done.

@firewave firewave merged commit 1cff895 into danmar: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