From efd085d16be897ffeaef0c6b539d5410d6eff30a Mon Sep 17 00:00:00 2001 From: Nate Weibley Date: Mon, 4 Apr 2016 13:43:36 -0400 Subject: [PATCH] Fix case sensitive names, QPointer header, and mobile builds --- qgroundcontrol.pro | 8 ++++---- src/QGCDockWidget.h | 5 +++-- .../{appmessagesdialog.cc => AppMessagesDialog.cc} | 0 .../{appmessagesdialog.h => AppMessagesDialog.h} | 0 src/main.cc | 7 ++++--- 5 files changed, 11 insertions(+), 9 deletions(-) rename src/ViewWidgets/{appmessagesdialog.cc => AppMessagesDialog.cc} (100%) rename src/ViewWidgets/{appmessagesdialog.h => AppMessagesDialog.h} (100%) diff --git a/qgroundcontrol.pro b/qgroundcontrol.pro index f61044ca6..659bfbf31 100644 --- a/qgroundcontrol.pro +++ b/qgroundcontrol.pro @@ -297,8 +297,7 @@ HEADERS += \ src/AutoPilotPlugins/APM/APMAirframeLoader.h \ src/QmlControls/QGCImageProvider.h \ src/AutoPilotPlugins/APM/APMRemoteParamsDownloader.h \ - src/QtLocationPlugin/QMLControl/QGCMapEngineManager.h \ - src/ViewWidgets/AppMessagesDialog.h + src/QtLocationPlugin/QMLControl/QGCMapEngineManager.h DebugBuild { HEADERS += \ @@ -371,6 +370,7 @@ HEADERS += \ src/ViewWidgets/LogDownload.h \ src/ViewWidgets/LogDownloadController.h \ src/ViewWidgets/ViewWidgetController.h \ + src/ViewWidgets/AppMessagesDialog.h } iOSBuild { @@ -437,8 +437,7 @@ SOURCES += \ src/AutoPilotPlugins/APM/APMAirframeLoader.cc \ src/QmlControls/QGCImageProvider.cc \ src/AutoPilotPlugins/APM/APMRemoteParamsDownloader.cc \ - src/QtLocationPlugin/QMLControl/QGCMapEngineManager.cc \ - src/ViewWidgets/AppMessagesDialog.cc + src/QtLocationPlugin/QMLControl/QGCMapEngineManager.cc DebugBuild { SOURCES += \ @@ -504,6 +503,7 @@ SOURCES += \ src/ViewWidgets/LogDownload.cc \ src/ViewWidgets/LogDownloadController.cc \ src/ViewWidgets/ViewWidgetController.cc \ + src/ViewWidgets/AppMessagesDialog.cc } # diff --git a/src/QGCDockWidget.h b/src/QGCDockWidget.h index e8fde4558..5eca0eec2 100644 --- a/src/QGCDockWidget.h +++ b/src/QGCDockWidget.h @@ -26,6 +26,7 @@ #include #include +#include class QGCDockWidget : public QWidget { Q_OBJECT @@ -38,10 +39,10 @@ public: void saveSettings(void); void closeEvent(QCloseEvent* event); - + protected: QString _title; - QPointer _action; + QPointer _action; static const char* _settingsGroup; }; diff --git a/src/ViewWidgets/appmessagesdialog.cc b/src/ViewWidgets/AppMessagesDialog.cc similarity index 100% rename from src/ViewWidgets/appmessagesdialog.cc rename to src/ViewWidgets/AppMessagesDialog.cc diff --git a/src/ViewWidgets/appmessagesdialog.h b/src/ViewWidgets/AppMessagesDialog.h similarity index 100% rename from src/ViewWidgets/appmessagesdialog.h rename to src/ViewWidgets/AppMessagesDialog.h diff --git a/src/main.cc b/src/main.cc index 7ccdab536..abbbd1eee 100644 --- a/src/main.cc +++ b/src/main.cc @@ -36,13 +36,13 @@ This file is part of the QGROUNDCONTROL project #include #include #include -#include "AppMessagesDialog.h" #include "QGCApplication.h" #define SINGLE_INSTANCE_PORT 14499 #ifndef __mobile__ #include "QGCSerialPortInfo.h" + #include "AppMessagesDialog.h" #endif #ifdef QT_DEBUG @@ -116,6 +116,9 @@ int main(int argc, char *argv[]) { #ifndef __mobile__ + // install the message handler + AppMessagesDialog::installHandler(); + //-- Test for another instance already running. If that's the case, we simply exit. QHostAddress host("127.0.0.1"); QUdpSocket socket; @@ -133,8 +136,6 @@ int main(int argc, char *argv[]) #endif #endif - // install the message handler - AppMessagesDialog::installHandler(); #ifdef Q_OS_WIN // Set our own OpenGL buglist qputenv("QT_OPENGL_BUGLIST", ":/opengl/resources/opengl/buglist.json"); -- 2.22.0