forked from qt-creator/qt-creator
Prefix editor's uniqueId with plugin name
In this way we minimize the chance of generating non-unique id. Change-Id: Idd177c5a4b44b17a58c2a944ec77b9517e91964e Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -688,17 +688,19 @@ void QmlJSEditorWidget::inspectElementUnderCursor() const
|
||||
const CppComponentValue *cppValue = findCppComponentToInspect(semanticInfo, cursorPosition);
|
||||
if (!cppValue) {
|
||||
QString title = tr("Code Model Not Available");
|
||||
const QString nothingToShow = QStringLiteral("nothingToShow");
|
||||
const QString documentId = Constants::QML_JS_EDITOR_PLUGIN + QStringLiteral(".NothingToShow");
|
||||
EditorManager::openEditorWithContents(Core::Constants::K_DEFAULT_TEXT_EDITOR_ID, &title,
|
||||
tr("Code model not available.").toUtf8(), nothingToShow,
|
||||
tr("Code model not available.").toUtf8(), documentId,
|
||||
EditorManager::IgnoreNavigationHistory);
|
||||
return;
|
||||
}
|
||||
|
||||
QString title = tr("Code Model of %1").arg(cppValue->metaObject()->className());
|
||||
const QString documentId = Constants::QML_JS_EDITOR_PLUGIN + QStringLiteral(".Class.")
|
||||
+ cppValue->metaObject()->className();
|
||||
IEditor *outputEditor = EditorManager::openEditorWithContents(
|
||||
Core::Constants::K_DEFAULT_TEXT_EDITOR_ID, &title, QByteArray(),
|
||||
cppValue->metaObject()->className(), EditorManager::IgnoreNavigationHistory);
|
||||
documentId, EditorManager::IgnoreNavigationHistory);
|
||||
|
||||
if (!outputEditor)
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user