Remove boost::scoped_ptr & boost::shared_ptr
This commit is contained in:
parent
8424c18516
commit
5b4b06f64b
|
@ -18,9 +18,9 @@
|
||||||
#ifndef CRASHREPORTING_H
|
#ifndef CRASHREPORTING_H
|
||||||
#define CRASHREPORTING_H
|
#define CRASHREPORTING_H
|
||||||
|
|
||||||
#include <QObject>
|
#include <memory>
|
||||||
|
|
||||||
#include <boost/scoped_ptr.hpp>
|
#include <QObject>
|
||||||
|
|
||||||
class QFile;
|
class QFile;
|
||||||
class QNetworkAccessManager;
|
class QNetworkAccessManager;
|
||||||
|
@ -64,7 +64,7 @@ private:
|
||||||
static const char* kSendCrashReportOption;
|
static const char* kSendCrashReportOption;
|
||||||
static char* sPath;
|
static char* sPath;
|
||||||
|
|
||||||
boost::scoped_ptr<google_breakpad::ExceptionHandler> handler_;
|
std::unique_ptr<google_breakpad::ExceptionHandler> handler_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -18,13 +18,13 @@
|
||||||
#ifndef MACGLOBALSHORTCUTBACKEND_H
|
#ifndef MACGLOBALSHORTCUTBACKEND_H
|
||||||
#define MACGLOBALSHORTCUTBACKEND_H
|
#define MACGLOBALSHORTCUTBACKEND_H
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include "globalshortcutbackend.h"
|
#include "globalshortcutbackend.h"
|
||||||
|
|
||||||
#include <QKeySequence>
|
#include <QKeySequence>
|
||||||
#include <QMap>
|
#include <QMap>
|
||||||
|
|
||||||
#include <boost/scoped_ptr.hpp>
|
|
||||||
|
|
||||||
class MacGlobalShortcutBackendPrivate;
|
class MacGlobalShortcutBackendPrivate;
|
||||||
class QAction;
|
class QAction;
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ private:
|
||||||
QMap<QKeySequence, QAction*> shortcuts_;
|
QMap<QKeySequence, QAction*> shortcuts_;
|
||||||
|
|
||||||
friend class MacGlobalShortcutBackendPrivate;
|
friend class MacGlobalShortcutBackendPrivate;
|
||||||
boost::scoped_ptr<MacGlobalShortcutBackendPrivate> p_;
|
std::unique_ptr<MacGlobalShortcutBackendPrivate> p_;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // MACGLOBALSHORTCUTBACKEND_H
|
#endif // MACGLOBALSHORTCUTBACKEND_H
|
||||||
|
|
|
@ -24,8 +24,6 @@
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QtDBus>
|
#include <QtDBus>
|
||||||
|
|
||||||
#include <boost/scoped_ptr.hpp>
|
|
||||||
|
|
||||||
class Application;
|
class Application;
|
||||||
class MainWindow;
|
class MainWindow;
|
||||||
class Playlist;
|
class Playlist;
|
||||||
|
|
|
@ -18,11 +18,11 @@
|
||||||
#ifndef PLAYER_H
|
#ifndef PLAYER_H
|
||||||
#define PLAYER_H
|
#define PLAYER_H
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
|
|
||||||
#include <boost/scoped_ptr.hpp>
|
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "core/song.h"
|
#include "core/song.h"
|
||||||
#include "core/urlhandler.h"
|
#include "core/urlhandler.h"
|
||||||
|
@ -176,7 +176,7 @@ public slots:
|
||||||
|
|
||||||
PlaylistItemPtr current_item_;
|
PlaylistItemPtr current_item_;
|
||||||
|
|
||||||
boost::scoped_ptr<EngineBase> engine_;
|
std::unique_ptr<EngineBase> engine_;
|
||||||
Engine::TrackChangeFlags stream_change_type_;
|
Engine::TrackChangeFlags stream_change_type_;
|
||||||
Engine::State last_state_;
|
Engine::State last_state_;
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include <boost/scoped_array.hpp>
|
#include <memory>
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QDateTime>
|
#include <QDateTime>
|
||||||
|
@ -265,7 +265,7 @@ bool Copy(QIODevice* source, QIODevice* destination) {
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
const qint64 bytes = source->size();
|
const qint64 bytes = source->size();
|
||||||
boost::scoped_array<char> data(new char[bytes]);
|
std::unique_ptr<char[]> data(new char[bytes]);
|
||||||
qint64 pos = 0;
|
qint64 pos = 0;
|
||||||
|
|
||||||
qint64 bytes_read;
|
qint64 bytes_read;
|
||||||
|
|
|
@ -18,6 +18,8 @@
|
||||||
#ifndef UTILITIES_H
|
#ifndef UTILITIES_H
|
||||||
#define UTILITIES_H
|
#define UTILITIES_H
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include <QColor>
|
#include <QColor>
|
||||||
#include <QLocale>
|
#include <QLocale>
|
||||||
#include <QCryptographicHash>
|
#include <QCryptographicHash>
|
||||||
|
@ -25,8 +27,6 @@
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
|
|
||||||
#include <boost/scoped_array.hpp>
|
|
||||||
|
|
||||||
class QIODevice;
|
class QIODevice;
|
||||||
class QMouseEvent;
|
class QMouseEvent;
|
||||||
class QXmlStreamReader;
|
class QXmlStreamReader;
|
||||||
|
@ -159,7 +159,7 @@ private:
|
||||||
Q_DISABLE_COPY(ScopedWCharArray);
|
Q_DISABLE_COPY(ScopedWCharArray);
|
||||||
|
|
||||||
int chars_;
|
int chars_;
|
||||||
boost::scoped_array<wchar_t> data_;
|
std::unique_ptr<wchar_t[]> data_;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // UTILITIES_H
|
#endif // UTILITIES_H
|
||||||
|
|
|
@ -29,8 +29,6 @@
|
||||||
#include <QQueue>
|
#include <QQueue>
|
||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
|
|
||||||
#include <boost/scoped_ptr.hpp>
|
|
||||||
|
|
||||||
class QNetworkReply;
|
class QNetworkReply;
|
||||||
class QString;
|
class QString;
|
||||||
|
|
||||||
|
|
|
@ -18,12 +18,12 @@
|
||||||
#ifndef CURRENTARTLOADER_H
|
#ifndef CURRENTARTLOADER_H
|
||||||
#define CURRENTARTLOADER_H
|
#define CURRENTARTLOADER_H
|
||||||
|
|
||||||
#include "core/song.h"
|
#include <memory>
|
||||||
#include "covers/albumcoverloaderoptions.h"
|
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
|
||||||
#include <boost/scoped_ptr.hpp>
|
#include "core/song.h"
|
||||||
|
#include "covers/albumcoverloaderoptions.h"
|
||||||
|
|
||||||
class Application;
|
class Application;
|
||||||
|
|
||||||
|
@ -56,8 +56,8 @@ private:
|
||||||
|
|
||||||
QString temp_file_pattern_;
|
QString temp_file_pattern_;
|
||||||
|
|
||||||
boost::scoped_ptr<QTemporaryFile> temp_art_;
|
std::unique_ptr<QTemporaryFile> temp_art_;
|
||||||
boost::scoped_ptr<QTemporaryFile> temp_art_thumbnail_;
|
std::unique_ptr<QTemporaryFile> temp_art_thumbnail_;
|
||||||
quint64 id_;
|
quint64 id_;
|
||||||
|
|
||||||
Song last_song_;
|
Song last_song_;
|
||||||
|
|
|
@ -18,14 +18,14 @@
|
||||||
#ifndef CONNECTEDDEVICE_H
|
#ifndef CONNECTEDDEVICE_H
|
||||||
#define CONNECTEDDEVICE_H
|
#define CONNECTEDDEVICE_H
|
||||||
|
|
||||||
#include "core/musicstorage.h"
|
#include <memory>
|
||||||
#include "core/song.h"
|
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
|
|
||||||
#include <boost/enable_shared_from_this.hpp>
|
#include "core/musicstorage.h"
|
||||||
|
#include "core/song.h"
|
||||||
|
|
||||||
class Application;
|
class Application;
|
||||||
class Database;
|
class Database;
|
||||||
|
@ -35,7 +35,7 @@ class LibraryBackend;
|
||||||
class LibraryModel;
|
class LibraryModel;
|
||||||
|
|
||||||
class ConnectedDevice : public QObject, public virtual MusicStorage,
|
class ConnectedDevice : public QObject, public virtual MusicStorage,
|
||||||
public boost::enable_shared_from_this<ConnectedDevice> {
|
public std::enable_shared_from_this<ConnectedDevice> {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -18,12 +18,12 @@
|
||||||
#ifndef DEVICEKITLISTER_H
|
#ifndef DEVICEKITLISTER_H
|
||||||
#define DEVICEKITLISTER_H
|
#define DEVICEKITLISTER_H
|
||||||
|
|
||||||
#include "devicelister.h"
|
#include <memory>
|
||||||
|
|
||||||
#include <QMutex>
|
#include <QMutex>
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
|
|
||||||
#include <boost/scoped_ptr.hpp>
|
#include "devicelister.h"
|
||||||
|
|
||||||
class OrgFreedesktopUDisksInterface;
|
class OrgFreedesktopUDisksInterface;
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ private:
|
||||||
T LockAndGetDeviceInfo(const QString& id, T DeviceData::*field);
|
T LockAndGetDeviceInfo(const QString& id, T DeviceData::*field);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
boost::scoped_ptr<OrgFreedesktopUDisksInterface> interface_;
|
std::unique_ptr<OrgFreedesktopUDisksInterface> interface_;
|
||||||
|
|
||||||
QMutex mutex_;
|
QMutex mutex_;
|
||||||
QMap<QString, DeviceData> device_data_;
|
QMap<QString, DeviceData> device_data_;
|
||||||
|
|
|
@ -21,8 +21,6 @@
|
||||||
#include <QAbstractItemModel>
|
#include <QAbstractItemModel>
|
||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
|
|
||||||
#include <boost/shared_ptr.hpp>
|
|
||||||
|
|
||||||
class ConnectedDevice;
|
class ConnectedDevice;
|
||||||
class DeviceManager;
|
class DeviceManager;
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,8 @@
|
||||||
#ifndef DEVICEVIEW_H
|
#ifndef DEVICEVIEW_H
|
||||||
#define DEVICEVIEW_H
|
#define DEVICEVIEW_H
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include "core/song.h"
|
#include "core/song.h"
|
||||||
#include "library/libraryview.h"
|
#include "library/libraryview.h"
|
||||||
#include "widgets/autoexpandingtreeview.h"
|
#include "widgets/autoexpandingtreeview.h"
|
||||||
|
@ -88,8 +90,8 @@ private:
|
||||||
MergedProxyModel* merged_model_;
|
MergedProxyModel* merged_model_;
|
||||||
QSortFilterProxyModel* sort_model_;
|
QSortFilterProxyModel* sort_model_;
|
||||||
|
|
||||||
boost::scoped_ptr<DeviceProperties> properties_dialog_;
|
std::unique_ptr<DeviceProperties> properties_dialog_;
|
||||||
boost::scoped_ptr<OrganiseDialog> organise_dialog_;
|
std::unique_ptr<OrganiseDialog> organise_dialog_;
|
||||||
|
|
||||||
QMenu* device_menu_;
|
QMenu* device_menu_;
|
||||||
QAction* eject_action_;
|
QAction* eject_action_;
|
||||||
|
|
|
@ -27,8 +27,9 @@
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QtDebug>
|
#include <QtDebug>
|
||||||
|
|
||||||
GPodLoader::GPodLoader(const QString& mount_point, TaskManager* task_manager,
|
GPodLoader::GPodLoader(
|
||||||
LibraryBackend* backend, boost::shared_ptr<ConnectedDevice> device)
|
const QString& mount_point, TaskManager* task_manager,
|
||||||
|
LibraryBackend* backend, std::shared_ptr<ConnectedDevice> device)
|
||||||
: QObject(NULL),
|
: QObject(NULL),
|
||||||
device_(device),
|
device_(device),
|
||||||
mount_point_(mount_point),
|
mount_point_(mount_point),
|
||||||
|
|
|
@ -18,9 +18,10 @@
|
||||||
#ifndef GPODLOADER_H
|
#ifndef GPODLOADER_H
|
||||||
#define GPODLOADER_H
|
#define GPODLOADER_H
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
|
||||||
#include <boost/shared_ptr.hpp>
|
|
||||||
#include <gpod/itdb.h>
|
#include <gpod/itdb.h>
|
||||||
|
|
||||||
#include "core/song.h"
|
#include "core/song.h"
|
||||||
|
@ -34,7 +35,7 @@ class GPodLoader : public QObject {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
GPodLoader(const QString& mount_point, TaskManager* task_manager,
|
GPodLoader(const QString& mount_point, TaskManager* task_manager,
|
||||||
LibraryBackend* backend, boost::shared_ptr<ConnectedDevice> device);
|
LibraryBackend* backend, std::shared_ptr<ConnectedDevice> device);
|
||||||
~GPodLoader();
|
~GPodLoader();
|
||||||
|
|
||||||
void set_music_path_prefix(const QString& prefix) { path_prefix_ = prefix; }
|
void set_music_path_prefix(const QString& prefix) { path_prefix_ = prefix; }
|
||||||
|
@ -49,7 +50,7 @@ signals:
|
||||||
void LoadFinished(Itdb_iTunesDB* db);
|
void LoadFinished(Itdb_iTunesDB* db);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
boost::shared_ptr<ConnectedDevice> device_;
|
std::shared_ptr<ConnectedDevice> device_;
|
||||||
QThread* original_thread_;
|
QThread* original_thread_;
|
||||||
|
|
||||||
QString mount_point_;
|
QString mount_point_;
|
||||||
|
|
|
@ -18,12 +18,12 @@
|
||||||
#ifndef MTPDEVICE_H
|
#ifndef MTPDEVICE_H
|
||||||
#define MTPDEVICE_H
|
#define MTPDEVICE_H
|
||||||
|
|
||||||
#include "connecteddevice.h"
|
#include <memory>
|
||||||
|
|
||||||
#include <QMutex>
|
#include <QMutex>
|
||||||
#include <QWaitCondition>
|
#include <QWaitCondition>
|
||||||
|
|
||||||
#include <boost/scoped_ptr.hpp>
|
#include "connecteddevice.h"
|
||||||
|
|
||||||
struct LIBMTP_mtpdevice_struct;
|
struct LIBMTP_mtpdevice_struct;
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ private:
|
||||||
SongList songs_to_add_;
|
SongList songs_to_add_;
|
||||||
SongList songs_to_remove_;
|
SongList songs_to_remove_;
|
||||||
|
|
||||||
boost::scoped_ptr<MtpConnection> connection_;
|
std::unique_ptr<MtpConnection> connection_;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // MTPDEVICE_H
|
#endif // MTPDEVICE_H
|
||||||
|
|
|
@ -15,17 +15,19 @@
|
||||||
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "mtploader.h"
|
||||||
|
|
||||||
|
#include <libmtp.h>
|
||||||
|
|
||||||
#include "connecteddevice.h"
|
#include "connecteddevice.h"
|
||||||
#include "mtpconnection.h"
|
#include "mtpconnection.h"
|
||||||
#include "mtploader.h"
|
|
||||||
#include "core/song.h"
|
#include "core/song.h"
|
||||||
#include "core/taskmanager.h"
|
#include "core/taskmanager.h"
|
||||||
#include "library/librarybackend.h"
|
#include "library/librarybackend.h"
|
||||||
|
|
||||||
#include <libmtp.h>
|
MtpLoader::MtpLoader(
|
||||||
|
const QUrl& url, TaskManager* task_manager,
|
||||||
MtpLoader::MtpLoader(const QUrl& url, TaskManager* task_manager,
|
LibraryBackend* backend, std::shared_ptr<ConnectedDevice> device)
|
||||||
LibraryBackend* backend, boost::shared_ptr<ConnectedDevice> device)
|
|
||||||
: QObject(NULL),
|
: QObject(NULL),
|
||||||
device_(device),
|
device_(device),
|
||||||
url_(url),
|
url_(url),
|
||||||
|
|
|
@ -18,11 +18,11 @@
|
||||||
#ifndef MTPLOADER_H
|
#ifndef MTPLOADER_H
|
||||||
#define MTPLOADER_H
|
#define MTPLOADER_H
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
|
|
||||||
#include <boost/shared_ptr.hpp>
|
|
||||||
|
|
||||||
class ConnectedDevice;
|
class ConnectedDevice;
|
||||||
class LibraryBackend;
|
class LibraryBackend;
|
||||||
class TaskManager;
|
class TaskManager;
|
||||||
|
@ -32,7 +32,7 @@ class MtpLoader : public QObject {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MtpLoader(const QUrl& url, TaskManager* task_manager,
|
MtpLoader(const QUrl& url, TaskManager* task_manager,
|
||||||
LibraryBackend* backend, boost::shared_ptr<ConnectedDevice> device);
|
LibraryBackend* backend, std::shared_ptr<ConnectedDevice> device);
|
||||||
~MtpLoader();
|
~MtpLoader();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
@ -47,7 +47,7 @@ private:
|
||||||
bool TryLoad();
|
bool TryLoad();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
boost::shared_ptr<ConnectedDevice> device_;
|
std::shared_ptr<ConnectedDevice> device_;
|
||||||
QThread* original_thread_;
|
QThread* original_thread_;
|
||||||
|
|
||||||
QUrl url_;
|
QUrl url_;
|
||||||
|
|
|
@ -27,8 +27,6 @@
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include <boost/noncopyable.hpp>
|
|
||||||
|
|
||||||
#include <QList>
|
#include <QList>
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
|
@ -39,7 +37,7 @@ namespace Engine {
|
||||||
|
|
||||||
typedef std::vector<int16_t> Scope;
|
typedef std::vector<int16_t> Scope;
|
||||||
|
|
||||||
class Base : public QObject, boost::noncopyable {
|
class Base : public QObject {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -153,6 +151,7 @@ class Base : public QObject, boost::noncopyable {
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool about_to_end_emitted_;
|
bool about_to_end_emitted_;
|
||||||
|
Q_DISABLE_COPY(Base);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -41,11 +41,11 @@ const int GstEnginePipeline::kEqBandFrequencies[] = {
|
||||||
60, 170, 310, 600, 1000, 3000, 6000, 12000, 14000, 16000};
|
60, 170, 310, 600, 1000, 3000, 6000, 12000, 14000, 16000};
|
||||||
|
|
||||||
int GstEnginePipeline::sId = 1;
|
int GstEnginePipeline::sId = 1;
|
||||||
GstElementDeleter* GstEnginePipeline::sElementDeleter = NULL;
|
GstElementDeleter* GstEnginePipeline::sElementDeleter = nullptr;
|
||||||
|
|
||||||
|
|
||||||
GstEnginePipeline::GstEnginePipeline(GstEngine* engine)
|
GstEnginePipeline::GstEnginePipeline(GstEngine* engine)
|
||||||
: QObject(NULL),
|
: QObject(nullptr),
|
||||||
engine_(engine),
|
engine_(engine),
|
||||||
id_(sId++),
|
id_(sId++),
|
||||||
valid_(false),
|
valid_(false),
|
||||||
|
@ -75,20 +75,19 @@ GstEnginePipeline::GstEnginePipeline(GstEngine* engine)
|
||||||
pending_seek_nanosec_(-1),
|
pending_seek_nanosec_(-1),
|
||||||
volume_percent_(100),
|
volume_percent_(100),
|
||||||
volume_modifier_(1.0),
|
volume_modifier_(1.0),
|
||||||
fader_(NULL),
|
pipeline_(nullptr),
|
||||||
pipeline_(NULL),
|
uridecodebin_(nullptr),
|
||||||
uridecodebin_(NULL),
|
audiobin_(nullptr),
|
||||||
audiobin_(NULL),
|
queue_(nullptr),
|
||||||
queue_(NULL),
|
audioconvert_(nullptr),
|
||||||
audioconvert_(NULL),
|
rgvolume_(nullptr),
|
||||||
rgvolume_(NULL),
|
rglimiter_(nullptr),
|
||||||
rglimiter_(NULL),
|
audioconvert2_(nullptr),
|
||||||
audioconvert2_(NULL),
|
equalizer_(nullptr),
|
||||||
equalizer_(NULL),
|
stereo_panorama_(nullptr),
|
||||||
stereo_panorama_(NULL),
|
volume_(nullptr),
|
||||||
volume_(NULL),
|
audioscale_(nullptr),
|
||||||
audioscale_(NULL),
|
audiosink_(nullptr)
|
||||||
audiosink_(NULL)
|
|
||||||
{
|
{
|
||||||
if (!sElementDeleter) {
|
if (!sElementDeleter) {
|
||||||
sElementDeleter = new GstElementDeleter;
|
sElementDeleter = new GstElementDeleter;
|
||||||
|
|
|
@ -18,6 +18,8 @@
|
||||||
#ifndef GSTENGINEPIPELINE_H
|
#ifndef GSTENGINEPIPELINE_H
|
||||||
#define GSTENGINEPIPELINE_H
|
#define GSTENGINEPIPELINE_H
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include <QBasicTimer>
|
#include <QBasicTimer>
|
||||||
#include <QFuture>
|
#include <QFuture>
|
||||||
#include <QMutex>
|
#include <QMutex>
|
||||||
|
@ -27,7 +29,6 @@
|
||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
|
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
#include <boost/scoped_ptr.hpp>
|
|
||||||
|
|
||||||
#include "engine_fwd.h"
|
#include "engine_fwd.h"
|
||||||
|
|
||||||
|
@ -253,7 +254,7 @@ class GstEnginePipeline : public QObject {
|
||||||
int volume_percent_;
|
int volume_percent_;
|
||||||
qreal volume_modifier_;
|
qreal volume_modifier_;
|
||||||
|
|
||||||
boost::scoped_ptr<QTimeLine> fader_;
|
std::unique_ptr<QTimeLine> fader_;
|
||||||
QBasicTimer fader_fudge_timer_;
|
QBasicTimer fader_fudge_timer_;
|
||||||
bool use_fudge_timer_;
|
bool use_fudge_timer_;
|
||||||
|
|
||||||
|
|
|
@ -18,9 +18,7 @@
|
||||||
#include "spotifysearchprovider.h"
|
#include "spotifysearchprovider.h"
|
||||||
|
|
||||||
#include <ctime>
|
#include <ctime>
|
||||||
|
#include <random>
|
||||||
#include <boost/random/mersenne_twister.hpp>
|
|
||||||
#include <boost/random/uniform_int.hpp>
|
|
||||||
|
|
||||||
#include "core/logging.h"
|
#include "core/logging.h"
|
||||||
#include "internet/internetmodel.h"
|
#include "internet/internetmodel.h"
|
||||||
|
@ -219,8 +217,8 @@ QStringList SpotifySearchProvider::GetSuggestions(int count) {
|
||||||
|
|
||||||
QStringList all_suggestions = suggestions_.toList();
|
QStringList all_suggestions = suggestions_.toList();
|
||||||
|
|
||||||
boost::mt19937 gen(std::time(0));
|
std::mt19937 gen(std::time(0));
|
||||||
boost::uniform_int<> random(0, all_suggestions.size() - 1);
|
std::uniform_int_distribution<> random(0, all_suggestions.size() - 1);
|
||||||
|
|
||||||
QSet<QString> candidates;
|
QSet<QString> candidates;
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,8 @@
|
||||||
|
|
||||||
#include "internetservice.h"
|
#include "internetservice.h"
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
|
|
||||||
#include "core/tagreaderclient.h"
|
#include "core/tagreaderclient.h"
|
||||||
|
@ -61,8 +63,8 @@ class CloudFileService : public InternetService {
|
||||||
LibraryModel* library_model_;
|
LibraryModel* library_model_;
|
||||||
QSortFilterProxyModel* library_sort_model_;
|
QSortFilterProxyModel* library_sort_model_;
|
||||||
|
|
||||||
boost::scoped_ptr<QMenu> context_menu_;
|
std::unique_ptr<QMenu> context_menu_;
|
||||||
boost::scoped_ptr<AlbumCoverManager> cover_manager_;
|
std::unique_ptr<AlbumCoverManager> cover_manager_;
|
||||||
PlaylistManager* playlist_manager_;
|
PlaylistManager* playlist_manager_;
|
||||||
TaskManager* task_manager_;
|
TaskManager* task_manager_;
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
#ifndef DIGITALLYIMPORTEDSERVICEBASE_H
|
#ifndef DIGITALLYIMPORTEDSERVICEBASE_H
|
||||||
#define DIGITALLYIMPORTEDSERVICEBASE_H
|
#define DIGITALLYIMPORTEDSERVICEBASE_H
|
||||||
|
|
||||||
#include <boost/scoped_ptr.hpp>
|
#include <memory>
|
||||||
|
|
||||||
#include "digitallyimportedclient.h"
|
#include "digitallyimportedclient.h"
|
||||||
#include "internetservice.h"
|
#include "internetservice.h"
|
||||||
|
@ -104,7 +104,7 @@ private:
|
||||||
|
|
||||||
QStandardItem* root_;
|
QStandardItem* root_;
|
||||||
|
|
||||||
boost::scoped_ptr<QMenu> context_menu_;
|
std::unique_ptr<QMenu> context_menu_;
|
||||||
QStandardItem* context_item_;
|
QStandardItem* context_item_;
|
||||||
|
|
||||||
CachedList<DigitallyImportedClient::Channel> saved_channels_;
|
CachedList<DigitallyImportedClient::Channel> saved_channels_;
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
#include "groovesharkservice.h"
|
#include "groovesharkservice.h"
|
||||||
|
|
||||||
#include <boost/scoped_ptr.hpp>
|
#include <memory>
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QClipboard>
|
#include <QClipboard>
|
||||||
|
@ -1286,8 +1286,8 @@ void GroovesharkService::DeletePlaylist(int playlist_id) {
|
||||||
if (!playlists_.contains(playlist_id)) {
|
if (!playlists_.contains(playlist_id)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::scoped_ptr<QMessageBox> confirmation_dialog(new QMessageBox(
|
std::unique_ptr<QMessageBox> confirmation_dialog(new QMessageBox(
|
||||||
QMessageBox::Question, tr("Delete Grooveshark playlist"),
|
QMessageBox::Question, tr("Delete Grooveshark playlist"),
|
||||||
tr("Are you sure you want to delete this playlist?"),
|
tr("Are you sure you want to delete this playlist?"),
|
||||||
QMessageBox::Yes | QMessageBox::Cancel));
|
QMessageBox::Yes | QMessageBox::Cancel));
|
||||||
|
|
|
@ -32,8 +32,6 @@
|
||||||
|
|
||||||
#include "lastfmservice.h"
|
#include "lastfmservice.h"
|
||||||
|
|
||||||
#include <boost/scoped_ptr.hpp>
|
|
||||||
|
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
|
|
||||||
|
@ -61,7 +59,6 @@
|
||||||
#include "ui/iconloader.h"
|
#include "ui/iconloader.h"
|
||||||
#include "ui/settingsdialog.h"
|
#include "ui/settingsdialog.h"
|
||||||
|
|
||||||
using boost::scoped_ptr;
|
|
||||||
using lastfm::XmlQuery;
|
using lastfm::XmlQuery;
|
||||||
|
|
||||||
uint qHash(const lastfm::Track& track) {
|
uint qHash(const lastfm::Track& track) {
|
||||||
|
|
|
@ -18,6 +18,8 @@
|
||||||
#ifndef LASTFMSERVICE_H
|
#ifndef LASTFMSERVICE_H
|
||||||
#define LASTFMSERVICE_H
|
#define LASTFMSERVICE_H
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
namespace lastfm {
|
namespace lastfm {
|
||||||
class RadioStation;
|
class RadioStation;
|
||||||
class Track;
|
class Track;
|
||||||
|
@ -40,8 +42,6 @@ uint qHash(const lastfm::Track& track);
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
#include <QQueue>
|
#include <QQueue>
|
||||||
|
|
||||||
#include <boost/scoped_ptr.hpp>
|
|
||||||
|
|
||||||
class LastFMUrlHandler;
|
class LastFMUrlHandler;
|
||||||
|
|
||||||
class QAction;
|
class QAction;
|
||||||
|
@ -198,9 +198,9 @@ class LastFMService : public InternetService {
|
||||||
QQueue<lastfm::Track> playlist_;
|
QQueue<lastfm::Track> playlist_;
|
||||||
bool already_scrobbled_;
|
bool already_scrobbled_;
|
||||||
|
|
||||||
boost::scoped_ptr<LastFMStationDialog> station_dialog_;
|
std::unique_ptr<LastFMStationDialog> station_dialog_;
|
||||||
|
|
||||||
boost::scoped_ptr<QMenu> context_menu_;
|
std::unique_ptr<QMenu> context_menu_;
|
||||||
QAction* remove_action_;
|
QAction* remove_action_;
|
||||||
QAction* add_artist_action_;
|
QAction* add_artist_action_;
|
||||||
QAction* add_tag_action_;
|
QAction* add_tag_action_;
|
||||||
|
|
|
@ -16,13 +16,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "magnatunedownloaddialog.h"
|
#include "magnatunedownloaddialog.h"
|
||||||
#include "magnatuneservice.h"
|
|
||||||
#include "internetmodel.h"
|
#include <memory>
|
||||||
#include "ui_magnatunedownloaddialog.h"
|
|
||||||
#include "core/logging.h"
|
|
||||||
#include "core/network.h"
|
|
||||||
#include "core/utilities.h"
|
|
||||||
#include "widgets/progressitemdelegate.h"
|
|
||||||
|
|
||||||
#include <QCloseEvent>
|
#include <QCloseEvent>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
|
@ -35,6 +30,14 @@
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
#include <QXmlStreamReader>
|
#include <QXmlStreamReader>
|
||||||
|
|
||||||
|
#include "magnatuneservice.h"
|
||||||
|
#include "internetmodel.h"
|
||||||
|
#include "ui_magnatunedownloaddialog.h"
|
||||||
|
#include "core/logging.h"
|
||||||
|
#include "core/network.h"
|
||||||
|
#include "core/utilities.h"
|
||||||
|
#include "widgets/progressitemdelegate.h"
|
||||||
|
|
||||||
MagnatuneDownloadDialog::MagnatuneDownloadDialog(MagnatuneService* service,
|
MagnatuneDownloadDialog::MagnatuneDownloadDialog(MagnatuneService* service,
|
||||||
QWidget *parent)
|
QWidget *parent)
|
||||||
: QDialog(parent),
|
: QDialog(parent),
|
||||||
|
@ -275,7 +278,7 @@ QString MagnatuneDownloadDialog::GetOutputFilename() {
|
||||||
|
|
||||||
void MagnatuneDownloadDialog::closeEvent(QCloseEvent* e) {
|
void MagnatuneDownloadDialog::closeEvent(QCloseEvent* e) {
|
||||||
if (current_reply_ && current_reply_->isRunning()) {
|
if (current_reply_ && current_reply_->isRunning()) {
|
||||||
boost::scoped_ptr<QMessageBox> message_box(new QMessageBox(
|
std::unique_ptr<QMessageBox> message_box(new QMessageBox(
|
||||||
QMessageBox::Question, tr("Really cancel?"),
|
QMessageBox::Question, tr("Really cancel?"),
|
||||||
tr("Closing this window will cancel the download."),
|
tr("Closing this window will cancel the download."),
|
||||||
QMessageBox::Abort, this));
|
QMessageBox::Abort, this));
|
||||||
|
|
|
@ -18,12 +18,12 @@
|
||||||
#ifndef MAGNATUNEDOWNLOADDIALOG_H
|
#ifndef MAGNATUNEDOWNLOADDIALOG_H
|
||||||
#define MAGNATUNEDOWNLOADDIALOG_H
|
#define MAGNATUNEDOWNLOADDIALOG_H
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include <QDialog>
|
#include <QDialog>
|
||||||
#include <QNetworkReply>
|
#include <QNetworkReply>
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
|
|
||||||
#include <boost/scoped_ptr.hpp>
|
|
||||||
|
|
||||||
#include "core/song.h"
|
#include "core/song.h"
|
||||||
|
|
||||||
class MagnatuneService;
|
class MagnatuneService;
|
||||||
|
@ -71,7 +71,7 @@ private:
|
||||||
|
|
||||||
QNetworkAccessManager* network_;
|
QNetworkAccessManager* network_;
|
||||||
QNetworkReply* current_reply_;
|
QNetworkReply* current_reply_;
|
||||||
boost::scoped_ptr<QFile> download_file_;
|
std::unique_ptr<QFile> download_file_;
|
||||||
|
|
||||||
int next_row_;
|
int next_row_;
|
||||||
};
|
};
|
||||||
|
|
|
@ -51,8 +51,6 @@
|
||||||
|
|
||||||
#include <QtDebug>
|
#include <QtDebug>
|
||||||
|
|
||||||
using boost::shared_ptr;
|
|
||||||
|
|
||||||
const char* MagnatuneService::kServiceName = "Magnatune";
|
const char* MagnatuneService::kServiceName = "Magnatune";
|
||||||
const char* MagnatuneService::kSettingsGroup = "Magnatune";
|
const char* MagnatuneService::kSettingsGroup = "Magnatune";
|
||||||
const char* MagnatuneService::kSongsTable = "magnatune_songs";
|
const char* MagnatuneService::kSongsTable = "magnatune_songs";
|
||||||
|
|
|
@ -18,9 +18,9 @@
|
||||||
#ifndef SAVEDRADIO_H
|
#ifndef SAVEDRADIO_H
|
||||||
#define SAVEDRADIO_H
|
#define SAVEDRADIO_H
|
||||||
|
|
||||||
#include "internetservice.h"
|
#include <memory>
|
||||||
|
|
||||||
#include <boost/scoped_ptr.hpp>
|
#include "internetservice.h"
|
||||||
|
|
||||||
class QMenu;
|
class QMenu;
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ class SavedRadio : public InternetService {
|
||||||
|
|
||||||
StreamList streams_;
|
StreamList streams_;
|
||||||
|
|
||||||
boost::scoped_ptr<AddStreamDialog> edit_dialog_;
|
std::unique_ptr<AddStreamDialog> edit_dialog_;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // SAVEDRADIO_H
|
#endif // SAVEDRADIO_H
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
#include "skydriveservice.h"
|
#include "skydriveservice.h"
|
||||||
|
|
||||||
#include <boost/scoped_ptr.hpp>
|
#include <memory>
|
||||||
using boost::scoped_ptr;
|
|
||||||
|
|
||||||
#include <qjson/parser.h>
|
#include <qjson/parser.h>
|
||||||
|
|
||||||
|
@ -158,7 +157,7 @@ QUrl SkydriveService::GetStreamingUrlFromSongId(const QString& file_id) {
|
||||||
QUrl url(QString(kSkydriveBase) + file_id);
|
QUrl url(QString(kSkydriveBase) + file_id);
|
||||||
QNetworkRequest request(url);
|
QNetworkRequest request(url);
|
||||||
AddAuthorizationHeader(&request);
|
AddAuthorizationHeader(&request);
|
||||||
scoped_ptr<QNetworkReply> reply(network_->get(request));
|
std::unique_ptr<QNetworkReply> reply(network_->get(request));
|
||||||
WaitForSignal(reply.get(), SIGNAL(finished()));
|
WaitForSignal(reply.get(), SIGNAL(finished()));
|
||||||
|
|
||||||
QJson::Parser parser;
|
QJson::Parser parser;
|
||||||
|
|
|
@ -8,8 +8,6 @@
|
||||||
#include <QProcess>
|
#include <QProcess>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
|
||||||
#include <boost/shared_ptr.hpp>
|
|
||||||
|
|
||||||
class Playlist;
|
class Playlist;
|
||||||
class SearchBoxWidget;
|
class SearchBoxWidget;
|
||||||
class SpotifyServer;
|
class SpotifyServer;
|
||||||
|
|
|
@ -21,8 +21,6 @@
|
||||||
#include <QHash>
|
#include <QHash>
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
|
||||||
#include <boost/scoped_ptr.hpp>
|
|
||||||
|
|
||||||
class Application;
|
class Application;
|
||||||
class Database;
|
class Database;
|
||||||
class LibraryBackend;
|
class LibraryBackend;
|
||||||
|
|
|
@ -18,9 +18,9 @@
|
||||||
#ifndef LIBRARYFILTERWIDGET_H
|
#ifndef LIBRARYFILTERWIDGET_H
|
||||||
#define LIBRARYFILTERWIDGET_H
|
#define LIBRARYFILTERWIDGET_H
|
||||||
|
|
||||||
#include <QWidget>
|
#include <memory>
|
||||||
|
|
||||||
#include <boost/scoped_ptr.hpp>
|
#include <QWidget>
|
||||||
|
|
||||||
#include "librarymodel.h"
|
#include "librarymodel.h"
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@ class LibraryFilterWidget : public QWidget {
|
||||||
Ui_LibraryFilterWidget* ui_;
|
Ui_LibraryFilterWidget* ui_;
|
||||||
LibraryModel* model_;
|
LibraryModel* model_;
|
||||||
|
|
||||||
boost::scoped_ptr<GroupByDialog> group_by_dialog_;
|
std::unique_ptr<GroupByDialog> group_by_dialog_;
|
||||||
SettingsDialog* settings_dialog_;
|
SettingsDialog* settings_dialog_;
|
||||||
|
|
||||||
QMenu* filter_age_menu_;
|
QMenu* filter_age_menu_;
|
||||||
|
|
|
@ -32,8 +32,6 @@
|
||||||
#include "playlist/playlistmanager.h"
|
#include "playlist/playlistmanager.h"
|
||||||
#include "smartplaylists/generator_fwd.h"
|
#include "smartplaylists/generator_fwd.h"
|
||||||
|
|
||||||
#include <boost/scoped_ptr.hpp>
|
|
||||||
|
|
||||||
class Application;
|
class Application;
|
||||||
class AlbumCoverLoader;
|
class AlbumCoverLoader;
|
||||||
class LibraryDirectoryModel;
|
class LibraryDirectoryModel;
|
||||||
|
|
|
@ -18,13 +18,13 @@
|
||||||
#ifndef LIBRARYVIEW_H
|
#ifndef LIBRARYVIEW_H
|
||||||
#define LIBRARYVIEW_H
|
#define LIBRARYVIEW_H
|
||||||
|
|
||||||
#include "core/song.h"
|
#include <memory>
|
||||||
#include "ui/edittagdialog.h"
|
|
||||||
#include "widgets/autoexpandingtreeview.h"
|
|
||||||
|
|
||||||
#include <QStyledItemDelegate>
|
#include <QStyledItemDelegate>
|
||||||
|
|
||||||
#include <boost/scoped_ptr.hpp>
|
#include "core/song.h"
|
||||||
|
#include "ui/edittagdialog.h"
|
||||||
|
#include "widgets/autoexpandingtreeview.h"
|
||||||
|
|
||||||
class Application;
|
class Application;
|
||||||
class LibraryFilterWidget;
|
class LibraryFilterWidget;
|
||||||
|
@ -140,8 +140,8 @@ class LibraryView : public AutoExpandingTreeView {
|
||||||
QAction* edit_smart_playlist_;
|
QAction* edit_smart_playlist_;
|
||||||
QAction* delete_smart_playlist_;
|
QAction* delete_smart_playlist_;
|
||||||
|
|
||||||
boost::scoped_ptr<OrganiseDialog> organise_dialog_;
|
std::unique_ptr<OrganiseDialog> organise_dialog_;
|
||||||
boost::scoped_ptr<EditTagDialog> edit_tag_dialog_;
|
std::unique_ptr<EditTagDialog> edit_tag_dialog_;
|
||||||
|
|
||||||
bool is_in_keyboard_search_;
|
bool is_in_keyboard_search_;
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
#include "moodbarloader.h"
|
#include "moodbarloader.h"
|
||||||
|
|
||||||
#include <boost/scoped_ptr.hpp>
|
#include <memory>
|
||||||
|
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
|
@ -101,7 +101,7 @@ MoodbarLoader::Result MoodbarLoader::Load(
|
||||||
}
|
}
|
||||||
|
|
||||||
// Maybe it exists in the cache?
|
// Maybe it exists in the cache?
|
||||||
boost::scoped_ptr<QIODevice> cache_device(cache_->data(url));
|
std::unique_ptr<QIODevice> cache_device(cache_->data(url));
|
||||||
if (cache_device) {
|
if (cache_device) {
|
||||||
qLog(Info) << "Loading cached moodbar data for" << filename;
|
qLog(Info) << "Loading cached moodbar data for" << filename;
|
||||||
*data = cache_device->readAll();
|
*data = cache_device->readAll();
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef NETWORKREMOTE_H
|
#ifndef NETWORKREMOTE_H
|
||||||
#define NETWORKREMOTE_H
|
#define NETWORKREMOTE_H
|
||||||
|
|
||||||
#include <boost/scoped_ptr.hpp>
|
#include <memory>
|
||||||
|
|
||||||
#include <QTcpServer>
|
#include <QTcpServer>
|
||||||
#include <QTcpSocket>
|
#include <QTcpSocket>
|
||||||
|
@ -30,10 +30,10 @@ public slots:
|
||||||
void SendKitten(quint64 id, const QImage& kitten);
|
void SendKitten(quint64 id, const QImage& kitten);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
boost::scoped_ptr<QTcpServer> server_;
|
std::unique_ptr<QTcpServer> server_;
|
||||||
boost::scoped_ptr<QTcpServer> server_ipv6_;
|
std::unique_ptr<QTcpServer> server_ipv6_;
|
||||||
boost::scoped_ptr<IncomingDataParser> incoming_data_parser_;
|
std::unique_ptr<IncomingDataParser> incoming_data_parser_;
|
||||||
boost::scoped_ptr<OutgoingDataCreator> outgoing_data_creator_;
|
std::unique_ptr<OutgoingDataCreator> outgoing_data_creator_;
|
||||||
|
|
||||||
quint16 port_;
|
quint16 port_;
|
||||||
bool use_remote_;
|
bool use_remote_;
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
#ifndef OUTGOINGDATACREATOR_H
|
#ifndef OUTGOINGDATACREATOR_H
|
||||||
#define OUTGOINGDATACREATOR_H
|
#define OUTGOINGDATACREATOR_H
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include <QTcpSocket>
|
#include <QTcpSocket>
|
||||||
#include <QImage>
|
#include <QImage>
|
||||||
#include <QList>
|
#include <QList>
|
||||||
|
@ -24,7 +26,6 @@
|
||||||
#include "songinfo/ultimatelyricsreader.h"
|
#include "songinfo/ultimatelyricsreader.h"
|
||||||
#include "remotecontrolmessages.pb.h"
|
#include "remotecontrolmessages.pb.h"
|
||||||
#include "remoteclient.h"
|
#include "remoteclient.h"
|
||||||
#include <boost/scoped_ptr.hpp>
|
|
||||||
|
|
||||||
typedef QList<SongInfoProvider*> ProviderList;
|
typedef QList<SongInfoProvider*> ProviderList;
|
||||||
|
|
||||||
|
@ -91,7 +92,7 @@ private:
|
||||||
int last_track_position_;
|
int last_track_position_;
|
||||||
bool aww_;
|
bool aww_;
|
||||||
|
|
||||||
boost::scoped_ptr<UltimateLyricsReader> ultimate_reader_;
|
std::unique_ptr<UltimateLyricsReader> ultimate_reader_;
|
||||||
ProviderList provider_list_;
|
ProviderList provider_list_;
|
||||||
QMap<int, SongInfoFetcher::Result> results_;
|
QMap<int, SongInfoFetcher::Result> results_;
|
||||||
SongInfoFetcher* fetcher_;
|
SongInfoFetcher* fetcher_;
|
||||||
|
|
|
@ -21,8 +21,6 @@
|
||||||
#include <QAbstractItemModel>
|
#include <QAbstractItemModel>
|
||||||
#include <QList>
|
#include <QList>
|
||||||
|
|
||||||
#include <boost/shared_ptr.hpp>
|
|
||||||
|
|
||||||
#include "playlistitem.h"
|
#include "playlistitem.h"
|
||||||
#include "playlistsequence.h"
|
#include "playlistsequence.h"
|
||||||
#include "core/tagreaderclient.h"
|
#include "core/tagreaderclient.h"
|
||||||
|
|
|
@ -18,12 +18,12 @@
|
||||||
#ifndef PLAYLISTSEQUENCE_H
|
#ifndef PLAYLISTSEQUENCE_H
|
||||||
#define PLAYLISTSEQUENCE_H
|
#define PLAYLISTSEQUENCE_H
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
|
||||||
#include "core/settingsprovider.h"
|
#include "core/settingsprovider.h"
|
||||||
|
|
||||||
#include <boost/scoped_ptr.hpp>
|
|
||||||
|
|
||||||
class QMenu;
|
class QMenu;
|
||||||
|
|
||||||
class Ui_PlaylistSequence;
|
class Ui_PlaylistSequence;
|
||||||
|
@ -79,7 +79,7 @@ class PlaylistSequence : public QWidget {
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui_PlaylistSequence* ui_;
|
Ui_PlaylistSequence* ui_;
|
||||||
boost::scoped_ptr<SettingsProvider> settings_;
|
std::unique_ptr<SettingsProvider> settings_;
|
||||||
|
|
||||||
QMenu* repeat_menu_;
|
QMenu* repeat_menu_;
|
||||||
QMenu* shuffle_menu_;
|
QMenu* shuffle_menu_;
|
||||||
|
|
|
@ -18,13 +18,13 @@
|
||||||
#ifndef PLAYLISTVIEW_H
|
#ifndef PLAYLISTVIEW_H
|
||||||
#define PLAYLISTVIEW_H
|
#define PLAYLISTVIEW_H
|
||||||
|
|
||||||
#include "playlist.h"
|
#include <memory>
|
||||||
|
|
||||||
#include <QBasicTimer>
|
#include <QBasicTimer>
|
||||||
#include <QProxyStyle>
|
#include <QProxyStyle>
|
||||||
#include <QTreeView>
|
#include <QTreeView>
|
||||||
|
|
||||||
#include <boost/scoped_ptr.hpp>
|
#include "playlist.h"
|
||||||
|
|
||||||
class QCleanlooksStyle;
|
class QCleanlooksStyle;
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ public:
|
||||||
QPainter* painter, const QWidget* widget) const;
|
QPainter* painter, const QWidget* widget) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
boost::scoped_ptr<QCleanlooksStyle> cleanlooks_;
|
std::unique_ptr<QCleanlooksStyle> cleanlooks_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -23,8 +23,6 @@
|
||||||
#include <QXmlStreamReader>
|
#include <QXmlStreamReader>
|
||||||
#include <QXmlStreamWriter>
|
#include <QXmlStreamWriter>
|
||||||
|
|
||||||
#include <boost/noncopyable.hpp>
|
|
||||||
|
|
||||||
class QDomDocument;
|
class QDomDocument;
|
||||||
class QDomNode;
|
class QDomNode;
|
||||||
|
|
||||||
|
@ -32,7 +30,7 @@ class XMLParser : public ParserBase {
|
||||||
protected:
|
protected:
|
||||||
XMLParser(LibraryBackendInterface* library, QObject* parent);
|
XMLParser(LibraryBackendInterface* library, QObject* parent);
|
||||||
|
|
||||||
class StreamElement : public boost::noncopyable {
|
class StreamElement {
|
||||||
public:
|
public:
|
||||||
StreamElement(const QString& name, QXmlStreamWriter* stream) : stream_(stream) {
|
StreamElement(const QString& name, QXmlStreamWriter* stream) : stream_(stream) {
|
||||||
stream->writeStartElement(name);
|
stream->writeStartElement(name);
|
||||||
|
@ -44,6 +42,7 @@ class XMLParser : public ParserBase {
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QXmlStreamWriter* stream_;
|
QXmlStreamWriter* stream_;
|
||||||
|
Q_DISABLE_COPY(StreamElement);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -20,14 +20,13 @@
|
||||||
|
|
||||||
#include "playlist/playlistitem.h"
|
#include "playlist/playlistitem.h"
|
||||||
|
|
||||||
#include <boost/enable_shared_from_this.hpp>
|
#include <memory>
|
||||||
#include <boost/shared_ptr.hpp>
|
|
||||||
|
|
||||||
class LibraryBackend;
|
class LibraryBackend;
|
||||||
|
|
||||||
namespace smart_playlists {
|
namespace smart_playlists {
|
||||||
|
|
||||||
class Generator : public QObject, public boost::enable_shared_from_this<Generator> {
|
class Generator : public QObject, public std::enable_shared_from_this<Generator> {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -38,7 +37,7 @@ public:
|
||||||
static const int kDefaultDynamicFuture;
|
static const int kDefaultDynamicFuture;
|
||||||
|
|
||||||
// Creates a new Generator of the given type
|
// Creates a new Generator of the given type
|
||||||
static boost::shared_ptr<Generator> Create(const QString& type);
|
static std::shared_ptr<Generator> Create(const QString& type);
|
||||||
|
|
||||||
// Should be called before Load on a new Generator
|
// Should be called before Load on a new Generator
|
||||||
void set_library(LibraryBackend* backend) { backend_ = backend; }
|
void set_library(LibraryBackend* backend) { backend_ = backend; }
|
||||||
|
|
|
@ -18,13 +18,13 @@
|
||||||
#ifndef PLAYLISTGENERATOR_FWD_H
|
#ifndef PLAYLISTGENERATOR_FWD_H
|
||||||
#define PLAYLISTGENERATOR_FWD_H
|
#define PLAYLISTGENERATOR_FWD_H
|
||||||
|
|
||||||
#include <boost/shared_ptr.hpp>
|
#include <memory>
|
||||||
|
|
||||||
namespace smart_playlists {
|
namespace smart_playlists {
|
||||||
|
|
||||||
class Generator;
|
class Generator;
|
||||||
|
|
||||||
typedef boost::shared_ptr<Generator> GeneratorPtr;
|
typedef std::shared_ptr<Generator> GeneratorPtr;
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,7 @@ public:
|
||||||
|
|
||||||
SearchPreview* preview_;
|
SearchPreview* preview_;
|
||||||
|
|
||||||
boost::scoped_ptr<Ui_SmartPlaylistQuerySearchPage> ui_;
|
std::unique_ptr<Ui_SmartPlaylistQuerySearchPage> ui_;
|
||||||
};
|
};
|
||||||
|
|
||||||
class QueryWizardPlugin::SortPage : public QWizardPage {
|
class QueryWizardPlugin::SortPage : public QWizardPage {
|
||||||
|
@ -161,8 +161,8 @@ int QueryWizardPlugin::CreatePages(QWizard* wizard, int finish_page_id) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void QueryWizardPlugin::SetGenerator(GeneratorPtr g) {
|
void QueryWizardPlugin::SetGenerator(GeneratorPtr g) {
|
||||||
boost::shared_ptr<QueryGenerator> gen =
|
std::shared_ptr<QueryGenerator> gen =
|
||||||
boost::dynamic_pointer_cast<QueryGenerator>(g);
|
std::dynamic_pointer_cast<QueryGenerator>(g);
|
||||||
if (!gen)
|
if (!gen)
|
||||||
return;
|
return;
|
||||||
Search search = gen->search();
|
Search search = gen->search();
|
||||||
|
@ -198,10 +198,10 @@ void QueryWizardPlugin::SetGenerator(GeneratorPtr g) {
|
||||||
}
|
}
|
||||||
|
|
||||||
GeneratorPtr QueryWizardPlugin::CreateGenerator() const {
|
GeneratorPtr QueryWizardPlugin::CreateGenerator() const {
|
||||||
boost::shared_ptr<QueryGenerator> gen(new QueryGenerator);
|
std::shared_ptr<QueryGenerator> gen(new QueryGenerator);
|
||||||
gen->Load(MakeSearch());
|
gen->Load(MakeSearch());
|
||||||
|
|
||||||
return boost::static_pointer_cast<Generator>(gen);
|
return std::static_pointer_cast<Generator>(gen);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QueryWizardPlugin::UpdateSortOrder() {
|
void QueryWizardPlugin::UpdateSortOrder() {
|
||||||
|
|
|
@ -18,12 +18,13 @@
|
||||||
#ifndef QUERYWIZARDPLUGIN_H
|
#ifndef QUERYWIZARDPLUGIN_H
|
||||||
#define QUERYWIZARDPLUGIN_H
|
#define QUERYWIZARDPLUGIN_H
|
||||||
|
|
||||||
#include "search.h"
|
|
||||||
#include "wizardplugin.h"
|
#include "wizardplugin.h"
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include <QWizard>
|
#include <QWizard>
|
||||||
|
|
||||||
#include <boost/scoped_ptr.hpp>
|
#include "search.h"
|
||||||
|
|
||||||
class Ui_SmartPlaylistQuerySearchPage;
|
class Ui_SmartPlaylistQuerySearchPage;
|
||||||
class Ui_SmartPlaylistQuerySortPage;
|
class Ui_SmartPlaylistQuerySortPage;
|
||||||
|
@ -70,7 +71,7 @@ private:
|
||||||
Search MakeSearch() const;
|
Search MakeSearch() const;
|
||||||
|
|
||||||
SearchPage* search_page_;
|
SearchPage* search_page_;
|
||||||
boost::scoped_ptr<Ui_SmartPlaylistQuerySortPage> sort_ui_;
|
std::unique_ptr<Ui_SmartPlaylistQuerySortPage> sort_ui_;
|
||||||
|
|
||||||
int previous_scrollarea_max_;
|
int previous_scrollarea_max_;
|
||||||
};
|
};
|
||||||
|
|
|
@ -15,14 +15,17 @@
|
||||||
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "querygenerator.h"
|
|
||||||
#include "searchpreview.h"
|
#include "searchpreview.h"
|
||||||
#include "ui_searchpreview.h"
|
#include "ui_searchpreview.h"
|
||||||
#include "playlist/playlist.h"
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include <QFutureWatcher>
|
#include <QFutureWatcher>
|
||||||
#include <QtConcurrentRun>
|
#include <QtConcurrentRun>
|
||||||
|
|
||||||
|
#include "querygenerator.h"
|
||||||
|
#include "playlist/playlist.h"
|
||||||
|
|
||||||
namespace smart_playlists {
|
namespace smart_playlists {
|
||||||
|
|
||||||
typedef QFuture<PlaylistItemList> Future;
|
typedef QFuture<PlaylistItemList> Future;
|
||||||
|
@ -94,7 +97,7 @@ PlaylistItemList DoRunSearch(GeneratorPtr gen) {
|
||||||
void SearchPreview::RunSearch(const Search& search) {
|
void SearchPreview::RunSearch(const Search& search) {
|
||||||
generator_.reset(new QueryGenerator);
|
generator_.reset(new QueryGenerator);
|
||||||
generator_->set_library(backend_);
|
generator_->set_library(backend_);
|
||||||
boost::dynamic_pointer_cast<QueryGenerator>(generator_)->Load(search);
|
std::dynamic_pointer_cast<QueryGenerator>(generator_)->Load(search);
|
||||||
|
|
||||||
ui_->busy_container->show();
|
ui_->busy_container->show();
|
||||||
ui_->count_label->hide();
|
ui_->count_label->hide();
|
||||||
|
@ -109,7 +112,7 @@ void SearchPreview::SearchFinished() {
|
||||||
FutureWatcher* watcher = static_cast<FutureWatcher*>(sender());
|
FutureWatcher* watcher = static_cast<FutureWatcher*>(sender());
|
||||||
watcher->deleteLater();
|
watcher->deleteLater();
|
||||||
|
|
||||||
last_search_ = boost::dynamic_pointer_cast<QueryGenerator>(generator_)->search();
|
last_search_ = std::dynamic_pointer_cast<QueryGenerator>(generator_)->search();
|
||||||
generator_.reset();
|
generator_.reset();
|
||||||
|
|
||||||
if (pending_search_.is_valid() && pending_search_ != last_search_) {
|
if (pending_search_.is_valid() && pending_search_ != last_search_) {
|
||||||
|
|
|
@ -16,18 +16,19 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "echonestbiographies.h"
|
#include "echonestbiographies.h"
|
||||||
#include "songinfotextview.h"
|
|
||||||
#include "core/logging.h"
|
#include <memory>
|
||||||
|
|
||||||
#include <echonest/Artist.h>
|
#include <echonest/Artist.h>
|
||||||
|
|
||||||
#include <boost/scoped_ptr.hpp>
|
#include "songinfotextview.h"
|
||||||
|
#include "core/logging.h"
|
||||||
|
|
||||||
struct EchoNestBiographies::Request {
|
struct EchoNestBiographies::Request {
|
||||||
Request(int id) : id_(id), artist_(new Echonest::Artist) {}
|
Request(int id) : id_(id), artist_(new Echonest::Artist) {}
|
||||||
|
|
||||||
int id_;
|
int id_;
|
||||||
boost::scoped_ptr<Echonest::Artist> artist_;
|
std::unique_ptr<Echonest::Artist> artist_;
|
||||||
};
|
};
|
||||||
|
|
||||||
EchoNestBiographies::EchoNestBiographies() {
|
EchoNestBiographies::EchoNestBiographies() {
|
||||||
|
@ -46,7 +47,7 @@ EchoNestBiographies::EchoNestBiographies() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void EchoNestBiographies::FetchInfo(int id, const Song& metadata) {
|
void EchoNestBiographies::FetchInfo(int id, const Song& metadata) {
|
||||||
boost::shared_ptr<Request> request(new Request(id));
|
std::shared_ptr<Request> request(new Request(id));
|
||||||
request->artist_->setName(metadata.artist());
|
request->artist_->setName(metadata.artist());
|
||||||
|
|
||||||
QNetworkReply* reply = request->artist_->fetchBiographies();
|
QNetworkReply* reply = request->artist_->fetchBiographies();
|
||||||
|
@ -70,7 +71,7 @@ void EchoNestBiographies::RequestFinished() {
|
||||||
|
|
||||||
QSet<QString> already_seen;
|
QSet<QString> already_seen;
|
||||||
|
|
||||||
foreach (const Echonest::Biography& bio, request->artist_->biographies()) {
|
for (const Echonest::Biography& bio : request->artist_->biographies()) {
|
||||||
QString canonical_site = bio.site().toLower();
|
QString canonical_site = bio.site().toLower();
|
||||||
canonical_site.replace(QRegExp("[^a-z]"),"");
|
canonical_site.replace(QRegExp("[^a-z]"),"");
|
||||||
|
|
||||||
|
|
|
@ -18,9 +18,9 @@
|
||||||
#ifndef ECHONESTBIOGRAPHIES_H
|
#ifndef ECHONESTBIOGRAPHIES_H
|
||||||
#define ECHONESTBIOGRAPHIES_H
|
#define ECHONESTBIOGRAPHIES_H
|
||||||
|
|
||||||
#include "songinfoprovider.h"
|
#include <memory>
|
||||||
|
|
||||||
#include <boost/shared_ptr.hpp>
|
#include "songinfoprovider.h"
|
||||||
|
|
||||||
class QNetworkReply;
|
class QNetworkReply;
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ private:
|
||||||
QMap<QString, QIcon> site_icons_;
|
QMap<QString, QIcon> site_icons_;
|
||||||
|
|
||||||
struct Request;
|
struct Request;
|
||||||
typedef boost::shared_ptr<Request> RequestPtr;
|
typedef std::shared_ptr<Request> RequestPtr;
|
||||||
|
|
||||||
QMap<QNetworkReply*, RequestPtr> requests_;
|
QMap<QNetworkReply*, RequestPtr> requests_;
|
||||||
};
|
};
|
||||||
|
|
|
@ -16,21 +16,22 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "echonestimages.h"
|
#include "echonestimages.h"
|
||||||
#include "core/logging.h"
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include <echonest/Artist.h>
|
#include <echonest/Artist.h>
|
||||||
|
|
||||||
#include <boost/scoped_ptr.hpp>
|
#include "core/logging.h"
|
||||||
|
|
||||||
struct EchoNestImages::Request {
|
struct EchoNestImages::Request {
|
||||||
Request(int id) : id_(id), artist_(new Echonest::Artist) {}
|
Request(int id) : id_(id), artist_(new Echonest::Artist) {}
|
||||||
|
|
||||||
int id_;
|
int id_;
|
||||||
boost::scoped_ptr<Echonest::Artist> artist_;
|
std::unique_ptr<Echonest::Artist> artist_;
|
||||||
};
|
};
|
||||||
|
|
||||||
void EchoNestImages::FetchInfo(int id, const Song& metadata) {
|
void EchoNestImages::FetchInfo(int id, const Song& metadata) {
|
||||||
boost::shared_ptr<Request> request(new Request(id));
|
std::shared_ptr<Request> request(new Request(id));
|
||||||
request->artist_->setName(metadata.artist());
|
request->artist_->setName(metadata.artist());
|
||||||
|
|
||||||
QNetworkReply* reply = request->artist_->fetchImages();
|
QNetworkReply* reply = request->artist_->fetchImages();
|
||||||
|
|
|
@ -18,9 +18,9 @@
|
||||||
#ifndef ECHONESTIMAGES_H
|
#ifndef ECHONESTIMAGES_H
|
||||||
#define ECHONESTIMAGES_H
|
#define ECHONESTIMAGES_H
|
||||||
|
|
||||||
#include "songinfoprovider.h"
|
#include <memory>
|
||||||
|
|
||||||
#include <boost/shared_ptr.hpp>
|
#include "songinfoprovider.h"
|
||||||
|
|
||||||
class QNetworkReply;
|
class QNetworkReply;
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ private slots:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
struct Request;
|
struct Request;
|
||||||
typedef boost::shared_ptr<Request> RequestPtr;
|
typedef std::shared_ptr<Request> RequestPtr;
|
||||||
|
|
||||||
QMap<QNetworkReply*, RequestPtr> requests_;
|
QMap<QNetworkReply*, RequestPtr> requests_;
|
||||||
};
|
};
|
||||||
|
|
|
@ -16,22 +16,23 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "echonesttags.h"
|
#include "echonesttags.h"
|
||||||
#include "tagwidget.h"
|
|
||||||
#include "core/logging.h"
|
#include <memory>
|
||||||
|
|
||||||
#include <echonest/Artist.h>
|
#include <echonest/Artist.h>
|
||||||
|
|
||||||
#include <boost/scoped_ptr.hpp>
|
#include "tagwidget.h"
|
||||||
|
#include "core/logging.h"
|
||||||
|
|
||||||
struct EchoNestTags::Request {
|
struct EchoNestTags::Request {
|
||||||
Request(int id) : id_(id), artist_(new Echonest::Artist) {}
|
Request(int id) : id_(id), artist_(new Echonest::Artist) {}
|
||||||
|
|
||||||
int id_;
|
int id_;
|
||||||
boost::scoped_ptr<Echonest::Artist> artist_;
|
std::unique_ptr<Echonest::Artist> artist_;
|
||||||
};
|
};
|
||||||
|
|
||||||
void EchoNestTags::FetchInfo(int id, const Song& metadata) {
|
void EchoNestTags::FetchInfo(int id, const Song& metadata) {
|
||||||
boost::shared_ptr<Request> request(new Request(id));
|
std::shared_ptr<Request> request(new Request(id));
|
||||||
request->artist_->setName(metadata.artist());
|
request->artist_->setName(metadata.artist());
|
||||||
|
|
||||||
QNetworkReply* reply = request->artist_->fetchTerms();
|
QNetworkReply* reply = request->artist_->fetchTerms();
|
||||||
|
@ -65,7 +66,7 @@ void EchoNestTags::RequestFinished() {
|
||||||
|
|
||||||
widget->SetIcon(data.icon_);
|
widget->SetIcon(data.icon_);
|
||||||
|
|
||||||
foreach (const Echonest::Term& term, request->artist_->terms()) {
|
for (const Echonest::Term& term : request->artist_->terms()) {
|
||||||
widget->AddTag(term.name());
|
widget->AddTag(term.name());
|
||||||
if (widget->count() >= 10)
|
if (widget->count() >= 10)
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -18,9 +18,9 @@
|
||||||
#ifndef ECHONESTTAGS_H
|
#ifndef ECHONESTTAGS_H
|
||||||
#define ECHONESTTAGS_H
|
#define ECHONESTTAGS_H
|
||||||
|
|
||||||
#include "songinfoprovider.h"
|
#include <memory>
|
||||||
|
|
||||||
#include <boost/shared_ptr.hpp>
|
#include "songinfoprovider.h"
|
||||||
|
|
||||||
class QNetworkReply;
|
class QNetworkReply;
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ private slots:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
struct Request;
|
struct Request;
|
||||||
typedef boost::shared_ptr<Request> RequestPtr;
|
typedef std::shared_ptr<Request> RequestPtr;
|
||||||
|
|
||||||
QMap<QNetworkReply*, RequestPtr> requests_;
|
QMap<QNetworkReply*, RequestPtr> requests_;
|
||||||
};
|
};
|
||||||
|
|
|
@ -18,9 +18,9 @@
|
||||||
#ifndef SONGINFOVIEW_H
|
#ifndef SONGINFOVIEW_H
|
||||||
#define SONGINFOVIEW_H
|
#define SONGINFOVIEW_H
|
||||||
|
|
||||||
#include "songinfobase.h"
|
#include <memory>
|
||||||
|
|
||||||
#include <boost/scoped_ptr.hpp>
|
#include "songinfobase.h"
|
||||||
|
|
||||||
class UltimateLyricsProvider;
|
class UltimateLyricsProvider;
|
||||||
class UltimateLyricsReader;
|
class UltimateLyricsReader;
|
||||||
|
@ -52,7 +52,7 @@ private slots:
|
||||||
void UltimateLyricsParsed();
|
void UltimateLyricsParsed();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
boost::scoped_ptr<UltimateLyricsReader> ultimate_reader_;
|
std::unique_ptr<UltimateLyricsReader> ultimate_reader_;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // SONGINFOVIEW_H
|
#endif // SONGINFOVIEW_H
|
||||||
|
|
|
@ -26,8 +26,6 @@
|
||||||
#include <QTextCodec>
|
#include <QTextCodec>
|
||||||
#include <QThread>
|
#include <QThread>
|
||||||
|
|
||||||
#include <boost/scoped_ptr.hpp>
|
|
||||||
|
|
||||||
const int UltimateLyricsProvider::kRedirectLimit = 5;
|
const int UltimateLyricsProvider::kRedirectLimit = 5;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -211,7 +211,7 @@ void AlbumCoverManager::showEvent(QShowEvent *) {
|
||||||
|
|
||||||
void AlbumCoverManager::closeEvent(QCloseEvent* e) {
|
void AlbumCoverManager::closeEvent(QCloseEvent* e) {
|
||||||
if (!cover_fetching_tasks_.isEmpty()) {
|
if (!cover_fetching_tasks_.isEmpty()) {
|
||||||
boost::scoped_ptr<QMessageBox> message_box(new QMessageBox(
|
std::unique_ptr<QMessageBox> message_box(new QMessageBox(
|
||||||
QMessageBox::Question, tr("Really cancel?"),
|
QMessageBox::Question, tr("Really cancel?"),
|
||||||
tr("Closing this window will stop searching for album covers."),
|
tr("Closing this window will stop searching for album covers."),
|
||||||
QMessageBox::Abort, this));
|
QMessageBox::Abort, this));
|
||||||
|
|
|
@ -15,16 +15,17 @@
|
||||||
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "albumcovermanager.h"
|
|
||||||
#include "albumcovermanagerlist.h"
|
#include "albumcovermanagerlist.h"
|
||||||
#include "library/librarybackend.h"
|
|
||||||
#include "playlist/songmimedata.h"
|
|
||||||
|
|
||||||
#include <boost/scoped_ptr.hpp>
|
#include <memory>
|
||||||
|
|
||||||
#include <QDropEvent>
|
#include <QDropEvent>
|
||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
|
|
||||||
|
#include "albumcovermanager.h"
|
||||||
|
#include "library/librarybackend.h"
|
||||||
|
#include "playlist/songmimedata.h"
|
||||||
|
|
||||||
AlbumCoverManagerList::AlbumCoverManagerList(QWidget *parent)
|
AlbumCoverManagerList::AlbumCoverManagerList(QWidget *parent)
|
||||||
: QListWidget(parent),
|
: QListWidget(parent),
|
||||||
manager_(NULL)
|
manager_(NULL)
|
||||||
|
@ -48,7 +49,7 @@ QMimeData* AlbumCoverManagerList::mimeData(const QList<QListWidgetItem*> items)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the QAbstractItemModel data so the picture works
|
// Get the QAbstractItemModel data so the picture works
|
||||||
boost::scoped_ptr<QMimeData> orig_data(QListWidget::mimeData(items));
|
std::unique_ptr<QMimeData> orig_data(QListWidget::mimeData(items));
|
||||||
|
|
||||||
SongMimeData* mime_data = new SongMimeData;
|
SongMimeData* mime_data = new SongMimeData;
|
||||||
mime_data->backend = manager_->backend();
|
mime_data->backend = manager_->backend();
|
||||||
|
|
|
@ -18,14 +18,12 @@
|
||||||
#ifndef ALBUMCOVERSEARCHER_H
|
#ifndef ALBUMCOVERSEARCHER_H
|
||||||
#define ALBUMCOVERSEARCHER_H
|
#define ALBUMCOVERSEARCHER_H
|
||||||
|
|
||||||
#include "covers/albumcoverfetcher.h"
|
|
||||||
#include "covers/albumcoverloaderoptions.h"
|
|
||||||
|
|
||||||
#include <QDialog>
|
#include <QDialog>
|
||||||
#include <QIcon>
|
#include <QIcon>
|
||||||
#include <QStyledItemDelegate>
|
#include <QStyledItemDelegate>
|
||||||
|
|
||||||
#include <boost/shared_ptr.hpp>
|
#include "covers/albumcoverfetcher.h"
|
||||||
|
#include "covers/albumcoverloaderoptions.h"
|
||||||
|
|
||||||
class AlbumCoverLoader;
|
class AlbumCoverLoader;
|
||||||
class Application;
|
class Application;
|
||||||
|
@ -35,7 +33,6 @@ class QModelIndex;
|
||||||
class QStandardItem;
|
class QStandardItem;
|
||||||
class QStandardItemModel;
|
class QStandardItemModel;
|
||||||
|
|
||||||
|
|
||||||
class SizeOverlayDelegate : public QStyledItemDelegate {
|
class SizeOverlayDelegate : public QStyledItemDelegate {
|
||||||
public:
|
public:
|
||||||
static const int kMargin;
|
static const int kMargin;
|
||||||
|
|
|
@ -24,11 +24,9 @@
|
||||||
|
|
||||||
#include <QKeySequence>
|
#include <QKeySequence>
|
||||||
|
|
||||||
#include <boost/noncopyable.hpp>
|
|
||||||
|
|
||||||
#import "core/mac_utilities.h"
|
#import "core/mac_utilities.h"
|
||||||
|
|
||||||
class MacMonitorWrapper : boost::noncopyable {
|
class MacMonitorWrapper {
|
||||||
public:
|
public:
|
||||||
explicit MacMonitorWrapper(id monitor)
|
explicit MacMonitorWrapper(id monitor)
|
||||||
: local_monitor_(monitor) {
|
: local_monitor_(monitor) {
|
||||||
|
@ -40,6 +38,7 @@ class MacMonitorWrapper : boost::noncopyable {
|
||||||
|
|
||||||
private:
|
private:
|
||||||
id local_monitor_;
|
id local_monitor_;
|
||||||
|
Q_DISABLE_COPY(MacMonitorWrapper);
|
||||||
};
|
};
|
||||||
|
|
||||||
bool GlobalShortcutGrabber::HandleMacEvent(NSEvent* event) {
|
bool GlobalShortcutGrabber::HandleMacEvent(NSEvent* event) {
|
||||||
|
|
|
@ -18,11 +18,11 @@
|
||||||
#ifndef GLOBALSHORTCUTSSETTINGSPAGE_H
|
#ifndef GLOBALSHORTCUTSSETTINGSPAGE_H
|
||||||
#define GLOBALSHORTCUTSSETTINGSPAGE_H
|
#define GLOBALSHORTCUTSSETTINGSPAGE_H
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include <QMap>
|
#include <QMap>
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
|
|
||||||
#include <boost/scoped_ptr.hpp>
|
|
||||||
|
|
||||||
#include "core/globalshortcuts.h"
|
#include "core/globalshortcuts.h"
|
||||||
#include "ui/settingspage.h"
|
#include "ui/settingspage.h"
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ private:
|
||||||
Ui_GlobalShortcutsSettingsPage* ui_;
|
Ui_GlobalShortcutsSettingsPage* ui_;
|
||||||
|
|
||||||
bool initialised_;
|
bool initialised_;
|
||||||
boost::scoped_ptr<GlobalShortcutGrabber> grabber_;
|
std::unique_ptr<GlobalShortcutGrabber> grabber_;
|
||||||
|
|
||||||
QSettings settings_;
|
QSettings settings_;
|
||||||
QMap<QString, Shortcut> shortcuts_;
|
QMap<QString, Shortcut> shortcuts_;
|
||||||
|
|
|
@ -18,14 +18,13 @@
|
||||||
#ifndef MACSYSTEMTRAYICON_H
|
#ifndef MACSYSTEMTRAYICON_H
|
||||||
#define MACSYSTEMTRAYICON_H
|
#define MACSYSTEMTRAYICON_H
|
||||||
|
|
||||||
#include "systemtrayicon.h"
|
#include <memory>
|
||||||
|
|
||||||
#include <boost/noncopyable.hpp>
|
#include "systemtrayicon.h"
|
||||||
#include <boost/scoped_ptr.hpp>
|
|
||||||
|
|
||||||
class MacSystemTrayIconPrivate;
|
class MacSystemTrayIconPrivate;
|
||||||
|
|
||||||
class MacSystemTrayIcon : public SystemTrayIcon, boost::noncopyable {
|
class MacSystemTrayIcon : public SystemTrayIcon {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -52,8 +51,8 @@ protected:
|
||||||
private:
|
private:
|
||||||
QPixmap orange_icon_;
|
QPixmap orange_icon_;
|
||||||
QPixmap grey_icon_;
|
QPixmap grey_icon_;
|
||||||
|
std::unique_ptr<MacSystemTrayIconPrivate> p_;
|
||||||
boost::scoped_ptr<MacSystemTrayIconPrivate> p_;
|
Q_DISABLE_COPY(MacSystemTrayIcon);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // MACSYSTEMTRAYICON_H
|
#endif // MACSYSTEMTRAYICON_H
|
||||||
|
|
|
@ -56,7 +56,7 @@
|
||||||
}
|
}
|
||||||
@end
|
@end
|
||||||
|
|
||||||
class MacSystemTrayIconPrivate : boost::noncopyable {
|
class MacSystemTrayIconPrivate {
|
||||||
public:
|
public:
|
||||||
MacSystemTrayIconPrivate() {
|
MacSystemTrayIconPrivate() {
|
||||||
dock_menu_ = [[NSMenu alloc] initWithTitle:@"DockMenu"];
|
dock_menu_ = [[NSMenu alloc] initWithTitle:@"DockMenu"];
|
||||||
|
@ -153,6 +153,8 @@ class MacSystemTrayIconPrivate : boost::noncopyable {
|
||||||
NSMenuItem* now_playing_;
|
NSMenuItem* now_playing_;
|
||||||
NSMenuItem* now_playing_artist_;
|
NSMenuItem* now_playing_artist_;
|
||||||
NSMenuItem* now_playing_title_;
|
NSMenuItem* now_playing_title_;
|
||||||
|
|
||||||
|
Q_DISABLE_COPY(MacSystemTrayIconPrivate);
|
||||||
};
|
};
|
||||||
|
|
||||||
MacSystemTrayIcon::MacSystemTrayIcon(QObject* parent)
|
MacSystemTrayIcon::MacSystemTrayIcon(QObject* parent)
|
||||||
|
|
|
@ -174,18 +174,8 @@ MainWindow::MainWindow(Application* app,
|
||||||
device_view_(new DeviceView(this)),
|
device_view_(new DeviceView(this)),
|
||||||
song_info_view_(new SongInfoView(this)),
|
song_info_view_(new SongInfoView(this)),
|
||||||
artist_info_view_(new ArtistInfoView(this)),
|
artist_info_view_(new ArtistInfoView(this)),
|
||||||
settings_dialog_(NULL),
|
|
||||||
cover_manager_(NULL),
|
|
||||||
equalizer_(new Equalizer),
|
equalizer_(new Equalizer),
|
||||||
error_dialog_(NULL),
|
|
||||||
organise_dialog_(new OrganiseDialog(app_->task_manager())),
|
organise_dialog_(new OrganiseDialog(app_->task_manager())),
|
||||||
queue_manager_(NULL),
|
|
||||||
#ifdef ENABLE_VISUALISATIONS
|
|
||||||
visualisation_(NULL),
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_WIIMOTEDEV
|
|
||||||
wiimotedev_shortcuts_(NULL),
|
|
||||||
#endif
|
|
||||||
playlist_menu_(new QMenu(this)),
|
playlist_menu_(new QMenu(this)),
|
||||||
playlist_add_to_another_(NULL),
|
playlist_add_to_another_(NULL),
|
||||||
playlistitem_actions_separator_(NULL),
|
playlistitem_actions_separator_(NULL),
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
#ifndef MAINWINDOW_H
|
#ifndef MAINWINDOW_H
|
||||||
#define MAINWINDOW_H
|
#define MAINWINDOW_H
|
||||||
|
|
||||||
#include <boost/scoped_ptr.hpp>
|
#include <memory>
|
||||||
|
|
||||||
#include <QMainWindow>
|
#include <QMainWindow>
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
|
@ -278,8 +278,8 @@ class MainWindow : public QMainWindow, public PlatformInterface {
|
||||||
Application* app_;
|
Application* app_;
|
||||||
SystemTrayIcon* tray_icon_;
|
SystemTrayIcon* tray_icon_;
|
||||||
OSD* osd_;
|
OSD* osd_;
|
||||||
boost::scoped_ptr<EditTagDialog> edit_tag_dialog_;
|
std::unique_ptr<EditTagDialog> edit_tag_dialog_;
|
||||||
boost::scoped_ptr<About> about_dialog_;
|
std::unique_ptr<About> about_dialog_;
|
||||||
|
|
||||||
GlobalShortcuts* global_shortcuts_;
|
GlobalShortcuts* global_shortcuts_;
|
||||||
Remote* remote_;
|
Remote* remote_;
|
||||||
|
@ -293,25 +293,25 @@ class MainWindow : public QMainWindow, public PlatformInterface {
|
||||||
SongInfoView* song_info_view_;
|
SongInfoView* song_info_view_;
|
||||||
ArtistInfoView* artist_info_view_;
|
ArtistInfoView* artist_info_view_;
|
||||||
|
|
||||||
boost::scoped_ptr<SettingsDialog> settings_dialog_;
|
std::unique_ptr<SettingsDialog> settings_dialog_;
|
||||||
boost::scoped_ptr<AddStreamDialog> add_stream_dialog_;
|
std::unique_ptr<AddStreamDialog> add_stream_dialog_;
|
||||||
boost::scoped_ptr<AlbumCoverManager> cover_manager_;
|
std::unique_ptr<AlbumCoverManager> cover_manager_;
|
||||||
boost::scoped_ptr<Equalizer> equalizer_;
|
std::unique_ptr<Equalizer> equalizer_;
|
||||||
boost::scoped_ptr<TranscodeDialog> transcode_dialog_;
|
std::unique_ptr<TranscodeDialog> transcode_dialog_;
|
||||||
boost::scoped_ptr<ErrorDialog> error_dialog_;
|
std::unique_ptr<ErrorDialog> error_dialog_;
|
||||||
boost::scoped_ptr<OrganiseDialog> organise_dialog_;
|
std::unique_ptr<OrganiseDialog> organise_dialog_;
|
||||||
boost::scoped_ptr<QueueManager> queue_manager_;
|
std::unique_ptr<QueueManager> queue_manager_;
|
||||||
|
|
||||||
boost::scoped_ptr<TagFetcher> tag_fetcher_;
|
std::unique_ptr<TagFetcher> tag_fetcher_;
|
||||||
boost::scoped_ptr<TrackSelectionDialog> track_selection_dialog_;
|
std::unique_ptr<TrackSelectionDialog> track_selection_dialog_;
|
||||||
PlaylistItemList autocomplete_tag_items_;
|
PlaylistItemList autocomplete_tag_items_;
|
||||||
|
|
||||||
#ifdef ENABLE_VISUALISATIONS
|
#ifdef ENABLE_VISUALISATIONS
|
||||||
boost::scoped_ptr<VisualisationContainer> visualisation_;
|
std::unique_ptr<VisualisationContainer> visualisation_;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_WIIMOTEDEV
|
#ifdef HAVE_WIIMOTEDEV
|
||||||
boost::scoped_ptr<WiimotedevShortcuts> wiimotedev_shortcuts_;
|
std::unique_ptr<WiimotedevShortcuts> wiimotedev_shortcuts_;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
QAction* library_show_all_;
|
QAction* library_show_all_;
|
||||||
|
|
|
@ -18,6 +18,8 @@
|
||||||
#ifndef ORGANISEDIALOG_H
|
#ifndef ORGANISEDIALOG_H
|
||||||
#define ORGANISEDIALOG_H
|
#define ORGANISEDIALOG_H
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include <QDialog>
|
#include <QDialog>
|
||||||
#include <QMap>
|
#include <QMap>
|
||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
|
@ -25,8 +27,6 @@
|
||||||
#include "core/organiseformat.h"
|
#include "core/organiseformat.h"
|
||||||
#include "core/song.h"
|
#include "core/song.h"
|
||||||
|
|
||||||
#include <boost/scoped_ptr.hpp>
|
|
||||||
|
|
||||||
class LibraryWatcher;
|
class LibraryWatcher;
|
||||||
class OrganiseErrorDialog;
|
class OrganiseErrorDialog;
|
||||||
class TaskManager;
|
class TaskManager;
|
||||||
|
@ -80,7 +80,7 @@ private:
|
||||||
SongList preview_songs_;
|
SongList preview_songs_;
|
||||||
quint64 total_size_;
|
quint64 total_size_;
|
||||||
|
|
||||||
boost::scoped_ptr<OrganiseErrorDialog> error_dialog_;
|
std::unique_ptr<OrganiseErrorDialog> error_dialog_;
|
||||||
|
|
||||||
bool resized_by_user_;
|
bool resized_by_user_;
|
||||||
};
|
};
|
||||||
|
|
|
@ -48,15 +48,13 @@
|
||||||
|
|
||||||
ProjectMVisualisation::ProjectMVisualisation(QObject *parent)
|
ProjectMVisualisation::ProjectMVisualisation(QObject *parent)
|
||||||
: QGraphicsScene(parent),
|
: QGraphicsScene(parent),
|
||||||
projectm_(NULL),
|
preset_model_(nullptr),
|
||||||
preset_model_(NULL),
|
|
||||||
mode_(Random),
|
mode_(Random),
|
||||||
duration_(15),
|
duration_(15),
|
||||||
texture_size_(512)
|
texture_size_(512) {
|
||||||
{
|
|
||||||
connect(this, SIGNAL(sceneRectChanged(QRectF)), SLOT(SceneRectChanged(QRectF)));
|
connect(this, SIGNAL(sceneRectChanged(QRectF)), SLOT(SceneRectChanged(QRectF)));
|
||||||
|
|
||||||
for (int i=0 ; i<TOTAL_RATING_TYPES ; ++i)
|
for (int i = 0; i < TOTAL_RATING_TYPES; ++i)
|
||||||
default_rating_list_.push_back(3);
|
default_rating_list_.push_back(3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,12 +18,12 @@
|
||||||
#ifndef PROJECTMVISUALISATION_H
|
#ifndef PROJECTMVISUALISATION_H
|
||||||
#define PROJECTMVISUALISATION_H
|
#define PROJECTMVISUALISATION_H
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include <QGraphicsScene>
|
#include <QGraphicsScene>
|
||||||
#include <QBasicTimer>
|
#include <QBasicTimer>
|
||||||
#include <QSet>
|
#include <QSet>
|
||||||
|
|
||||||
#include <boost/scoped_ptr.hpp>
|
|
||||||
|
|
||||||
#include "engines/bufferconsumer.h"
|
#include "engines/bufferconsumer.h"
|
||||||
|
|
||||||
class projectM;
|
class projectM;
|
||||||
|
@ -77,12 +77,12 @@ private:
|
||||||
int IndexOfPreset(const QString& path) const;
|
int IndexOfPreset(const QString& path) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
boost::scoped_ptr<projectM> projectm_;
|
std::unique_ptr<projectM> projectm_;
|
||||||
ProjectMPresetModel* preset_model_;
|
ProjectMPresetModel* preset_model_;
|
||||||
Mode mode_;
|
Mode mode_;
|
||||||
int duration_;
|
int duration_;
|
||||||
|
|
||||||
boost::scoped_ptr<QTemporaryFile> temporary_font_;
|
std::unique_ptr<QTemporaryFile> temporary_font_;
|
||||||
|
|
||||||
std::vector<int> default_rating_list_;
|
std::vector<int> default_rating_list_;
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,8 @@
|
||||||
#ifndef FANCYTABWIDGET_H
|
#ifndef FANCYTABWIDGET_H
|
||||||
#define FANCYTABWIDGET_H
|
#define FANCYTABWIDGET_H
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include <QIcon>
|
#include <QIcon>
|
||||||
#include <QPropertyAnimation>
|
#include <QPropertyAnimation>
|
||||||
#include <QProxyStyle>
|
#include <QProxyStyle>
|
||||||
|
@ -37,8 +39,6 @@
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
|
||||||
#include <boost/scoped_ptr.hpp>
|
|
||||||
|
|
||||||
class QActionGroup;
|
class QActionGroup;
|
||||||
class QMenu;
|
class QMenu;
|
||||||
class QPainter;
|
class QPainter;
|
||||||
|
@ -219,7 +219,7 @@ private:
|
||||||
|
|
||||||
QMenu* menu_;
|
QMenu* menu_;
|
||||||
|
|
||||||
boost::scoped_ptr<FancyTabProxyStyle> proxy_style_;
|
std::unique_ptr<FancyTabProxyStyle> proxy_style_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
|
|
@ -18,12 +18,12 @@
|
||||||
#ifndef NOWPLAYINGWIDGET_H
|
#ifndef NOWPLAYINGWIDGET_H
|
||||||
#define NOWPLAYINGWIDGET_H
|
#define NOWPLAYINGWIDGET_H
|
||||||
|
|
||||||
#include "core/song.h"
|
#include <memory>
|
||||||
#include "covers/albumcoverloaderoptions.h"
|
|
||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
|
||||||
#include <boost/scoped_ptr.hpp>
|
#include "core/song.h"
|
||||||
|
#include "covers/albumcoverloaderoptions.h"
|
||||||
|
|
||||||
class AlbumCoverChoiceController;
|
class AlbumCoverChoiceController;
|
||||||
class Application;
|
class Application;
|
||||||
|
@ -141,8 +141,8 @@ private:
|
||||||
|
|
||||||
static const char* kHypnotoadPath;
|
static const char* kHypnotoadPath;
|
||||||
QAction* bask_in_his_glory_action_;
|
QAction* bask_in_his_glory_action_;
|
||||||
boost::scoped_ptr<QMovie> hypnotoad_;
|
std::unique_ptr<QMovie> hypnotoad_;
|
||||||
boost::scoped_ptr<FullscreenHypnotoad> big_hypnotoad_;
|
std::unique_ptr<FullscreenHypnotoad> big_hypnotoad_;
|
||||||
|
|
||||||
bool aww_;
|
bool aww_;
|
||||||
KittenLoader* kittens_;
|
KittenLoader* kittens_;
|
||||||
|
|
|
@ -18,6 +18,8 @@
|
||||||
#ifndef OSD_H
|
#ifndef OSD_H
|
||||||
#define OSD_H
|
#define OSD_H
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include <QDateTime>
|
#include <QDateTime>
|
||||||
#include <QImage>
|
#include <QImage>
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
@ -36,7 +38,6 @@ class QDBusPendingCallWatcher;
|
||||||
|
|
||||||
#ifdef HAVE_DBUS
|
#ifdef HAVE_DBUS
|
||||||
# include <QDBusArgument>
|
# include <QDBusArgument>
|
||||||
# include <boost/scoped_ptr.hpp>
|
|
||||||
|
|
||||||
QDBusArgument& operator<< (QDBusArgument& arg, const QImage& image);
|
QDBusArgument& operator<< (QDBusArgument& arg, const QImage& image);
|
||||||
const QDBusArgument& operator>> (const QDBusArgument& arg, QImage& image);
|
const QDBusArgument& operator>> (const QDBusArgument& arg, QImage& image);
|
||||||
|
@ -136,7 +137,7 @@ class OSD : public QObject {
|
||||||
#endif // Q_OS_DARWIN
|
#endif // Q_OS_DARWIN
|
||||||
|
|
||||||
#ifdef HAVE_DBUS
|
#ifdef HAVE_DBUS
|
||||||
boost::scoped_ptr<OrgFreedesktopNotificationsInterface> interface_;
|
std::unique_ptr<OrgFreedesktopNotificationsInterface> interface_;
|
||||||
uint notification_id_;
|
uint notification_id_;
|
||||||
QDateTime last_notification_time_;
|
QDateTime last_notification_time_;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -15,19 +15,20 @@
|
||||||
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "osd.h"
|
#include "osd.h"
|
||||||
#include "core/logging.h"
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include <QtDebug>
|
#include <QtDebug>
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
#include "core/logging.h"
|
||||||
|
|
||||||
#ifdef HAVE_DBUS
|
#ifdef HAVE_DBUS
|
||||||
#include "dbus/notification.h"
|
#include "dbus/notification.h"
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
#include <QTextDocument>
|
#include <QTextDocument>
|
||||||
|
|
||||||
using boost::scoped_ptr;
|
|
||||||
|
|
||||||
QDBusArgument& operator<< (QDBusArgument& arg, const QImage& image) {
|
QDBusArgument& operator<< (QDBusArgument& arg, const QImage& image) {
|
||||||
if (image.isNull()) {
|
if (image.isNull()) {
|
||||||
// Sometimes this gets called with a null QImage for no obvious reason.
|
// Sometimes this gets called with a null QImage for no obvious reason.
|
||||||
|
@ -142,7 +143,7 @@ void OSD::ShowMessageNative(const QString& summary, const QString& message,
|
||||||
|
|
||||||
#ifdef HAVE_DBUS
|
#ifdef HAVE_DBUS
|
||||||
void OSD::CallFinished(QDBusPendingCallWatcher* watcher) {
|
void OSD::CallFinished(QDBusPendingCallWatcher* watcher) {
|
||||||
scoped_ptr<QDBusPendingCallWatcher> w(watcher);
|
std::unique_ptr<QDBusPendingCallWatcher> w(watcher);
|
||||||
|
|
||||||
QDBusPendingReply<uint> reply = *watcher;
|
QDBusPendingReply<uint> reply = *watcher;
|
||||||
if (reply.isError()) {
|
if (reply.isError()) {
|
||||||
|
|
|
@ -36,7 +36,6 @@ WiimotedevShortcuts::WiimotedevShortcuts(OSD* osd, QWidget* window, QObject* par
|
||||||
wiimotedev_device_(1),
|
wiimotedev_device_(1),
|
||||||
wiimotedev_enable_(true),
|
wiimotedev_enable_(true),
|
||||||
wiimotedev_focus_(false),
|
wiimotedev_focus_(false),
|
||||||
wiimotedev_iface_(NULL),
|
|
||||||
wiimotedev_notification_(true)
|
wiimotedev_notification_(true)
|
||||||
{
|
{
|
||||||
connect(this, SIGNAL(WiiremoteActived(int)), osd_, SLOT(WiiremoteActived(int)));
|
connect(this, SIGNAL(WiiremoteActived(int)), osd_, SLOT(WiiremoteActived(int)));
|
||||||
|
|
|
@ -18,8 +18,9 @@
|
||||||
#ifndef WIIMOTEDEV_SHORTCUTS_H
|
#ifndef WIIMOTEDEV_SHORTCUTS_H
|
||||||
#define WIIMOTEDEV_SHORTCUTS_H
|
#define WIIMOTEDEV_SHORTCUTS_H
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
#include <boost/scoped_ptr.hpp>
|
|
||||||
|
|
||||||
#include "dbus/wiimotedev.h"
|
#include "dbus/wiimotedev.h"
|
||||||
#include "core/player.h"
|
#include "core/player.h"
|
||||||
|
@ -77,7 +78,7 @@ private:
|
||||||
quint32 wiimotedev_device_;
|
quint32 wiimotedev_device_;
|
||||||
bool wiimotedev_enable_;
|
bool wiimotedev_enable_;
|
||||||
bool wiimotedev_focus_;
|
bool wiimotedev_focus_;
|
||||||
boost::scoped_ptr<OrgWiimotedevDeviceEventsInterface> wiimotedev_iface_;
|
std::unique_ptr<OrgWiimotedevDeviceEventsInterface> wiimotedev_iface_;
|
||||||
bool wiimotedev_notification_;
|
bool wiimotedev_notification_;
|
||||||
|
|
||||||
QHash <quint64, quint32> actions_;
|
QHash <quint64, quint32> actions_;
|
||||||
|
|
|
@ -18,11 +18,11 @@
|
||||||
#ifndef WIIMOTESHORTCUTGRABBER_H
|
#ifndef WIIMOTESHORTCUTGRABBER_H
|
||||||
#define WIIMOTESHORTCUTGRABBER_H
|
#define WIIMOTESHORTCUTGRABBER_H
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include <QDialog>
|
#include <QDialog>
|
||||||
#include <QTimeLine>
|
#include <QTimeLine>
|
||||||
|
|
||||||
#include <boost/scoped_ptr.hpp>
|
|
||||||
|
|
||||||
#include "wiimotesettingspage.h"
|
#include "wiimotesettingspage.h"
|
||||||
#include "dbus/wiimotedev.h"
|
#include "dbus/wiimotedev.h"
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ private:
|
||||||
|
|
||||||
Ui_WiimoteShortcutGrabber* ui_;
|
Ui_WiimoteShortcutGrabber* ui_;
|
||||||
WiimoteSettingsPage* config_;
|
WiimoteSettingsPage* config_;
|
||||||
boost::scoped_ptr<OrgWiimotedevDeviceEventsInterface> wiimotedev_iface_;
|
std::unique_ptr<OrgWiimotedevDeviceEventsInterface> wiimotedev_iface_;
|
||||||
quint32 wiimotedev_device_;
|
quint32 wiimotedev_device_;
|
||||||
quint64 wiimotedev_buttons_;
|
quint64 wiimotedev_buttons_;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue