From 40f48471fe531ba5b9f1e1c4371f252fca4c2d52 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Tue, 8 Mar 2016 13:08:07 -0600 Subject: add out-of-line virtual method definitions to Indicator to silence clang++ warnings --- src/CMakeLists.txt | 4 +++- src/indicator.cpp | 37 +++++++++++++++++++++++++++++++++++++ src/indicator.h | 13 ++++++------- 3 files changed, 46 insertions(+), 8 deletions(-) create mode 100644 src/indicator.cpp diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 414a750..ff385d9 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -7,7 +7,9 @@ add_definitions (-DG_LOG_DOMAIN="${CMAKE_PROJECT_NAME}") set (SERVICE_LIB_HANDWRITTEN_SOURCES adbd-client.cpp exporter.cpp - rotation-lock.cpp) + indicator.cpp + rotation-lock.cpp + usb-snap.cpp) add_library (${SERVICE_LIB} STATIC ${SERVICE_LIB_HANDWRITTEN_SOURCES}) diff --git a/src/indicator.cpp b/src/indicator.cpp new file mode 100644 index 0000000..77c4af7 --- /dev/null +++ b/src/indicator.cpp @@ -0,0 +1,37 @@ +/* + * Copyright 2016 Canonical Ltd. + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 3, as published + * by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranties of + * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + * + * Authors: + * Charles Kerr + */ + +#include + +Profile::Profile() +{ +} + +Profile::~Profile() +{ +} + +SimpleProfile::~SimpleProfile() +{ +} + +Indicator::~Indicator() +{ +} + diff --git a/src/indicator.h b/src/indicator.h index d0834fd..c55be79 100644 --- a/src/indicator.h +++ b/src/indicator.h @@ -1,5 +1,5 @@ /* - * Copyright 2014 Canonical Ltd. + * Copyright 2014-2016 Canonical Ltd. * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published @@ -17,8 +17,7 @@ * Charles Kerr */ -#ifndef INDICATOR_DISPLAY_INDICATOR_H -#define INDICATOR_DISPLAY_INDICATOR_H +#pragma once #include @@ -52,10 +51,10 @@ public: virtual std::string name() const =0; virtual const core::Property
& header() const =0; virtual std::shared_ptr menu_model() const =0; - virtual ~Profile() =default; + virtual ~Profile(); protected: - Profile() =default; + Profile(); }; @@ -63,6 +62,7 @@ class SimpleProfile: public Profile { public: SimpleProfile(const char* name, const std::shared_ptr& menu): m_name(name), m_menu(menu) {} + virtual ~SimpleProfile(); std::string name() const {return m_name;} core::Property
& header() {return m_header;} @@ -79,11 +79,10 @@ protected: class Indicator { public: - virtual ~Indicator() =default; + virtual ~Indicator(); virtual const char* name() const =0; virtual GSimpleActionGroup* action_group() const =0; virtual std::vector> profiles() const =0; }; -#endif -- cgit v1.2.3