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:
Friedemann Kleint
2010-09-03 08:59:20 +02:00
parent df8fc5a9d1
commit faf34c3ae6
2 changed files with 5 additions and 8 deletions

View File

@@ -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);
}
}