From 9c8a9e0c52a67e13d4673b7be83fa3f9a5efb112 Mon Sep 17 00:00:00 2001 From: Jeff Mitchell Date: Sat, 31 Dec 2011 00:05:50 -0500 Subject: [PATCH] Possibly fix some of the qsharedptr warnings by making constructors explicit --- src/libtomahawk/album.h | 4 ++-- src/libtomahawk/artist.h | 12 ++++++------ src/libtomahawk/result.h | 9 +++++---- src/libtomahawk/source.h | 8 ++++---- 4 files changed, 17 insertions(+), 16 deletions(-) diff --git a/src/libtomahawk/album.h b/src/libtomahawk/album.h index 6b1d4c8da..3ad460afd 100644 --- a/src/libtomahawk/album.h +++ b/src/libtomahawk/album.h @@ -37,7 +37,7 @@ public: static album_ptr get( const Tomahawk::artist_ptr& artist, const QString& name, bool autoCreate = false ); static album_ptr get( unsigned int id, const QString& name, const Tomahawk::artist_ptr& artist ); - Album( unsigned int id, const QString& name, const Tomahawk::artist_ptr& artist ); + explicit Album( unsigned int id, const QString& name, const Tomahawk::artist_ptr& artist ); virtual ~Album(); unsigned int id() const { return m_id; } @@ -54,7 +54,7 @@ private slots: private: Q_DISABLE_COPY( Album ) - Album(); + explicit Album(); unsigned int m_id; QString m_name; diff --git a/src/libtomahawk/artist.h b/src/libtomahawk/artist.h index 97ea054b1..be7db3704 100644 --- a/src/libtomahawk/artist.h +++ b/src/libtomahawk/artist.h @@ -19,8 +19,8 @@ #ifndef TOMAHAWKARTIST_H #define TOMAHAWKARTIST_H -#include -#include +#include +#include #include "typedefs.h" #include "dllmacro.h" @@ -35,9 +35,9 @@ Q_OBJECT public: static artist_ptr get( const QString& name, bool autoCreate = false ); static artist_ptr get( unsigned int id, const QString& name ); - Artist( unsigned int id, const QString& name ); + explicit Artist( unsigned int id, const QString& name ); - Artist(); + explicit Artist(); virtual ~Artist(); unsigned int id() const { return m_id; } @@ -53,7 +53,7 @@ private slots: void onTracksAdded( const QList& tracks ); private: - Q_DISABLE_COPY(Artist) + Q_DISABLE_COPY( Artist ) unsigned int m_id; QString m_name; @@ -62,6 +62,6 @@ private: Tomahawk::playlistinterface_ptr m_playlistInterface; }; -}; // ns +} // ns #endif diff --git a/src/libtomahawk/result.h b/src/libtomahawk/result.h index 9b9642922..e7adc4a6e 100644 --- a/src/libtomahawk/result.h +++ b/src/libtomahawk/result.h @@ -19,8 +19,9 @@ #ifndef RESULT_H #define RESULT_H -#include -#include +#include +#include +#include #include "typedefs.h" @@ -125,7 +126,7 @@ private slots: private: // private constructor explicit Result( const QString& url ); - Result(); + explicit Result(); void updateAttributes(); void parseSocialActions(); @@ -156,6 +157,6 @@ private: QList< SocialAction > m_allSocialActions; }; -}; //ns +} //ns #endif // RESULT_H diff --git a/src/libtomahawk/source.h b/src/libtomahawk/source.h index 00a608e96..ab2801a5b 100644 --- a/src/libtomahawk/source.h +++ b/src/libtomahawk/source.h @@ -19,9 +19,9 @@ #ifndef SOURCE_H #define SOURCE_H -#include -#include -#include +#include +#include +#include #include "typedefs.h" #include "network/dbsyncconnection.h" @@ -162,6 +162,6 @@ private: Tomahawk::playlistinterface_ptr m_playlistInterface; }; -}; +} //ns #endif // SOURCE_H