Removed commented-out code and ran make format.

This commit is contained in:
Joseph Freeman 2014-04-25 19:41:04 -04:00
parent 156728390d
commit fe4a80b2d5
5 changed files with 17 additions and 18 deletions

View File

@ -87,9 +87,11 @@ void LibraryBackend::UpdateSongRatingAsync(int id, float rating) {
Q_ARG(int, id), Q_ARG(float, rating));
}
void LibraryBackend::UpdateSongsRatingAsync(const QList<int>& ids, float rating) {
void LibraryBackend::UpdateSongsRatingAsync(const QList<int>& ids,
float rating) {
metaObject()->invokeMethod(this, "UpdateSongsRating", Qt::QueuedConnection,
Q_ARG(const QList<int>&, ids), Q_ARG(float, rating));
Q_ARG(const QList<int>&, ids),
Q_ARG(float, rating));
}
void LibraryBackend::LoadDirectories() {
@ -1115,7 +1117,8 @@ void LibraryBackend::UpdateSongRating(int id, float rating) {
UpdateSongsRating(id_list, rating);
}
void LibraryBackend::UpdateSongsRating(const QList<int> &id_list, float rating) {
void LibraryBackend::UpdateSongsRating(const QList<int>& id_list,
float rating) {
if (id_list.isEmpty()) return;
QMutexLocker l(db_->Mutex());

View File

@ -100,7 +100,8 @@ void MoodbarProxyStyle::NextState() {
// While the regular slider should stay at the standard size (Fixed),
// moodbars should use all available space (MinimumExpanding).
slider_->setSizePolicy(QSizePolicy::Expanding,
slider_->setSizePolicy(
QSizePolicy::Expanding,
visible ? QSizePolicy::MinimumExpanding : QSizePolicy::Fixed);
slider_->updateGeometry();
@ -173,7 +174,6 @@ void MoodbarProxyStyle::drawComplexControl(ComplexControl control,
void MoodbarProxyStyle::Render(ComplexControl control,
const QStyleOptionSlider* option,
QPainter* painter, const QWidget* widget) {
const qreal fade_value = fade_timeline_->currentValue();
// Have we finished fading?

View File

@ -189,7 +189,6 @@ bool Playlist::column_is_editable(Playlist::Column column) {
bool Playlist::set_column_value(Song& song, Playlist::Column column,
const QVariant& value) {
if (!song.IsEditable()) return false;
switch (column) {

View File

@ -578,7 +578,8 @@ void PlaylistView::keyPressEvent(QKeyEvent* event) {
event->accept();
} else if (event->modifiers() != Qt::ControlModifier // Ctrl+Space selects
// the item
&& event->key() == Qt::Key_Space) {
&&
event->key() == Qt::Key_Space) {
emit PlayPause();
event->accept();
} else if (event->key() == Qt::Key_Left) {
@ -689,7 +690,6 @@ void PlaylistView::closeEditor(QWidget* editor,
QTreeView::closeEditor(editor, QAbstractItemDelegate::SubmitModelCache);
} else if (hint == QAbstractItemDelegate::EditNextItem ||
hint == QAbstractItemDelegate::EditPreviousItem) {
QModelIndex index;
if (hint == QAbstractItemDelegate::EditNextItem)
index = NextEditableIndex(currentIndex());
@ -791,7 +791,6 @@ void PlaylistView::mousePressEvent(QMouseEvent* event) {
if (index.data(Playlist::Role_CanSetRating).toBool()) {
QModelIndex src_index = playlist_->proxy()->mapToSource(index);
src_index_list << src_index;
//playlist_->RateSong(src_index, new_rating);
}
}
playlist_->RateSongs(src_index_list, new_rating);
@ -892,7 +891,6 @@ void PlaylistView::paintEvent(QPaintEvent* event) {
// Check if we should recompute the background image
if (height() != last_height_ || width() != last_width_ ||
force_background_redraw_) {
if (background_image_.isNull()) {
cached_scaled_background_image_ = QPixmap();
} else {

View File

@ -166,7 +166,6 @@ void OrganiseDialog::InsertTag(const QString& tag) {
Organise::NewSongInfoList OrganiseDialog::ComputeNewSongsFilenames(
const SongList& songs, const OrganiseFormat& format) {
// Check if we will have multiple files with the same name.
// If so, they will erase each other if the overwrite flag is set.
// Better to rename them: e.g. foo.bar -> foo(2).bar