Remove useless using std
This commit is contained in:
parent
1cfe61dc72
commit
c69fff52cc
|
@ -34,8 +34,6 @@
|
|||
#include "collectionbackend.h"
|
||||
#include "collectiondirectorymodel.h"
|
||||
|
||||
using std::shared_ptr;
|
||||
|
||||
CollectionDirectoryModel::CollectionDirectoryModel(CollectionBackend *backend, QObject *parent)
|
||||
: QStandardItemModel(parent),
|
||||
dir_icon_(IconLoader::Load("document-open-folder")),
|
||||
|
|
|
@ -64,8 +64,6 @@
|
|||
#include "organise/organisedialog.h"
|
||||
#include "settings/collectionsettingspage.h"
|
||||
|
||||
using std::unique_ptr;
|
||||
|
||||
CollectionView::CollectionView(QWidget *parent)
|
||||
: AutoExpandingTreeView(parent),
|
||||
app_(nullptr),
|
||||
|
|
|
@ -47,8 +47,6 @@ class CollectionFilterWidget;
|
|||
class EditTagDialog;
|
||||
class OrganiseDialog;
|
||||
|
||||
using std::unique_ptr;
|
||||
|
||||
class CollectionView : public AutoExpandingTreeView {
|
||||
Q_OBJECT
|
||||
|
||||
|
|
|
@ -75,9 +75,6 @@
|
|||
#include "internet/internetservice.h"
|
||||
#include "scrobbler/audioscrobbler.h"
|
||||
|
||||
using std::shared_ptr;
|
||||
using std::unique_ptr;
|
||||
|
||||
const char *Player::kSettingsGroup = "Player";
|
||||
|
||||
Player::Player(Application *app, QObject *parent)
|
||||
|
@ -125,7 +122,7 @@ Engine::EngineType Player::CreateEngine(Engine::EngineType enginetype) {
|
|||
#ifdef HAVE_GSTREAMER
|
||||
case Engine::GStreamer:{
|
||||
use_enginetype=Engine::GStreamer;
|
||||
unique_ptr<GstEngine> gst_engine(new GstEngine(app_->task_manager()));
|
||||
std::unique_ptr<GstEngine> gst_engine(new GstEngine(app_->task_manager()));
|
||||
gst_engine->SetStartup(gst_startup_);
|
||||
engine_.reset(gst_engine.release());
|
||||
break;
|
||||
|
|
|
@ -48,8 +48,6 @@ class Equalizer;
|
|||
class GstStartup;
|
||||
#endif
|
||||
|
||||
using std::unique_ptr;
|
||||
|
||||
namespace Engine {
|
||||
struct SimpleMetaBundle;
|
||||
} // namespace Engine
|
||||
|
|
|
@ -66,9 +66,6 @@
|
|||
#endif
|
||||
|
||||
using std::placeholders::_1;
|
||||
using std::bind;
|
||||
using std::stable_sort;
|
||||
using std::shared_ptr;
|
||||
|
||||
QSet<QString> SongLoader::sRawUriSchemes;
|
||||
const int SongLoader::kDefaultTimeout = 5000;
|
||||
|
|
|
@ -37,8 +37,6 @@
|
|||
#include "coversearchstatisticsdialog.h"
|
||||
#include "ui_coversearchstatisticsdialog.h"
|
||||
|
||||
using std::sort;
|
||||
|
||||
CoverSearchStatisticsDialog::CoverSearchStatisticsDialog(QWidget *parent)
|
||||
: QDialog(parent), ui_(new Ui_CoverSearchStatisticsDialog) {
|
||||
|
||||
|
|
|
@ -87,8 +87,6 @@
|
|||
# include "giolister.h" // Needs to be last because of #undef signals.
|
||||
#endif
|
||||
|
||||
using std::bind;
|
||||
|
||||
const int DeviceManager::kDeviceIconSize = 32;
|
||||
const int DeviceManager::kDeviceIconOverlaySize = 16;
|
||||
|
||||
|
@ -108,7 +106,7 @@ DeviceManager::DeviceManager(Application *app, QObject *parent)
|
|||
connect(this, SIGNAL(DeviceCreatedFromDB(DeviceInfo*)), SLOT(AddDeviceFromDB(DeviceInfo*)));
|
||||
|
||||
// This reads from the database and contents on the database mutex, which can be very slow on startup.
|
||||
ConcurrentRun::Run<void>(&thread_pool_, bind(&DeviceManager::LoadAllDevices, this));
|
||||
ConcurrentRun::Run<void>(&thread_pool_, std::bind(&DeviceManager::LoadAllDevices, this));
|
||||
|
||||
// This proxy model only shows connected devices
|
||||
connected_devices_model_ = new DeviceStateFilterModel(this);
|
||||
|
|
|
@ -58,9 +58,6 @@
|
|||
#include "gstenginepipeline.h"
|
||||
#include "gstbufferconsumer.h"
|
||||
|
||||
using std::shared_ptr;
|
||||
using std::vector;
|
||||
|
||||
const char *GstEngine::kAutoSink = "autoaudiosink";
|
||||
const char *GstEngine::kALSASink = "alsasink";
|
||||
const char *GstEngine::kOpenALSASink = "openalsink";
|
||||
|
@ -167,7 +164,7 @@ bool GstEngine::Load(const QUrl &stream_url, const QUrl &original_url, Engine::T
|
|||
return true;
|
||||
}
|
||||
|
||||
shared_ptr<GstEnginePipeline> pipeline = CreatePipeline(gst_url, original_url, force_stop_at_end ? end_nanosec : 0);
|
||||
std::shared_ptr<GstEnginePipeline> pipeline = CreatePipeline(gst_url, original_url, force_stop_at_end ? end_nanosec : 0);
|
||||
if (!pipeline) return false;
|
||||
|
||||
if (crossfade) StartFadeout();
|
||||
|
@ -749,11 +746,11 @@ void GstEngine::StopTimers() {
|
|||
}
|
||||
}
|
||||
|
||||
shared_ptr<GstEnginePipeline> GstEngine::CreatePipeline() {
|
||||
std::shared_ptr<GstEnginePipeline> GstEngine::CreatePipeline() {
|
||||
|
||||
EnsureInitialised();
|
||||
|
||||
shared_ptr<GstEnginePipeline> ret(new GstEnginePipeline(this));
|
||||
std::shared_ptr<GstEnginePipeline> ret(new GstEnginePipeline(this));
|
||||
ret->set_output_device(output_, device_);
|
||||
ret->set_volume_enabled(volume_control_);
|
||||
ret->set_stereo_balancer_enabled(stereo_balancer_enabled_);
|
||||
|
@ -778,9 +775,9 @@ shared_ptr<GstEnginePipeline> GstEngine::CreatePipeline() {
|
|||
|
||||
}
|
||||
|
||||
shared_ptr<GstEnginePipeline> GstEngine::CreatePipeline(const QByteArray &gst_url, const QUrl &original_url, const qint64 end_nanosec) {
|
||||
std::shared_ptr<GstEnginePipeline> GstEngine::CreatePipeline(const QByteArray &gst_url, const QUrl &original_url, const qint64 end_nanosec) {
|
||||
|
||||
shared_ptr<GstEnginePipeline> ret = CreatePipeline();
|
||||
std::shared_ptr<GstEnginePipeline> ret = CreatePipeline();
|
||||
if (!ret->InitFromUrl(gst_url, original_url, end_nanosec)) ret.reset();
|
||||
return ret;
|
||||
|
||||
|
|
|
@ -44,8 +44,6 @@
|
|||
#include <QString>
|
||||
#include <QUrl>
|
||||
|
||||
using std::unique_ptr;
|
||||
|
||||
class QTimerEvent;
|
||||
class GstEngine;
|
||||
class GstBufferConsumer;
|
||||
|
|
|
@ -62,8 +62,6 @@
|
|||
# include "xinescope.h"
|
||||
#endif
|
||||
|
||||
using std::shared_ptr;
|
||||
|
||||
#ifndef LLONG_MAX
|
||||
#define LLONG_MAX 9223372036854775807LL
|
||||
#endif
|
||||
|
|
|
@ -39,8 +39,6 @@
|
|||
#include "engine_fwd.h"
|
||||
#include "enginebase.h"
|
||||
|
||||
using std::shared_ptr;
|
||||
|
||||
class TaskManager;
|
||||
class PruneScopeThread;
|
||||
|
||||
|
|
|
@ -50,8 +50,6 @@
|
|||
# include <windows.h>
|
||||
#endif
|
||||
|
||||
using std::unique_ptr;
|
||||
|
||||
MoodbarLoader::MoodbarLoader(Application* app, QObject* parent)
|
||||
: QObject(parent),
|
||||
cache_(new QNetworkDiskCache(this)),
|
||||
|
|
|
@ -49,8 +49,6 @@
|
|||
#include "core/timeconstants.h"
|
||||
#include "core/logging.h"
|
||||
|
||||
using std::stable_sort;
|
||||
|
||||
const char *AcoustidClient::kClientId = "0qjUoxbowg";
|
||||
const char *AcoustidClient::kUrl = "https://api.acoustid.org/v2/lookup";
|
||||
const int AcoustidClient::kDefaultTimeout = 5000; // msec
|
||||
|
|
|
@ -51,9 +51,6 @@
|
|||
#include "core/utilities.h"
|
||||
#include "musicbrainzclient.h"
|
||||
|
||||
using std::sort;
|
||||
using std::stable_sort;
|
||||
|
||||
const char *MusicBrainzClient::kTrackUrl = "https://musicbrainz.org/ws/2/recording/";
|
||||
const char *MusicBrainzClient::kDiscUrl = "https://musicbrainz.org/ws/2/discid/";
|
||||
const char *MusicBrainzClient::kDateRegex = "^[12]\\d{3}";
|
||||
|
|
|
@ -36,8 +36,6 @@
|
|||
#include "organiseerrordialog.h"
|
||||
#include "ui_organiseerrordialog.h"
|
||||
|
||||
using std::stable_sort;
|
||||
|
||||
OrganiseErrorDialog::OrganiseErrorDialog(QWidget *parent) : QDialog(parent), ui_(new Ui_OrganiseErrorDialog) {
|
||||
|
||||
ui_->setupUi(this);
|
||||
|
|
|
@ -57,7 +57,6 @@
|
|||
#include "playlistparsers/cueparser.h"
|
||||
|
||||
using std::placeholders::_1;
|
||||
using std::shared_ptr;
|
||||
|
||||
const int PlaylistBackend::kSongTableJoins = 2;
|
||||
|
||||
|
@ -346,7 +345,7 @@ void PlaylistBackend::SavePlaylist(int playlist, const PlaylistItemList &items,
|
|||
if (db_->CheckErrors(clear)) return;
|
||||
|
||||
// Save the new ones
|
||||
for (const PlaylistItemPtr item : items) {
|
||||
for (PlaylistItemPtr item : items) {
|
||||
insert.bindValue(":playlist", playlist);
|
||||
item->BindToQuery(&insert);
|
||||
|
||||
|
|
|
@ -42,8 +42,6 @@
|
|||
#include "wplparser.h"
|
||||
#include "xspfparser.h"
|
||||
|
||||
using std::stable_sort;
|
||||
|
||||
const int PlaylistParser::kMagicSize = 512;
|
||||
|
||||
PlaylistParser::PlaylistParser(CollectionBackendInterface *collection, QObject *parent)
|
||||
|
|
|
@ -42,8 +42,6 @@
|
|||
#include "playlist/playlistitem.h"
|
||||
#include "queue.h"
|
||||
|
||||
using std::stable_sort;
|
||||
|
||||
const char *Queue::kRowsMimetype = "application/x-strawberry-queue-rows";
|
||||
|
||||
Queue::Queue(Playlist *parent) : QAbstractProxyModel(parent), playlist_(parent), total_length_ns_(0) {
|
||||
|
|
|
@ -40,8 +40,6 @@
|
|||
#include "queueview.h"
|
||||
#include "ui_queueview.h"
|
||||
|
||||
using std::stable_sort;
|
||||
|
||||
QueueView::QueueView(QWidget *parent)
|
||||
: QWidget(parent),
|
||||
ui_(new Ui_QueueView),
|
||||
|
|
|
@ -57,8 +57,6 @@
|
|||
#include "settings/settingsdialog.h"
|
||||
#include "settings/subsonicsettingspage.h"
|
||||
|
||||
using std::shared_ptr;
|
||||
|
||||
const Song::Source SubsonicService::kSource = Song::Source_Subsonic;
|
||||
const char *SubsonicService::kClientName = "Strawberry";
|
||||
const char *SubsonicService::kApiVersion = "1.11.0";
|
||||
|
|
|
@ -48,8 +48,6 @@ class SubsonicRequest;
|
|||
class CollectionBackend;
|
||||
class CollectionModel;
|
||||
|
||||
using std::shared_ptr;
|
||||
|
||||
class SubsonicService : public InternetService {
|
||||
Q_OBJECT
|
||||
|
||||
|
|
|
@ -70,8 +70,6 @@
|
|||
#undef AddJob
|
||||
#endif
|
||||
|
||||
using std::sort;
|
||||
|
||||
const char *TranscodeDialog::kSettingsGroup = "Transcoder";
|
||||
const int TranscodeDialog::kProgressInterval = 500;
|
||||
const int TranscodeDialog::kMaxDestinationItems = 10;
|
||||
|
|
|
@ -46,9 +46,6 @@
|
|||
#include "core/signalchecker.h"
|
||||
#include "transcoder.h"
|
||||
|
||||
using std::shared_ptr;
|
||||
using std::sort;
|
||||
|
||||
int Transcoder::JobFinishedEvent::sEventType = -1;
|
||||
|
||||
TranscoderPreset::TranscoderPreset(Song::FileType type, const QString &name, const QString &extension, const QString &codec_mimetype, const QString &muxer_mimetype)
|
||||
|
@ -414,7 +411,7 @@ void Transcoder::JobState::ReportError(GstMessage *msg) {
|
|||
|
||||
bool Transcoder::StartJob(const Job &job) {
|
||||
|
||||
shared_ptr<JobState> state(new JobState(job, this));
|
||||
std::shared_ptr<JobState> state(new JobState(job, this));
|
||||
|
||||
emit LogLine(tr("Starting %1").arg(QDir::toNativeSeparators(job.input)));
|
||||
|
||||
|
@ -526,7 +523,7 @@ void Transcoder::Cancel() {
|
|||
// Stop the running ones
|
||||
JobStateList::iterator it = current_jobs_.begin();
|
||||
while (it != current_jobs_.end()) {
|
||||
shared_ptr<JobState> state(*it);
|
||||
std::shared_ptr<JobState> state(*it);
|
||||
|
||||
// Remove event handlers from the gstreamer pipeline so they don't get called after the pipeline is shutting down
|
||||
gst_bus_set_sync_handler(gst_pipeline_get_bus(GST_PIPELINE(state->pipeline_)), nullptr, nullptr, nullptr);
|
||||
|
|
|
@ -33,7 +33,6 @@
|
|||
#include <QtDebug>
|
||||
#include <QUndoStack>
|
||||
|
||||
using std::shared_ptr;
|
||||
using ::testing::Return;
|
||||
|
||||
namespace {
|
||||
|
@ -60,8 +59,8 @@ class PlaylistTest : public ::testing::Test {
|
|||
return ret;
|
||||
}
|
||||
|
||||
shared_ptr<PlaylistItem> MakeMockItemP(const QString& title, const QString& artist = QString(), const QString& album = QString(), int length = 123) const {
|
||||
return shared_ptr<PlaylistItem>(MakeMockItem(title, artist, album, length));
|
||||
std::shared_ptr<PlaylistItem> MakeMockItemP(const QString& title, const QString& artist = QString(), const QString& album = QString(), int length = 123) const {
|
||||
return std::shared_ptr<PlaylistItem>(MakeMockItem(title, artist, album, length));
|
||||
}
|
||||
|
||||
Playlist playlist_;
|
||||
|
@ -76,7 +75,7 @@ TEST_F(PlaylistTest, Basic) {
|
|||
TEST_F(PlaylistTest, InsertItems) {
|
||||
|
||||
MockPlaylistItem* item = MakeMockItem("Title", "Artist", "Album", 123);
|
||||
shared_ptr<PlaylistItem> item_ptr(item);
|
||||
std::shared_ptr<PlaylistItem> item_ptr(item);
|
||||
|
||||
// Insert the item
|
||||
EXPECT_EQ(0, playlist_.rowCount(QModelIndex()));
|
||||
|
|
Loading…
Reference in New Issue