Remove boost::scoped_ptr & boost::shared_ptr

This commit is contained in:
John Maguire 2014-02-06 15:35:36 +01:00
parent 8424c18516
commit 5b4b06f64b
75 changed files with 255 additions and 275 deletions

View File

@ -18,9 +18,9 @@
#ifndef CRASHREPORTING_H
#define CRASHREPORTING_H
#include <QObject>
#include <memory>
#include <boost/scoped_ptr.hpp>
#include <QObject>
class QFile;
class QNetworkAccessManager;
@ -64,7 +64,7 @@ private:
static const char* kSendCrashReportOption;
static char* sPath;
boost::scoped_ptr<google_breakpad::ExceptionHandler> handler_;
std::unique_ptr<google_breakpad::ExceptionHandler> handler_;
};

View File

@ -18,13 +18,13 @@
#ifndef MACGLOBALSHORTCUTBACKEND_H
#define MACGLOBALSHORTCUTBACKEND_H
#include <memory>
#include "globalshortcutbackend.h"
#include <QKeySequence>
#include <QMap>
#include <boost/scoped_ptr.hpp>
class MacGlobalShortcutBackendPrivate;
class QAction;
@ -50,7 +50,7 @@ private:
QMap<QKeySequence, QAction*> shortcuts_;
friend class MacGlobalShortcutBackendPrivate;
boost::scoped_ptr<MacGlobalShortcutBackendPrivate> p_;
std::unique_ptr<MacGlobalShortcutBackendPrivate> p_;
};
#endif // MACGLOBALSHORTCUTBACKEND_H

View File

@ -24,8 +24,6 @@
#include <QObject>
#include <QtDBus>
#include <boost/scoped_ptr.hpp>
class Application;
class MainWindow;
class Playlist;

View File

@ -18,11 +18,11 @@
#ifndef PLAYER_H
#define PLAYER_H
#include <memory>
#include <QObject>
#include <QSettings>
#include <boost/scoped_ptr.hpp>
#include "config.h"
#include "core/song.h"
#include "core/urlhandler.h"
@ -176,7 +176,7 @@ public slots:
PlaylistItemPtr current_item_;
boost::scoped_ptr<EngineBase> engine_;
std::unique_ptr<EngineBase> engine_;
Engine::TrackChangeFlags stream_change_type_;
Engine::State last_state_;

View File

@ -19,7 +19,7 @@
#include <stdlib.h>
#include <boost/scoped_array.hpp>
#include <memory>
#include <QApplication>
#include <QDateTime>
@ -265,7 +265,7 @@ bool Copy(QIODevice* source, QIODevice* destination) {
return false;
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 bytes_read;

View File

@ -18,6 +18,8 @@
#ifndef UTILITIES_H
#define UTILITIES_H
#include <memory>
#include <QColor>
#include <QLocale>
#include <QCryptographicHash>
@ -25,8 +27,6 @@
#include <QString>
#include <QUrl>
#include <boost/scoped_array.hpp>
class QIODevice;
class QMouseEvent;
class QXmlStreamReader;
@ -159,7 +159,7 @@ private:
Q_DISABLE_COPY(ScopedWCharArray);
int chars_;
boost::scoped_array<wchar_t> data_;
std::unique_ptr<wchar_t[]> data_;
};
#endif // UTILITIES_H

View File

@ -29,8 +29,6 @@
#include <QQueue>
#include <QUrl>
#include <boost/scoped_ptr.hpp>
class QNetworkReply;
class QString;

View File

@ -18,12 +18,12 @@
#ifndef CURRENTARTLOADER_H
#define CURRENTARTLOADER_H
#include "core/song.h"
#include "covers/albumcoverloaderoptions.h"
#include <memory>
#include <QObject>
#include <boost/scoped_ptr.hpp>
#include "core/song.h"
#include "covers/albumcoverloaderoptions.h"
class Application;
@ -56,8 +56,8 @@ private:
QString temp_file_pattern_;
boost::scoped_ptr<QTemporaryFile> temp_art_;
boost::scoped_ptr<QTemporaryFile> temp_art_thumbnail_;
std::unique_ptr<QTemporaryFile> temp_art_;
std::unique_ptr<QTemporaryFile> temp_art_thumbnail_;
quint64 id_;
Song last_song_;

View File

@ -18,14 +18,14 @@
#ifndef CONNECTEDDEVICE_H
#define CONNECTEDDEVICE_H
#include "core/musicstorage.h"
#include "core/song.h"
#include <memory>
#include <QObject>
#include <QStringList>
#include <QUrl>
#include <boost/enable_shared_from_this.hpp>
#include "core/musicstorage.h"
#include "core/song.h"
class Application;
class Database;
@ -35,7 +35,7 @@ class LibraryBackend;
class LibraryModel;
class ConnectedDevice : public QObject, public virtual MusicStorage,
public boost::enable_shared_from_this<ConnectedDevice> {
public std::enable_shared_from_this<ConnectedDevice> {
Q_OBJECT
public:

View File

@ -18,12 +18,12 @@
#ifndef DEVICEKITLISTER_H
#define DEVICEKITLISTER_H
#include "devicelister.h"
#include <memory>
#include <QMutex>
#include <QStringList>
#include <boost/scoped_ptr.hpp>
#include "devicelister.h"
class OrgFreedesktopUDisksInterface;
@ -88,7 +88,7 @@ private:
T LockAndGetDeviceInfo(const QString& id, T DeviceData::*field);
private:
boost::scoped_ptr<OrgFreedesktopUDisksInterface> interface_;
std::unique_ptr<OrgFreedesktopUDisksInterface> interface_;
QMutex mutex_;
QMap<QString, DeviceData> device_data_;

View File

@ -21,8 +21,6 @@
#include <QAbstractItemModel>
#include <QUrl>
#include <boost/shared_ptr.hpp>
class ConnectedDevice;
class DeviceManager;

View File

@ -18,6 +18,8 @@
#ifndef DEVICEVIEW_H
#define DEVICEVIEW_H
#include <memory>
#include "core/song.h"
#include "library/libraryview.h"
#include "widgets/autoexpandingtreeview.h"
@ -88,8 +90,8 @@ private:
MergedProxyModel* merged_model_;
QSortFilterProxyModel* sort_model_;
boost::scoped_ptr<DeviceProperties> properties_dialog_;
boost::scoped_ptr<OrganiseDialog> organise_dialog_;
std::unique_ptr<DeviceProperties> properties_dialog_;
std::unique_ptr<OrganiseDialog> organise_dialog_;
QMenu* device_menu_;
QAction* eject_action_;

View File

@ -27,8 +27,9 @@
#include <QDir>
#include <QtDebug>
GPodLoader::GPodLoader(const QString& mount_point, TaskManager* task_manager,
LibraryBackend* backend, boost::shared_ptr<ConnectedDevice> device)
GPodLoader::GPodLoader(
const QString& mount_point, TaskManager* task_manager,
LibraryBackend* backend, std::shared_ptr<ConnectedDevice> device)
: QObject(NULL),
device_(device),
mount_point_(mount_point),

View File

@ -18,9 +18,10 @@
#ifndef GPODLOADER_H
#define GPODLOADER_H
#include <memory>
#include <QObject>
#include <boost/shared_ptr.hpp>
#include <gpod/itdb.h>
#include "core/song.h"
@ -34,7 +35,7 @@ class GPodLoader : public QObject {
public:
GPodLoader(const QString& mount_point, TaskManager* task_manager,
LibraryBackend* backend, boost::shared_ptr<ConnectedDevice> device);
LibraryBackend* backend, std::shared_ptr<ConnectedDevice> device);
~GPodLoader();
void set_music_path_prefix(const QString& prefix) { path_prefix_ = prefix; }
@ -49,7 +50,7 @@ signals:
void LoadFinished(Itdb_iTunesDB* db);
private:
boost::shared_ptr<ConnectedDevice> device_;
std::shared_ptr<ConnectedDevice> device_;
QThread* original_thread_;
QString mount_point_;

View File

@ -18,12 +18,12 @@
#ifndef MTPDEVICE_H
#define MTPDEVICE_H
#include "connecteddevice.h"
#include <memory>
#include <QMutex>
#include <QWaitCondition>
#include <boost/scoped_ptr.hpp>
#include "connecteddevice.h"
struct LIBMTP_mtpdevice_struct;
@ -74,7 +74,7 @@ private:
SongList songs_to_add_;
SongList songs_to_remove_;
boost::scoped_ptr<MtpConnection> connection_;
std::unique_ptr<MtpConnection> connection_;
};
#endif // MTPDEVICE_H

View File

@ -15,17 +15,19 @@
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
*/
#include "mtploader.h"
#include <libmtp.h>
#include "connecteddevice.h"
#include "mtpconnection.h"
#include "mtploader.h"
#include "core/song.h"
#include "core/taskmanager.h"
#include "library/librarybackend.h"
#include <libmtp.h>
MtpLoader::MtpLoader(const QUrl& url, TaskManager* task_manager,
LibraryBackend* backend, boost::shared_ptr<ConnectedDevice> device)
MtpLoader::MtpLoader(
const QUrl& url, TaskManager* task_manager,
LibraryBackend* backend, std::shared_ptr<ConnectedDevice> device)
: QObject(NULL),
device_(device),
url_(url),

View File

@ -18,11 +18,11 @@
#ifndef MTPLOADER_H
#define MTPLOADER_H
#include <memory>
#include <QObject>
#include <QUrl>
#include <boost/shared_ptr.hpp>
class ConnectedDevice;
class LibraryBackend;
class TaskManager;
@ -32,7 +32,7 @@ class MtpLoader : public QObject {
public:
MtpLoader(const QUrl& url, TaskManager* task_manager,
LibraryBackend* backend, boost::shared_ptr<ConnectedDevice> device);
LibraryBackend* backend, std::shared_ptr<ConnectedDevice> device);
~MtpLoader();
public slots:
@ -47,7 +47,7 @@ private:
bool TryLoad();
private:
boost::shared_ptr<ConnectedDevice> device_;
std::shared_ptr<ConnectedDevice> device_;
QThread* original_thread_;
QUrl url_;

View File

@ -27,8 +27,6 @@
#include <vector>
#include <boost/noncopyable.hpp>
#include <QList>
#include <QObject>
#include <QUrl>
@ -39,7 +37,7 @@ namespace Engine {
typedef std::vector<int16_t> Scope;
class Base : public QObject, boost::noncopyable {
class Base : public QObject {
Q_OBJECT
public:
@ -153,6 +151,7 @@ class Base : public QObject, boost::noncopyable {
private:
bool about_to_end_emitted_;
Q_DISABLE_COPY(Base);
};

View File

@ -41,11 +41,11 @@ const int GstEnginePipeline::kEqBandFrequencies[] = {
60, 170, 310, 600, 1000, 3000, 6000, 12000, 14000, 16000};
int GstEnginePipeline::sId = 1;
GstElementDeleter* GstEnginePipeline::sElementDeleter = NULL;
GstElementDeleter* GstEnginePipeline::sElementDeleter = nullptr;
GstEnginePipeline::GstEnginePipeline(GstEngine* engine)
: QObject(NULL),
: QObject(nullptr),
engine_(engine),
id_(sId++),
valid_(false),
@ -75,20 +75,19 @@ GstEnginePipeline::GstEnginePipeline(GstEngine* engine)
pending_seek_nanosec_(-1),
volume_percent_(100),
volume_modifier_(1.0),
fader_(NULL),
pipeline_(NULL),
uridecodebin_(NULL),
audiobin_(NULL),
queue_(NULL),
audioconvert_(NULL),
rgvolume_(NULL),
rglimiter_(NULL),
audioconvert2_(NULL),
equalizer_(NULL),
stereo_panorama_(NULL),
volume_(NULL),
audioscale_(NULL),
audiosink_(NULL)
pipeline_(nullptr),
uridecodebin_(nullptr),
audiobin_(nullptr),
queue_(nullptr),
audioconvert_(nullptr),
rgvolume_(nullptr),
rglimiter_(nullptr),
audioconvert2_(nullptr),
equalizer_(nullptr),
stereo_panorama_(nullptr),
volume_(nullptr),
audioscale_(nullptr),
audiosink_(nullptr)
{
if (!sElementDeleter) {
sElementDeleter = new GstElementDeleter;

View File

@ -18,6 +18,8 @@
#ifndef GSTENGINEPIPELINE_H
#define GSTENGINEPIPELINE_H
#include <memory>
#include <QBasicTimer>
#include <QFuture>
#include <QMutex>
@ -27,7 +29,6 @@
#include <QUrl>
#include <gst/gst.h>
#include <boost/scoped_ptr.hpp>
#include "engine_fwd.h"
@ -253,7 +254,7 @@ class GstEnginePipeline : public QObject {
int volume_percent_;
qreal volume_modifier_;
boost::scoped_ptr<QTimeLine> fader_;
std::unique_ptr<QTimeLine> fader_;
QBasicTimer fader_fudge_timer_;
bool use_fudge_timer_;

View File

@ -18,9 +18,7 @@
#include "spotifysearchprovider.h"
#include <ctime>
#include <boost/random/mersenne_twister.hpp>
#include <boost/random/uniform_int.hpp>
#include <random>
#include "core/logging.h"
#include "internet/internetmodel.h"
@ -219,8 +217,8 @@ QStringList SpotifySearchProvider::GetSuggestions(int count) {
QStringList all_suggestions = suggestions_.toList();
boost::mt19937 gen(std::time(0));
boost::uniform_int<> random(0, all_suggestions.size() - 1);
std::mt19937 gen(std::time(0));
std::uniform_int_distribution<> random(0, all_suggestions.size() - 1);
QSet<QString> candidates;

View File

@ -3,6 +3,8 @@
#include "internetservice.h"
#include <memory>
#include <QMenu>
#include "core/tagreaderclient.h"
@ -61,8 +63,8 @@ class CloudFileService : public InternetService {
LibraryModel* library_model_;
QSortFilterProxyModel* library_sort_model_;
boost::scoped_ptr<QMenu> context_menu_;
boost::scoped_ptr<AlbumCoverManager> cover_manager_;
std::unique_ptr<QMenu> context_menu_;
std::unique_ptr<AlbumCoverManager> cover_manager_;
PlaylistManager* playlist_manager_;
TaskManager* task_manager_;

View File

@ -18,7 +18,7 @@
#ifndef DIGITALLYIMPORTEDSERVICEBASE_H
#define DIGITALLYIMPORTEDSERVICEBASE_H
#include <boost/scoped_ptr.hpp>
#include <memory>
#include "digitallyimportedclient.h"
#include "internetservice.h"
@ -104,7 +104,7 @@ private:
QStandardItem* root_;
boost::scoped_ptr<QMenu> context_menu_;
std::unique_ptr<QMenu> context_menu_;
QStandardItem* context_item_;
CachedList<DigitallyImportedClient::Channel> saved_channels_;

View File

@ -17,7 +17,7 @@
#include "groovesharkservice.h"
#include <boost/scoped_ptr.hpp>
#include <memory>
#include <QApplication>
#include <QClipboard>
@ -1286,8 +1286,8 @@ void GroovesharkService::DeletePlaylist(int playlist_id) {
if (!playlists_.contains(playlist_id)) {
return;
}
boost::scoped_ptr<QMessageBox> confirmation_dialog(new QMessageBox(
std::unique_ptr<QMessageBox> confirmation_dialog(new QMessageBox(
QMessageBox::Question, tr("Delete Grooveshark playlist"),
tr("Are you sure you want to delete this playlist?"),
QMessageBox::Yes | QMessageBox::Cancel));

View File

@ -32,8 +32,6 @@
#include "lastfmservice.h"
#include <boost/scoped_ptr.hpp>
#include <QMenu>
#include <QSettings>
@ -61,7 +59,6 @@
#include "ui/iconloader.h"
#include "ui/settingsdialog.h"
using boost::scoped_ptr;
using lastfm::XmlQuery;
uint qHash(const lastfm::Track& track) {

View File

@ -18,6 +18,8 @@
#ifndef LASTFMSERVICE_H
#define LASTFMSERVICE_H
#include <memory>
namespace lastfm {
class RadioStation;
class Track;
@ -40,8 +42,6 @@ uint qHash(const lastfm::Track& track);
#include <QMenu>
#include <QQueue>
#include <boost/scoped_ptr.hpp>
class LastFMUrlHandler;
class QAction;
@ -198,9 +198,9 @@ class LastFMService : public InternetService {
QQueue<lastfm::Track> playlist_;
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* add_artist_action_;
QAction* add_tag_action_;

View File

@ -16,13 +16,8 @@
*/
#include "magnatunedownloaddialog.h"
#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"
#include <memory>
#include <QCloseEvent>
#include <QDir>
@ -35,6 +30,14 @@
#include <QSettings>
#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,
QWidget *parent)
: QDialog(parent),
@ -275,7 +278,7 @@ QString MagnatuneDownloadDialog::GetOutputFilename() {
void MagnatuneDownloadDialog::closeEvent(QCloseEvent* e) {
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?"),
tr("Closing this window will cancel the download."),
QMessageBox::Abort, this));

View File

@ -18,12 +18,12 @@
#ifndef MAGNATUNEDOWNLOADDIALOG_H
#define MAGNATUNEDOWNLOADDIALOG_H
#include <memory>
#include <QDialog>
#include <QNetworkReply>
#include <QStringList>
#include <boost/scoped_ptr.hpp>
#include "core/song.h"
class MagnatuneService;
@ -71,7 +71,7 @@ private:
QNetworkAccessManager* network_;
QNetworkReply* current_reply_;
boost::scoped_ptr<QFile> download_file_;
std::unique_ptr<QFile> download_file_;
int next_row_;
};

View File

@ -51,8 +51,6 @@
#include <QtDebug>
using boost::shared_ptr;
const char* MagnatuneService::kServiceName = "Magnatune";
const char* MagnatuneService::kSettingsGroup = "Magnatune";
const char* MagnatuneService::kSongsTable = "magnatune_songs";

View File

@ -18,9 +18,9 @@
#ifndef SAVEDRADIO_H
#define SAVEDRADIO_H
#include "internetservice.h"
#include <memory>
#include <boost/scoped_ptr.hpp>
#include "internetservice.h"
class QMenu;
@ -83,7 +83,7 @@ class SavedRadio : public InternetService {
StreamList streams_;
boost::scoped_ptr<AddStreamDialog> edit_dialog_;
std::unique_ptr<AddStreamDialog> edit_dialog_;
};
#endif // SAVEDRADIO_H

View File

@ -1,7 +1,6 @@
#include "skydriveservice.h"
#include <boost/scoped_ptr.hpp>
using boost::scoped_ptr;
#include <memory>
#include <qjson/parser.h>
@ -158,7 +157,7 @@ QUrl SkydriveService::GetStreamingUrlFromSongId(const QString& file_id) {
QUrl url(QString(kSkydriveBase) + file_id);
QNetworkRequest request(url);
AddAuthorizationHeader(&request);
scoped_ptr<QNetworkReply> reply(network_->get(request));
std::unique_ptr<QNetworkReply> reply(network_->get(request));
WaitForSignal(reply.get(), SIGNAL(finished()));
QJson::Parser parser;

View File

@ -8,8 +8,6 @@
#include <QProcess>
#include <QTimer>
#include <boost/shared_ptr.hpp>
class Playlist;
class SearchBoxWidget;
class SpotifyServer;

View File

@ -21,8 +21,6 @@
#include <QHash>
#include <QObject>
#include <boost/scoped_ptr.hpp>
class Application;
class Database;
class LibraryBackend;

View File

@ -18,9 +18,9 @@
#ifndef LIBRARYFILTERWIDGET_H
#define LIBRARYFILTERWIDGET_H
#include <QWidget>
#include <memory>
#include <boost/scoped_ptr.hpp>
#include <QWidget>
#include "librarymodel.h"
@ -91,7 +91,7 @@ class LibraryFilterWidget : public QWidget {
Ui_LibraryFilterWidget* ui_;
LibraryModel* model_;
boost::scoped_ptr<GroupByDialog> group_by_dialog_;
std::unique_ptr<GroupByDialog> group_by_dialog_;
SettingsDialog* settings_dialog_;
QMenu* filter_age_menu_;

View File

@ -32,8 +32,6 @@
#include "playlist/playlistmanager.h"
#include "smartplaylists/generator_fwd.h"
#include <boost/scoped_ptr.hpp>
class Application;
class AlbumCoverLoader;
class LibraryDirectoryModel;

View File

@ -18,13 +18,13 @@
#ifndef LIBRARYVIEW_H
#define LIBRARYVIEW_H
#include "core/song.h"
#include "ui/edittagdialog.h"
#include "widgets/autoexpandingtreeview.h"
#include <memory>
#include <QStyledItemDelegate>
#include <boost/scoped_ptr.hpp>
#include "core/song.h"
#include "ui/edittagdialog.h"
#include "widgets/autoexpandingtreeview.h"
class Application;
class LibraryFilterWidget;
@ -140,8 +140,8 @@ class LibraryView : public AutoExpandingTreeView {
QAction* edit_smart_playlist_;
QAction* delete_smart_playlist_;
boost::scoped_ptr<OrganiseDialog> organise_dialog_;
boost::scoped_ptr<EditTagDialog> edit_tag_dialog_;
std::unique_ptr<OrganiseDialog> organise_dialog_;
std::unique_ptr<EditTagDialog> edit_tag_dialog_;
bool is_in_keyboard_search_;

View File

@ -17,7 +17,7 @@
#include "moodbarloader.h"
#include <boost/scoped_ptr.hpp>
#include <memory>
#include <QCoreApplication>
#include <QDir>
@ -101,7 +101,7 @@ MoodbarLoader::Result MoodbarLoader::Load(
}
// 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) {
qLog(Info) << "Loading cached moodbar data for" << filename;
*data = cache_device->readAll();

View File

@ -1,7 +1,7 @@
#ifndef NETWORKREMOTE_H
#define NETWORKREMOTE_H
#include <boost/scoped_ptr.hpp>
#include <memory>
#include <QTcpServer>
#include <QTcpSocket>
@ -30,10 +30,10 @@ public slots:
void SendKitten(quint64 id, const QImage& kitten);
private:
boost::scoped_ptr<QTcpServer> server_;
boost::scoped_ptr<QTcpServer> server_ipv6_;
boost::scoped_ptr<IncomingDataParser> incoming_data_parser_;
boost::scoped_ptr<OutgoingDataCreator> outgoing_data_creator_;
std::unique_ptr<QTcpServer> server_;
std::unique_ptr<QTcpServer> server_ipv6_;
std::unique_ptr<IncomingDataParser> incoming_data_parser_;
std::unique_ptr<OutgoingDataCreator> outgoing_data_creator_;
quint16 port_;
bool use_remote_;

View File

@ -1,6 +1,8 @@
#ifndef OUTGOINGDATACREATOR_H
#define OUTGOINGDATACREATOR_H
#include <memory>
#include <QTcpSocket>
#include <QImage>
#include <QList>
@ -24,7 +26,6 @@
#include "songinfo/ultimatelyricsreader.h"
#include "remotecontrolmessages.pb.h"
#include "remoteclient.h"
#include <boost/scoped_ptr.hpp>
typedef QList<SongInfoProvider*> ProviderList;
@ -91,7 +92,7 @@ private:
int last_track_position_;
bool aww_;
boost::scoped_ptr<UltimateLyricsReader> ultimate_reader_;
std::unique_ptr<UltimateLyricsReader> ultimate_reader_;
ProviderList provider_list_;
QMap<int, SongInfoFetcher::Result> results_;
SongInfoFetcher* fetcher_;

View File

@ -21,8 +21,6 @@
#include <QAbstractItemModel>
#include <QList>
#include <boost/shared_ptr.hpp>
#include "playlistitem.h"
#include "playlistsequence.h"
#include "core/tagreaderclient.h"

View File

@ -18,12 +18,12 @@
#ifndef PLAYLISTSEQUENCE_H
#define PLAYLISTSEQUENCE_H
#include <memory>
#include <QWidget>
#include "core/settingsprovider.h"
#include <boost/scoped_ptr.hpp>
class QMenu;
class Ui_PlaylistSequence;
@ -79,7 +79,7 @@ class PlaylistSequence : public QWidget {
private:
Ui_PlaylistSequence* ui_;
boost::scoped_ptr<SettingsProvider> settings_;
std::unique_ptr<SettingsProvider> settings_;
QMenu* repeat_menu_;
QMenu* shuffle_menu_;

View File

@ -18,13 +18,13 @@
#ifndef PLAYLISTVIEW_H
#define PLAYLISTVIEW_H
#include "playlist.h"
#include <memory>
#include <QBasicTimer>
#include <QProxyStyle>
#include <QTreeView>
#include <boost/scoped_ptr.hpp>
#include "playlist.h"
class QCleanlooksStyle;
@ -52,7 +52,7 @@ public:
QPainter* painter, const QWidget* widget) const;
private:
boost::scoped_ptr<QCleanlooksStyle> cleanlooks_;
std::unique_ptr<QCleanlooksStyle> cleanlooks_;
};

View File

@ -23,8 +23,6 @@
#include <QXmlStreamReader>
#include <QXmlStreamWriter>
#include <boost/noncopyable.hpp>
class QDomDocument;
class QDomNode;
@ -32,7 +30,7 @@ class XMLParser : public ParserBase {
protected:
XMLParser(LibraryBackendInterface* library, QObject* parent);
class StreamElement : public boost::noncopyable {
class StreamElement {
public:
StreamElement(const QString& name, QXmlStreamWriter* stream) : stream_(stream) {
stream->writeStartElement(name);
@ -44,6 +42,7 @@ class XMLParser : public ParserBase {
private:
QXmlStreamWriter* stream_;
Q_DISABLE_COPY(StreamElement);
};
};

View File

@ -20,14 +20,13 @@
#include "playlist/playlistitem.h"
#include <boost/enable_shared_from_this.hpp>
#include <boost/shared_ptr.hpp>
#include <memory>
class LibraryBackend;
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
public:
@ -38,7 +37,7 @@ public:
static const int kDefaultDynamicFuture;
// 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
void set_library(LibraryBackend* backend) { backend_ = backend; }

View File

@ -18,13 +18,13 @@
#ifndef PLAYLISTGENERATOR_FWD_H
#define PLAYLISTGENERATOR_FWD_H
#include <boost/shared_ptr.hpp>
#include <memory>
namespace smart_playlists {
class Generator;
typedef boost::shared_ptr<Generator> GeneratorPtr;
typedef std::shared_ptr<Generator> GeneratorPtr;
} // namespace

View File

@ -55,7 +55,7 @@ public:
SearchPreview* preview_;
boost::scoped_ptr<Ui_SmartPlaylistQuerySearchPage> ui_;
std::unique_ptr<Ui_SmartPlaylistQuerySearchPage> ui_;
};
class QueryWizardPlugin::SortPage : public QWizardPage {
@ -161,8 +161,8 @@ int QueryWizardPlugin::CreatePages(QWizard* wizard, int finish_page_id) {
}
void QueryWizardPlugin::SetGenerator(GeneratorPtr g) {
boost::shared_ptr<QueryGenerator> gen =
boost::dynamic_pointer_cast<QueryGenerator>(g);
std::shared_ptr<QueryGenerator> gen =
std::dynamic_pointer_cast<QueryGenerator>(g);
if (!gen)
return;
Search search = gen->search();
@ -198,10 +198,10 @@ void QueryWizardPlugin::SetGenerator(GeneratorPtr g) {
}
GeneratorPtr QueryWizardPlugin::CreateGenerator() const {
boost::shared_ptr<QueryGenerator> gen(new QueryGenerator);
std::shared_ptr<QueryGenerator> gen(new QueryGenerator);
gen->Load(MakeSearch());
return boost::static_pointer_cast<Generator>(gen);
return std::static_pointer_cast<Generator>(gen);
}
void QueryWizardPlugin::UpdateSortOrder() {

View File

@ -18,12 +18,13 @@
#ifndef QUERYWIZARDPLUGIN_H
#define QUERYWIZARDPLUGIN_H
#include "search.h"
#include "wizardplugin.h"
#include <memory>
#include <QWizard>
#include <boost/scoped_ptr.hpp>
#include "search.h"
class Ui_SmartPlaylistQuerySearchPage;
class Ui_SmartPlaylistQuerySortPage;
@ -70,7 +71,7 @@ private:
Search MakeSearch() const;
SearchPage* search_page_;
boost::scoped_ptr<Ui_SmartPlaylistQuerySortPage> sort_ui_;
std::unique_ptr<Ui_SmartPlaylistQuerySortPage> sort_ui_;
int previous_scrollarea_max_;
};

View File

@ -15,14 +15,17 @@
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
*/
#include "querygenerator.h"
#include "searchpreview.h"
#include "ui_searchpreview.h"
#include "playlist/playlist.h"
#include <memory>
#include <QFutureWatcher>
#include <QtConcurrentRun>
#include "querygenerator.h"
#include "playlist/playlist.h"
namespace smart_playlists {
typedef QFuture<PlaylistItemList> Future;
@ -94,7 +97,7 @@ PlaylistItemList DoRunSearch(GeneratorPtr gen) {
void SearchPreview::RunSearch(const Search& search) {
generator_.reset(new QueryGenerator);
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_->count_label->hide();
@ -109,7 +112,7 @@ void SearchPreview::SearchFinished() {
FutureWatcher* watcher = static_cast<FutureWatcher*>(sender());
watcher->deleteLater();
last_search_ = boost::dynamic_pointer_cast<QueryGenerator>(generator_)->search();
last_search_ = std::dynamic_pointer_cast<QueryGenerator>(generator_)->search();
generator_.reset();
if (pending_search_.is_valid() && pending_search_ != last_search_) {

View File

@ -16,18 +16,19 @@
*/
#include "echonestbiographies.h"
#include "songinfotextview.h"
#include "core/logging.h"
#include <memory>
#include <echonest/Artist.h>
#include <boost/scoped_ptr.hpp>
#include "songinfotextview.h"
#include "core/logging.h"
struct EchoNestBiographies::Request {
Request(int id) : id_(id), artist_(new Echonest::Artist) {}
int id_;
boost::scoped_ptr<Echonest::Artist> artist_;
std::unique_ptr<Echonest::Artist> artist_;
};
EchoNestBiographies::EchoNestBiographies() {
@ -46,7 +47,7 @@ EchoNestBiographies::EchoNestBiographies() {
}
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());
QNetworkReply* reply = request->artist_->fetchBiographies();
@ -70,7 +71,7 @@ void EchoNestBiographies::RequestFinished() {
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();
canonical_site.replace(QRegExp("[^a-z]"),"");

View File

@ -18,9 +18,9 @@
#ifndef ECHONESTBIOGRAPHIES_H
#define ECHONESTBIOGRAPHIES_H
#include "songinfoprovider.h"
#include <memory>
#include <boost/shared_ptr.hpp>
#include "songinfoprovider.h"
class QNetworkReply;
@ -40,7 +40,7 @@ private:
QMap<QString, QIcon> site_icons_;
struct Request;
typedef boost::shared_ptr<Request> RequestPtr;
typedef std::shared_ptr<Request> RequestPtr;
QMap<QNetworkReply*, RequestPtr> requests_;
};

View File

@ -16,21 +16,22 @@
*/
#include "echonestimages.h"
#include "core/logging.h"
#include <memory>
#include <echonest/Artist.h>
#include <boost/scoped_ptr.hpp>
#include "core/logging.h"
struct EchoNestImages::Request {
Request(int id) : id_(id), artist_(new Echonest::Artist) {}
int id_;
boost::scoped_ptr<Echonest::Artist> artist_;
std::unique_ptr<Echonest::Artist> artist_;
};
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());
QNetworkReply* reply = request->artist_->fetchImages();

View File

@ -18,9 +18,9 @@
#ifndef ECHONESTIMAGES_H
#define ECHONESTIMAGES_H
#include "songinfoprovider.h"
#include <memory>
#include <boost/shared_ptr.hpp>
#include "songinfoprovider.h"
class QNetworkReply;
@ -35,7 +35,7 @@ private slots:
private:
struct Request;
typedef boost::shared_ptr<Request> RequestPtr;
typedef std::shared_ptr<Request> RequestPtr;
QMap<QNetworkReply*, RequestPtr> requests_;
};

View File

@ -16,22 +16,23 @@
*/
#include "echonesttags.h"
#include "tagwidget.h"
#include "core/logging.h"
#include <memory>
#include <echonest/Artist.h>
#include <boost/scoped_ptr.hpp>
#include "tagwidget.h"
#include "core/logging.h"
struct EchoNestTags::Request {
Request(int id) : id_(id), artist_(new Echonest::Artist) {}
int id_;
boost::scoped_ptr<Echonest::Artist> artist_;
std::unique_ptr<Echonest::Artist> artist_;
};
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());
QNetworkReply* reply = request->artist_->fetchTerms();
@ -65,7 +66,7 @@ void EchoNestTags::RequestFinished() {
widget->SetIcon(data.icon_);
foreach (const Echonest::Term& term, request->artist_->terms()) {
for (const Echonest::Term& term : request->artist_->terms()) {
widget->AddTag(term.name());
if (widget->count() >= 10)
break;

View File

@ -18,9 +18,9 @@
#ifndef ECHONESTTAGS_H
#define ECHONESTTAGS_H
#include "songinfoprovider.h"
#include <memory>
#include <boost/shared_ptr.hpp>
#include "songinfoprovider.h"
class QNetworkReply;
@ -35,7 +35,7 @@ private slots:
private:
struct Request;
typedef boost::shared_ptr<Request> RequestPtr;
typedef std::shared_ptr<Request> RequestPtr;
QMap<QNetworkReply*, RequestPtr> requests_;
};

View File

@ -18,9 +18,9 @@
#ifndef SONGINFOVIEW_H
#define SONGINFOVIEW_H
#include "songinfobase.h"
#include <memory>
#include <boost/scoped_ptr.hpp>
#include "songinfobase.h"
class UltimateLyricsProvider;
class UltimateLyricsReader;
@ -52,7 +52,7 @@ private slots:
void UltimateLyricsParsed();
private:
boost::scoped_ptr<UltimateLyricsReader> ultimate_reader_;
std::unique_ptr<UltimateLyricsReader> ultimate_reader_;
};
#endif // SONGINFOVIEW_H

View File

@ -26,8 +26,6 @@
#include <QTextCodec>
#include <QThread>
#include <boost/scoped_ptr.hpp>
const int UltimateLyricsProvider::kRedirectLimit = 5;

View File

@ -211,7 +211,7 @@ void AlbumCoverManager::showEvent(QShowEvent *) {
void AlbumCoverManager::closeEvent(QCloseEvent* e) {
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?"),
tr("Closing this window will stop searching for album covers."),
QMessageBox::Abort, this));

View File

@ -15,16 +15,17 @@
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
*/
#include "albumcovermanager.h"
#include "albumcovermanagerlist.h"
#include "library/librarybackend.h"
#include "playlist/songmimedata.h"
#include <boost/scoped_ptr.hpp>
#include <memory>
#include <QDropEvent>
#include <QUrl>
#include "albumcovermanager.h"
#include "library/librarybackend.h"
#include "playlist/songmimedata.h"
AlbumCoverManagerList::AlbumCoverManagerList(QWidget *parent)
: QListWidget(parent),
manager_(NULL)
@ -48,7 +49,7 @@ QMimeData* AlbumCoverManagerList::mimeData(const QList<QListWidgetItem*> items)
}
// 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;
mime_data->backend = manager_->backend();

View File

@ -18,14 +18,12 @@
#ifndef ALBUMCOVERSEARCHER_H
#define ALBUMCOVERSEARCHER_H
#include "covers/albumcoverfetcher.h"
#include "covers/albumcoverloaderoptions.h"
#include <QDialog>
#include <QIcon>
#include <QStyledItemDelegate>
#include <boost/shared_ptr.hpp>
#include "covers/albumcoverfetcher.h"
#include "covers/albumcoverloaderoptions.h"
class AlbumCoverLoader;
class Application;
@ -35,7 +33,6 @@ class QModelIndex;
class QStandardItem;
class QStandardItemModel;
class SizeOverlayDelegate : public QStyledItemDelegate {
public:
static const int kMargin;

View File

@ -24,11 +24,9 @@
#include <QKeySequence>
#include <boost/noncopyable.hpp>
#import "core/mac_utilities.h"
class MacMonitorWrapper : boost::noncopyable {
class MacMonitorWrapper {
public:
explicit MacMonitorWrapper(id monitor)
: local_monitor_(monitor) {
@ -40,6 +38,7 @@ class MacMonitorWrapper : boost::noncopyable {
private:
id local_monitor_;
Q_DISABLE_COPY(MacMonitorWrapper);
};
bool GlobalShortcutGrabber::HandleMacEvent(NSEvent* event) {

View File

@ -18,11 +18,11 @@
#ifndef GLOBALSHORTCUTSSETTINGSPAGE_H
#define GLOBALSHORTCUTSSETTINGSPAGE_H
#include <memory>
#include <QMap>
#include <QSettings>
#include <boost/scoped_ptr.hpp>
#include "core/globalshortcuts.h"
#include "ui/settingspage.h"
@ -64,7 +64,7 @@ private:
Ui_GlobalShortcutsSettingsPage* ui_;
bool initialised_;
boost::scoped_ptr<GlobalShortcutGrabber> grabber_;
std::unique_ptr<GlobalShortcutGrabber> grabber_;
QSettings settings_;
QMap<QString, Shortcut> shortcuts_;

View File

@ -18,14 +18,13 @@
#ifndef MACSYSTEMTRAYICON_H
#define MACSYSTEMTRAYICON_H
#include "systemtrayicon.h"
#include <memory>
#include <boost/noncopyable.hpp>
#include <boost/scoped_ptr.hpp>
#include "systemtrayicon.h"
class MacSystemTrayIconPrivate;
class MacSystemTrayIcon : public SystemTrayIcon, boost::noncopyable {
class MacSystemTrayIcon : public SystemTrayIcon {
Q_OBJECT
public:
@ -52,8 +51,8 @@ protected:
private:
QPixmap orange_icon_;
QPixmap grey_icon_;
boost::scoped_ptr<MacSystemTrayIconPrivate> p_;
std::unique_ptr<MacSystemTrayIconPrivate> p_;
Q_DISABLE_COPY(MacSystemTrayIcon);
};
#endif // MACSYSTEMTRAYICON_H

View File

@ -56,7 +56,7 @@
}
@end
class MacSystemTrayIconPrivate : boost::noncopyable {
class MacSystemTrayIconPrivate {
public:
MacSystemTrayIconPrivate() {
dock_menu_ = [[NSMenu alloc] initWithTitle:@"DockMenu"];
@ -153,6 +153,8 @@ class MacSystemTrayIconPrivate : boost::noncopyable {
NSMenuItem* now_playing_;
NSMenuItem* now_playing_artist_;
NSMenuItem* now_playing_title_;
Q_DISABLE_COPY(MacSystemTrayIconPrivate);
};
MacSystemTrayIcon::MacSystemTrayIcon(QObject* parent)

View File

@ -174,18 +174,8 @@ MainWindow::MainWindow(Application* app,
device_view_(new DeviceView(this)),
song_info_view_(new SongInfoView(this)),
artist_info_view_(new ArtistInfoView(this)),
settings_dialog_(NULL),
cover_manager_(NULL),
equalizer_(new Equalizer),
error_dialog_(NULL),
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_add_to_another_(NULL),
playlistitem_actions_separator_(NULL),

View File

@ -18,7 +18,7 @@
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <boost/scoped_ptr.hpp>
#include <memory>
#include <QMainWindow>
#include <QSettings>
@ -278,8 +278,8 @@ class MainWindow : public QMainWindow, public PlatformInterface {
Application* app_;
SystemTrayIcon* tray_icon_;
OSD* osd_;
boost::scoped_ptr<EditTagDialog> edit_tag_dialog_;
boost::scoped_ptr<About> about_dialog_;
std::unique_ptr<EditTagDialog> edit_tag_dialog_;
std::unique_ptr<About> about_dialog_;
GlobalShortcuts* global_shortcuts_;
Remote* remote_;
@ -293,25 +293,25 @@ class MainWindow : public QMainWindow, public PlatformInterface {
SongInfoView* song_info_view_;
ArtistInfoView* artist_info_view_;
boost::scoped_ptr<SettingsDialog> settings_dialog_;
boost::scoped_ptr<AddStreamDialog> add_stream_dialog_;
boost::scoped_ptr<AlbumCoverManager> cover_manager_;
boost::scoped_ptr<Equalizer> equalizer_;
boost::scoped_ptr<TranscodeDialog> transcode_dialog_;
boost::scoped_ptr<ErrorDialog> error_dialog_;
boost::scoped_ptr<OrganiseDialog> organise_dialog_;
boost::scoped_ptr<QueueManager> queue_manager_;
std::unique_ptr<SettingsDialog> settings_dialog_;
std::unique_ptr<AddStreamDialog> add_stream_dialog_;
std::unique_ptr<AlbumCoverManager> cover_manager_;
std::unique_ptr<Equalizer> equalizer_;
std::unique_ptr<TranscodeDialog> transcode_dialog_;
std::unique_ptr<ErrorDialog> error_dialog_;
std::unique_ptr<OrganiseDialog> organise_dialog_;
std::unique_ptr<QueueManager> queue_manager_;
boost::scoped_ptr<TagFetcher> tag_fetcher_;
boost::scoped_ptr<TrackSelectionDialog> track_selection_dialog_;
std::unique_ptr<TagFetcher> tag_fetcher_;
std::unique_ptr<TrackSelectionDialog> track_selection_dialog_;
PlaylistItemList autocomplete_tag_items_;
#ifdef ENABLE_VISUALISATIONS
boost::scoped_ptr<VisualisationContainer> visualisation_;
std::unique_ptr<VisualisationContainer> visualisation_;
#endif
#ifdef HAVE_WIIMOTEDEV
boost::scoped_ptr<WiimotedevShortcuts> wiimotedev_shortcuts_;
std::unique_ptr<WiimotedevShortcuts> wiimotedev_shortcuts_;
#endif
QAction* library_show_all_;

View File

@ -18,6 +18,8 @@
#ifndef ORGANISEDIALOG_H
#define ORGANISEDIALOG_H
#include <memory>
#include <QDialog>
#include <QMap>
#include <QUrl>
@ -25,8 +27,6 @@
#include "core/organiseformat.h"
#include "core/song.h"
#include <boost/scoped_ptr.hpp>
class LibraryWatcher;
class OrganiseErrorDialog;
class TaskManager;
@ -80,7 +80,7 @@ private:
SongList preview_songs_;
quint64 total_size_;
boost::scoped_ptr<OrganiseErrorDialog> error_dialog_;
std::unique_ptr<OrganiseErrorDialog> error_dialog_;
bool resized_by_user_;
};

View File

@ -48,15 +48,13 @@
ProjectMVisualisation::ProjectMVisualisation(QObject *parent)
: QGraphicsScene(parent),
projectm_(NULL),
preset_model_(NULL),
preset_model_(nullptr),
mode_(Random),
duration_(15),
texture_size_(512)
{
texture_size_(512) {
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);
}

View File

@ -18,12 +18,12 @@
#ifndef PROJECTMVISUALISATION_H
#define PROJECTMVISUALISATION_H
#include <memory>
#include <QGraphicsScene>
#include <QBasicTimer>
#include <QSet>
#include <boost/scoped_ptr.hpp>
#include "engines/bufferconsumer.h"
class projectM;
@ -77,12 +77,12 @@ private:
int IndexOfPreset(const QString& path) const;
private:
boost::scoped_ptr<projectM> projectm_;
std::unique_ptr<projectM> projectm_;
ProjectMPresetModel* preset_model_;
Mode mode_;
int duration_;
boost::scoped_ptr<QTemporaryFile> temporary_font_;
std::unique_ptr<QTemporaryFile> temporary_font_;
std::vector<int> default_rating_list_;

View File

@ -30,6 +30,8 @@
#ifndef FANCYTABWIDGET_H
#define FANCYTABWIDGET_H
#include <memory>
#include <QIcon>
#include <QPropertyAnimation>
#include <QProxyStyle>
@ -37,8 +39,6 @@
#include <QTimer>
#include <QWidget>
#include <boost/scoped_ptr.hpp>
class QActionGroup;
class QMenu;
class QPainter;
@ -219,7 +219,7 @@ private:
QMenu* menu_;
boost::scoped_ptr<FancyTabProxyStyle> proxy_style_;
std::unique_ptr<FancyTabProxyStyle> proxy_style_;
};
} // namespace Internal

View File

@ -18,12 +18,12 @@
#ifndef NOWPLAYINGWIDGET_H
#define NOWPLAYINGWIDGET_H
#include "core/song.h"
#include "covers/albumcoverloaderoptions.h"
#include <memory>
#include <QWidget>
#include <boost/scoped_ptr.hpp>
#include "core/song.h"
#include "covers/albumcoverloaderoptions.h"
class AlbumCoverChoiceController;
class Application;
@ -141,8 +141,8 @@ private:
static const char* kHypnotoadPath;
QAction* bask_in_his_glory_action_;
boost::scoped_ptr<QMovie> hypnotoad_;
boost::scoped_ptr<FullscreenHypnotoad> big_hypnotoad_;
std::unique_ptr<QMovie> hypnotoad_;
std::unique_ptr<FullscreenHypnotoad> big_hypnotoad_;
bool aww_;
KittenLoader* kittens_;

View File

@ -18,6 +18,8 @@
#ifndef OSD_H
#define OSD_H
#include <memory>
#include <QDateTime>
#include <QImage>
#include <QObject>
@ -36,7 +38,6 @@ class QDBusPendingCallWatcher;
#ifdef HAVE_DBUS
# include <QDBusArgument>
# include <boost/scoped_ptr.hpp>
QDBusArgument& operator<< (QDBusArgument& arg, const QImage& image);
const QDBusArgument& operator>> (const QDBusArgument& arg, QImage& image);
@ -136,7 +137,7 @@ class OSD : public QObject {
#endif // Q_OS_DARWIN
#ifdef HAVE_DBUS
boost::scoped_ptr<OrgFreedesktopNotificationsInterface> interface_;
std::unique_ptr<OrgFreedesktopNotificationsInterface> interface_;
uint notification_id_;
QDateTime last_notification_time_;
#endif

View File

@ -15,19 +15,20 @@
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include "osd.h"
#include "core/logging.h"
#include <memory>
#include <QtDebug>
#include "config.h"
#include "core/logging.h"
#ifdef HAVE_DBUS
#include "dbus/notification.h"
#include <QCoreApplication>
#include <QTextDocument>
using boost::scoped_ptr;
QDBusArgument& operator<< (QDBusArgument& arg, const QImage& image) {
if (image.isNull()) {
// 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
void OSD::CallFinished(QDBusPendingCallWatcher* watcher) {
scoped_ptr<QDBusPendingCallWatcher> w(watcher);
std::unique_ptr<QDBusPendingCallWatcher> w(watcher);
QDBusPendingReply<uint> reply = *watcher;
if (reply.isError()) {

View File

@ -36,7 +36,6 @@ WiimotedevShortcuts::WiimotedevShortcuts(OSD* osd, QWidget* window, QObject* par
wiimotedev_device_(1),
wiimotedev_enable_(true),
wiimotedev_focus_(false),
wiimotedev_iface_(NULL),
wiimotedev_notification_(true)
{
connect(this, SIGNAL(WiiremoteActived(int)), osd_, SLOT(WiiremoteActived(int)));

View File

@ -18,8 +18,9 @@
#ifndef WIIMOTEDEV_SHORTCUTS_H
#define WIIMOTEDEV_SHORTCUTS_H
#include <memory>
#include <QWidget>
#include <boost/scoped_ptr.hpp>
#include "dbus/wiimotedev.h"
#include "core/player.h"
@ -77,7 +78,7 @@ private:
quint32 wiimotedev_device_;
bool wiimotedev_enable_;
bool wiimotedev_focus_;
boost::scoped_ptr<OrgWiimotedevDeviceEventsInterface> wiimotedev_iface_;
std::unique_ptr<OrgWiimotedevDeviceEventsInterface> wiimotedev_iface_;
bool wiimotedev_notification_;
QHash <quint64, quint32> actions_;

View File

@ -18,11 +18,11 @@
#ifndef WIIMOTESHORTCUTGRABBER_H
#define WIIMOTESHORTCUTGRABBER_H
#include <memory>
#include <QDialog>
#include <QTimeLine>
#include <boost/scoped_ptr.hpp>
#include "wiimotesettingspage.h"
#include "dbus/wiimotedev.h"
@ -47,7 +47,7 @@ private:
Ui_WiimoteShortcutGrabber* ui_;
WiimoteSettingsPage* config_;
boost::scoped_ptr<OrgWiimotedevDeviceEventsInterface> wiimotedev_iface_;
std::unique_ptr<OrgWiimotedevDeviceEventsInterface> wiimotedev_iface_;
quint32 wiimotedev_device_;
quint64 wiimotedev_buttons_;