From 5c9fd5ed3a0c2e683274e1f8256d514e24971181 Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Sat, 24 Sep 2016 17:54:38 -0400 Subject: [PATCH] Linux add icon with setWindowIcon -fixes #4073 --- qgcresources.qrc | 6 +----- src/main.cc | 5 +++++ 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/qgcresources.qrc b/qgcresources.qrc index 959f2456e..973da9ffa 100644 --- a/qgcresources.qrc +++ b/qgcresources.qrc @@ -3,11 +3,8 @@ resources/fonts/OpenSans-Regular.ttf resources/fonts/OpenSans-Semibold.ttf - src/AutoPilotPlugins/Common/Images/AirframeComponentIcon.png - - src/AutoPilotPlugins/Common/Images/FlyingWing.svg src/AutoPilotPlugins/Common/Images/HexaRotorPlus.svg src/AutoPilotPlugins/Common/Images/HexaRotorX.svg @@ -18,8 +15,6 @@ src/AutoPilotPlugins/Common/Images/QuadRotorX.svg src/AutoPilotPlugins/Common/Images/AirframeSimulation.svg src/AutoPilotPlugins/Common/Images/Plane.svg - - src/AutoPilotPlugins/Common/Images/AirframeSimulation.svg src/AutoPilotPlugins/Common/Images/AirframeUnknown.svg src/AutoPilotPlugins/Common/Images/Boat.svg @@ -179,6 +174,7 @@ resources/TrashDelete.svg resources/XDelete.svg resources/XDeleteBlack.svg + resources/icons/qgroundcontrol.ico resources/firmware/px4.png diff --git a/src/main.cc b/src/main.cc index 307086a89..5a582ce66 100644 --- a/src/main.cc +++ b/src/main.cc @@ -17,6 +17,7 @@ #include #include +#include #include #include #include @@ -211,6 +212,10 @@ int main(int argc, char *argv[]) QGCApplication* app = new QGCApplication(argc, argv, runUnitTests); Q_CHECK_PTR(app); +#ifdef Q_OS_LINUX + QApplication::setWindowIcon(QIcon(":/res/resources/icons/qgroundcontrol.ico")); +#endif /* Q_OS_LINUX */ + // There appears to be a threading issue in qRegisterMetaType which can cause it to throw a qWarning // about duplicate type converters. This is caused by a race condition in the Qt code. Still working // with them on tracking down the bug. For now we register the type which is giving us problems here -- 2.22.0