forked from qt-creator/qt-creator
Git: Cleanup gitExecutable()
Using expected removes a bunch of handling code. Change-Id: Id524912d82aa693fbb39c7e7fa34abd77153f92e Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -409,11 +409,9 @@ void GitPluginPrivate::onApplySettings()
|
||||
{
|
||||
emit configurationChanged();
|
||||
updateRepositoryBrowserAction();
|
||||
bool gitFoundOk;
|
||||
QString errorMessage;
|
||||
settings().gitExecutable(&gitFoundOk, &errorMessage);
|
||||
if (!gitFoundOk) {
|
||||
QTimer::singleShot(0, this, [errorMessage] {
|
||||
const expected_str<FilePath> result = settings().gitExecutable();
|
||||
if (!result) {
|
||||
QTimer::singleShot(0, this, [errorMessage = result.error()] {
|
||||
AsynchronousMessageBox::warning(Tr::tr("Git Settings"), errorMessage);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user