diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2021-06-29 15:21:06 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2021-06-29 13:43:17 +0000 |
commit | 29704e60b0a0315589b768cf96a1563357c4ec69 (patch) | |
tree | b78e7c8b4733b171799d0a5397058585f33e9374 /src/plugins/designer | |
parent | d8bd855c021bbfbe6c3605237c1d70d653faf547 (diff) | |
download | qt-creator-29704e60b0a0315589b768cf96a1563357c4ec69.tar.gz |
Designer: Fix "Go to slot"
Amends 8dc4cb17c1, where we forgot to actually open the file in case the
slot already exists.
Fixes: QTCREATORBUG-25843
Change-Id: Idd9395f5bf72418043f917fd70bc3d6569b4f2fd
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src/plugins/designer')
-rw-r--r-- | src/plugins/designer/qtcreatorintegration.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/designer/qtcreatorintegration.cpp b/src/plugins/designer/qtcreatorintegration.cpp index c11756674c..5460377554 100644 --- a/src/plugins/designer/qtcreatorintegration.cpp +++ b/src/plugins/designer/qtcreatorintegration.cpp @@ -550,8 +550,11 @@ bool QtCreatorIntegration::navigateToSlot(const QString &objectName, CppTools::CppRefactoringChanges refactoring(docTable); CppTools::SymbolFinder symbolFinder; - if (symbolFinder.findMatchingDefinition(fun, docTable, true)) + if (const Function *funImpl = symbolFinder.findMatchingDefinition(fun, docTable, true)) { + Core::EditorManager::openEditorAt(QString::fromUtf8(funImpl->fileName()), + funImpl->line() + 2); return true; + } const QString implFilePath = CppTools::correspondingHeaderOrSource(declFilePath); const CppTools::InsertionLocation location = CppTools::insertLocationForMethodDefinition (fun, false, CppTools::NamespaceHandling::CreateMissing, refactoring, implFilePath); |