** conditions contained in a signed written agreement between you and Nokia.
**
** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
+** Nokia at info@qt.nokia.com.
**
**************************************************************************/
return activateEditor(view, editor, flags);
}
- QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
IEditor *editor = createEditor(editorId, fn);
// If we could not open the file in the requested editor, fall
// back to the default editor:
if (!editor)
editor = createEditor(QString(), fn);
+ if (!editor) // Internal error
+ return 0;
+
+ QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
QString errorString;
- if (!editor || !editor->open(&errorString, fn)) {
+ if (!editor->open(&errorString, fn)) {
QApplication::restoreOverrideCursor();
QMessageBox::critical(m_d->m_core->mainWindow(), tr("File Error"), errorString);
delete editor;
- editor = 0;
return 0;
}
addEditor(editor);
if (version != "EditorManagerV4")
return false;
- QMap<QString, QVariant> editorstates;
-
QApplication::setOverrideCursor(Qt::WaitCursor);
- stream >> editorstates;
-
- QMapIterator<QString, QVariant> i(editorstates);
- while (i.hasNext()) {
- i.next();
- m_d->m_editorStates.insert(i.key(), i.value());
- }
+ stream >> m_d->m_editorStates;
int editorCount = 0;
stream >> editorCount;