Use nullptr as parent parameter default everywhere

This commit is contained in:
John Maguire 2014-02-10 16:03:54 +01:00
parent fd183a80ff
commit 192b60d965
192 changed files with 209 additions and 209 deletions

View File

@ -39,7 +39,7 @@ class SpotifyClient : public AbstractMessageHandler<pb::spotify::Message> {
Q_OBJECT
public:
SpotifyClient(QObject* parent = 0);
SpotifyClient(QObject* parent = nullptr);
~SpotifyClient();
static const int kSpotifyImageIDSize;

View File

@ -30,7 +30,7 @@ class _MessageReplyBase : public QObject {
Q_OBJECT
public:
_MessageReplyBase(QObject* parent = 0);
_MessageReplyBase(QObject* parent = nullptr);
virtual int id() const = 0;
bool is_finished() const { return finished_; }
@ -58,7 +58,7 @@ signals:
template <typename MessageType>
class MessageReply : public _MessageReplyBase {
public:
MessageReply(const MessageType& request_message, QObject* parent = 0);
MessageReply(const MessageType& request_message, QObject* parent = nullptr);
int id() const { return request_message_.id(); }
const MessageType& request_message() const { return request_message_; }

View File

@ -38,7 +38,7 @@ class _WorkerPoolBase : public QObject {
Q_OBJECT
public:
_WorkerPoolBase(QObject* parent = 0);
_WorkerPoolBase(QObject* parent = nullptr);
signals:
// Emitted when a worker failed to start. This usually happens when the
@ -60,7 +60,7 @@ signals:
template <typename HandlerType>
class WorkerPool : public _WorkerPoolBase {
public:
WorkerPool(QObject* parent = 0);
WorkerPool(QObject* parent = nullptr);
~WorkerPool();
typedef typename HandlerType::MessageType MessageType;

View File

@ -13,7 +13,7 @@ class QAction;
class BackgroundStreams : public QObject {
Q_OBJECT
public:
explicit BackgroundStreams(EngineBase* engine, QObject* parent = 0);
explicit BackgroundStreams(EngineBase* engine, QObject* parent = nullptr);
~BackgroundStreams();
void LoadStreams();

View File

@ -8,7 +8,7 @@
template <typename T, typename D>
class BoundFutureWatcher : public QFutureWatcher<T>, boost::noncopyable {
public:
BoundFutureWatcher(const D& data, QObject* parent = 0)
BoundFutureWatcher(const D& data, QObject* parent = nullptr)
: QFutureWatcher<T>(parent), data_(data) {}
~BoundFutureWatcher() {}

View File

@ -42,7 +42,7 @@ class Database : public QObject {
Q_OBJECT
public:
Database(Application* app, QObject* parent = 0,
Database(Application* app, QObject* parent = nullptr,
const QString& database_name = QString());
struct AttachedDatabase {
@ -175,7 +175,7 @@ signals:
class MemoryDatabase : public Database {
public:
MemoryDatabase(Application* app, QObject* parent = 0)
MemoryDatabase(Application* app, QObject* parent = nullptr)
: Database(app, parent, ":memory:") {}
~MemoryDatabase() {
// Make sure Qt doesn't reuse the same database

View File

@ -23,13 +23,13 @@
class FileSystemWatcherInterface : public QObject {
Q_OBJECT
public:
FileSystemWatcherInterface(QObject* parent = 0);
FileSystemWatcherInterface(QObject* parent = nullptr);
virtual void Init() {}
virtual void AddPath(const QString& path) = 0;
virtual void RemovePath(const QString& path) = 0;
virtual void Clear() = 0;
static FileSystemWatcherInterface* Create(QObject* parent = 0);
static FileSystemWatcherInterface* Create(QObject* parent = nullptr);
signals:
void PathChanged(const QString& path);

View File

@ -26,7 +26,7 @@ class GlobalShortcutBackend : public QObject {
Q_OBJECT
public:
GlobalShortcutBackend(GlobalShortcuts* parent = 0);
GlobalShortcutBackend(GlobalShortcuts* parent = nullptr);
virtual ~GlobalShortcutBackend() {}
bool is_active() const { return active_; }

View File

@ -33,7 +33,7 @@ class GlobalShortcuts : public QWidget {
Q_OBJECT
public:
GlobalShortcuts(QWidget* parent = 0);
GlobalShortcuts(QWidget* parent = nullptr);
static const char* kSettingsGroup;

View File

@ -30,7 +30,7 @@ class MacFSListener : public FileSystemWatcherInterface {
Q_OBJECT
public:
explicit MacFSListener(QObject* parent = 0);
explicit MacFSListener(QObject* parent = nullptr);
void Init();
void AddPath(const QString& path);
void RemovePath(const QString& path);

View File

@ -30,7 +30,7 @@ class MergedProxyModel : public QAbstractProxyModel {
Q_OBJECT
public:
MergedProxyModel(QObject* parent = 0);
MergedProxyModel(QObject* parent = nullptr);
~MergedProxyModel();
// Make another model appear as a child of the given item in the source model.

View File

@ -7,7 +7,7 @@
template <typename T>
class ModelFutureWatcher : public QFutureWatcher<T> {
public:
ModelFutureWatcher(const QModelIndex& index, QObject* parent = 0)
ModelFutureWatcher(const QModelIndex& index, QObject* parent = nullptr)
: QFutureWatcher<T>(parent), index_(index) {}
~ModelFutureWatcher() {}

View File

@ -31,7 +31,7 @@ class Mpris : public QObject {
Q_OBJECT
public:
Mpris(Application* app, QObject* parent = 0);
Mpris(Application* app, QObject* parent = nullptr);
signals:
void RaiseMainWindow();

View File

@ -78,7 +78,7 @@ class Mpris1 : public QObject {
Q_OBJECT
public:
Mpris1(Application* app, QObject* parent = 0,
Mpris1(Application* app, QObject* parent = nullptr,
const QString& dbus_service_name = QString());
~Mpris1();
@ -102,7 +102,7 @@ class Mpris1Root : public QObject {
Q_OBJECT
public:
Mpris1Root(Application* app, QObject* parent = 0);
Mpris1Root(Application* app, QObject* parent = nullptr);
QString Identity();
void Quit();
@ -116,7 +116,7 @@ class Mpris1Player : public QObject {
Q_OBJECT
public:
Mpris1Player(Application* app, QObject* parent = 0);
Mpris1Player(Application* app, QObject* parent = nullptr);
void Pause();
void Stop();
@ -171,7 +171,7 @@ class Mpris1TrackList : public QObject {
Q_OBJECT
public:
Mpris1TrackList(Application* app, QObject* parent = 0);
Mpris1TrackList(Application* app, QObject* parent = nullptr);
int AddTrack(const QString&, bool);
void DelTrack(int index);

View File

@ -102,7 +102,7 @@ class Mpris2 : public QObject {
Q_PROPERTY(QStringList Orderings READ Orderings)
Q_PROPERTY(MaybePlaylist ActivePlaylist READ ActivePlaylist)
Mpris2(Application* app, Mpris1* mpris1, QObject* parent = 0);
Mpris2(Application* app, Mpris1* mpris1, QObject* parent = nullptr);
// Root Properties
bool CanQuit() const;

View File

@ -48,7 +48,7 @@ class NetworkAccessManager : public QNetworkAccessManager {
Q_OBJECT
public:
NetworkAccessManager(QObject* parent = 0);
NetworkAccessManager(QObject* parent = nullptr);
protected:
QNetworkReply* createRequest(Operation op, const QNetworkRequest& request,
@ -104,7 +104,7 @@ class NetworkTimeouts : public QObject {
Q_OBJECT
public:
NetworkTimeouts(int timeout_msec, QObject* parent = 0);
NetworkTimeouts(int timeout_msec, QObject* parent = nullptr);
// TODO: Template this to avoid code duplication.
void AddReply(QNetworkReply* reply);

View File

@ -48,7 +48,7 @@ class OrganiseFormat {
class Validator : public QValidator {
public:
explicit Validator(QObject* parent = 0);
explicit Validator(QObject* parent = nullptr);
QValidator::State validate(QString& format, int& pos) const;
};
@ -61,7 +61,7 @@ class OrganiseFormat {
static const QRgb kInvalidTagColorDark;
static const QRgb kBlockColorDark;
explicit SyntaxHighlighter(QObject* parent = 0);
explicit SyntaxHighlighter(QObject* parent = nullptr);
explicit SyntaxHighlighter(QTextEdit* parent);
explicit SyntaxHighlighter(QTextDocument* parent);
void highlightBlock(const QString& format);

View File

@ -37,7 +37,7 @@ class PlayerInterface : public QObject {
Q_OBJECT
public:
PlayerInterface(QObject* parent = 0) : QObject(parent) {}
PlayerInterface(QObject* parent = nullptr) : QObject(parent) {}
virtual EngineBase* engine() const = 0;
virtual Engine::State GetState() const = 0;
@ -107,7 +107,7 @@ class Player : public PlayerInterface {
Q_OBJECT
public:
Player(Application* app, QObject* parent = 0);
Player(Application* app, QObject* parent = nullptr);
~Player();
void Init();

View File

@ -24,7 +24,7 @@ class QxtGlobalShortcut;
class QxtGlobalShortcutBackend : public GlobalShortcutBackend {
public:
QxtGlobalShortcutBackend(GlobalShortcuts* parent = 0);
QxtGlobalShortcutBackend(GlobalShortcuts* parent = nullptr);
protected:
bool DoRegister();

View File

@ -25,7 +25,7 @@ class QModelIndex;
template <typename T>
class SimpleTreeModel : public QAbstractItemModel {
public:
SimpleTreeModel(T* root = 0, QObject* parent = 0);
SimpleTreeModel(T* root = 0, QObject* parent = nullptr);
virtual ~SimpleTreeModel() {}
// QAbstractItemModel

View File

@ -41,7 +41,7 @@ class SongLoader : public QObject {
Q_OBJECT
public:
SongLoader(LibraryBackendInterface* library, const Player* player,
QObject* parent = 0);
QObject* parent = nullptr);
~SongLoader();
enum Result { Success, Error, WillLoadAsync, };

View File

@ -25,7 +25,7 @@
class StyleSheetLoader : public QObject {
public:
StyleSheetLoader(QObject* parent = 0);
StyleSheetLoader(QObject* parent = nullptr);
// Sets the given stylesheet on the given widget.
// If the stylesheet contains strings like %palette-[role], these get replaced

View File

@ -32,7 +32,7 @@ class TagReaderClient : public QObject {
Q_OBJECT
public:
TagReaderClient(QObject* parent = 0);
TagReaderClient(QObject* parent = nullptr);
typedef AbstractMessageHandler<pb::tagreader::Message> HandlerType;
typedef HandlerType::ReplyType ReplyType;

View File

@ -26,7 +26,7 @@ class TaskManager : public QObject {
Q_OBJECT
public:
TaskManager(QObject* parent = 0);
TaskManager(QObject* parent = nullptr);
struct Task {
int id;

View File

@ -26,7 +26,7 @@ class UrlHandler : public QObject {
Q_OBJECT
public:
UrlHandler(QObject* parent = 0);
UrlHandler(QObject* parent = nullptr);
// The URL scheme that this handler handles.
virtual QString scheme() const = 0;

View File

@ -32,7 +32,7 @@ class AlbumCoverExporter : public QObject {
Q_OBJECT
public:
AlbumCoverExporter(QObject* parent = 0);
AlbumCoverExporter(QObject* parent = nullptr);
virtual ~AlbumCoverExporter() {}
static const int kMaxConcurrentRequests;

View File

@ -78,7 +78,7 @@ class AlbumCoverFetcher : public QObject {
Q_OBJECT
public:
AlbumCoverFetcher(CoverProviders* cover_providers, QObject* parent = 0,
AlbumCoverFetcher(CoverProviders* cover_providers, QObject* parent = nullptr,
QNetworkAccessManager* network = 0);
virtual ~AlbumCoverFetcher() {}

View File

@ -34,7 +34,7 @@ class AlbumCoverLoader : public QObject {
Q_OBJECT
public:
AlbumCoverLoader(QObject* parent = 0);
AlbumCoverLoader(QObject* parent = nullptr);
void Stop() { stop_requested_ = true; }

View File

@ -30,7 +30,7 @@ class CoverSearchStatisticsDialog : public QDialog {
Q_OBJECT
public:
CoverSearchStatisticsDialog(QWidget* parent = 0);
CoverSearchStatisticsDialog(QWidget* parent = nullptr);
~CoverSearchStatisticsDialog();
void Show(const CoverSearchStatistics& statistics);

View File

@ -34,7 +34,7 @@ class CurrentArtLoader : public QObject {
Q_OBJECT
public:
CurrentArtLoader(Application* app, QObject* parent = 0);
CurrentArtLoader(Application* app, QObject* parent = nullptr);
~CurrentArtLoader();
const AlbumCoverLoaderOptions& options() const { return options_; }

View File

@ -11,7 +11,7 @@ class QNetworkReply;
class KittenLoader : public AlbumCoverLoader {
Q_OBJECT
public:
KittenLoader(QObject* parent = 0);
KittenLoader(QObject* parent = nullptr);
virtual quint64 LoadKitten(const AlbumCoverLoaderOptions& options);

View File

@ -28,7 +28,7 @@ class QNetworkReply;
class MusicbrainzCoverProvider : public CoverProvider {
Q_OBJECT
public:
MusicbrainzCoverProvider(QObject* parent = 0);
MusicbrainzCoverProvider(QObject* parent = nullptr);
// CoverProvider
virtual bool StartSearch(const QString& artist, const QString& album, int id);

View File

@ -29,7 +29,7 @@ class DeviceDatabaseBackend : public QObject {
Q_OBJECT
public:
Q_INVOKABLE DeviceDatabaseBackend(QObject* parent = 0);
Q_INVOKABLE DeviceDatabaseBackend(QObject* parent = nullptr);
struct Device {
Device() : id_(-1) {}

View File

@ -39,7 +39,7 @@ class DeviceManager : public QAbstractListModel {
Q_OBJECT
public:
DeviceManager(Application* app, QObject* parent = 0);
DeviceManager(Application* app, QObject* parent = nullptr);
~DeviceManager();
enum Role {

View File

@ -30,7 +30,7 @@ class DeviceProperties : public QDialog {
Q_OBJECT
public:
DeviceProperties(QWidget* parent = 0);
DeviceProperties(QWidget* parent = nullptr);
~DeviceProperties();
void SetDeviceManager(DeviceManager* manager);

View File

@ -48,7 +48,7 @@ class DeviceView : public AutoExpandingTreeView {
Q_OBJECT
public:
DeviceView(QWidget* parent = 0);
DeviceView(QWidget* parent = nullptr);
~DeviceView();
void SetApplication(Application* app);

View File

@ -30,7 +30,7 @@ class DeviceViewContainer : public QWidget {
Q_OBJECT
public:
explicit DeviceViewContainer(QWidget* parent = 0);
explicit DeviceViewContainer(QWidget* parent = nullptr);
~DeviceViewContainer();
DeviceView* view() const;

View File

@ -26,7 +26,7 @@ class GstElementDeleter : public QObject {
Q_OBJECT
public:
GstElementDeleter(QObject* parent = 0);
GstElementDeleter(QObject* parent = nullptr);
// If you call this function with any gstreamer element, the element will get
// deleted in the main thread. This is useful if you need to delete an

View File

@ -32,7 +32,7 @@ class GlobalSearch : public QObject {
Q_OBJECT
public:
GlobalSearch(Application* app, QObject* parent = 0);
GlobalSearch(Application* app, QObject* parent = nullptr);
static const int kDelayedSearchTimeoutMs;
static const char* kSettingsGroup;

View File

@ -31,7 +31,7 @@ class GlobalSearchModel : public QStandardItemModel {
Q_OBJECT
public:
GlobalSearchModel(GlobalSearch* engine, QObject* parent = 0);
GlobalSearchModel(GlobalSearch* engine, QObject* parent = nullptr);
enum Role {
Role_Result = LibraryModel::LastRole,

View File

@ -22,7 +22,7 @@
class GlobalSearchSortModel : public QSortFilterProxyModel {
public:
GlobalSearchSortModel(QObject* parent = 0);
GlobalSearchSortModel(QObject* parent = nullptr);
protected:
bool lessThan(const QModelIndex& left, const QModelIndex& right) const;

View File

@ -41,7 +41,7 @@ class GlobalSearchView : public QWidget {
Q_OBJECT
public:
GlobalSearchView(Application* app, QWidget* parent = 0);
GlobalSearchView(Application* app, QWidget* parent = nullptr);
~GlobalSearchView();
static const int kSwapModelsTimeoutMsec;

View File

@ -28,7 +28,7 @@ class GroovesharkSearchProvider : public SearchProvider {
Q_OBJECT
public:
explicit GroovesharkSearchProvider(Application* app, QObject* parent = 0);
explicit GroovesharkSearchProvider(Application* app, QObject* parent = nullptr);
void Init(GroovesharkService* service);
// SearchProvider

View File

@ -27,7 +27,7 @@ class LibrarySearchProvider : public BlockingSearchProvider {
LibrarySearchProvider(LibraryBackendInterface* backend, const QString& name,
const QString& id, const QIcon& icon,
bool enabled_by_default, Application* app,
QObject* parent = 0);
QObject* parent = nullptr);
ResultList Search(int id, const QString& query);
MimeData* LoadTracks(const ResultList& results);

View File

@ -32,7 +32,7 @@ class SearchProvider : public QObject {
Q_OBJECT
public:
SearchProvider(Application* app, QObject* parent = 0);
SearchProvider(Application* app, QObject* parent = nullptr);
static const int kArtHeight;
@ -199,7 +199,7 @@ class BlockingSearchProvider : public SearchProvider {
Q_OBJECT
public:
BlockingSearchProvider(Application* app, QObject* parent = 0);
BlockingSearchProvider(Application* app, QObject* parent = nullptr);
void SearchAsync(int id, const QString& query);
virtual ResultList Search(int id, const QString& query) = 0;

View File

@ -27,7 +27,7 @@ class Ui_SearchProviderStatusWidget;
class SearchProviderStatusWidget : public QWidget {
public:
SearchProviderStatusWidget(const QIcon& warning_icon, GlobalSearch* engine,
SearchProvider* provider, QWidget* parent = 0);
SearchProvider* provider, QWidget* parent = nullptr);
~SearchProviderStatusWidget();
bool eventFilter(QObject* object, QEvent* event);

View File

@ -28,7 +28,7 @@ class SoundCloudSearchProvider : public SearchProvider {
Q_OBJECT
public:
explicit SoundCloudSearchProvider(Application* app, QObject* parent = 0);
explicit SoundCloudSearchProvider(Application* app, QObject* parent = nullptr);
void Init(SoundCloudService* service);
// SearchProvider

View File

@ -28,7 +28,7 @@ class SpotifySearchProvider : public SearchProvider {
Q_OBJECT
public:
SpotifySearchProvider(Application* app, QObject* parent = 0);
SpotifySearchProvider(Application* app, QObject* parent = nullptr);
void SearchAsync(int id, const QString& query);
void LoadArtAsync(int id, const Result& result);

View File

@ -26,7 +26,7 @@ class SuggestionWidget : public QWidget {
Q_OBJECT
public:
SuggestionWidget(const QIcon& search_icon, QWidget* parent = 0);
SuggestionWidget(const QIcon& search_icon, QWidget* parent = nullptr);
~SuggestionWidget();
bool eventFilter(QObject* object, QEvent* event);

View File

@ -30,7 +30,7 @@ class BoxSettingsPage : public SettingsPage {
Q_OBJECT
public:
BoxSettingsPage(SettingsDialog* parent = 0);
BoxSettingsPage(SettingsDialog* parent = nullptr);
~BoxSettingsPage();
void Load();

View File

@ -8,7 +8,7 @@ class BoxService;
class BoxUrlHandler : public UrlHandler {
Q_OBJECT
public:
BoxUrlHandler(BoxService* service, QObject* parent = 0);
BoxUrlHandler(BoxService* service, QObject* parent = nullptr);
QString scheme() const { return "box"; }
QIcon icon() const { return QIcon(":/providers/box.png"); }

View File

@ -31,7 +31,7 @@ class DigitallyImportedClient : public QObject {
Q_OBJECT
public:
DigitallyImportedClient(const QString& service_name, QObject* parent = 0);
DigitallyImportedClient(const QString& service_name, QObject* parent = nullptr);
static const char* kApiUsername;
static const char* kApiPassword;

View File

@ -11,7 +11,7 @@ class QNetworkReply;
class DropboxAuthenticator : public QObject {
Q_OBJECT
public:
explicit DropboxAuthenticator(QObject* parent = 0);
explicit DropboxAuthenticator(QObject* parent = nullptr);
void StartAuthorisation();
const QString& access_token() const { return access_token_; }

View File

@ -31,7 +31,7 @@ class DropboxSettingsPage : public SettingsPage {
Q_OBJECT
public:
DropboxSettingsPage(SettingsDialog* parent = 0);
DropboxSettingsPage(SettingsDialog* parent = nullptr);
~DropboxSettingsPage();
void Load();

View File

@ -8,7 +8,7 @@ class DropboxService;
class DropboxUrlHandler : public UrlHandler {
Q_OBJECT
public:
DropboxUrlHandler(DropboxService* service, QObject* parent = 0);
DropboxUrlHandler(DropboxService* service, QObject* parent = nullptr);
QString scheme() const { return "dropbox"; }
QIcon icon() const { return QIcon(":providers/dropbox.png"); }

View File

@ -25,7 +25,7 @@
class Geolocator : public QObject {
Q_OBJECT
public:
explicit Geolocator(QObject* parent = 0);
explicit Geolocator(QObject* parent = nullptr);
void Geolocate();

View File

@ -134,7 +134,7 @@ class Client : public QObject {
Q_OBJECT
public:
Client(QObject* parent = 0);
Client(QObject* parent = nullptr);
bool is_authenticated() const;
const QString& access_token() const { return access_token_; }

View File

@ -30,7 +30,7 @@ class GoogleDriveSettingsPage : public SettingsPage {
Q_OBJECT
public:
GoogleDriveSettingsPage(SettingsDialog* parent = 0);
GoogleDriveSettingsPage(SettingsDialog* parent = nullptr);
~GoogleDriveSettingsPage();
void Load();

View File

@ -8,7 +8,7 @@ class GoogleDriveService;
class GoogleDriveUrlHandler : public UrlHandler {
Q_OBJECT
public:
GoogleDriveUrlHandler(GoogleDriveService* service, QObject* parent = 0);
GoogleDriveUrlHandler(GoogleDriveService* service, QObject* parent = nullptr);
QString scheme() const { return "googledrive"; }
QIcon icon() const { return QIcon(":providers/googledrive.png"); }

View File

@ -29,7 +29,7 @@ class IcecastBackend : public QObject {
Q_OBJECT
public:
IcecastBackend(QObject* parent = 0);
IcecastBackend(QObject* parent = nullptr);
void Init(Database* db);
static const char* kTableName;

View File

@ -33,7 +33,7 @@ class IcecastFilterWidget : public QWidget {
Q_OBJECT
public:
IcecastFilterWidget(QWidget* parent = 0);
IcecastFilterWidget(QWidget* parent = nullptr);
~IcecastFilterWidget();
static const char* kSettingsGroup;

View File

@ -30,7 +30,7 @@ class IcecastModel : public SimpleTreeModel<IcecastItem> {
Q_OBJECT
public:
IcecastModel(IcecastBackend* backend, QObject* parent = 0);
IcecastModel(IcecastBackend* backend, QObject* parent = nullptr);
~IcecastModel();
// These values get saved in QSettings - don't change them

View File

@ -42,7 +42,7 @@ class InternetModel : public QStandardItemModel {
Q_OBJECT
public:
InternetModel(Application* app, QObject* parent = 0);
InternetModel(Application* app, QObject* parent = nullptr);
enum Role {
// Services can use this role to distinguish between different types of

View File

@ -24,7 +24,7 @@ class InternetView : public AutoExpandingTreeView {
Q_OBJECT
public:
InternetView(QWidget* parent = 0);
InternetView(QWidget* parent = nullptr);
// QWidget
void contextMenuEvent(QContextMenuEvent* e);

View File

@ -34,7 +34,7 @@ class InternetViewContainer : public QWidget {
Q_OBJECT
public:
InternetViewContainer(QWidget* parent = 0);
InternetViewContainer(QWidget* parent = nullptr);
~InternetViewContainer();
static const int kAnimationDuration;

View File

@ -26,7 +26,7 @@ class LastFMStationDialog : public QDialog {
Q_OBJECT
public:
LastFMStationDialog(QWidget* parent = 0);
LastFMStationDialog(QWidget* parent = nullptr);
~LastFMStationDialog();
enum Type { Artist, Tag, Custom, };

View File

@ -11,7 +11,7 @@ class QTcpSocket;
class LocalRedirectServer : public QObject {
Q_OBJECT
public:
LocalRedirectServer(QObject* parent = 0);
LocalRedirectServer(QObject* parent = nullptr);
// Causes the server to listen for _one_ request.
void Listen();

View File

@ -35,7 +35,7 @@ class QXmlStreamReader;
class MagnatuneDownloadDialog : public QDialog {
Q_OBJECT
public:
MagnatuneDownloadDialog(MagnatuneService* service, QWidget* parent = 0);
MagnatuneDownloadDialog(MagnatuneService* service, QWidget* parent = nullptr);
~MagnatuneDownloadDialog();
void Show(const SongList& songs);

View File

@ -21,7 +21,7 @@ class OAuthenticator : public QObject {
};
OAuthenticator(const QString& client_id, const QString& client_secret,
RedirectStyle redirect, QObject* parent = 0);
RedirectStyle redirect, QObject* parent = nullptr);
void StartAuthorisation(const QString& oauth_endpoint,
const QString& token_endpoint, const QString& scope);
void RefreshAuthorisation(const QString& token_endpoint,

View File

@ -8,7 +8,7 @@ class SkydriveService;
class SkydriveUrlHandler : public UrlHandler {
Q_OBJECT
public:
SkydriveUrlHandler(SkydriveService* service, QObject* parent = 0);
SkydriveUrlHandler(SkydriveService* service, QObject* parent = nullptr);
QString scheme() const { return "skydrive"; }
QIcon icon() const { return QIcon(":providers/skydrive.png"); }

View File

@ -29,7 +29,7 @@ class SpotifyBlobDownloader : public QObject {
public:
SpotifyBlobDownloader(const QString& version, const QString& path,
QObject* parent = 0);
QObject* parent = nullptr);
~SpotifyBlobDownloader();
static const char* kSignatureSuffix;

View File

@ -31,7 +31,7 @@ class SpotifyServer : public AbstractMessageHandler<pb::spotify::Message> {
Q_OBJECT
public:
SpotifyServer(QObject* parent = 0);
SpotifyServer(QObject* parent = nullptr);
void Init();
void Login(const QString& username, const QString& password,

View File

@ -140,7 +140,7 @@ class SubsonicLibraryScanner : public QObject {
Q_OBJECT
public:
SubsonicLibraryScanner(SubsonicService* service, QObject* parent = 0);
SubsonicLibraryScanner(SubsonicService* service, QObject* parent = nullptr);
~SubsonicLibraryScanner();
void Scan();

View File

@ -9,7 +9,7 @@ class NetworkAccessManager;
class UbuntuOneAuthenticator : public QObject {
Q_OBJECT
public:
explicit UbuntuOneAuthenticator(QObject* parent = 0);
explicit UbuntuOneAuthenticator(QObject* parent = nullptr);
void StartAuthorisation(const QString& email, const QString& password);
bool success() const { return success_; }

View File

@ -10,7 +10,7 @@ class Ui_UbuntuOneSettingsPage;
class UbuntuOneSettingsPage : public SettingsPage {
Q_OBJECT
public:
UbuntuOneSettingsPage(SettingsDialog* parent = 0);
UbuntuOneSettingsPage(SettingsDialog* parent = nullptr);
void Load();
void Save();

View File

@ -8,7 +8,7 @@ class UbuntuOneService;
class UbuntuOneUrlHandler : public UrlHandler {
Q_OBJECT
public:
UbuntuOneUrlHandler(UbuntuOneService* service, QObject* parent = 0);
UbuntuOneUrlHandler(UbuntuOneService* service, QObject* parent = nullptr);
QString scheme() const { return "ubuntuonefile"; }
QIcon icon() const { return QIcon(":providers/ubuntuone.png"); }

View File

@ -36,7 +36,7 @@ class LibraryBackendInterface : public QObject {
Q_OBJECT
public:
LibraryBackendInterface(QObject* parent = 0) : QObject(parent) {}
LibraryBackendInterface(QObject* parent = nullptr) : QObject(parent) {}
virtual ~LibraryBackendInterface() {}
struct Album {
@ -121,7 +121,7 @@ class LibraryBackend : public LibraryBackendInterface {
public:
static const char* kSettingsGroup;
Q_INVOKABLE LibraryBackend(QObject* parent = 0);
Q_INVOKABLE LibraryBackend(QObject* parent = nullptr);
void Init(Database* db, const QString& songs_table, const QString& dirs_table,
const QString& subdirs_table, const QString& fts_table);

View File

@ -32,7 +32,7 @@ class LibraryDirectoryModel : public QStandardItemModel {
Q_OBJECT
public:
LibraryDirectoryModel(LibraryBackend* backend, QObject* parent = 0);
LibraryDirectoryModel(LibraryBackend* backend, QObject* parent = nullptr);
~LibraryDirectoryModel();
// To be called by GUIs

View File

@ -38,7 +38,7 @@ class LibraryFilterWidget : public QWidget {
Q_OBJECT
public:
LibraryFilterWidget(QWidget* parent = 0);
LibraryFilterWidget(QWidget* parent = nullptr);
~LibraryFilterWidget();
static const int kFilterDelay = 500; // msec

View File

@ -47,7 +47,7 @@ class LibraryModel : public SimpleTreeModel<LibraryItem> {
Q_ENUMS(GroupBy);
public:
LibraryModel(LibraryBackend* backend, Application* app, QObject* parent = 0);
LibraryModel(LibraryBackend* backend, Application* app, QObject* parent = nullptr);
~LibraryModel();
static const char* kSmartPlaylistsMimeType;

View File

@ -53,7 +53,7 @@ class LibraryView : public AutoExpandingTreeView {
Q_OBJECT
public:
LibraryView(QWidget* parent = 0);
LibraryView(QWidget* parent = nullptr);
~LibraryView();
static const char* kSettingsGroup;

View File

@ -28,7 +28,7 @@ class LibraryViewContainer : public QWidget {
Q_OBJECT
public:
LibraryViewContainer(QWidget* parent = 0);
LibraryViewContainer(QWidget* parent = nullptr);
~LibraryViewContainer();
LibraryFilterWidget* filter() const;

View File

@ -38,7 +38,7 @@ class LibraryWatcher : public QObject {
Q_OBJECT
public:
LibraryWatcher(QObject* parent = 0);
LibraryWatcher(QObject* parent = nullptr);
static const char* kSettingsGroup;

View File

@ -30,7 +30,7 @@ class MoodbarController : public QObject {
Q_OBJECT
public:
MoodbarController(Application* app, QObject* parent = 0);
MoodbarController(Application* app, QObject* parent = nullptr);
signals:
void CurrentMoodbarDataChanged(const QByteArray& data);

View File

@ -36,7 +36,7 @@ class MoodbarItemDelegate : public QItemDelegate {
public:
MoodbarItemDelegate(Application* app, PlaylistView* view,
QObject* parent = 0);
QObject* parent = nullptr);
void paint(QPainter* painter, const QStyleOptionViewItem& option,
const QModelIndex& index) const;

View File

@ -32,7 +32,7 @@ class MoodbarLoader : public QObject {
Q_OBJECT
public:
MoodbarLoader(Application* app, QObject* parent = 0);
MoodbarLoader(Application* app, QObject* parent = nullptr);
~MoodbarLoader();
enum Result {

View File

@ -38,7 +38,7 @@ class AcoustidClient : public QObject {
// the Finished signal - they have no meaning to AcoustidClient.
public:
AcoustidClient(QObject* parent = 0);
AcoustidClient(QObject* parent = nullptr);
// Network requests will be aborted after this interval.
void SetTimeout(int msec);

View File

@ -38,7 +38,7 @@ class MusicBrainzClient : public QObject {
// the Finished signal - they have no meaning to MusicBrainzClient.
public:
MusicBrainzClient(QObject* parent = 0);
MusicBrainzClient(QObject* parent = nullptr);
struct Result {
Result() : duration_msec_(0), track_(0), year_(-1) {}

View File

@ -33,7 +33,7 @@ class TagFetcher : public QObject {
// MusicBrainzClient.
public:
TagFetcher(QObject* parent = 0);
TagFetcher(QObject* parent = nullptr);
void StartFetch(const SongList& songs);

View File

@ -18,7 +18,7 @@ class NetworkRemote : public QObject {
static const char* kSettingsGroup;
static const quint16 kDefaultServerPort;
explicit NetworkRemote(Application* app, QObject* parent = 0);
explicit NetworkRemote(Application* app, QObject* parent = nullptr);
~NetworkRemote();
public slots:

View File

@ -26,7 +26,7 @@ class DynamicPlaylistControls : public QWidget {
Q_OBJECT
public:
DynamicPlaylistControls(QWidget* parent = 0);
DynamicPlaylistControls(QWidget* parent = nullptr);
~DynamicPlaylistControls();
signals:

View File

@ -78,7 +78,7 @@ class Playlist : public QAbstractListModel {
Playlist(PlaylistBackend* backend, TaskManager* task_manager,
LibraryBackend* library, int id,
const QString& special_type = QString(), bool favorite = false,
QObject* parent = 0);
QObject* parent = nullptr);
~Playlist();
void SkipTracks(const QModelIndexList& source_indexes);

View File

@ -34,7 +34,7 @@ class PlaylistBackend : public QObject {
Q_OBJECT
public:
Q_INVOKABLE PlaylistBackend(Application* app, QObject* parent = 0);
Q_INVOKABLE PlaylistBackend(Application* app, QObject* parent = nullptr);
struct Playlist {
Playlist() : id(-1), favorite(false), last_played(0) {}

View File

@ -36,7 +36,7 @@ class PlaylistContainer : public QWidget {
Q_OBJECT
public:
PlaylistContainer(QWidget* parent = 0);
PlaylistContainer(QWidget* parent = nullptr);
~PlaylistContainer();
static const char* kSettingsGroup;

View File

@ -31,7 +31,7 @@ class PlaylistFilter : public QSortFilterProxyModel {
Q_OBJECT
public:
PlaylistFilter(QObject* parent = 0);
PlaylistFilter(QObject* parent = nullptr);
~PlaylistFilter();
// QAbstractItemModel

View File

@ -30,7 +30,7 @@ class PlaylistHeader : public StretchHeaderView {
public:
PlaylistHeader(Qt::Orientation orientation, PlaylistView* view,
QWidget* parent = 0);
QWidget* parent = nullptr);
// QWidget
void contextMenuEvent(QContextMenuEvent* e);

View File

@ -35,7 +35,7 @@ class PlaylistListContainer : public QWidget {
Q_OBJECT
public:
PlaylistListContainer(QWidget* parent = 0);
PlaylistListContainer(QWidget* parent = nullptr);
~PlaylistListContainer();
void SetApplication(Application* app);

View File

@ -7,7 +7,7 @@ class PlaylistListModel : public QStandardItemModel {
Q_OBJECT
public:
PlaylistListModel(QObject* parent = 0);
PlaylistListModel(QObject* parent = nullptr);
enum Types { Type_Folder, Type_Playlist };

View File

@ -135,7 +135,7 @@ class PlaylistManager : public PlaylistManagerInterface {
Q_OBJECT
public:
PlaylistManager(Application* app, QObject* parent = 0);
PlaylistManager(Application* app, QObject* parent = nullptr);
~PlaylistManager();
int current_id() const { return current_; }

View File

@ -32,7 +32,7 @@ class PlaylistSequence : public QWidget {
Q_OBJECT
public:
PlaylistSequence(QWidget* parent = 0, SettingsProvider* settings = 0);
PlaylistSequence(QWidget* parent = nullptr, SettingsProvider* settings = 0);
~PlaylistSequence();
enum RepeatMode {

Some files were not shown because too many files have changed in this diff Show More