forked from qt-creator/qt-creator
TextEditor: Reuse qScopeGuard instead of ExecuteOnDestruction
Change-Id: I2ca7d4676bb4f34fbf59fd45bcd01d7857cb7e4e Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -4,10 +4,10 @@
|
||||
#include "basehoverhandler.h"
|
||||
#include "texteditor.h"
|
||||
|
||||
#include <utils/executeondestruction.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/tooltip/tooltip.h>
|
||||
|
||||
#include <QScopeGuard>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
namespace TextEditor {
|
||||
@@ -121,7 +121,7 @@ void BaseHoverHandler::process(TextEditorWidget *widget, int pos, ReportPriority
|
||||
|
||||
void BaseHoverHandler::identifyMatch(TextEditorWidget *editorWidget, int pos, ReportPriority report)
|
||||
{
|
||||
Utils::ExecuteOnDestruction reportPriority([this, report](){ report(priority()); });
|
||||
const auto cleanup = qScopeGuard([this, report] { report(priority()); });
|
||||
|
||||
QString tooltip = editorWidget->extraSelectionTooltip(pos);
|
||||
if (!tooltip.isEmpty())
|
||||
|
||||
Reference in New Issue
Block a user