From 23b3912302625aa64346da5474f4190d43ec819d Mon Sep 17 00:00:00 2001 From: Gus Grubba Date: Thu, 20 Apr 2017 11:41:09 -0400 Subject: [PATCH 1/2] Added a subtle border to the Toolstrip Added a bit more separation between the Toolstrip and the Toolbar --- src/FlightDisplay/FlightDisplayView.qml | 2 +- src/QmlControls/ToolStrip.qml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/FlightDisplay/FlightDisplayView.qml b/src/FlightDisplay/FlightDisplayView.qml index 697a18c..db2b793 100644 --- a/src/FlightDisplay/FlightDisplayView.qml +++ b/src/FlightDisplay/FlightDisplayView.qml @@ -407,7 +407,7 @@ QGCView { id: toolStrip anchors.leftMargin: ScreenTools.defaultFontPixelWidth anchors.left: _panel.left - anchors.topMargin: ScreenTools.toolbarHeight + _margins + anchors.topMargin: ScreenTools.toolbarHeight + (_margins * 2) anchors.top: _panel.top z: _panel.z + 4 title: qsTr("Fly") diff --git a/src/QmlControls/ToolStrip.qml b/src/QmlControls/ToolStrip.qml index 5f8746a..4d7d9ae 100644 --- a/src/QmlControls/ToolStrip.qml +++ b/src/QmlControls/ToolStrip.qml @@ -19,6 +19,8 @@ Rectangle { width: ScreenTools.isMobile ? ScreenTools.minTouchPixels : ScreenTools.defaultFontPixelWidth * 6 height: buttonStripColumn.height + (buttonStripColumn.anchors.margins * 2) radius: _radius + border.width: 1 + border.color: qgcPal.globalTheme === QGCPalette.Light ? Qt.rgba(0,0,0,0.35) : Qt.rgba(1,1,1,0.35) property string title: "Title" property alias model: repeater.model From 747c2917cd7d05d9ed4fb659a9a529d78ad11eed Mon Sep 17 00:00:00 2001 From: Gus Grubba Date: Thu, 20 Apr 2017 11:57:09 -0400 Subject: [PATCH 2/2] Fixing build warnings. --- .../src/client/linux/crash_generation/crash_generation_client.cc | 3 ++- libs/breakpad/src/client/linux/handler/exception_handler.cc | 2 +- libs/breakpad/src/client/linux/log/log.cc | 5 +++-- libs/breakpad/src/client/linux/microdump_writer/microdump_writer.cc | 3 ++- libs/breakpad/src/client/linux/minidump_writer/linux_dumper.cc | 3 ++- src/QGCApplication.cc | 6 +++--- 6 files changed, 13 insertions(+), 9 deletions(-) diff --git a/libs/breakpad/src/client/linux/crash_generation/crash_generation_client.cc b/libs/breakpad/src/client/linux/crash_generation/crash_generation_client.cc index d8bfbba..30485b4 100644 --- a/libs/breakpad/src/client/linux/crash_generation/crash_generation_client.cc +++ b/libs/breakpad/src/client/linux/crash_generation/crash_generation_client.cc @@ -58,7 +58,8 @@ class CrashGenerationClientImpl : public CrashGenerationClient { iov.iov_base = const_cast(blob); iov.iov_len = blob_size; - struct kernel_msghdr msg = { 0 }; + struct kernel_msghdr msg; + memset(&msg, 0, sizeof(kernel_msghdr)); msg.msg_iov = &iov; msg.msg_iovlen = 1; char cmsg[kControlMsgSize] = ""; diff --git a/libs/breakpad/src/client/linux/handler/exception_handler.cc b/libs/breakpad/src/client/linux/handler/exception_handler.cc index d372a10..69dd1ed 100644 --- a/libs/breakpad/src/client/linux/handler/exception_handler.cc +++ b/libs/breakpad/src/client/linux/handler/exception_handler.cc @@ -471,7 +471,7 @@ bool ExceptionHandler::HandleSignal(int /*sig*/, siginfo_t* info, void* uc) { // This is a public interface to HandleSignal that allows the client to // generate a crash dump. This function may run in a compromised context. bool ExceptionHandler::SimulateSignalDelivery(int sig) { - siginfo_t siginfo = {}; + siginfo_t siginfo; // Mimic a trusted signal to allow tracing the process (see // ExceptionHandler::HandleSignal(). siginfo.si_code = SI_USER; diff --git a/libs/breakpad/src/client/linux/log/log.cc b/libs/breakpad/src/client/linux/log/log.cc index fc23aa6..e029ede 100644 --- a/libs/breakpad/src/client/linux/log/log.cc +++ b/libs/breakpad/src/client/linux/log/log.cc @@ -75,9 +75,10 @@ int writeToCrashLog(const char* buf) { int write(const char* buf, size_t nbytes) { #if defined(__ANDROID__) - return __android_log_write(ANDROID_LOG_WARN, kAndroidLogTag, buf); + (void)nbytes; + return __android_log_write(ANDROID_LOG_WARN, kAndroidLogTag, buf); #else - return sys_write(2, buf, nbytes); + return sys_write(2, buf, nbytes); #endif } diff --git a/libs/breakpad/src/client/linux/microdump_writer/microdump_writer.cc b/libs/breakpad/src/client/linux/microdump_writer/microdump_writer.cc index 3764eec..17e655d 100644 --- a/libs/breakpad/src/client/linux/microdump_writer/microdump_writer.cc +++ b/libs/breakpad/src/client/linux/microdump_writer/microdump_writer.cc @@ -449,7 +449,8 @@ class MicrodumpWriter { } // Copy as many bytes of |identifier| as will fit into a MDGUID - MDGUID module_identifier = {0}; + MDGUID module_identifier; + memset(&module_identifier, 0, sizeof(MDGUID)); memcpy(&module_identifier, &identifier_bytes[0], std::min(sizeof(MDGUID), identifier_bytes.size())); diff --git a/libs/breakpad/src/client/linux/minidump_writer/linux_dumper.cc b/libs/breakpad/src/client/linux/minidump_writer/linux_dumper.cc index 3b8c80a..ea440f7 100644 --- a/libs/breakpad/src/client/linux/minidump_writer/linux_dumper.cc +++ b/libs/breakpad/src/client/linux/minidump_writer/linux_dumper.cc @@ -874,7 +874,8 @@ bool LinuxDumper::HandleDeletedFileInMapping(char* path) const { char exe_link[NAME_MAX]; if (!BuildProcPath(exe_link, pid_, "exe")) return false; - MappingInfo new_mapping = {0}; + MappingInfo new_mapping; + memset(&new_mapping, 0, sizeof(MappingInfo)); if (!SafeReadLink(exe_link, new_mapping.name)) return false; char new_path[PATH_MAX]; diff --git a/src/QGCApplication.cc b/src/QGCApplication.cc index d4b453f..dd3a451 100644 --- a/src/QGCApplication.cc +++ b/src/QGCApplication.cc @@ -144,10 +144,10 @@ static QObject* qgroundcontrolQmlGlobalSingletonFactory(QQmlEngine*, QJSEngine*) // breakpad support #include "client/linux/handler/exception_handler.h" -static bool dumpCallback(const google_breakpad::MinidumpDescriptor& descriptor, void* context, bool succeeded) +static bool dumpCallback(const google_breakpad::MinidumpDescriptor& descriptor, void* /*context*/, bool succeeded) { - qDebug() << "dumpCallback" << succeeded << descriptor.path(); - return succeeded; + qDebug() << "dumpCallback" << succeeded << descriptor.path(); + return succeeded; } #endif