aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2016-03-08 13:08:07 -0600
committerCharles Kerr <charles.kerr@canonical.com>2016-03-08 13:08:07 -0600
commit40f48471fe531ba5b9f1e1c4371f252fca4c2d52 (patch)
treefccbe9bd02bce73f34c249bf5f1e7704fcbf2738 /src
parent95277f3c7344e537ad42835c64607339e1d3e6e9 (diff)
downloadayatana-indicator-display-40f48471fe531ba5b9f1e1c4371f252fca4c2d52.tar.gz
ayatana-indicator-display-40f48471fe531ba5b9f1e1c4371f252fca4c2d52.tar.bz2
ayatana-indicator-display-40f48471fe531ba5b9f1e1c4371f252fca4c2d52.zip
add out-of-line virtual method definitions to Indicator to silence clang++ warnings
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt4
-rw-r--r--src/indicator.cpp37
-rw-r--r--src/indicator.h13
3 files changed, 46 insertions, 8 deletions
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 <http://www.gnu.org/licenses/>.
+ *
+ * Authors:
+ * Charles Kerr <charles.kerr@canonical.com>
+ */
+
+#include <src/indicator.h>
+
+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 <charles.kerr@canonical.com>
*/
-#ifndef INDICATOR_DISPLAY_INDICATOR_H
-#define INDICATOR_DISPLAY_INDICATOR_H
+#pragma once
#include <core/property.h>
@@ -52,10 +51,10 @@ public:
virtual std::string name() const =0;
virtual const core::Property<Header>& header() const =0;
virtual std::shared_ptr<GMenuModel> 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<GMenuModel>& menu): m_name(name), m_menu(menu) {}
+ virtual ~SimpleProfile();
std::string name() const {return m_name;}
core::Property<Header>& 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<std::shared_ptr<Profile>> profiles() const =0;
};
-#endif