Commit 99b9229b authored by Tomaz Canabrava's avatar Tomaz Canabrava

Declare the Static Const Char on the .cpp file

Since the Static const char * items are private and nothing
should access them besides the MainWindow class, declare
them inside of the .cpp file with static linkage, this way
a few good things happen: they are not exported as symbols
to any other class (not even with private linkage) and also
if we need to add a new one, on the .cpp, the only compiled
file will be the cpp, instead of the tons of files that include
mainwindow.h
Signed-off-by: 's avatarTomaz Canabrava <tomaz.canabrava@intel.com>
parent 91ae7330
...@@ -84,15 +84,16 @@ This file is part of the QGROUNDCONTROL project ...@@ -84,15 +84,16 @@ This file is part of the QGROUNDCONTROL project
const char* MAIN_SETTINGS_GROUP = "QGC_MAINWINDOW"; const char* MAIN_SETTINGS_GROUP = "QGC_MAINWINDOW";
#ifndef __mobile__ #ifndef __mobile__
const char* MainWindow::_mavlinkDockWidgetName = "MAVLink Inspector"; static const char* _mavlinkDockWidgetName = "MAVLink Inspector";
const char* MainWindow::_customCommandWidgetName = "Custom Command"; static const char* _customCommandWidgetName = "Custom Command";
const char* MainWindow::_filesDockWidgetName = "Onboard Files"; static const char* _filesDockWidgetName = "Onboard Files";
const char* MainWindow::_uasStatusDetailsDockWidgetName = "Status Details"; static const char* _uasStatusDetailsDockWidgetName = "Status Details";
const char* MainWindow::_uasInfoViewDockWidgetName = "Info View"; static const char* _pfdDockWidgetName = "Primary Flight Display";
const char* MainWindow::_hilDockWidgetName = "HIL Config"; static const char* _uasInfoViewDockWidgetName = "Info View";
const char* MainWindow::_analyzeDockWidgetName = "Analyze"; static const char* _hilDockWidgetName = "HIL Config";
static const char* _analyzeDockWidgetName = "Analyze";
const char* MainWindow::_visibleWidgetsKey = "VisibleWidgets";
static const char* _visibleWidgetsKey = "VisibleWidgets";
#endif #endif
static MainWindow* _instance = NULL; ///< @brief MainWindow singleton static MainWindow* _instance = NULL; ///< @brief MainWindow singleton
......
...@@ -227,15 +227,6 @@ private: ...@@ -227,15 +227,6 @@ private:
QPointer<QWidget> _missionEditorView; QPointer<QWidget> _missionEditorView;
#ifndef __mobile__ #ifndef __mobile__
// Dock widget names
static const char* _mavlinkDockWidgetName;
static const char* _customCommandWidgetName;
static const char* _filesDockWidgetName;
static const char* _uasStatusDetailsDockWidgetName;
static const char* _uasInfoViewDockWidgetName;
static const char* _hilDockWidgetName;
static const char* _analyzeDockWidgetName;
QMap<QString, QGCDockWidget*> _mapName2DockWidget; QMap<QString, QGCDockWidget*> _mapName2DockWidget;
QMap<QString, QAction*> _mapName2Action; QMap<QString, QAction*> _mapName2Action;
#endif #endif
...@@ -250,8 +241,6 @@ private: ...@@ -250,8 +241,6 @@ private:
void _showDockWidget(const QString &name, bool show); void _showDockWidget(const QString &name, bool show);
void _loadVisibleWidgetsSettings(void); void _loadVisibleWidgetsSettings(void);
void _storeVisibleWidgetsSettings(void); void _storeVisibleWidgetsSettings(void);
static const char* _visibleWidgetsKey;
#endif #endif
bool _autoReconnect; bool _autoReconnect;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment