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
Education
Cantor
Commits
55052fcc
Commit
55052fcc
authored
Jan 02, 2022
by
Alexander Semke
Browse files
Don't crash when openning an invalid project file from an invalid URL.
parent
611d31c4
Pipeline
#117313
passed with stage
in 18 minutes and 51 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/cantor.cpp
View file @
55052fcc
/*
SPDX-License-Identifier: GPL-2.0-or-later
SPDX-FileCopyrightText: 2009 Alexander Rieder <alexanderrieder@gmail.com>
SPDX-FileCopyrightText: 2018-202
1
Alexander Semke <alexander.semke@web.de>
SPDX-FileCopyrightText: 2018-202
2
Alexander Semke <alexander.semke@web.de>
*/
#include
"cantor.h"
#include
"lib/session.h"
...
...
@@ -113,13 +113,13 @@ void CantorShell::load(const QUrl& url)
m_tabWidget
->
setCurrentIndex
(
m_parts
.
size
()
-
1
);
}
if
(
!
m_part
->
openUrl
(
url
))
closeTab
(
m_tabWidget
->
currentIndex
());
if
(
m_recentProjectsAction
)
m_recentProjectsAction
->
addUrl
(
url
);
if
(
m_part
->
openUrl
(
url
))
{
if
(
m_recentProjectsAction
)
m_recentProjectsAction
->
addUrl
(
url
);
updateWindowTitle
(
m_part
->
url
().
fileName
());
updateWindowTitle
(
m_part
->
url
().
fileName
());
}
else
closeTab
(
m_tabWidget
->
currentIndex
());
}
void
CantorShell
::
setupActions
()
...
...
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