forked from qt-creator/qt-creator
Various plugins: Reuse QScopeGuard instead of ExecuteOnDestruction
Change-Id: I3341342bc763fade5ad9dcb854928e5499287472 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: hjk <hjk@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -110,6 +110,7 @@
|
||||
#include <QMessageBox>
|
||||
#include <QPointer>
|
||||
#include <QPushButton>
|
||||
#include <QScopeGuard>
|
||||
#include <QSettings>
|
||||
#include <QStackedWidget>
|
||||
#include <QTextBlock>
|
||||
@@ -125,8 +126,6 @@
|
||||
#include <cppeditor/cpptoolstestcase.h>
|
||||
#include <cppeditor/projectinfo.h>
|
||||
|
||||
#include <utils/executeondestruction.h>
|
||||
|
||||
#include <QTest>
|
||||
#include <QSignalSpy>
|
||||
#include <QTestEventLoop>
|
||||
@@ -2338,7 +2337,7 @@ void DebuggerUnitTests::testStateMachine()
|
||||
BuildManager::buildProjectWithDependencies(ProjectManager::startupProject());
|
||||
loop.exec();
|
||||
|
||||
ExecuteOnDestruction guard([] { EditorManager::closeAllEditors(false); });
|
||||
const QScopeGuard cleanup([] { EditorManager::closeAllEditors(false); });
|
||||
|
||||
RunConfiguration *rc = ProjectManager::startupRunConfiguration();
|
||||
QVERIFY(rc);
|
||||
|
||||
Reference in New Issue
Block a user