Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
f4e022e7
Commit
f4e022e7
authored
Jun 24, 2019
by
Stefan Dunca
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove windows shutdown old hack. Fixes the waiting time on close for windows platforms.
parent
f9141630
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
30 deletions
+3
-30
MainRootWindow.qml
src/ui/MainRootWindow.qml
+3
-30
No files found.
src/ui/MainRootWindow.qml
View file @
f4e022e7
...
@@ -181,43 +181,15 @@ ApplicationWindow {
...
@@ -181,43 +181,15 @@ ApplicationWindow {
}
}
}
}
//-------------------------------------------------------------------------
//-- Weird hack that has to be fixed elsewhere and have this removed
property
bool
_forceClose
:
false
property
bool
_forceClose
:
false
function
reallyClose
()
{
_forceClose
=
true
mainWindow
.
close
()
}
function
finishCloseProcess
()
{
function
finishCloseProcess
()
{
if
(
ScreenTools
.
isWindows
)
{
if
(
ScreenTools
.
isWindows
)
{
hide
()
hide
()
}
}
QGroundControl
.
linkManager
.
shutdown
()
QGroundControl
.
linkManager
.
shutdown
()
// The above shutdown causes a flurry of activity as the vehicle components are removed. This in turn
_forceClose
=
true
// causes the Windows Version of Qt to crash if you allow the close event to be accepted. In order to prevent
mainWindow
.
close
()
// the crash, we ignore the close event and setup a delayed timer to close the window after things settle down.
if
(
ScreenTools
.
isWindows
)
{
delayedWindowCloseTimer
.
start
()
}
else
{
reallyClose
()
}
}
Timer
{
id
:
delayedWindowCloseTimer
interval
:
1500
running
:
false
repeat
:
false
onTriggered
:
{
reallyClose
()
if
(
ScreenTools
.
isWindows
)
{
// Closing the app while main is hidden doesn't work
Qt
.
callLater
(
Qt
.
quit
)
}
}
}
}
MessageDialog
{
MessageDialog
{
...
@@ -241,6 +213,7 @@ ApplicationWindow {
...
@@ -241,6 +213,7 @@ ApplicationWindow {
//-- Check for unsaved missions
//-- Check for unsaved missions
onClosing
:
{
onClosing
:
{
// Check first for unsaved missions and active connections
if
(
!
_forceClose
)
{
if
(
!
_forceClose
)
{
unsavedMissionCloseDialog
.
check
()
unsavedMissionCloseDialog
.
check
()
close
.
accepted
=
false
close
.
accepted
=
false
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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