Debugger: Show output of debugger detection

... in tooltip of debugger path lineedit.

Helps with cases where necessary libraries are missing.

The tooltip is a bit hard to recognize, but as such cases now also
are marked in red text there's at least some direct hint that something
is not ok.

Change-Id: Ic5da8dcb1921a98f91f6eed755fa87ce5feed698
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
hjk
2021-08-03 12:22:25 +02:00
parent 2f6c5db856
commit 4652ef286b
3 changed files with 17 additions and 3 deletions

View File

@@ -314,6 +314,15 @@ DebuggerItemConfigWidget::DebuggerItemConfigWidget()
m_binaryChooser->setExpectedKind(PathChooser::ExistingCommand);
m_binaryChooser->setMinimumWidth(400);
m_binaryChooser->setHistoryCompleter("DebuggerPaths");
m_binaryChooser->setValidationFunction([this](FancyLineEdit *edit, QString *errorMessage) {
if (!m_binaryChooser->defaultValidationFunction()(edit, errorMessage))
return false;
DebuggerItem item;
item.setCommand(m_binaryChooser->filePath());
errorMessage->clear();
item.reinitializeFromFile({}, errorMessage);
return errorMessage->isEmpty();
});
m_workingDirectoryChooser = new PathChooser(this);
m_workingDirectoryChooser->setExpectedKind(PathChooser::Directory);