1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-19 15:29:42 +01: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( 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;

View File

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

View File

@ -19,8 +19,8 @@
#ifndef TOMAHAWKARTIST_H
#define TOMAHAWKARTIST_H
#include <QObject>
#include <QSharedPointer>
#include <QtCore/QObject>
#include <QtCore/QSharedPointer>
#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<Tomahawk::query_ptr>& 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

View File

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

View File

@ -19,8 +19,9 @@
#ifndef RESULT_H
#define RESULT_H
#include <QObject>
#include <QVariant>
#include <QtCore/QObject>
#include <QtCore/QSharedPointer>
#include <QtCore/QVariant>
#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

View File

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