diff options
author | Eike Ziller <eike.ziller@qt.io> | 2022-01-17 16:47:31 +0100 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2022-01-18 09:33:20 +0000 |
commit | 3749cfc89621236046dd7cbe89bc375a62bc0685 (patch) | |
tree | 012fdaf1063607384dca7f677e7367eef1c099a0 /src/plugins/python/pythonlanguageclient.cpp | |
parent | 49ac087955789e4ab931afe3a34414c7cba68589 (diff) | |
download | qt-creator-3749cfc89621236046dd7cbe89bc375a62bc0685.tar.gz |
InfoBar: Make adding more buttons possible
Change-Id: Ic0c946cf3f87fe46cd06391f38e0bc71374ad340
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Diffstat (limited to 'src/plugins/python/pythonlanguageclient.cpp')
-rw-r--r-- | src/plugins/python/pythonlanguageclient.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/plugins/python/pythonlanguageclient.cpp b/src/plugins/python/pythonlanguageclient.cpp index a0292f6797..ec82520f22 100644 --- a/src/plugins/python/pythonlanguageclient.cpp +++ b/src/plugins/python/pythonlanguageclient.cpp @@ -382,8 +382,8 @@ void PyLSConfigureAssistant::handlePyLSState(const FilePath &python, Utils::InfoBarEntry info(installPylsInfoBarId, message, Utils::InfoBarEntry::GlobalSuppression::Enabled); - info.setCustomButtonInfo(tr("Install"), - [=]() { installPythonLanguageServer(python, document); }); + info.addCustomButton(tr("Install"), + [=]() { installPythonLanguageServer(python, document); }); infoBar->addInfo(info); m_infoBarEntries[python] << document; } else if (state.state == PythonLanguageServerState::AlreadyInstalled @@ -394,8 +394,7 @@ void PyLSConfigureAssistant::handlePyLSState(const FilePath &python, Utils::InfoBarEntry info(startPylsInfoBarId, message, Utils::InfoBarEntry::GlobalSuppression::Enabled); - info.setCustomButtonInfo(tr("Set Up"), - [=]() { setupPythonLanguageServer(python, document); }); + info.addCustomButton(tr("Set Up"), [=]() { setupPythonLanguageServer(python, document); }); infoBar->addInfo(info); m_infoBarEntries[python] << document; } else if (state.state == PythonLanguageServerState::ConfiguredButDisabled @@ -405,8 +404,7 @@ void PyLSConfigureAssistant::handlePyLSState(const FilePath &python, Utils::InfoBarEntry info(enablePylsInfoBarId, message, Utils::InfoBarEntry::GlobalSuppression::Enabled); - info.setCustomButtonInfo(tr("Enable"), - [=]() { enablePythonLanguageServer(python, document); }); + info.addCustomButton(tr("Enable"), [=]() { enablePythonLanguageServer(python, document); }); infoBar->addInfo(info); m_infoBarEntries[python] << document; } |