forked from qt-creator/qt-creator
Fix Opening .ui file from "Recent Files" to go to 'Design' mode.
On that occasion, rename Designer to show up as 'Form Editor' instead of Xml Editor in 'Open With'. Task-number: QTCREATORBUG-2246
This commit is contained in:
@@ -1269,13 +1269,10 @@ void MainWindow::aboutToShowRecentFiles()
|
|||||||
|
|
||||||
void MainWindow::openRecentFile()
|
void MainWindow::openRecentFile()
|
||||||
{
|
{
|
||||||
QAction *action = qobject_cast<QAction*>(sender());
|
if (const QAction *action = qobject_cast<const QAction*>(sender())) {
|
||||||
if (!action)
|
const QString fileName = action->data().toString();
|
||||||
return;
|
if (!fileName.isEmpty())
|
||||||
QString fileName = action->data().toString();
|
|
||||||
if (!fileName.isEmpty()) {
|
|
||||||
editorManager()->openEditor(fileName);
|
editorManager()->openEditor(fileName);
|
||||||
editorManager()->ensureEditorManagerVisible();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -39,7 +39,7 @@ const char * const INFO_READ_ONLY = "DesignerXmlEditor.ReadOnly";
|
|||||||
const char * const K_DESIGNER_XML_EDITOR_ID = "FormEditor.DesignerXmlEditor";
|
const char * const K_DESIGNER_XML_EDITOR_ID = "FormEditor.DesignerXmlEditor";
|
||||||
const char * const C_DESIGNER_XML_EDITOR = "Designer Xml Editor";
|
const char * const C_DESIGNER_XML_EDITOR = "Designer Xml Editor";
|
||||||
const char * const DESIGNER_XML_EDITOR_ID ="DesignerXmlEditor";
|
const char * const DESIGNER_XML_EDITOR_ID ="DesignerXmlEditor";
|
||||||
const char * const C_DESIGNER_XML_DISPLAY_NAME = QT_TRANSLATE_NOOP("Designer", "Xml Editor");
|
const char * const C_DESIGNER_XML_DISPLAY_NAME = QT_TRANSLATE_NOOP("Designer", "Form Editor");
|
||||||
|
|
||||||
const char * const SETTINGS_CATEGORY = "P.Designer";
|
const char * const SETTINGS_CATEGORY = "P.Designer";
|
||||||
const char * const SETTINGS_CATEGORY_ICON = ":/core/images/category_design.png";
|
const char * const SETTINGS_CATEGORY_ICON = ":/core/images/category_design.png";
|
||||||
|
Reference in New Issue
Block a user