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()
|
||||
{
|
||||
QAction *action = qobject_cast<QAction*>(sender());
|
||||
if (!action)
|
||||
return;
|
||||
QString fileName = action->data().toString();
|
||||
if (!fileName.isEmpty()) {
|
||||
editorManager()->openEditor(fileName);
|
||||
editorManager()->ensureEditorManagerVisible();
|
||||
if (const QAction *action = qobject_cast<const QAction*>(sender())) {
|
||||
const QString fileName = action->data().toString();
|
||||
if (!fileName.isEmpty())
|
||||
editorManager()->openEditor(fileName);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user