1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-06 14:16:32 +02:00

Possibly fix some of the qsharedptr warnings by making constructors explicit

This commit is contained in:
Jeff Mitchell
2011-12-31 00:05:50 -05:00
parent b72863a1ff
commit 20d1c2a5cc
6 changed files with 21 additions and 23 deletions

View File

@@ -37,7 +37,7 @@ public:
static album_ptr get( const Tomahawk::artist_ptr& artist, const QString& name, bool autoCreate = false ); 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 ); 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(); virtual ~Album();
unsigned int id() const { return m_id; } unsigned int id() const { return m_id; }
@@ -54,7 +54,7 @@ private slots:
private: private:
Q_DISABLE_COPY( Album ) Q_DISABLE_COPY( Album )
Album(); explicit Album();
unsigned int m_id; unsigned int m_id;
QString m_name; QString m_name;

View File

@@ -22,6 +22,7 @@
#include <QtCore/QObject> #include <QtCore/QObject>
#include <QtCore/QSharedPointer> #include <QtCore/QSharedPointer>
#include "album.h"
#include "typedefs.h" #include "typedefs.h"
#include "playlistinterface.h" #include "playlistinterface.h"
#include "dllmacro.h" #include "dllmacro.h"
@@ -29,9 +30,6 @@
namespace Tomahawk namespace Tomahawk
{ {
class Album;
class DLLEXPORT AlbumPlaylistInterface : public Tomahawk::PlaylistInterface class DLLEXPORT AlbumPlaylistInterface : public Tomahawk::PlaylistInterface
{ {
Q_OBJECT Q_OBJECT

View File

@@ -19,8 +19,8 @@
#ifndef TOMAHAWKARTIST_H #ifndef TOMAHAWKARTIST_H
#define TOMAHAWKARTIST_H #define TOMAHAWKARTIST_H
#include <QObject> #include <QtCore/QObject>
#include <QSharedPointer> #include <QtCore/QSharedPointer>
#include "typedefs.h" #include "typedefs.h"
#include "dllmacro.h" #include "dllmacro.h"
@@ -35,9 +35,9 @@ Q_OBJECT
public: public:
static artist_ptr get( const QString& name, bool autoCreate = false ); static artist_ptr get( const QString& name, bool autoCreate = false );
static artist_ptr get( unsigned int id, const QString& name ); 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(); virtual ~Artist();
unsigned int id() const { return m_id; } unsigned int id() const { return m_id; }
@@ -53,7 +53,7 @@ private slots:
void onTracksAdded( const QList<Tomahawk::query_ptr>& tracks ); void onTracksAdded( const QList<Tomahawk::query_ptr>& tracks );
private: private:
Q_DISABLE_COPY(Artist) Q_DISABLE_COPY( Artist )
unsigned int m_id; unsigned int m_id;
QString m_name; QString m_name;
@@ -62,6 +62,6 @@ private:
Tomahawk::playlistinterface_ptr m_playlistInterface; Tomahawk::playlistinterface_ptr m_playlistInterface;
}; };
}; // ns } // ns
#endif #endif

View File

@@ -19,9 +19,10 @@
#ifndef TOMAHAWKARTISTPLAYLISTINTERFACE_H #ifndef TOMAHAWKARTISTPLAYLISTINTERFACE_H
#define TOMAHAWKARTISTPLAYLISTINTERFACE_H #define TOMAHAWKARTISTPLAYLISTINTERFACE_H
#include <QObject> #include <QtCore/QObject>
#include <QSharedPointer> #include <QtCore/QSharedPointer>
#include "artist.h"
#include "typedefs.h" #include "typedefs.h"
#include "playlistinterface.h" #include "playlistinterface.h"
#include "dllmacro.h" #include "dllmacro.h"
@@ -29,8 +30,6 @@
namespace Tomahawk namespace Tomahawk
{ {
class Artist;
class DLLEXPORT ArtistPlaylistInterface : public Tomahawk::PlaylistInterface class DLLEXPORT ArtistPlaylistInterface : public Tomahawk::PlaylistInterface
{ {
Q_OBJECT Q_OBJECT

View File

@@ -19,8 +19,9 @@
#ifndef RESULT_H #ifndef RESULT_H
#define RESULT_H #define RESULT_H
#include <QObject> #include <QtCore/QObject>
#include <QVariant> #include <QtCore/QSharedPointer>
#include <QtCore/QVariant>
#include "typedefs.h" #include "typedefs.h"
@@ -125,7 +126,7 @@ private slots:
private: private:
// private constructor // private constructor
explicit Result( const QString& url ); explicit Result( const QString& url );
Result(); explicit Result();
void updateAttributes(); void updateAttributes();
void parseSocialActions(); void parseSocialActions();
@@ -156,6 +157,6 @@ private:
QList< SocialAction > m_allSocialActions; QList< SocialAction > m_allSocialActions;
}; };
}; //ns } //ns
#endif // RESULT_H #endif // RESULT_H

View File

@@ -19,9 +19,9 @@
#ifndef SOURCE_H #ifndef SOURCE_H
#define SOURCE_H #define SOURCE_H
#include <QObject> #include <QtCore/QObject>
#include <QSharedPointer> #include <QtCore/QSharedPointer>
#include <QVariantMap> #include <QtCore/QVariantMap>
#include "typedefs.h" #include "typedefs.h"
#include "network/dbsyncconnection.h" #include "network/dbsyncconnection.h"
@@ -162,6 +162,6 @@ private:
Tomahawk::playlistinterface_ptr m_playlistInterface; Tomahawk::playlistinterface_ptr m_playlistInterface;
}; };
}; } //ns
#endif // SOURCE_H #endif // SOURCE_H