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
Valentin Platzgummer
qgroundcontrol
Commits
4ea83c50
Commit
4ea83c50
authored
Nov 29, 2014
by
Don Gagne
Browse files
Cleanup for use with unit test
Splash screen is optional. Also remove some unused class definition.
parent
6c35a7ff
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/ui/MainWindow.cc
View file @
4ea83c50
...
@@ -88,7 +88,6 @@ const QString MainWindow::defaultLightStyle = ":files/styles/style-light.css";
...
@@ -88,7 +88,6 @@ const QString MainWindow::defaultLightStyle = ":files/styles/style-light.css";
MainWindow
*
MainWindow
::
_create
(
QSplashScreen
*
splashScreen
,
enum
MainWindow
::
CUSTOM_MODE
mode
)
MainWindow
*
MainWindow
::
_create
(
QSplashScreen
*
splashScreen
,
enum
MainWindow
::
CUSTOM_MODE
mode
)
{
{
Q_ASSERT
(
_instance
==
NULL
);
Q_ASSERT
(
_instance
==
NULL
);
Q_ASSERT
(
splashScreen
);
new
MainWindow
(
splashScreen
,
mode
);
new
MainWindow
(
splashScreen
,
mode
);
...
@@ -125,12 +124,12 @@ MainWindow::MainWindow(QSplashScreen* splashScreen, enum MainWindow::CUSTOM_MODE
...
@@ -125,12 +124,12 @@ MainWindow::MainWindow(QSplashScreen* splashScreen, enum MainWindow::CUSTOM_MODE
menuActionHelper
(
new
MenuActionHelper
()),
menuActionHelper
(
new
MenuActionHelper
()),
_splashScreen
(
splashScreen
)
_splashScreen
(
splashScreen
)
{
{
Q_ASSERT
(
splashScreen
);
Q_ASSERT
(
_instance
==
NULL
);
Q_ASSERT
(
_instance
==
NULL
);
_instance
=
this
;
_instance
=
this
;
connect
(
this
,
&
MainWindow
::
initStatusChanged
,
splashScreen
,
&
QSplashScreen
::
showMessage
);
if
(
splashScreen
)
{
connect
(
this
,
&
MainWindow
::
initStatusChanged
,
splashScreen
,
&
QSplashScreen
::
showMessage
);
}
this
->
setAttribute
(
Qt
::
WA_DeleteOnClose
);
this
->
setAttribute
(
Qt
::
WA_DeleteOnClose
);
connect
(
menuActionHelper
,
SIGNAL
(
needToShowDockWidget
(
QString
,
bool
)),
SLOT
(
showDockWidget
(
QString
,
bool
)));
connect
(
menuActionHelper
,
SIGNAL
(
needToShowDockWidget
(
QString
,
bool
)),
SLOT
(
showDockWidget
(
QString
,
bool
)));
...
...
src/ui/MainWindow.h
View file @
4ea83c50
...
@@ -468,14 +468,9 @@ private slots:
...
@@ -468,14 +468,9 @@ private slots:
void
_saveTempFlightDataLog
(
QString
tempLogfile
);
void
_saveTempFlightDataLog
(
QString
tempLogfile
);
private:
private:
/// Constructor is private since all creation should be through MainWindow::
instance.
/// Constructor is private since all creation should be through MainWindow::
_create
MainWindow
(
QSplashScreen
*
splashScreen
,
enum
MainWindow
::
CUSTOM_MODE
mode
);
MainWindow
(
QSplashScreen
*
splashScreen
,
enum
MainWindow
::
CUSTOM_MODE
mode
);
/// @brief Two phase construction such that MainWindow::instance is available to code
void
_init
(
void
);
friend
class
QGCApplication
;
void
_hideSplashScreen
(
void
);
void
_hideSplashScreen
(
void
);
void
_openUrl
(
const
QString
&
url
,
const
QString
&
errorMessage
);
void
_openUrl
(
const
QString
&
url
,
const
QString
&
errorMessage
);
...
...
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