Remove whitespaces
This commit is contained in:
@@ -62,7 +62,7 @@ Database::Token::Token(const QString &token, int start, int end)
|
||||
: token(token), start_offset(start), end_offset(end) {}
|
||||
|
||||
struct sqlite3_tokenizer_module {
|
||||
|
||||
|
||||
int iVersion;
|
||||
int (*xCreate)(int argc, /* Size of argv array */
|
||||
const char *const *argv, /* Tokenizer argument strings */
|
||||
@@ -106,7 +106,7 @@ int Database::FTSCreate(int argc, const char *const *argv, sqlite3_tokenizer **t
|
||||
}
|
||||
|
||||
int Database::FTSDestroy(sqlite3_tokenizer *tokenizer) {
|
||||
|
||||
|
||||
UnicodeTokenizer *real_tokenizer = reinterpret_cast<UnicodeTokenizer*>(tokenizer);
|
||||
delete real_tokenizer;
|
||||
return SQLITE_OK;
|
||||
@@ -460,7 +460,7 @@ void Database::UrlEncodeFilenameColumn(const QString &table, QSqlDatabase &db) {
|
||||
update.prepare(QString("UPDATE %1 SET filename=:filename WHERE ROWID=:id").arg(table));
|
||||
select.exec();
|
||||
if (CheckErrors(select)) return;
|
||||
|
||||
|
||||
while (select.next()) {
|
||||
const int rowid = select.value(0).toInt();
|
||||
const QString filename = select.value(1).toString();
|
||||
@@ -565,7 +565,7 @@ QStringList Database::SongsTables(QSqlDatabase &db, int schema_version) const {
|
||||
}
|
||||
|
||||
bool Database::CheckErrors(const QSqlQuery &query) {
|
||||
|
||||
|
||||
QSqlError last_error = query.lastError();
|
||||
if (last_error.isValid()) {
|
||||
qLog(Error) << "db error: " << last_error;
|
||||
|
||||
@@ -11,7 +11,7 @@ class PlatformInterface;
|
||||
NSMenu* dock_menu_;
|
||||
MacGlobalShortcutBackend* shortcut_handler_;
|
||||
SPMediaKeyTap* key_tap_;
|
||||
|
||||
|
||||
}
|
||||
|
||||
- (id) initWithHandler: (PlatformInterface*)handler;
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "macsystemtrayicon.h"
|
||||
@@ -183,7 +183,7 @@ void MacSystemTrayIcon::SetupMenu(QAction* previous, QAction* play, QAction* sto
|
||||
SetupMenuItem(mute);
|
||||
p_->AddSeparator();
|
||||
Q_UNUSED(quit); // Mac already has a Quit item.
|
||||
|
||||
|
||||
}
|
||||
|
||||
void MacSystemTrayIcon::SetupMenuItem(QAction* action) {
|
||||
|
||||
@@ -280,7 +280,7 @@ MainWindow::MainWindow(Application *app, SystemTrayIcon *tray_icon, OSD *osd, co
|
||||
collection_sort_model_->setDynamicSortFilter(true);
|
||||
collection_sort_model_->setSortLocaleAware(true);
|
||||
collection_sort_model_->sort(0);
|
||||
|
||||
|
||||
qLog(Debug) << "Creating models finished";
|
||||
|
||||
connect(ui_->playlist, SIGNAL(ViewSelectionModelChanged()), SLOT(PlaylistViewSelectionModelChanged()));
|
||||
@@ -617,7 +617,7 @@ MainWindow::MainWindow(Application *app, SystemTrayIcon *tray_icon, OSD *osd, co
|
||||
connect(ui_->tabs, SIGNAL(ModeChanged(FancyTabWidget::Mode)), SLOT(SaveGeometry()));
|
||||
connect(ui_->tabs, SIGNAL(CurrentChanged(int)), SLOT(TabSwitched()));
|
||||
connect(ui_->tabs, SIGNAL(CurrentChanged(int)), SLOT(SaveGeometry()));
|
||||
|
||||
|
||||
// Context
|
||||
connect(app_->playlist_manager(), SIGNAL(CurrentSongChanged(Song)), context_view_, SLOT(SongChanged(Song)));
|
||||
connect(app_->player(), SIGNAL(PlaylistFinished()), context_view_, SLOT(Stopped()));
|
||||
@@ -841,7 +841,7 @@ void MainWindow::MediaStopped() {
|
||||
}
|
||||
|
||||
void MainWindow::MediaPaused() {
|
||||
|
||||
|
||||
ui_->action_stop->setEnabled(true);
|
||||
ui_->action_stop_after_this_track->setEnabled(true);
|
||||
ui_->action_play_pause->setIcon(IconLoader::Load("media-play"));
|
||||
@@ -920,7 +920,7 @@ void MainWindow::resizeEvent(QResizeEvent *event) {
|
||||
}
|
||||
|
||||
void MainWindow::TabSwitched() {
|
||||
|
||||
|
||||
if (ui_->tabs->currentIndex() > 0)
|
||||
ui_->widget_playing->SetEnabled();
|
||||
else
|
||||
@@ -943,7 +943,7 @@ void MainWindow::SaveGeometry() {
|
||||
}
|
||||
|
||||
void MainWindow::SavePlaybackStatus() {
|
||||
|
||||
|
||||
QSettings settings;
|
||||
|
||||
settings.beginGroup("Player");
|
||||
@@ -954,13 +954,13 @@ void MainWindow::SavePlaybackStatus() {
|
||||
else {
|
||||
settings.setValue("playback_position", 0);
|
||||
}
|
||||
|
||||
|
||||
settings.endGroup();
|
||||
|
||||
|
||||
}
|
||||
|
||||
void MainWindow::LoadPlaybackStatus() {
|
||||
|
||||
|
||||
QSettings settings;
|
||||
|
||||
settings.beginGroup(BehaviourSettingsPage::kSettingsGroup);
|
||||
@@ -973,7 +973,7 @@ void MainWindow::LoadPlaybackStatus() {
|
||||
saved_playback_state_ = static_cast<Engine::State> (settings.value("playback_state", Engine::Empty).toInt());
|
||||
saved_playback_position_ = settings.value("playback_position", 0).toDouble();
|
||||
settings.endGroup();
|
||||
|
||||
|
||||
if (saved_playback_state_ == Engine::Empty || saved_playback_state_ == Engine::Idle) {
|
||||
return;
|
||||
}
|
||||
@@ -998,7 +998,7 @@ void MainWindow::ResumePlayback() {
|
||||
}
|
||||
|
||||
void MainWindow::PlayIndex(const QModelIndex &index) {
|
||||
|
||||
|
||||
if (!index.isValid()) return;
|
||||
|
||||
int row = index.row();
|
||||
@@ -1043,7 +1043,7 @@ void MainWindow::VolumeWheelEvent(int delta) {
|
||||
}
|
||||
|
||||
void MainWindow::ToggleShowHide() {
|
||||
|
||||
|
||||
if (settings_.value("hidden").toBool()) {
|
||||
show();
|
||||
SetHiddenInTray(false);
|
||||
@@ -1119,7 +1119,7 @@ void MainWindow::Seeked(qlonglong microseconds) {
|
||||
}
|
||||
|
||||
void MainWindow::UpdateTrackPosition() {
|
||||
|
||||
|
||||
// Track position in seconds
|
||||
//Playlist *playlist = app_->playlist_manager()->active();
|
||||
|
||||
@@ -1217,7 +1217,7 @@ void MainWindow::AddToPlaylist(QMimeData *data) {
|
||||
}
|
||||
|
||||
void MainWindow::AddToPlaylist(QAction *action) {
|
||||
|
||||
|
||||
int destination = action->data().toInt();
|
||||
PlaylistItemList items;
|
||||
|
||||
@@ -1289,17 +1289,17 @@ void MainWindow::PlaylistRightClick(const QPoint &global_pos, const QModelIndex
|
||||
int not_in_queue = 0;
|
||||
int in_skipped = 0;
|
||||
int not_in_skipped = 0;
|
||||
|
||||
|
||||
for (const QModelIndex &index : selection) {
|
||||
|
||||
|
||||
all++;
|
||||
|
||||
if (index.column() != 0) continue;
|
||||
|
||||
|
||||
selected++;
|
||||
|
||||
|
||||
PlaylistItemPtr item = app_->playlist_manager()->current()->item_at(index.row());
|
||||
|
||||
|
||||
if (item->Metadata().has_cue()) {
|
||||
cue_selected = true;
|
||||
}
|
||||
@@ -1349,7 +1349,7 @@ void MainWindow::PlaylistRightClick(const QPoint &global_pos, const QModelIndex
|
||||
//qLog(Debug) << "selected" << selected;
|
||||
//qLog(Debug) << "in_queue" << in_queue << "not_in_queue" << not_in_queue;
|
||||
//qLog(Debug) << "in_skipped" << in_skipped << "not_in_skipped" << not_in_skipped;
|
||||
|
||||
|
||||
if (selected < 1) {
|
||||
playlist_queue_->setVisible(false);
|
||||
playlist_skip_->setVisible(false);
|
||||
@@ -1382,8 +1382,8 @@ void MainWindow::PlaylistRightClick(const QPoint &global_pos, const QModelIndex
|
||||
ui_->action_edit_value->setVisible(false);
|
||||
}
|
||||
else {
|
||||
|
||||
|
||||
|
||||
|
||||
Playlist::Column column = (Playlist::Column)index.column();
|
||||
bool column_is_editable = Playlist::column_is_editable(column) && editable;
|
||||
|
||||
@@ -1584,7 +1584,7 @@ void MainWindow::EditValue() {
|
||||
}
|
||||
|
||||
void MainWindow::AddFile() {
|
||||
|
||||
|
||||
// Last used directory
|
||||
QString directory =settings_.value("add_media_path", QDir::currentPath()).toString();
|
||||
|
||||
@@ -2052,7 +2052,7 @@ SettingsDialog *MainWindow::CreateSettingsDialog() {
|
||||
}
|
||||
|
||||
void MainWindow::EnsureSettingsDialogCreated() {
|
||||
|
||||
|
||||
//if (settings_dialog_) return;
|
||||
|
||||
//settings_dialog_.reset(new SettingsDialog(app_));
|
||||
@@ -2064,14 +2064,14 @@ void MainWindow::EnsureSettingsDialogCreated() {
|
||||
|
||||
// Allows custom notification preview
|
||||
//connect(settings_dialog_.get(), SIGNAL(NotificationPreview(OSD::Behaviour,QString,QString)), SLOT(HandleNotificationPreview(OSD::Behaviour, QString, QString)));
|
||||
|
||||
|
||||
}
|
||||
|
||||
void MainWindow::OpenSettingsDialog() {
|
||||
|
||||
EnsureSettingsDialogCreated();
|
||||
settings_dialog_->show();
|
||||
|
||||
|
||||
}
|
||||
|
||||
void MainWindow::OpenSettingsDialogAtPage(SettingsDialog::Page page) {
|
||||
@@ -2127,7 +2127,7 @@ void MainWindow::ShowErrorDialog(const QString &message) {
|
||||
}
|
||||
|
||||
void MainWindow::CheckFullRescanRevisions() {
|
||||
|
||||
|
||||
int from = app_->database()->startup_schema_version();
|
||||
int to = app_->database()->current_schema_version();
|
||||
|
||||
@@ -2169,7 +2169,7 @@ void MainWindow::ShowQueueManager() {
|
||||
}
|
||||
|
||||
void MainWindow::PlaylistViewSelectionModelChanged() {
|
||||
|
||||
|
||||
connect(ui_->playlist->view()->selectionModel(),SIGNAL(currentChanged(QModelIndex, QModelIndex)), SLOT(PlaylistCurrentChanged(QModelIndex)));
|
||||
}
|
||||
|
||||
@@ -2251,7 +2251,7 @@ void MainWindow::AutoCompleteTags() {
|
||||
}
|
||||
|
||||
void MainWindow::AutoCompleteTagsAccepted() {
|
||||
|
||||
|
||||
for (PlaylistItemPtr item : autocomplete_tag_items_) {
|
||||
item->Reload();
|
||||
}
|
||||
@@ -2389,7 +2389,7 @@ void MainWindow::AlbumArtLoaded(const Song &song, const QString&, const QImage &
|
||||
}
|
||||
|
||||
void MainWindow::GetCoverAutomatically() {
|
||||
|
||||
|
||||
// Search for cover automatically?
|
||||
bool search =
|
||||
album_cover_choice_controller_->search_cover_auto_action()->isChecked() &&
|
||||
|
||||
@@ -296,7 +296,7 @@ signals:
|
||||
|
||||
// creates the icon by painting the full one depending on the current position
|
||||
QPixmap CreateOverlayedIcon(int position, int scrobble_point);
|
||||
|
||||
|
||||
void GetCoverAutomatically();
|
||||
|
||||
private:
|
||||
|
||||
@@ -453,7 +453,7 @@ bool MergedProxyModel::dropMimeData(const QMimeData *data, Qt::DropAction action
|
||||
}
|
||||
|
||||
QModelIndex MergedProxyModel::FindSourceParent(const QModelIndex &proxy_index) const {
|
||||
|
||||
|
||||
if (!proxy_index.isValid()) return QModelIndex();
|
||||
|
||||
QModelIndex source_index = mapToSource(proxy_index);
|
||||
@@ -463,7 +463,7 @@ QModelIndex MergedProxyModel::FindSourceParent(const QModelIndex &proxy_index) c
|
||||
}
|
||||
|
||||
bool MergedProxyModel::canFetchMore(const QModelIndex &parent) const {
|
||||
|
||||
|
||||
QModelIndex source_index = mapToSource(parent);
|
||||
|
||||
if (!source_index.isValid())
|
||||
@@ -473,7 +473,7 @@ bool MergedProxyModel::canFetchMore(const QModelIndex &parent) const {
|
||||
}
|
||||
|
||||
void MergedProxyModel::fetchMore(const QModelIndex &parent) {
|
||||
|
||||
|
||||
QModelIndex source_index = mapToSource(parent);
|
||||
|
||||
if (!source_index.isValid())
|
||||
|
||||
@@ -52,7 +52,7 @@ class MimeData : public QMimeData {
|
||||
|
||||
// If this is set then the items are added to the queue after being inserted.
|
||||
bool enqueue_now_;
|
||||
|
||||
|
||||
// If this is set then the items are added to the beginning of the queue after being inserted.
|
||||
bool enqueue_next_now_;
|
||||
|
||||
|
||||
@@ -121,7 +121,7 @@ Mpris2::Mpris2(Application *app, QObject *parent) : QObject(parent), app_(app) {
|
||||
connect(app_->playlist_manager(), SIGNAL(CurrentSongChanged(Song)), SLOT(CurrentSongChanged(Song)));
|
||||
connect(app_->playlist_manager(), SIGNAL(PlaylistChanged(Playlist*)), SLOT(PlaylistChanged(Playlist*)));
|
||||
connect(app_->playlist_manager(), SIGNAL(CurrentChanged(Playlist*)), SLOT(PlaylistCollectionChanged(Playlist*)));
|
||||
|
||||
|
||||
}
|
||||
|
||||
// when PlaylistManager gets it ready, we connect PlaylistSequence with this
|
||||
|
||||
@@ -155,7 +155,7 @@ void Player::CreateEngine(Engine::EngineType enginetype) {
|
||||
}
|
||||
|
||||
void Player::Init() {
|
||||
|
||||
|
||||
if (!engine_->Init()) { qFatal("Error initialising audio engine"); }
|
||||
|
||||
analyzer_->SetEngine(engine_.get());
|
||||
@@ -347,7 +347,7 @@ void Player::TrackEnded() {
|
||||
}
|
||||
|
||||
void Player::PlayPause() {
|
||||
|
||||
|
||||
switch (engine_->state()) {
|
||||
case Engine::Paused:
|
||||
engine_->Unpause();
|
||||
@@ -520,7 +520,7 @@ void Player::CurrentMetadataChanged(const Song &metadata) {
|
||||
}
|
||||
|
||||
void Player::SeekTo(int seconds) {
|
||||
|
||||
|
||||
const qint64 length_nanosec = engine_->length_nanosec();
|
||||
|
||||
// If the length is 0 then either there is no song playing, or the song isn't seekable.
|
||||
@@ -724,7 +724,7 @@ void Player::RegisterUrlHandler(UrlHandler *handler) {
|
||||
url_handlers_.insert(scheme, handler);
|
||||
connect(handler, SIGNAL(destroyed(QObject*)), SLOT(UrlHandlerDestroyed(QObject*)));
|
||||
connect(handler, SIGNAL(AsyncLoadComplete(UrlHandler::LoadResult)), SLOT(HandleLoadResult(UrlHandler::LoadResult)));
|
||||
|
||||
|
||||
}
|
||||
|
||||
void Player::UnregisterUrlHandler(UrlHandler *handler) {
|
||||
|
||||
@@ -78,7 +78,7 @@ QtSystemTrayIcon::~QtSystemTrayIcon() {
|
||||
}
|
||||
|
||||
bool QtSystemTrayIcon::eventFilter(QObject *object, QEvent *event) {
|
||||
|
||||
|
||||
if (QObject::eventFilter(object, event)) return true;
|
||||
|
||||
if (object != tray_) return false;
|
||||
@@ -135,7 +135,7 @@ void QtSystemTrayIcon::SetupMenu(QAction *previous, QAction *play, QAction *stop
|
||||
}
|
||||
|
||||
void QtSystemTrayIcon::Clicked(QSystemTrayIcon::ActivationReason reason) {
|
||||
|
||||
|
||||
switch (reason) {
|
||||
case QSystemTrayIcon::DoubleClick:
|
||||
case QSystemTrayIcon::Trigger:
|
||||
|
||||
@@ -1051,7 +1051,7 @@ void Song::BindToQuery(QSqlQuery *query) const {
|
||||
query->bindValue(":mtime", notnullintval(d->mtime_));
|
||||
query->bindValue(":ctime", notnullintval(d->ctime_));
|
||||
query->bindValue(":unavailable", d->unavailable_ ? 1 : 0);
|
||||
|
||||
|
||||
query->bindValue(":playcount", d->playcount_);
|
||||
query->bindValue(":skipcount", d->skipcount_);
|
||||
query->bindValue(":lastplayed", intval(d->lastplayed_));
|
||||
@@ -1060,13 +1060,13 @@ void Song::BindToQuery(QSqlQuery *query) const {
|
||||
query->bindValue(":compilation_on", d->compilation_on_ ? 1 : 0);
|
||||
query->bindValue(":compilation_off", d->compilation_off_ ? 1 : 0);
|
||||
query->bindValue(":compilation_effective", is_compilation() ? 1 : 0);
|
||||
|
||||
|
||||
query->bindValue(":art_automatic", d->art_automatic_);
|
||||
query->bindValue(":art_manual", d->art_manual_);
|
||||
|
||||
query->bindValue(":effective_albumartist", this->effective_albumartist());
|
||||
query->bindValue(":effective_originalyear", intval(this->effective_originalyear()));
|
||||
|
||||
|
||||
query->bindValue(":cue_path", d->cue_path_);
|
||||
|
||||
#undef intval
|
||||
|
||||
@@ -82,7 +82,7 @@ class Song {
|
||||
|
||||
static const QString kManuallyUnsetCover;
|
||||
static const QString kEmbeddedCover;
|
||||
|
||||
|
||||
static const QRegExp kCoverRemoveDisc;
|
||||
|
||||
static QString JoinSpec(const QString &table);
|
||||
@@ -214,18 +214,18 @@ class Song {
|
||||
|
||||
const QString &art_automatic() const;
|
||||
const QString &art_manual() const;
|
||||
|
||||
|
||||
const QString &cue_path() const;
|
||||
bool has_cue() const;
|
||||
|
||||
|
||||
const QString &effective_album() const;
|
||||
int effective_originalyear() const;
|
||||
const QString &effective_albumartist() const;
|
||||
|
||||
|
||||
bool is_collection_song() const;
|
||||
bool is_stream() const;
|
||||
bool is_cdda() const;
|
||||
|
||||
|
||||
// Playlist views are special because you don't want to fill in album artists automatically for compilations, but you do for normal albums:
|
||||
const QString &playlist_albumartist() const;
|
||||
|
||||
@@ -248,7 +248,7 @@ class Song {
|
||||
QString PrettyYear() const;
|
||||
|
||||
QString TitleWithCompilationArtist() const;
|
||||
|
||||
|
||||
QString SampleRateBitDepthToText() const;
|
||||
|
||||
// Setters
|
||||
@@ -292,7 +292,7 @@ class Song {
|
||||
void set_mtime(int v);
|
||||
void set_ctime(int v);
|
||||
void set_unavailable(bool v);
|
||||
|
||||
|
||||
void set_playcount(int v);
|
||||
void set_skipcount(int v);
|
||||
void set_lastplayed(int v);
|
||||
@@ -300,12 +300,12 @@ class Song {
|
||||
void set_compilation_detected(bool v);
|
||||
void set_compilation_on(bool v);
|
||||
void set_compilation_off(bool v);
|
||||
|
||||
|
||||
void set_art_automatic(const QString &v);
|
||||
void set_art_manual(const QString &v);
|
||||
|
||||
void set_cue_path(const QString &v);
|
||||
|
||||
|
||||
void set_image(const QImage &i);
|
||||
|
||||
// Comparison functions
|
||||
|
||||
@@ -96,7 +96,7 @@ SongLoader::SongLoader(CollectionBackendInterface *collection, const Player *pla
|
||||
timeout_timer_->setSingleShot(true);
|
||||
|
||||
connect(timeout_timer_, SIGNAL(timeout()), SLOT(Timeout()));
|
||||
|
||||
|
||||
}
|
||||
|
||||
SongLoader::~SongLoader() {
|
||||
@@ -520,7 +520,7 @@ GstBusSyncReply SongLoader::BusCallbackSync(GstBus *, GstMessage *msg, gpointer
|
||||
|
||||
#ifdef HAVE_GSTREAMER
|
||||
void SongLoader::ErrorMessageReceived(GstMessage *msg) {
|
||||
|
||||
|
||||
if (state_ == Finished) return;
|
||||
|
||||
GError *error;
|
||||
|
||||
@@ -55,7 +55,7 @@ void TagReaderClient::WorkerFailedToStart() {
|
||||
}
|
||||
|
||||
TagReaderReply *TagReaderClient::ReadFile(const QString &filename) {
|
||||
|
||||
|
||||
pb::tagreader::Message message;
|
||||
pb::tagreader::ReadFileRequest *req = message.mutable_read_file_request();
|
||||
|
||||
@@ -78,7 +78,7 @@ TagReaderReply *TagReaderClient::SaveFile(const QString &filename, const Song &m
|
||||
}
|
||||
|
||||
TagReaderReply *TagReaderClient::IsMediaFile(const QString &filename) {
|
||||
|
||||
|
||||
pb::tagreader::Message message;
|
||||
pb::tagreader::IsMediaFileRequest *req = message.mutable_is_media_file_request();
|
||||
|
||||
@@ -89,7 +89,7 @@ TagReaderReply *TagReaderClient::IsMediaFile(const QString &filename) {
|
||||
}
|
||||
|
||||
TagReaderReply *TagReaderClient::LoadEmbeddedArt(const QString &filename) {
|
||||
|
||||
|
||||
pb::tagreader::Message message;
|
||||
pb::tagreader::LoadEmbeddedArtRequest *req = message.mutable_load_embedded_art_request();
|
||||
|
||||
@@ -100,7 +100,7 @@ TagReaderReply *TagReaderClient::LoadEmbeddedArt(const QString &filename) {
|
||||
}
|
||||
|
||||
void TagReaderClient::ReadFileBlocking(const QString &filename, Song *song) {
|
||||
|
||||
|
||||
Q_ASSERT(QThread::currentThread() != thread());
|
||||
|
||||
TagReaderReply *reply = ReadFile(filename);
|
||||
@@ -112,7 +112,7 @@ void TagReaderClient::ReadFileBlocking(const QString &filename, Song *song) {
|
||||
}
|
||||
|
||||
bool TagReaderClient::SaveFileBlocking(const QString &filename, const Song &metadata) {
|
||||
|
||||
|
||||
Q_ASSERT(QThread::currentThread() != thread());
|
||||
|
||||
bool ret = false;
|
||||
@@ -128,7 +128,7 @@ bool TagReaderClient::SaveFileBlocking(const QString &filename, const Song &meta
|
||||
}
|
||||
|
||||
bool TagReaderClient::IsMediaFileBlocking(const QString &filename) {
|
||||
|
||||
|
||||
Q_ASSERT(QThread::currentThread() != thread());
|
||||
|
||||
bool ret = false;
|
||||
@@ -144,7 +144,7 @@ bool TagReaderClient::IsMediaFileBlocking(const QString &filename) {
|
||||
}
|
||||
|
||||
QImage TagReaderClient::LoadEmbeddedArtBlocking(const QString &filename) {
|
||||
|
||||
|
||||
Q_ASSERT(QThread::currentThread() != thread());
|
||||
|
||||
QImage ret;
|
||||
|
||||
@@ -298,7 +298,7 @@ bool RemoveRecursive(const QString &path) {
|
||||
}
|
||||
|
||||
bool CopyRecursive(const QString &source, const QString &destination) {
|
||||
|
||||
|
||||
// Make the destination directory
|
||||
QString dir_name = source.section('/', -1, -1);
|
||||
QString dest_path = destination + "/" + dir_name;
|
||||
@@ -323,7 +323,7 @@ bool CopyRecursive(const QString &source, const QString &destination) {
|
||||
}
|
||||
|
||||
bool Copy(QIODevice *source, QIODevice *destination) {
|
||||
|
||||
|
||||
if (!source->open(QIODevice::ReadOnly)) return false;
|
||||
|
||||
if (!destination->open(QIODevice::WriteOnly)) return false;
|
||||
@@ -493,7 +493,7 @@ QByteArray Sha1CoverHash(const QString &artist, const QString &album) {
|
||||
QCryptographicHash hash(QCryptographicHash::Sha1);
|
||||
hash.addData(artist.toLower().toUtf8().constData());
|
||||
hash.addData(album.toLower().toUtf8().constData());
|
||||
|
||||
|
||||
//qLog(Debug) << artist << album << hash.result();
|
||||
|
||||
return hash.result();
|
||||
|
||||
Reference in New Issue
Block a user