[Pkg-owncloud-commits] [owncloud-client] 48/70: Cleanup member initialization in Theme

Sandro Knauß hefee-guest at moszumanska.debian.org
Tue Jul 1 10:21:22 UTC 2014


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit 6ff38d80053e469ee0a5d11498555d5a2fd913c0
Author: Daniel Molkentin <danimo at owncloud.com>
Date:   Fri Jun 20 12:44:24 2014 +0200

    Cleanup member initialization in Theme
    
    This fixes coverity issue 12925
---
 src/mirall/owncloudtheme.cpp | 3 ++-
 src/mirall/theme.cpp         | 8 ++++++++
 src/mirall/theme.h           | 2 +-
 3 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/src/mirall/owncloudtheme.cpp b/src/mirall/owncloudtheme.cpp
index a58b630..f73aa7c 100644
--- a/src/mirall/owncloudtheme.cpp
+++ b/src/mirall/owncloudtheme.cpp
@@ -31,7 +31,8 @@
 
 namespace Mirall {
 
-ownCloudTheme::ownCloudTheme()
+ownCloudTheme::ownCloudTheme() :
+    Theme()
 {
     // qDebug() << " ** running ownCloud theme!";
 }
diff --git a/src/mirall/theme.cpp b/src/mirall/theme.cpp
index 8628508..f69d327 100644
--- a/src/mirall/theme.cpp
+++ b/src/mirall/theme.cpp
@@ -36,6 +36,7 @@ Theme* Theme::_instance = 0;
 Theme* Theme::instance() {
     if (!_instance) {
         _instance = new THEME_CLASS;
+        // some themes may not call the base ctor
         _instance->_mono = false;
     }
     return _instance;
@@ -151,6 +152,13 @@ QIcon Theme::themeIcon( const QString& name, bool sysTray ) const
     }
     return icon;
 }
+
+Theme::Theme() :
+    QObject(0)
+    ,_mono(false)
+{
+
+}
 #endif
 
 // if this option return true, the client only supports one folder to sync.
diff --git a/src/mirall/theme.h b/src/mirall/theme.h
index 6e40b9f..7f8166e 100644
--- a/src/mirall/theme.h
+++ b/src/mirall/theme.h
@@ -181,7 +181,7 @@ public:
 
 protected:
     QIcon themeIcon(const QString& name, bool sysTray = false) const;
-    Theme() {}
+    Theme();
 
 signals:
     void systrayUseMonoIconsChanged(bool);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list