Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
46c09e77
Commit
46c09e77
authored
May 02, 2011
by
Oswald Buddenhagen
Browse files
change createEditor() error handling
take it out of the editor->open() error path. it's unrelated.
parent
40c6653f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/coreplugin/editormanager/editormanager.cpp
View file @
46c09e77
...
...
@@ -1211,18 +1211,20 @@ IEditor *EditorManager::openEditor(Core::Internal::EditorView *view, const QStri
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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment