From 591f8592c74de2af85100ada9dff1775cb41559d Mon Sep 17 00:00:00 2001 From: Katsarov Date: Sat, 25 Jul 2020 11:36:06 +0200 Subject: [PATCH 01/86] adjusts the relative display to have no sign when value is 0 --- src/widget/wnumberrate.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/widget/wnumberrate.cpp b/src/widget/wnumberrate.cpp index 34a65d159cf0..89bef0c087b5 100644 --- a/src/widget/wnumberrate.cpp +++ b/src/widget/wnumberrate.cpp @@ -28,16 +28,19 @@ WNumberRate::WNumberRate(const char * group, QWidget * parent) setValue(0); } -void WNumberRate::setValue(double /*dValue*/) { - double vsign = m_pRateControl->get() * - m_pRateRangeControl->get() * - m_pRateDirControl->get(); +void WNumberRate::setValue(double dValue) { + double digitFactor = pow(10, m_iNoDigits); + // Calculate percentage rounded to the number of digits specified by iNoDigits + double percentage = round((dValue - 1) * 100.0 * digitFactor) / digitFactor; - char sign = '+'; - if (vsign < -0.00000001) { + QString sign(' '); + if (percentage > 0) { + sign = '+'; + } + if (percentage < 0) { sign = '-'; } setText(QString(m_skinText).append(sign) - .append("%1").arg(fabs(vsign) * 100.0, 0, 'f', m_iNoDigits)); + .append("%1").arg(fabs(percentage), 'f', m_iNoDigits); } From 6705afadc3520519613f9a05583892beaf375e4e Mon Sep 17 00:00:00 2001 From: Katsarov Date: Sat, 12 Sep 2020 21:04:42 +0200 Subject: [PATCH 02/86] refactor setText() --- src/widget/wnumberrate.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/widget/wnumberrate.cpp b/src/widget/wnumberrate.cpp index 89bef0c087b5..116ca55297cc 100644 --- a/src/widget/wnumberrate.cpp +++ b/src/widget/wnumberrate.cpp @@ -41,6 +41,5 @@ void WNumberRate::setValue(double dValue) { sign = '-'; } - setText(QString(m_skinText).append(sign) - .append("%1").arg(fabs(percentage), 'f', m_iNoDigits); + setText(m_skinText + sign + QString::number(fabs(percentage), 'f', m_iNoDigits)); } From fba5e10d1a372062684a23228a646d556f0b6d07 Mon Sep 17 00:00:00 2001 From: Uwe Klotz Date: Sun, 27 Sep 2020 09:32:33 +0200 Subject: [PATCH 03/86] BaseTrackTableModel: Validate and transform raw data from derived classes --- src/library/basetracktablemodel.cpp | 295 +++++++++++++++++++--------- src/library/basetracktablemodel.h | 8 +- src/library/starrating.cpp | 16 +- src/library/starrating.h | 27 ++- src/track/trackrecord.h | 9 +- 5 files changed, 250 insertions(+), 105 deletions(-) diff --git a/src/library/basetracktablemodel.cpp b/src/library/basetracktablemodel.cpp index f74acb577424..d3c22f77368c 100644 --- a/src/library/basetracktablemodel.cpp +++ b/src/library/basetracktablemodel.cpp @@ -402,19 +402,14 @@ QVariant BaseTrackTableModel::data( } if (role == Qt::BackgroundRole) { - QModelIndex colorIndex = index.sibling( - index.row(), - fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_COLOR)); - if (!colorIndex.isValid()) { + const auto rgbColorValue = rawSiblingValue( + index, + ColumnCache::COLUMN_LIBRARYTABLE_COLOR); + const auto rgbColor = mixxx::RgbColor::fromQVariant(rgbColorValue); + if (!rgbColor) { return QVariant(); } - const auto trackColor = - mixxx::RgbColor::fromQVariant( - rawValue(colorIndex)); - if (!trackColor) { - return QVariant(); - } - auto bgColor = mixxx::RgbColor::toQColor(trackColor); + auto bgColor = mixxx::RgbColor::toQColor(rgbColor); DEBUG_ASSERT(bgColor.isValid()); DEBUG_ASSERT(m_backgroundColorOpacity >= 0.0); DEBUG_ASSERT(m_backgroundColorOpacity <= 1.0); @@ -433,6 +428,37 @@ QVariant BaseTrackTableModel::data( return roleValue(index, rawValue(index), role); } +QVariant BaseTrackTableModel::rawValue( + const QModelIndex& index) const { + VERIFY_OR_DEBUG_ASSERT(index.isValid()) { + return QVariant(); + } + const auto field = mapColumn(index.column()); + if (field == ColumnCache::COLUMN_LIBRARYTABLE_INVALID) { + return QVariant(); + } + return rawSiblingValue(index, field); +} + +QVariant BaseTrackTableModel::rawSiblingValue( + const QModelIndex& index, + ColumnCache::Column siblingField) const { + VERIFY_OR_DEBUG_ASSERT(index.isValid()) { + return QVariant(); + } + VERIFY_OR_DEBUG_ASSERT(siblingField != ColumnCache::COLUMN_LIBRARYTABLE_INVALID) { + return QVariant(); + } + const auto siblingColumn = fieldIndex(siblingField); + DEBUG_ASSERT(siblingColumn >= 0); + VERIFY_OR_DEBUG_ASSERT(siblingColumn != index.column()) { + // Prevent infinite recursion + return QVariant(); + } + const auto siblingIndex = index.sibling(index.row(), siblingColumn); + return rawValue(siblingIndex); +} + bool BaseTrackTableModel::setData( const QModelIndex& index, const QVariant& value, @@ -443,11 +469,15 @@ bool BaseTrackTableModel::setData( if (role == Qt::CheckStateRole) { const auto val = value.toInt() > 0; if (column == fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_TIMESPLAYED)) { - QModelIndex playedIndex = index.sibling(index.row(), fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_PLAYED)); + QModelIndex playedIndex = index.sibling( + index.row(), + fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_PLAYED)); return setData(playedIndex, val, Qt::EditRole); } else if (column == fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_BPM)) { - QModelIndex bpmLockindex = index.sibling(index.row(), fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_BPM_LOCK)); - return setData(bpmLockindex, val, Qt::EditRole); + QModelIndex bpmLockedIndex = index.sibling( + index.row(), + fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_BPM_LOCK)); + return setData(bpmLockedIndex, val, Qt::EditRole); } return false; } @@ -499,133 +529,218 @@ QVariant BaseTrackTableModel::roleValue( const QModelIndex& index, QVariant&& rawValue, int role) const { - const int column = index.column(); - // Format the value based on whether we are in a tooltip, - // display, or edit role + const auto field = mapColumn(index.column()); + if (field == ColumnCache::COLUMN_LIBRARYTABLE_INVALID) { + return std::move(rawValue); + } switch (role) { case Qt::ToolTipRole: - if (column == fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_COLOR)) { + if (field == ColumnCache::COLUMN_LIBRARYTABLE_COLOR) { return mixxx::RgbColor::toQString(mixxx::RgbColor::fromQVariant(rawValue)); - } else if (column == fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_COVERART)) { + } else if (field == ColumnCache::COLUMN_LIBRARYTABLE_COVERART) { return composeCoverArtToolTipHtml(index); - } else if (column == fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_PREVIEW)) { + } else if (field == ColumnCache::COLUMN_LIBRARYTABLE_PREVIEW) { return QVariant(); } M_FALLTHROUGH_INTENDED; case Qt::DisplayRole: - if (column == fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_DURATION)) { + if (field == ColumnCache::COLUMN_LIBRARYTABLE_DURATION) { + if (rawValue.isNull()) { + return QVariant(); + } + VERIFY_OR_DEBUG_ASSERT(rawValue.canConvert()) { + return QVariant(); + } bool ok; const auto duration = rawValue.toDouble(&ok); - if (ok && duration >= 0) { - return mixxx::Duration::formatTime( - duration, - mixxx::Duration::Precision::SECONDS); - } else { + VERIFY_OR_DEBUG_ASSERT(ok && duration >= 0) { return QVariant(); } - } else if (column == fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_RATING)) { - VERIFY_OR_DEBUG_ASSERT(rawValue.canConvert(QMetaType::Int)) { + return mixxx::Duration::formatTime( + duration, + mixxx::Duration::Precision::SECONDS); + } else if (field == ColumnCache::COLUMN_LIBRARYTABLE_RATING) { + if (rawValue.isNull()) { return QVariant(); } - return QVariant::fromValue(StarRating(rawValue.toInt())); - } else if (column == fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_PLAYED)) { - return rawValue.toBool(); - } else if (column == fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_TIMESPLAYED)) { - VERIFY_OR_DEBUG_ASSERT(rawValue.canConvert(QMetaType::Int)) { + VERIFY_OR_DEBUG_ASSERT(rawValue.canConvert()) { return QVariant(); } - return QString("(%1)").arg(rawValue.toInt()); - } else if (column == fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_DATETIMEADDED) || - column == fieldIndex(ColumnCache::COLUMN_PLAYLISTTRACKSTABLE_DATETIMEADDED)) { - return mixxx::localDateTimeFromUtc(mixxx::convertVariantToDateTime(rawValue)); - } else if (column == fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_BPM)) { bool ok; - const auto bpmValue = rawValue.toDouble(&ok); - if (ok && bpmValue > 0.0) { - return QString("%1").arg(bpmValue, 0, 'f', 1); + const auto starCount = rawValue.toInt(&ok); + VERIFY_OR_DEBUG_ASSERT(ok && starCount >= StarRating::kMinStarCount) { + return QVariant(); + } + return QVariant::fromValue(StarRating(starCount)); + } else if (field == ColumnCache::COLUMN_LIBRARYTABLE_TIMESPLAYED) { + if (rawValue.isNull()) { + return QVariant(); + } + VERIFY_OR_DEBUG_ASSERT(rawValue.canConvert()) { + return QVariant(); + } + bool ok; + const auto timesPlayed = rawValue.toInt(&ok); + VERIFY_OR_DEBUG_ASSERT(ok && timesPlayed >= 0) { + return QVariant(); + } + return QString("(%1)").arg(timesPlayed); + } else if (field == ColumnCache::COLUMN_LIBRARYTABLE_DATETIMEADDED || + field == ColumnCache::COLUMN_PLAYLISTTRACKSTABLE_DATETIMEADDED) { + VERIFY_OR_DEBUG_ASSERT(rawValue.canConvert()) { + return QVariant(); + } + return mixxx::localDateTimeFromUtc(rawValue.toDateTime()); + } else if (field == ColumnCache::COLUMN_LIBRARYTABLE_BPM) { + mixxx::Bpm bpm; + if (!rawValue.isNull()) { + if (rawValue.canConvert()) { + bpm = rawValue.value(); + } else { + VERIFY_OR_DEBUG_ASSERT(rawValue.canConvert()) { + return QVariant(); + } + bool ok; + const auto bpmValue = rawValue.toDouble(&ok); + VERIFY_OR_DEBUG_ASSERT(ok) { + return QVariant(); + } + bpm = mixxx::Bpm(bpmValue); + } + } + if (bpm.hasValue()) { + return QString("%1").arg(bpm.getValue(), 0, 'f', 1); } else { return QChar('-'); } - } else if (column == fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_BPM_LOCK)) { - return rawValue.toBool(); - } else if (column == fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_YEAR)) { - return mixxx::TrackMetadata::formatCalendarYear(rawValue.toString()); - } else if (column == fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_TRACKNUMBER)) { - const auto trackNumber = rawValue.toInt(0); - if (trackNumber > 0) { - return std::move(rawValue); - } else { - // clear invalid values + } else if (field == ColumnCache::COLUMN_LIBRARYTABLE_YEAR) { + if (rawValue.isNull()) { return QVariant(); } - } else if (column == fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_BITRATE)) { - int bitrateValue = rawValue.toInt(0); - if (bitrateValue > 0) { + VERIFY_OR_DEBUG_ASSERT(rawValue.canConvert()) { + return QVariant(); + } + bool ok; + const auto year = mixxx::TrackMetadata::formatCalendarYear(rawValue.toString(), &ok); + if (!ok) { + return QVariant(); + } + return year; + } else if (field == ColumnCache::COLUMN_LIBRARYTABLE_BITRATE) { + if (rawValue.isNull()) { + return QVariant(); + } + if (rawValue.canConvert()) { + // return value as is return std::move(rawValue); } else { - // clear invalid values - return QVariant(); + VERIFY_OR_DEBUG_ASSERT(rawValue.canConvert()) { + return QVariant(); + } + bool ok; + const auto bitrateValue = rawValue.toInt(&ok); + VERIFY_OR_DEBUG_ASSERT(ok) { + return QVariant(); + } + if (mixxx::audio::Bitrate(bitrateValue).isValid()) { + // return value as is + return std::move(rawValue); + } else { + // clear invalid values + return QVariant(); + } } - } else if (column == fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_KEY)) { + } else if (field == ColumnCache::COLUMN_LIBRARYTABLE_KEY) { // If we know the semantic key via the LIBRARYTABLE_KEY_ID // column (as opposed to the string representation of the key // currently stored in the DB) then lookup the key and render it // using the user's selected notation. - int keyIdColumn = fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_KEY_ID); - if (keyIdColumn == -1) { - // Otherwise, just use the column value + const QVariant keyCodeValue = rawSiblingValue( + index, + ColumnCache::COLUMN_LIBRARYTABLE_KEY_ID); + if (keyCodeValue.isNull()) { + // Otherwise, just use the column value as is return std::move(rawValue); } - mixxx::track::io::key::ChromaticKey key = - KeyUtils::keyFromNumericValue( - index.sibling(index.row(), keyIdColumn).data().toInt()); + // Convert or clear invalid values + VERIFY_OR_DEBUG_ASSERT(keyCodeValue.canConvert()) { + return QVariant(); + } + bool ok; + const auto keyCode = keyCodeValue.toInt(&ok); + VERIFY_OR_DEBUG_ASSERT(ok) { + return QVariant(); + } + const auto key = KeyUtils::keyFromNumericValue(keyCode); if (key == mixxx::track::io::key::INVALID) { - // clear invalid values return QVariant(); } - // Render this key with the user-provided notation. + // Render the key with the user-provided notation return KeyUtils::keyToString(key); - } else if (column == fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_REPLAYGAIN)) { + } else if (field == ColumnCache::COLUMN_LIBRARYTABLE_REPLAYGAIN) { + if (rawValue.isNull()) { + return QVariant(); + } + VERIFY_OR_DEBUG_ASSERT(rawValue.canConvert()) { + return QVariant(); + } bool ok; const auto gainValue = rawValue.toDouble(&ok); - return ok ? mixxx::ReplayGain::ratioToString(gainValue) : QString(); + VERIFY_OR_DEBUG_ASSERT(ok) { + return QVariant(); + } + return mixxx::ReplayGain::ratioToString(gainValue); } // Otherwise, just use the column value break; case Qt::EditRole: - if (column == fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_BPM)) { + if (field == ColumnCache::COLUMN_LIBRARYTABLE_BPM) { bool ok; const auto bpmValue = rawValue.toDouble(&ok); - return ok ? bpmValue : 0.0; - } else if (column == fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_TIMESPLAYED)) { + return ok ? bpmValue : mixxx::Bpm().getValue(); + } else if (field == ColumnCache::COLUMN_LIBRARYTABLE_TIMESPLAYED) { return index.sibling( - index.row(), fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_PLAYED)) - .data() - .toBool(); - } else if (column == fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_RATING)) { - VERIFY_OR_DEBUG_ASSERT(rawValue.canConvert(QMetaType::Int)) { + index.row(), + fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_PLAYED)) + .data() + .toBool(); + } else if (field == ColumnCache::COLUMN_LIBRARYTABLE_RATING) { + VERIFY_OR_DEBUG_ASSERT(rawValue.canConvert()) { return QVariant(); } return QVariant::fromValue(StarRating(rawValue.toInt())); } // Otherwise, just use the column value break; - case Qt::CheckStateRole: - if (column == fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_TIMESPLAYED)) { - bool played = index.sibling( - index.row(), fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_PLAYED)) - .data() - .toBool(); - return played ? Qt::Checked : Qt::Unchecked; - } else if (column == fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_BPM)) { - bool locked = index.sibling( - index.row(), fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_BPM_LOCK)) - .data() - .toBool(); - return locked ? Qt::Checked : Qt::Unchecked; + case Qt::CheckStateRole: { + QVariant boolValue; + switch (field) { + case ColumnCache::COLUMN_LIBRARYTABLE_PREVIEW: + boolValue = rawValue; + break; + case ColumnCache::COLUMN_LIBRARYTABLE_TIMESPLAYED: + boolValue = rawSiblingValue( + index, + ColumnCache::COLUMN_LIBRARYTABLE_PLAYED); + break; + case ColumnCache::COLUMN_LIBRARYTABLE_BPM: + boolValue = rawSiblingValue( + index, + ColumnCache::COLUMN_LIBRARYTABLE_BPM_LOCK); + break; + default: + // No check state supported + return QVariant(); } - // No check state supported - return QVariant(); + // Flags in the database are stored as integers that are + // convertible to bool. + if (!boolValue.isNull() && boolValue.canConvert()) { + return boolValue.toBool() ? Qt::Checked : Qt::Unchecked; + } else { + // Undecidable + return Qt::PartiallyChecked; + } + } default: DEBUG_ASSERT(!"unexpected role"); break; diff --git a/src/library/basetracktablemodel.h b/src/library/basetracktablemodel.h index 96e04f81e743..603c3a8219c1 100644 --- a/src/library/basetracktablemodel.h +++ b/src/library/basetracktablemodel.h @@ -149,8 +149,14 @@ class BaseTrackTableModel : public QAbstractTableModel, public TrackModel { virtual Qt::ItemFlags readWriteFlags( const QModelIndex& index) const; + // At least one of the following functions must be overridden, + // because each default implementation will call the other + // function!! virtual QVariant rawValue( - const QModelIndex& index) const = 0; + const QModelIndex& index) const; + virtual QVariant rawSiblingValue( + const QModelIndex& index, + ColumnCache::Column siblingField) const; // Reimplement in derived classes to handle columns other // then COLUMN_LIBRARYTABLE diff --git a/src/library/starrating.cpp b/src/library/starrating.cpp index a64941482a63..c062b28b70ad 100644 --- a/src/library/starrating.cpp +++ b/src/library/starrating.cpp @@ -8,9 +8,13 @@ // Magic number? Explain what this factor affects and how const int PaintingScaleFactor = 15; -StarRating::StarRating(int starCount, int maxStarCount) - : m_myStarCount(starCount), - m_myMaxStarCount(maxStarCount) { +StarRating::StarRating( + int starCount, + int maxStarCount) + : m_starCount(starCount), + m_maxStarCount(maxStarCount) { + DEBUG_ASSERT(m_starCount >= kMinStarCount); + DEBUG_ASSERT(m_starCount <= m_maxStarCount); // 1st star cusp at 0° of the unit circle whose center is shifted to adapt the 0,0-based paint area m_starPolygon << QPointF(1.0, 0.5); for (int i = 1; i < 5; ++i) { @@ -26,7 +30,7 @@ StarRating::StarRating(int starCount, int maxStarCount) } QSize StarRating::sizeHint() const { - return PaintingScaleFactor * QSize(m_myMaxStarCount, 1); + return PaintingScaleFactor * QSize(m_maxStarCount, 1); } void StarRating::paint(QPainter *painter, const QRect &rect) const { @@ -41,8 +45,8 @@ void StarRating::paint(QPainter *painter, const QRect &rect) const { //determine number of stars that are possible to paint int n = rect.width() / PaintingScaleFactor; - for (int i = 0; i < m_myMaxStarCount && idrawPolygon(m_starPolygon, Qt::WindingFill); } else { painter->drawPolygon(m_diamondPolygon, Qt::WindingFill); diff --git a/src/library/starrating.h b/src/library/starrating.h index df21447758f3..2a7d13194506 100644 --- a/src/library/starrating.h +++ b/src/library/starrating.h @@ -4,6 +4,8 @@ #include #include +#include "track/trackrecord.h" + QT_FORWARD_DECLARE_CLASS(QPainter); QT_FORWARD_DECLARE_CLASS(QRect); @@ -18,21 +20,32 @@ class StarRating { public: enum EditMode { Editable, ReadOnly }; - StarRating(int starCount = 1, int maxStarCount = 5); + static constexpr int kMinStarCount = 0; + + explicit StarRating( + int starCount = kMinStarCount, + int maxStarCount = mixxx::TrackRecord::kMaxRating - mixxx::TrackRecord::kMinRating); void paint(QPainter* painter, const QRect& rect) const; QSize sizeHint() const; - int starCount() const { return m_myStarCount; } - int maxStarCount() const { return m_myMaxStarCount; } - void setStarCount(int starCount) { m_myStarCount = starCount; } - void setMaxStarCount(int maxStarCount) { m_myMaxStarCount = maxStarCount; } + int starCount() const { + return m_starCount; + } + int maxStarCount() const { + return m_maxStarCount; + } + void setStarCount(int starCount) { + DEBUG_ASSERT(starCount >= kMinStarCount); + DEBUG_ASSERT(starCount <= m_maxStarCount); + m_starCount = starCount; + } private: QPolygonF m_starPolygon; QPolygonF m_diamondPolygon; - int m_myStarCount; - int m_myMaxStarCount; + int m_starCount; + int m_maxStarCount; }; Q_DECLARE_METATYPE(StarRating) diff --git a/src/track/trackrecord.h b/src/track/trackrecord.h index 1a9d2ae369df..bf819acc647c 100644 --- a/src/track/trackrecord.h +++ b/src/track/trackrecord.h @@ -66,8 +66,15 @@ class TrackRecord final { TrackRecord& operator=(TrackRecord&&) = default; TrackRecord& operator=(const TrackRecord&) = default; + static constexpr int kMinRating = 0; + static constexpr int kMaxRating = 5; + static constexpr int kNoRating = kMinRating; + + static bool isValidRating(int rating) { + return rating >= kMinRating && rating <= kMaxRating; + } bool hasRating() const { - return getRating() > 0; + return getRating() != kNoRating; } void setKeys(const Keys& keys); From 73c17c9ebfa6f99c3b21dee95119c3c0b27fbc99 Mon Sep 17 00:00:00 2001 From: Uwe Klotz Date: Sun, 15 Nov 2020 23:21:12 +0100 Subject: [PATCH 04/86] Replace sequential if/else with switch/case --- src/library/basetracktablemodel.cpp | 55 +++++++++++++++++++---------- 1 file changed, 37 insertions(+), 18 deletions(-) diff --git a/src/library/basetracktablemodel.cpp b/src/library/basetracktablemodel.cpp index d3c22f77368c..d178e3d67a66 100644 --- a/src/library/basetracktablemodel.cpp +++ b/src/library/basetracktablemodel.cpp @@ -535,16 +535,21 @@ QVariant BaseTrackTableModel::roleValue( } switch (role) { case Qt::ToolTipRole: - if (field == ColumnCache::COLUMN_LIBRARYTABLE_COLOR) { + switch (field) { + case ColumnCache::COLUMN_LIBRARYTABLE_COLOR: return mixxx::RgbColor::toQString(mixxx::RgbColor::fromQVariant(rawValue)); - } else if (field == ColumnCache::COLUMN_LIBRARYTABLE_COVERART) { + case ColumnCache::COLUMN_LIBRARYTABLE_COVERART: return composeCoverArtToolTipHtml(index); - } else if (field == ColumnCache::COLUMN_LIBRARYTABLE_PREVIEW) { + case ColumnCache::COLUMN_LIBRARYTABLE_PREVIEW: return QVariant(); + default: + // Same value as for Qt::DisplayRole (see below) + break; } M_FALLTHROUGH_INTENDED; case Qt::DisplayRole: - if (field == ColumnCache::COLUMN_LIBRARYTABLE_DURATION) { + switch (field) { + case ColumnCache::COLUMN_LIBRARYTABLE_DURATION: { if (rawValue.isNull()) { return QVariant(); } @@ -559,7 +564,8 @@ QVariant BaseTrackTableModel::roleValue( return mixxx::Duration::formatTime( duration, mixxx::Duration::Precision::SECONDS); - } else if (field == ColumnCache::COLUMN_LIBRARYTABLE_RATING) { + } + case ColumnCache::COLUMN_LIBRARYTABLE_RATING: { if (rawValue.isNull()) { return QVariant(); } @@ -572,7 +578,8 @@ QVariant BaseTrackTableModel::roleValue( return QVariant(); } return QVariant::fromValue(StarRating(starCount)); - } else if (field == ColumnCache::COLUMN_LIBRARYTABLE_TIMESPLAYED) { + } + case ColumnCache::COLUMN_LIBRARYTABLE_TIMESPLAYED: { if (rawValue.isNull()) { return QVariant(); } @@ -585,13 +592,14 @@ QVariant BaseTrackTableModel::roleValue( return QVariant(); } return QString("(%1)").arg(timesPlayed); - } else if (field == ColumnCache::COLUMN_LIBRARYTABLE_DATETIMEADDED || - field == ColumnCache::COLUMN_PLAYLISTTRACKSTABLE_DATETIMEADDED) { + } + case ColumnCache::COLUMN_LIBRARYTABLE_DATETIMEADDED: + case ColumnCache::COLUMN_PLAYLISTTRACKSTABLE_DATETIMEADDED: VERIFY_OR_DEBUG_ASSERT(rawValue.canConvert()) { return QVariant(); } return mixxx::localDateTimeFromUtc(rawValue.toDateTime()); - } else if (field == ColumnCache::COLUMN_LIBRARYTABLE_BPM) { + case ColumnCache::COLUMN_LIBRARYTABLE_BPM: { mixxx::Bpm bpm; if (!rawValue.isNull()) { if (rawValue.canConvert()) { @@ -613,7 +621,8 @@ QVariant BaseTrackTableModel::roleValue( } else { return QChar('-'); } - } else if (field == ColumnCache::COLUMN_LIBRARYTABLE_YEAR) { + } + case ColumnCache::COLUMN_LIBRARYTABLE_YEAR: { if (rawValue.isNull()) { return QVariant(); } @@ -626,7 +635,8 @@ QVariant BaseTrackTableModel::roleValue( return QVariant(); } return year; - } else if (field == ColumnCache::COLUMN_LIBRARYTABLE_BITRATE) { + } + case ColumnCache::COLUMN_LIBRARYTABLE_BITRATE: { if (rawValue.isNull()) { return QVariant(); } @@ -650,7 +660,8 @@ QVariant BaseTrackTableModel::roleValue( return QVariant(); } } - } else if (field == ColumnCache::COLUMN_LIBRARYTABLE_KEY) { + } + case ColumnCache::COLUMN_LIBRARYTABLE_KEY: { // If we know the semantic key via the LIBRARYTABLE_KEY_ID // column (as opposed to the string representation of the key // currently stored in the DB) then lookup the key and render it @@ -677,7 +688,8 @@ QVariant BaseTrackTableModel::roleValue( } // Render the key with the user-provided notation return KeyUtils::keyToString(key); - } else if (field == ColumnCache::COLUMN_LIBRARYTABLE_REPLAYGAIN) { + } + case ColumnCache::COLUMN_LIBRARYTABLE_REPLAYGAIN: { if (rawValue.isNull()) { return QVariant(); } @@ -691,26 +703,33 @@ QVariant BaseTrackTableModel::roleValue( } return mixxx::ReplayGain::ratioToString(gainValue); } - // Otherwise, just use the column value + default: + // Otherwise, just use the column value + break; + } break; case Qt::EditRole: - if (field == ColumnCache::COLUMN_LIBRARYTABLE_BPM) { + switch (field) { + case ColumnCache::COLUMN_LIBRARYTABLE_BPM: { bool ok; const auto bpmValue = rawValue.toDouble(&ok); return ok ? bpmValue : mixxx::Bpm().getValue(); - } else if (field == ColumnCache::COLUMN_LIBRARYTABLE_TIMESPLAYED) { + } + case ColumnCache::COLUMN_LIBRARYTABLE_TIMESPLAYED: return index.sibling( index.row(), fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_PLAYED)) .data() .toBool(); - } else if (field == ColumnCache::COLUMN_LIBRARYTABLE_RATING) { + case ColumnCache::COLUMN_LIBRARYTABLE_RATING: VERIFY_OR_DEBUG_ASSERT(rawValue.canConvert()) { return QVariant(); } return QVariant::fromValue(StarRating(rawValue.toInt())); + default: + // Otherwise, just use the column value + break; } - // Otherwise, just use the column value break; case Qt::CheckStateRole: { QVariant boolValue; From 200cb78901a4367e73c0dfab642fcefdd117a2c0 Mon Sep 17 00:00:00 2001 From: Uwe Klotz Date: Sun, 15 Nov 2020 23:33:04 +0100 Subject: [PATCH 05/86] Replace sequential if/else with switch/case (part 2) --- src/library/basetracktablemodel.cpp | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/src/library/basetracktablemodel.cpp b/src/library/basetracktablemodel.cpp index d178e3d67a66..5f5fc99c0c4e 100644 --- a/src/library/basetracktablemodel.cpp +++ b/src/library/basetracktablemodel.cpp @@ -464,22 +464,29 @@ bool BaseTrackTableModel::setData( const QVariant& value, int role) { const int column = index.column(); - - // Override sets to TIMESPLAYED and redirect them to PLAYED if (role == Qt::CheckStateRole) { - const auto val = value.toInt() > 0; - if (column == fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_TIMESPLAYED)) { + const auto field = mapColumn(index.column()); + if (field == ColumnCache::COLUMN_LIBRARYTABLE_INVALID) { + return false; + } + const auto checked = value.toInt() > 0; + switch (field) { + case ColumnCache::COLUMN_LIBRARYTABLE_TIMESPLAYED: { + // Override sets to TIMESPLAYED and redirect them to PLAYED QModelIndex playedIndex = index.sibling( index.row(), fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_PLAYED)); - return setData(playedIndex, val, Qt::EditRole); - } else if (column == fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_BPM)) { + return setData(playedIndex, checked, Qt::EditRole); + } + case ColumnCache::COLUMN_LIBRARYTABLE_BPM: { QModelIndex bpmLockedIndex = index.sibling( index.row(), fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_BPM_LOCK)); - return setData(bpmLockedIndex, val, Qt::EditRole); + return setData(bpmLockedIndex, checked, Qt::EditRole); + } + default: + return false; } - return false; } TrackPointer pTrack = getTrack(index); From f5a99cc27d34dff62965af210ff86f87a163ccc5 Mon Sep 17 00:00:00 2001 From: Uwe Klotz Date: Fri, 20 Nov 2020 20:35:57 +0100 Subject: [PATCH 06/86] BaseTrackTableModel: Document expected column types --- src/library/basetracktablemodel.cpp | 58 +++++++++++++++++++++-------- src/library/basetracktablemodel.h | 50 +++++++++++++++++++++++-- 2 files changed, 89 insertions(+), 19 deletions(-) diff --git a/src/library/basetracktablemodel.cpp b/src/library/basetracktablemodel.cpp index 5f5fc99c0c4e..b8a0afa63583 100644 --- a/src/library/basetracktablemodel.cpp +++ b/src/library/basetracktablemodel.cpp @@ -560,16 +560,25 @@ QVariant BaseTrackTableModel::roleValue( if (rawValue.isNull()) { return QVariant(); } - VERIFY_OR_DEBUG_ASSERT(rawValue.canConvert()) { - return QVariant(); - } - bool ok; - const auto duration = rawValue.toDouble(&ok); - VERIFY_OR_DEBUG_ASSERT(ok && duration >= 0) { - return QVariant(); + double durationInSeconds; + if (rawValue.canConvert()) { + const auto duration = rawValue.value(); + VERIFY_OR_DEBUG_ASSERT(duration >= mixxx::Duration::empty()) { + return QVariant(); + } + durationInSeconds = duration.toDoubleSeconds(); + } else { + VERIFY_OR_DEBUG_ASSERT(rawValue.canConvert()) { + return QVariant(); + } + bool ok; + durationInSeconds = rawValue.toDouble(&ok); + VERIFY_OR_DEBUG_ASSERT(ok && durationInSeconds >= 0) { + return QVariant(); + } } return mixxx::Duration::formatTime( - duration, + durationInSeconds, mixxx::Duration::Precision::SECONDS); } case ColumnCache::COLUMN_LIBRARYTABLE_RATING: { @@ -700,16 +709,33 @@ QVariant BaseTrackTableModel::roleValue( if (rawValue.isNull()) { return QVariant(); } - VERIFY_OR_DEBUG_ASSERT(rawValue.canConvert()) { - return QVariant(); - } - bool ok; - const auto gainValue = rawValue.toDouble(&ok); - VERIFY_OR_DEBUG_ASSERT(ok) { - return QVariant(); + double rgRatio; + if (rawValue.canConvert()) { + rgRatio = rawValue.value().getRatio(); + } else { + VERIFY_OR_DEBUG_ASSERT(rawValue.canConvert()) { + return QVariant(); + } + bool ok; + rgRatio = rawValue.toDouble(&ok); + VERIFY_OR_DEBUG_ASSERT(ok) { + return QVariant(); + } } - return mixxx::ReplayGain::ratioToString(gainValue); + return mixxx::ReplayGain::ratioToString(rgRatio); } + case ColumnCache::COLUMN_LIBRARYTABLE_CHANNELS: + // Not yet supported + DEBUG_ASSERT(rawValue.isNull()); + break; + case ColumnCache::COLUMN_LIBRARYTABLE_SAMPLERATE: + // Not yet supported + DEBUG_ASSERT(rawValue.isNull()); + break; + case ColumnCache::COLUMN_LIBRARYTABLE_URL: + // Not yet supported + DEBUG_ASSERT(rawValue.isNull()); + break; default: // Otherwise, just use the column value break; diff --git a/src/library/basetracktablemodel.h b/src/library/basetracktablemodel.h index 603c3a8219c1..1a1d1c3eec81 100644 --- a/src/library/basetracktablemodel.h +++ b/src/library/basetracktablemodel.h @@ -149,9 +149,53 @@ class BaseTrackTableModel : public QAbstractTableModel, public TrackModel { virtual Qt::ItemFlags readWriteFlags( const QModelIndex& index) const; - // At least one of the following functions must be overridden, - // because each default implementation will call the other - // function!! + /// At least one of the following functions must be overridden, + /// because each default implementation will call the other + /// function!! + /// + /// Return the raw data value at the given index. + /// + /// Expected types by ColumnCache field (pass-through = not validated): + /// COLUMN_LIBRARYTABLE_ID: DbId::value_type (pass-through) + /// COLUMN_LIBRARYTABLE_ARTIST: QString (pass-through) + /// COLUMN_LIBRARYTABLE_TITLE: QString (pass-through) + /// COLUMN_LIBRARYTABLE_ALBUM: QString (pass-through) + /// COLUMN_LIBRARYTABLE_ALBUMARTIST: QString (pass-through) + /// COLUMN_LIBRARYTABLE_YEAR: QString (pass-through) + /// COLUMN_LIBRARYTABLE_GENRE: QString (pass-through) + /// COLUMN_LIBRARYTABLE_COMPOSER: QString (pass-through) + /// COLUMN_LIBRARYTABLE_GROUPING: QString (pass-through) + /// COLUMN_LIBRARYTABLE_TRACKNUMBER: QString (pass-through) + /// COLUMN_LIBRARYTABLE_FILETYPE: QString (pass-through) + /// COLUMN_LIBRARYTABLE_NATIVELOCATION: QString (pass-through) + /// COLUMN_LIBRARYTABLE_COMMENT: QString (pass-through) + /// COLUMN_LIBRARYTABLE_DURATION: double (seconds)/mixxx::Duration + /// COLUMN_LIBRARYTABLE_BITRATE: int (kbps)/mixxx::audio::Bitrate + /// COLUMN_LIBRARYTABLE_BPM: double (beats per minute)/mixxx::Bpm + /// COLUMN_LIBRARYTABLE_REPLAYGAIN: double (ratio)/mixxx::ReplayGain + /// COLUMN_LIBRARYTABLE_URL: QString (unsupported) + /// COLUMN_LIBRARYTABLE_SAMPLERATE: int (Hz)/mixxx::audio::SampleRate (unsupported) + /// COLUMN_LIBRARYTABLE_WAVESUMMARYHEX: QVariant (pass-through) + /// COLUMN_LIBRARYTABLE_CHANNELS: int/mixxx::audio::ChannelCount (unsupported) + /// COLUMN_LIBRARYTABLE_MIXXXDELETED: bool (pass-through) + /// COLUMN_LIBRARYTABLE_DATETIMEADDED: QDateTime + /// COLUMN_LIBRARYTABLE_HEADERPARSED: bool (pass-through) + /// COLUMN_LIBRARYTABLE_TIMESPLAYED: int + /// COLUMN_LIBRARYTABLE_PLAYED: bool + /// COLUMN_LIBRARYTABLE_RATING: int + /// COLUMN_LIBRARYTABLE_KEY: QString (literal key name, pass-through) + /// COLUMN_LIBRARYTABLE_KEY_ID: int (internal key code) + /// COLUMN_LIBRARYTABLE_BPM_LOCK: bool + /// COLUMN_LIBRARYTABLE_PREVIEW: bool + /// COLUMN_LIBRARYTABLE_COLOR: mixxx::RgbColor::code_t + /// COLUMN_LIBRARYTABLE_COVERART: virtual column for CoverArtDelegate + /// COLUMN_LIBRARYTABLE_COVERART_SOURCE: int (pass-through) + /// COLUMN_LIBRARYTABLE_COVERART_TYPE: int (pass-through) + /// COLUMN_LIBRARYTABLE_COVERART_LOCATION: QString (pass-through) + /// COLUMN_LIBRARYTABLE_COVERART_COLOR: mixxx::RgbColor::code_t (pass-through) + /// COLUMN_LIBRARYTABLE_COVERART_DIGEST: QByteArray (pass-through) + /// COLUMN_LIBRARYTABLE_COVERART_HASH: quint16 (pass-through) + /// COLUMN_PLAYLISTTABLE_DATETIMEADDED: QDateTime virtual QVariant rawValue( const QModelIndex& index) const; virtual QVariant rawSiblingValue( From ad6c6d3a922decda6c2d3c81bf52f606ada1d850 Mon Sep 17 00:00:00 2001 From: ronso0 Date: Thu, 5 Nov 2020 21:31:26 +0100 Subject: [PATCH 07/86] DlgPrefController: add dialog for saving controller presets --- src/controllers/dlgprefcontroller.cpp | 132 ++++++++++++++++++++++---- src/controllers/dlgprefcontroller.h | 2 + 2 files changed, 113 insertions(+), 21 deletions(-) diff --git a/src/controllers/dlgprefcontroller.cpp b/src/controllers/dlgprefcontroller.cpp index 84e9e9460bdf..7146e0b38e03 100644 --- a/src/controllers/dlgprefcontroller.cpp +++ b/src/controllers/dlgprefcontroller.cpp @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -23,11 +24,15 @@ #include "preferences/usersettings.h" #include "util/version.h" -DlgPrefController::DlgPrefController(QWidget* parent, Controller* controller, - ControllerManager* controllerManager, - UserSettingsPointer pConfig) +const QString kPresetExt(".midi.xml"); + +DlgPrefController::DlgPrefController(QWidget* parent, + Controller* controller, + ControllerManager* controllerManager, + UserSettingsPointer pConfig) : DlgPreferencePage(parent), m_pConfig(pConfig), + m_pUserDir(userPresetsPath(pConfig)), m_pControllerManager(controllerManager), m_pController(controller), m_pDlgControllerLearning(NULL), @@ -491,33 +496,118 @@ void DlgPrefController::savePreset() { } if (!m_pPreset->isDirty()) { - qDebug() << "Preset is not dirty, no need to save it."; + qDebug() << "Preset has not been edited, no need to save it."; return; } - QFileInfo fileInfo(m_pPreset->filePath()); - QString fileName = fileInfo.fileName(); - - // Add " (edited)" to preset name (if it's not already present) - QString editedSuffix = QStringLiteral(" (") + tr("edited") + QStringLiteral(")"); - if (!m_pPreset->name().endsWith(editedSuffix)) { - m_pPreset->setName(m_pPreset->name() + editedSuffix); - qDebug() << "Renamed preset to " << m_pPreset->name(); + QString oldFilePath = m_pPreset->filePath(); + QString newFilePath; + QFileInfo fileInfo(oldFilePath); + QString presetName = m_pPreset->name(); + + bool isUserPreset = fileInfo.absoluteDir().absolutePath().append("/") == m_pUserDir; + bool saveAsNew = true; + if (m_pOverwritePresets.contains(oldFilePath) && + m_pOverwritePresets.value(oldFilePath) == true) { + saveAsNew = false; + } + + // If this is a user preset, ask whether to overwrite or save with new name. + // Optionally, tick checkbox to always overwrite this preset in the current session. + if (isUserPreset && saveAsNew) { + QString overwriteTitle = tr("Preset already exists."); + QString overwriteLabel = tr( + "%1 already exists in user preset folder.
" + "Overwrite or save with a new name?"); + QString overwriteCheckLabel = tr("Always overwrite during this session"); + + QMessageBox overwriteMsgBox; + overwriteMsgBox.setIcon(QMessageBox::Question); + overwriteMsgBox.setWindowTitle(overwriteTitle); + overwriteMsgBox.setText(overwriteLabel.arg(presetName)); + QCheckBox overwriteCheckBox; + overwriteCheckBox.setText(overwriteCheckLabel); + overwriteCheckBox.blockSignals(true); + overwriteCheckBox.setCheckState(Qt::Unchecked); + overwriteMsgBox.addButton(&overwriteCheckBox, QMessageBox::ActionRole); + QPushButton* pSaveAsNew = overwriteMsgBox.addButton( + tr("Save As"), QMessageBox::AcceptRole); + QPushButton* pOverwrite = overwriteMsgBox.addButton( + tr("Overwrite"), QMessageBox::AcceptRole); + overwriteMsgBox.setDefaultButton(pSaveAsNew); + overwriteMsgBox.exec(); + + if (overwriteMsgBox.clickedButton() == pOverwrite) { + saveAsNew = false; + if (overwriteCheckBox.checkState() == Qt::Checked) { + m_pOverwritePresets.insert(m_pPreset->filePath(), true); + } + } else if (overwriteMsgBox.close()) { + return; + } + } - // Add " (edited)" to file name (if it's not already present) - QString baseName = fileInfo.baseName(); - if (baseName.endsWith(editedSuffix)) { - baseName.chop(editedSuffix.size()); + // Ask for a preset name when + // * initially saving a modified Mixxx preset to the user folder + // * saving a user preset with a new name. + // The name will be used as display name and file name. + if (!saveAsNew) { + newFilePath = oldFilePath; + } else { + QString savePresetTitle = tr("Save user preset"); + QString savePresetLabel = tr("Enter the name for saving the preset to the user folder."); + QString savingFailedTitle = tr("Saving preset failed"); + QString invalidNameLabel = + tr("A preset cannot have a blank name and may not contain " + "special characters."); + QString fileExistsLabel = tr("A preset file with that name already exists."); + // Only allow the name to contain letters, numbers, whitespaces and _-+()/ + const QRegExp rxRemove = QRegExp("[^[(a-zA-Z0-9\\_\\-\\+\\(\\)\\/|\\s]"); + + // Choose a new file (base) name + bool validPresetName = false; + while (!validPresetName) { + QString userDir = m_pUserDir; + bool ok = false; + presetName = QInputDialog::getText(nullptr, + savePresetTitle, + savePresetLabel, + QLineEdit::Normal, + presetName, + &ok) + .remove(rxRemove) + .trimmed(); + if (!ok) { + return; + } + if (presetName.isEmpty()) { + QMessageBox::warning(nullptr, + savingFailedTitle, + invalidNameLabel); + continue; + } + // While / is allowed for the display name we can't use it for the file name. + QString fileName = presetName.replace(QString("/"), QString("-")); + newFilePath = userDir + fileName + kPresetExt; + if (QFile::exists(newFilePath)) { + QMessageBox::warning(nullptr, + savingFailedTitle, + fileExistsLabel); + continue; + } + validPresetName = true; } - fileName = baseName + editedSuffix + QStringLiteral(".") + fileInfo.completeSuffix(); + m_pPreset->setName(presetName); + qDebug() << "Preset renamed to" << m_pPreset->name(); } - QString filePath = QDir(userPresetsPath(m_pConfig)).absoluteFilePath(fileName); - if (!m_pPreset->savePreset(filePath)) { - qDebug() << "Failed to save preset!"; + if (!m_pPreset->savePreset(newFilePath)) { + qDebug() << "Failed to save preset as" << newFilePath; + return; } + qDebug() << "Preset saved as" << newFilePath; - m_pPreset->setFilePath(filePath); + m_pPreset->setFilePath(newFilePath); m_pPreset->setDirty(false); enumeratePresets(m_pPreset->filePath()); diff --git a/src/controllers/dlgprefcontroller.h b/src/controllers/dlgprefcontroller.h index 845494d43cb5..2e1e9d112e40 100644 --- a/src/controllers/dlgprefcontroller.h +++ b/src/controllers/dlgprefcontroller.h @@ -110,10 +110,12 @@ class DlgPrefController : public DlgPreferencePage { Ui::DlgPrefControllerDlg m_ui; UserSettingsPointer m_pConfig; + const QString m_pUserDir; ControllerManager* m_pControllerManager; Controller* m_pController; DlgControllerLearning* m_pDlgControllerLearning; ControllerPresetPointer m_pPreset; + QMap m_pOverwritePresets; ControllerInputMappingTableModel* m_pInputTableModel; QSortFilterProxyModel* m_pInputProxyModel; ControllerOutputMappingTableModel* m_pOutputTableModel; From f27099395196a599b213fa2ddb00a2aad2e122f7 Mon Sep 17 00:00:00 2001 From: ronso0 Date: Thu, 26 Nov 2020 08:21:24 +0100 Subject: [PATCH 08/86] Revert "Preferences Interface: on macOS require restart applying a new skin" This reverts commit f8530b87cfa23aabc1cb52b38c333e49263ec771. --- src/preferences/dialog/dlgprefinterface.cpp | 16 ++-------------- src/preferences/dialog/dlgprefinterface.h | 3 +-- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/src/preferences/dialog/dlgprefinterface.cpp b/src/preferences/dialog/dlgprefinterface.cpp index 6d684f951fe8..98d756dddd23 100644 --- a/src/preferences/dialog/dlgprefinterface.cpp +++ b/src/preferences/dialog/dlgprefinterface.cpp @@ -335,19 +335,13 @@ void DlgPrefInterface::slotSetTooltips() { } } -void DlgPrefInterface::notifyLocaleRebootNecessary() { +void DlgPrefInterface::notifyRebootNecessary() { // make the fact that you have to restart mixxx more obvious QMessageBox::information( this, tr("Information"), tr("Mixxx must be restarted before the new locale setting will take effect.")); } -void DlgPrefInterface::notifySkinRebootNecessary() { - // make the fact that you have to restart mixxx more obvious - QMessageBox::information( - this, tr("Information"), tr("Mixxx must be restarted to load the new skin.")); -} - void DlgPrefInterface::slotSetScheme(int) { QString newScheme = ComboBoxSchemeconf->currentText(); if (m_colorScheme != newScheme) { @@ -420,21 +414,15 @@ void DlgPrefInterface::slotApply() { } if (locale != m_localeOnUpdate) { - notifyLocaleRebootNecessary(); + notifyRebootNecessary(); // hack to prevent showing the notification when pressing "Okay" after "Apply" m_localeOnUpdate = locale; } if (m_bRebootMixxxView) { - // Require restarting Mixxx to apply the new skin in order to work around - // macOS skin change crash. https://bugs.launchpad.net/mixxx/+bug/1877487 -#ifdef __APPLE__ - notifySkinRebootNecessary(); -#else m_mixxx->rebootMixxxView(); // Allow switching skins multiple times without closing the dialog m_skinOnUpdate = m_skin; -#endif } m_bRebootMixxxView = false; } diff --git a/src/preferences/dialog/dlgprefinterface.h b/src/preferences/dialog/dlgprefinterface.h index 248f5a63058f..00b98633b915 100644 --- a/src/preferences/dialog/dlgprefinterface.h +++ b/src/preferences/dialog/dlgprefinterface.h @@ -57,8 +57,7 @@ class DlgPrefInterface : public DlgPreferencePage, public Ui::DlgPrefControlsDlg void slotSetScaleFactorAuto(bool checked); private: - void notifyLocaleRebootNecessary(); - void notifySkinRebootNecessary(); + void notifyRebootNecessary(); void loadTooltipPreferenceFromConfig(); // Because the CueDefault list is out of order, we have to set the combo From 09a13b6398fe8098df4eb91ed8b1860d50b003fd Mon Sep 17 00:00:00 2001 From: Daniel Poelzleithner Date: Tue, 4 Aug 2020 23:14:37 +0200 Subject: [PATCH 09/86] Make better use of history root view Most of the time when accessing the history, the current history is the most important one to categorize tracks, etc. Currently the user has to open the menu, scroll to the last entry to access the current playlist. Instead use the root view as a shortcut to view the current playlist. --- src/library/trackset/setlogfeature.cpp | 43 ++++++++++++-------------- src/library/trackset/setlogfeature.h | 2 ++ 2 files changed, 22 insertions(+), 23 deletions(-) diff --git a/src/library/trackset/setlogfeature.cpp b/src/library/trackset/setlogfeature.cpp index c658be13d44f..7bafe264d796 100644 --- a/src/library/trackset/setlogfeature.cpp +++ b/src/library/trackset/setlogfeature.cpp @@ -394,28 +394,25 @@ void SetlogFeature::slotPlaylistTableRenamed(int playlistId, const QString& newN } } +void SetlogFeature::activate() { + activatePlaylist(m_playlistId); +} + +void SetlogFeature::activatePlaylist(int playlistId) { + //qDebug() << "BasePlaylistFeature::activatePlaylist()" << playlistId; + QModelIndex index = indexFromPlaylistId(playlistId); + if (playlistId != -1 && index.isValid()) { + m_pPlaylistTableModel->setTableModel(playlistId); + emit showTrackModel(m_pPlaylistTableModel); + emit enableCoverArtDisplay(true); + // Update selection only, if it is not the current playlist + if (playlistId != m_playlistId) { + emit featureSelect(this, m_lastRightClickedIndex); + activateChild(m_lastRightClickedIndex); + } + } +} + QString SetlogFeature::getRootViewHtml() const { - QString playlistsTitle = tr("History"); - QString playlistsSummary = - tr("The history section automatically keeps a list of tracks you " - "play in your DJ sets."); - QString playlistsSummary2 = - tr("This is handy for remembering what worked in your DJ sets, " - "posting set-lists, or reporting your plays to licensing " - "organizations."); - QString playlistsSummary3 = - tr("Every time you start Mixxx, a new history section is created. " - "You can export it as a playlist in various formats or play it " - "again with Auto DJ."); - QString playlistsSummary4 = - tr("You can join the current history session with a previous one " - "by right-clicking and selecting \"Join with previous\"."); - - QString html; - html.append(QStringLiteral("

%1

").arg(playlistsTitle)); - html.append(QStringLiteral("

%1

").arg(playlistsSummary)); - html.append(QStringLiteral("

%1

").arg(playlistsSummary2)); - html.append(QStringLiteral("

%1

").arg(playlistsSummary3)); - html.append(QStringLiteral("

%1

").arg(playlistsSummary4)); - return html; + return QString(); } diff --git a/src/library/trackset/setlogfeature.h b/src/library/trackset/setlogfeature.h index 2165588a1eea..c99cec613a89 100644 --- a/src/library/trackset/setlogfeature.h +++ b/src/library/trackset/setlogfeature.h @@ -21,12 +21,14 @@ class SetlogFeature : public BasePlaylistFeature { void bindLibraryWidget(WLibrary* libraryWidget, KeyboardEventFilter* keyboard) override; void bindSidebarWidget(WLibrarySidebar* pSidebarWidget) override; + void activatePlaylist(int playlistId) override; public slots: void onRightClick(const QPoint& globalPos) override; void onRightClickChild(const QPoint& globalPos, const QModelIndex& index) override; void slotJoinWithPrevious(); void slotGetNewPlaylist(); + void activate() override; protected: QList createPlaylistLabels() override; From d52f3f224d036331b737771c1c4d4a225f8de944 Mon Sep 17 00:00:00 2001 From: Daniel Poelzleithner Date: Tue, 4 Aug 2020 23:54:30 +0200 Subject: [PATCH 10/86] Order history in descending order (newest on top) --- src/library/trackset/setlogfeature.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/library/trackset/setlogfeature.cpp b/src/library/trackset/setlogfeature.cpp index 7bafe264d796..cf5f26000175 100644 --- a/src/library/trackset/setlogfeature.cpp +++ b/src/library/trackset/setlogfeature.cpp @@ -144,7 +144,7 @@ QList SetlogFeature::createPlaylistLabels() { playlistTableModel.setTable("Playlists"); playlistTableModel.setFilter("hidden=2"); // PLHT_SET_LOG playlistTableModel.setSort( - playlistTableModel.fieldIndex("id"), Qt::AscendingOrder); + playlistTableModel.fieldIndex("id"), Qt::DescendingOrder); playlistTableModel.select(); while (playlistTableModel.canFetchMore()) { playlistTableModel.fetchMore(); From c4d09cd1569bb4401c69e393ea50ae466c146eb6 Mon Sep 17 00:00:00 2001 From: Daniel Poelzleithner Date: Wed, 5 Aug 2020 14:38:54 +0200 Subject: [PATCH 11/86] Group history by year Show the last 5 entries directly and group later entries by year. This boils down the quite long list to a useable amount. --- src/library/trackset/baseplaylistfeature.h | 5 +- src/library/trackset/setlogfeature.cpp | 68 +++++++++++++++++++--- src/library/trackset/setlogfeature.h | 1 + src/library/treeitem.h | 3 +- 4 files changed, 65 insertions(+), 12 deletions(-) diff --git a/src/library/trackset/baseplaylistfeature.h b/src/library/trackset/baseplaylistfeature.h index f2ee571d522a..f811a170932f 100644 --- a/src/library/trackset/baseplaylistfeature.h +++ b/src/library/trackset/baseplaylistfeature.h @@ -102,11 +102,12 @@ class BasePlaylistFeature : public BaseTrackSetFeature { void slotTrackSelected(TrackPointer pTrack); void slotResetSelectedTrack(); + protected: + QSet m_playlistsSelectedTrackIsIn; + private: void initActions(); virtual QString getRootViewHtml() const = 0; TrackPointer m_pSelectedTrack; - - QSet m_playlistsSelectedTrackIsIn; }; diff --git a/src/library/trackset/setlogfeature.cpp b/src/library/trackset/setlogfeature.cpp index cf5f26000175..f84ab4395d49 100644 --- a/src/library/trackset/setlogfeature.cpp +++ b/src/library/trackset/setlogfeature.cpp @@ -18,6 +18,8 @@ #include "widget/wlibrarysidebar.h" #include "widget/wtracktableview.h" +const int kNumDirectHistoryEntries = 5; + SetlogFeature::SetlogFeature( Library* pLibrary, UserSettingsPointer pConfig) @@ -101,8 +103,11 @@ void SetlogFeature::onRightClickChild(const QPoint& globalPos, const QModelIndex //Save the model index so we can get it in the action slots... m_lastRightClickedIndex = index; - QString playlistName = index.data().toString(); - int playlistId = m_playlistDao.getPlaylistIdFromName(playlistName); + int playlistId = index.data(TreeItemModel::kDataRole).toInt(); + // not a real entry + if (playlistId == -1) { + return; + } bool locked = m_playlistDao.isPlaylistLocked(playlistId); m_pDeletePlaylistAction->setEnabled(!locked); @@ -137,7 +142,19 @@ void SetlogFeature::onRightClickChild(const QPoint& globalPos, const QModelIndex } QList SetlogFeature::createPlaylistLabels() { - QList playlistLabels; + return QList(); +} + +/** + * Purpose: When inserting or removing playlists, + * we require the sidebar model not to reset. + * This method queries the database and does dynamic insertion + * Use a custom model in the histroy for grouping by year +*/ +QModelIndex SetlogFeature::constructChildModel(int selected_id) { + QList data_list; + int selected_row = -1; + // Setup the sidebar playlist model QSqlTableModel playlistTableModel(this, m_pLibrary->trackCollections()->internalCollection()->database()); @@ -152,6 +169,9 @@ QList SetlogFeature::createPlaylistLabels() { QSqlRecord record = playlistTableModel.record(); int nameColumn = record.indexOf("name"); int idColumn = record.indexOf("id"); + int createdColumn = record.indexOf("date_created"); + + auto groups = QMap(); for (int row = 0; row < playlistTableModel.rowCount(); ++row) { int id = @@ -162,12 +182,44 @@ QList SetlogFeature::createPlaylistLabels() { playlistTableModel .data(playlistTableModel.index(row, nameColumn)) .toString(); - BasePlaylistFeature::IdAndLabel idAndLabel; - idAndLabel.id = id; - idAndLabel.label = name; - playlistLabels.append(idAndLabel); + QDateTime created = + playlistTableModel + .data(playlistTableModel.index(row, createdColumn)) + .toDateTime(); + + if (selected_id == id) { + // save index for selection + selected_row = row; + } + + // Create the TreeItem whose parent is the invisible root item + TreeItem* item = new TreeItem(name, id); + item->setBold(m_playlistsSelectedTrackIsIn.contains(id)); + + decorateChild(item, id); + if (row >= kNumDirectHistoryEntries ) { + int year = created.date().year(); + + QMap::const_iterator i = groups.find(year); + if (i != groups.end() && i.key() == year) { + i.value()->insertChild(i.value()->childRows(), item); + } else { + TreeItem* groupItem = new TreeItem(QString("%1").arg(year), -1); + groupItem->insertChild(0, item); + groups.insert(year, groupItem); + data_list.append(groupItem); + } + } else { + data_list.append(item); + } + } + + // Append all the newly created TreeItems in a dynamic way to the childmodel + m_childModel.insertTreeItemRows(data_list, 0); + if (selected_row == -1) { + return QModelIndex(); } - return playlistLabels; + return m_childModel.index(selected_row, 0); } QString SetlogFeature::fetchPlaylistLabel(int playlistId) { diff --git a/src/library/trackset/setlogfeature.h b/src/library/trackset/setlogfeature.h index c99cec613a89..4d6a6fdb7207 100644 --- a/src/library/trackset/setlogfeature.h +++ b/src/library/trackset/setlogfeature.h @@ -32,6 +32,7 @@ class SetlogFeature : public BasePlaylistFeature { protected: QList createPlaylistLabels() override; + QModelIndex constructChildModel(int selected_id) override; QString fetchPlaylistLabel(int playlistId) override; void decorateChild(TreeItem* pChild, int playlistId) override; diff --git a/src/library/treeitem.h b/src/library/treeitem.h index 92a8b9588772..d265a71fdfaf 100644 --- a/src/library/treeitem.h +++ b/src/library/treeitem.h @@ -95,7 +95,7 @@ class TreeItem final { // take ownership of children items void insertChildren(int row, QList& children); void removeChildren(int row, int count); - + void insertChild(int row, TreeItem* pChild); ///////////////////////////////////////////////////////////////////////// // Payload @@ -135,7 +135,6 @@ class TreeItem final { QString label = QString(), QVariant data = QVariant()); - void insertChild(int row, TreeItem* pChild); void initFeatureRecursively(LibraryFeature* pFeature); // The library feature is inherited from the parent. From b6754e220c54bf1f1acf637b15fd07a170d2ead9 Mon Sep 17 00:00:00 2001 From: Daniel Poelzleithner Date: Thu, 13 Aug 2020 00:44:20 +0200 Subject: [PATCH 12/86] Implement requested changes. Fix ownership of TreeItems which are child elements. Rename variables, add more docs --- src/library/trackset/baseplaylistfeature.cpp | 38 ------------------ src/library/trackset/baseplaylistfeature.h | 6 +-- src/library/trackset/playlistfeature.cpp | 38 ++++++++++++++++++ src/library/trackset/playlistfeature.h | 5 ++- src/library/trackset/setlogfeature.cpp | 41 ++++++++++++-------- src/library/trackset/setlogfeature.h | 3 +- 6 files changed, 68 insertions(+), 63 deletions(-) diff --git a/src/library/trackset/baseplaylistfeature.cpp b/src/library/trackset/baseplaylistfeature.cpp index dddb0e29184c..f5046af2a615 100644 --- a/src/library/trackset/baseplaylistfeature.cpp +++ b/src/library/trackset/baseplaylistfeature.cpp @@ -607,44 +607,6 @@ void BasePlaylistFeature::htmlLinkClicked(const QUrl& link) { } } -/** - * Purpose: When inserting or removing playlists, - * we require the sidebar model not to reset. - * This method queries the database and does dynamic insertion -*/ -QModelIndex BasePlaylistFeature::constructChildModel(int selected_id) { - QList data_list; - int selected_row = -1; - - int row = 0; - const QList playlistLabels = createPlaylistLabels(); - for (const auto& idAndLabel : playlistLabels) { - int playlistId = idAndLabel.id; - QString playlistLabel = idAndLabel.label; - - if (selected_id == playlistId) { - // save index for selection - selected_row = row; - } - - // Create the TreeItem whose parent is the invisible root item - TreeItem* item = new TreeItem(playlistLabel, playlistId); - item->setBold(m_playlistsSelectedTrackIsIn.contains(playlistId)); - - decorateChild(item, playlistId); - data_list.append(item); - - ++row; - } - - // Append all the newly created TreeItems in a dynamic way to the childmodel - m_childModel.insertTreeItemRows(data_list, 0); - if (selected_row == -1) { - return QModelIndex(); - } - return m_childModel.index(selected_row, 0); -} - void BasePlaylistFeature::updateChildModel(int playlistId) { QString playlistLabel = fetchPlaylistLabel(playlistId); diff --git a/src/library/trackset/baseplaylistfeature.h b/src/library/trackset/baseplaylistfeature.h index f811a170932f..fc0c4456f399 100644 --- a/src/library/trackset/baseplaylistfeature.h +++ b/src/library/trackset/baseplaylistfeature.h @@ -66,10 +66,8 @@ class BasePlaylistFeature : public BaseTrackSetFeature { QString label; }; - virtual QModelIndex constructChildModel(int selected_id); virtual void updateChildModel(int selected_id); virtual void clearChildModel(); - virtual QList createPlaylistLabels() = 0; virtual QString fetchPlaylistLabel(int playlistId) = 0; virtual void decorateChild(TreeItem* pChild, int playlistId) = 0; virtual void addToAutoDJ(PlaylistDAO::AutoDJSendLoc loc); @@ -97,14 +95,12 @@ class BasePlaylistFeature : public BaseTrackSetFeature { QAction* m_pAnalyzePlaylistAction; PlaylistTableModel* m_pPlaylistTableModel; + QSet m_playlistsSelectedTrackIsIn; private slots: void slotTrackSelected(TrackPointer pTrack); void slotResetSelectedTrack(); - protected: - QSet m_playlistsSelectedTrackIsIn; - private: void initActions(); virtual QString getRootViewHtml() const = 0; diff --git a/src/library/trackset/playlistfeature.cpp b/src/library/trackset/playlistfeature.cpp index 72770d490395..9f39b162c739 100644 --- a/src/library/trackset/playlistfeature.cpp +++ b/src/library/trackset/playlistfeature.cpp @@ -236,6 +236,44 @@ QString PlaylistFeature::fetchPlaylistLabel(int playlistId) { return QString(); } +/** + * Purpose: When inserting or removing playlists, + * we require the sidebar model not to reset. + * This method queries the database and does dynamic insertion + * @param selectedId entry which should be selected +*/ +QModelIndex PlaylistFeature::constructChildModel(int selectedId) { + QList data_list; + int selectedRow = -1; + + int row = 0; + for (const IdAndLabel& idAndLabel : createPlaylistLabels()) { + int playlistId = idAndLabel.id; + QString playlistLabel = idAndLabel.label; + + if (selectedId == playlistId) { + // save index for selection + selectedRow = row; + } + + // Create the TreeItem whose parent is the invisible root item + TreeItem* item = new TreeItem(playlistLabel, playlistId); + item->setBold(m_playlistsSelectedTrackIsIn.contains(playlistId)); + + decorateChild(item, playlistId); + data_list.append(item); + + ++row; + } + + // Append all the newly created TreeItems in a dynamic way to the childmodel + m_childModel.insertTreeItemRows(data_list, 0); + if (selectedRow == -1) { + return QModelIndex(); + } + return m_childModel.index(selectedRow, 0); +} + void PlaylistFeature::decorateChild(TreeItem* item, int playlistId) { if (m_playlistDao.isPlaylistLocked(playlistId)) { item->setIcon( diff --git a/src/library/trackset/playlistfeature.h b/src/library/trackset/playlistfeature.h index 86bb000d5c52..5389e492c2b3 100644 --- a/src/library/trackset/playlistfeature.h +++ b/src/library/trackset/playlistfeature.h @@ -44,9 +44,10 @@ class PlaylistFeature : public BasePlaylistFeature { void slotPlaylistTableRenamed(int playlistId, const QString& newName) override; protected: - QList createPlaylistLabels() override; QString fetchPlaylistLabel(int playlistId) override; - void decorateChild(TreeItem* pChild, int playlist_id) override; + void decorateChild(TreeItem* pChild, int playlistId) override; + virtual QList createPlaylistLabels(); + QModelIndex constructChildModel(int selectedId); private: QString getRootViewHtml() const override; diff --git a/src/library/trackset/setlogfeature.cpp b/src/library/trackset/setlogfeature.cpp index f84ab4395d49..770086ef1fa1 100644 --- a/src/library/trackset/setlogfeature.cpp +++ b/src/library/trackset/setlogfeature.cpp @@ -18,7 +18,9 @@ #include "widget/wlibrarysidebar.h" #include "widget/wtracktableview.h" -const int kNumDirectHistoryEntries = 5; +namespace { + constexpr int kNumDirectHistoryEntries = 5; +} SetlogFeature::SetlogFeature( Library* pLibrary, @@ -141,18 +143,14 @@ void SetlogFeature::onRightClickChild(const QPoint& globalPos, const QModelIndex menu.exec(globalPos); } -QList SetlogFeature::createPlaylistLabels() { - return QList(); -} - /** * Purpose: When inserting or removing playlists, * we require the sidebar model not to reset. * This method queries the database and does dynamic insertion - * Use a custom model in the histroy for grouping by year + * Use a custom model in the history for grouping by year + * @param selectedId row which should be selected */ -QModelIndex SetlogFeature::constructChildModel(int selected_id) { - QList data_list; +QModelIndex SetlogFeature::constructChildModel(int selectedId) { int selected_row = -1; // Setup the sidebar playlist model @@ -173,6 +171,9 @@ QModelIndex SetlogFeature::constructChildModel(int selected_id) { auto groups = QMap(); + QList data_list; + data_list.reserve(playlistTableModel.rowCount()); + for (int row = 0; row < playlistTableModel.rowCount(); ++row) { int id = playlistTableModel @@ -187,29 +188,37 @@ QModelIndex SetlogFeature::constructChildModel(int selected_id) { .data(playlistTableModel.index(row, createdColumn)) .toDateTime(); - if (selected_id == id) { + if (selectedId == id) { // save index for selection selected_row = row; } // Create the TreeItem whose parent is the invisible root item - TreeItem* item = new TreeItem(name, id); - item->setBold(m_playlistsSelectedTrackIsIn.contains(id)); - - decorateChild(item, id); if (row >= kNumDirectHistoryEntries ) { int year = created.date().year(); QMap::const_iterator i = groups.find(year); + TreeItem* groupItem; if (i != groups.end() && i.key() == year) { - i.value()->insertChild(i.value()->childRows(), item); + groupItem = i.value(); } else { - TreeItem* groupItem = new TreeItem(QString("%1").arg(year), -1); - groupItem->insertChild(0, item); + groupItem = new TreeItem(QString("%1").arg(year), -1); groups.insert(year, groupItem); data_list.append(groupItem); } + + std::unique_ptr item (new TreeItem(name, id)); + item->setBold(m_playlistsSelectedTrackIsIn.contains(id)); + + decorateChild(item.get(), id); + + groupItem->appendChild(std::move(item)); } else { + TreeItem* item = new TreeItem(name, id); + item->setBold(m_playlistsSelectedTrackIsIn.contains(id)); + + decorateChild(item, id); + data_list.append(item); } } diff --git a/src/library/trackset/setlogfeature.h b/src/library/trackset/setlogfeature.h index 4d6a6fdb7207..b7c1de0699df 100644 --- a/src/library/trackset/setlogfeature.h +++ b/src/library/trackset/setlogfeature.h @@ -31,8 +31,7 @@ class SetlogFeature : public BasePlaylistFeature { void activate() override; protected: - QList createPlaylistLabels() override; - QModelIndex constructChildModel(int selected_id) override; + QModelIndex constructChildModel(int selectedId); QString fetchPlaylistLabel(int playlistId) override; void decorateChild(TreeItem* pChild, int playlistId) override; From a5815cfbb48045917f9fd6586c2d441a651ceecf Mon Sep 17 00:00:00 2001 From: Daniel Poelzleithner Date: Mon, 21 Sep 2020 00:33:56 +0200 Subject: [PATCH 13/86] Better handle nested models in library features Don't assume the list is linear but nest into child object. User proper match function for finding index of playlist --- src/library/trackset/baseplaylistfeature.cpp | 71 ++++++++++++++------ src/library/trackset/baseplaylistfeature.h | 5 ++ src/library/trackset/playlistfeature.cpp | 5 -- src/library/trackset/playlistfeature.h | 3 - src/library/trackset/setlogfeature.cpp | 7 +- src/library/trackset/setlogfeature.h | 2 - src/library/treeitemmodel.cpp | 10 ++- src/library/treeitemmodel.h | 1 + 8 files changed, 69 insertions(+), 35 deletions(-) diff --git a/src/library/trackset/baseplaylistfeature.cpp b/src/library/trackset/baseplaylistfeature.cpp index f5046af2a615..6c4350d98cfd 100644 --- a/src/library/trackset/baseplaylistfeature.cpp +++ b/src/library/trackset/baseplaylistfeature.cpp @@ -16,9 +16,11 @@ #include "library/trackcollection.h" #include "library/trackcollectionmanager.h" #include "library/treeitem.h" +#include "library/treeitemmodel.h" #include "track/track.h" #include "util/assert.h" #include "widget/wlibrary.h" +#include "widget/wlibrarysidebar.h" #include "widget/wlibrarytextbrowser.h" BasePlaylistFeature::BasePlaylistFeature( @@ -162,9 +164,10 @@ void BasePlaylistFeature::activateChild(const QModelIndex& index) { } void BasePlaylistFeature::activatePlaylist(int playlistId) { - //qDebug() << "BasePlaylistFeature::activatePlaylist()" << playlistId; + // qDebug() << "BasePlaylistFeature::activatePlaylist()" << playlistId; QModelIndex index = indexFromPlaylistId(playlistId); if (playlistId != -1 && index.isValid()) { + m_lastRightClickedIndex = index; m_pPlaylistTableModel->setTableModel(playlistId); emit showTrackModel(m_pPlaylistTableModel); emit enableCoverArtDisplay(true); @@ -326,6 +329,8 @@ void BasePlaylistFeature::slotCreatePlaylist() { void BasePlaylistFeature::slotDeletePlaylist() { //qDebug() << "slotDeletePlaylist() row:" << m_lastRightClickedIndex.data(); int playlistId = playlistIdFromIndex(m_lastRightClickedIndex); + QModelIndex next = m_lastRightClickedIndex.siblingAtRow(m_lastRightClickedIndex.row() + 1); + int nextId = playlistIdFromIndex(next); if (playlistId == -1) { return; } @@ -343,6 +348,15 @@ void BasePlaylistFeature::slotDeletePlaylist() { m_playlistDao.deletePlaylist(playlistId); activate(); + if (nextId != -1) { + activatePlaylist(nextId); + if (m_pSidebarWidget) { + // FIXME: this index is for the current model of the feature, while + // the sidebar uses the sidebarmodel. Using the scrollTo on this index + // crashes the widget + // m_pSidebarWidget->scrollTo(next); + } + } } } @@ -599,6 +613,11 @@ void BasePlaylistFeature::bindLibraryWidget(WLibrary* libraryWidget, libraryWidget->registerView(m_rootViewName, edit); } +void BasePlaylistFeature::bindSidebarWidget(WLibrarySidebar* pSidebarWidget) { + // store the sidebar widget pointer for later use in onRightClickChild + m_pSidebarWidget = pSidebarWidget; +} + void BasePlaylistFeature::htmlLinkClicked(const QUrl& link) { if (QString(link.path()) == "create") { slotCreatePlaylist(); @@ -633,14 +652,15 @@ void BasePlaylistFeature::clearChildModel() { QModelIndex BasePlaylistFeature::indexFromPlaylistId(int playlistId) { QVariant variantId = QVariant(playlistId); - for (int row = 0; row < m_childModel.rowCount(); ++row) { - QModelIndex index = m_childModel.index(row, 0); - TreeItem* pTreeItem = m_childModel.getItem(index); - DEBUG_ASSERT(pTreeItem != nullptr); - if (!pTreeItem->hasChildren() && // leaf node - pTreeItem->getData() == variantId) { - return index; - } + auto results = m_childModel.match( + m_childModel.getRootIndex(), + TreeItemModel::kDataRole, + variantId, + 1, + Qt::MatchWrap | Qt::MatchExactly | Qt::MatchRecursive); + qDebug() << "indexFromPlaylistId: len:" << results.length(); + if (results.length()) { + return results.front(); } return QModelIndex(); } @@ -653,24 +673,37 @@ void BasePlaylistFeature::slotTrackSelected(TrackPointer pTrack) { } m_playlistDao.getPlaylistsTrackIsIn(trackId, &m_playlistsSelectedTrackIsIn); - // Set all playlists the track is in bold (or if there is no track selected, - // clear all the bolding). for (int row = 0; row < m_childModel.rowCount(); ++row) { QModelIndex index = m_childModel.index(row, 0); TreeItem* pTreeItem = m_childModel.getItem(index); DEBUG_ASSERT(pTreeItem != nullptr); - if (!pTreeItem->hasChildren()) { // leaf node - bool ok; - int playlistId = pTreeItem->getData().toInt(&ok); - VERIFY_OR_DEBUG_ASSERT(ok) { - continue; + markTreeItem(pTreeItem); + } + + m_childModel.triggerRepaint(); +} + +void BasePlaylistFeature::markTreeItem(TreeItem* pTreeItem) { + bool ok; + int playlistId = pTreeItem->getData().toInt(&ok); + if(ok) { + bool shouldBold = m_playlistsSelectedTrackIsIn.contains(playlistId); + pTreeItem->setBold(shouldBold); + if (shouldBold && pTreeItem->hasParent()) { + TreeItem* item = pTreeItem; + while ((item = item->parent())) { + item->setBold(true); } - bool shouldBold = m_playlistsSelectedTrackIsIn.contains(playlistId); - pTreeItem->setBold(shouldBold); } } + if (pTreeItem->hasChildren()) { + auto children = pTreeItem->children(); + QList::const_iterator i; - m_childModel.triggerRepaint(); + for (i = children.constBegin(); i != children.constEnd(); ++i) { + markTreeItem(*i); + } + } } void BasePlaylistFeature::slotResetSelectedTrack() { diff --git a/src/library/trackset/baseplaylistfeature.h b/src/library/trackset/baseplaylistfeature.h index fc0c4456f399..278f73c115b3 100644 --- a/src/library/trackset/baseplaylistfeature.h +++ b/src/library/trackset/baseplaylistfeature.h @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include @@ -18,6 +19,7 @@ class KeyboardEventFilter; class PlaylistTableModel; class TrackCollectionManager; class TreeItem; +class WLibrarySidebar; class BasePlaylistFeature : public BaseTrackSetFeature { Q_OBJECT @@ -33,6 +35,7 @@ class BasePlaylistFeature : public BaseTrackSetFeature { void bindLibraryWidget(WLibrary* libraryWidget, KeyboardEventFilter* keyboard) override; + void bindSidebarWidget(WLibrarySidebar* pSidebarWidget) override; public slots: void activateChild(const QModelIndex& index) override; @@ -79,6 +82,7 @@ class BasePlaylistFeature : public BaseTrackSetFeature { PlaylistDAO& m_playlistDao; QModelIndex m_lastRightClickedIndex; + QPointer m_pSidebarWidget; QAction* m_pCreatePlaylistAction; QAction* m_pDeletePlaylistAction; @@ -104,6 +108,7 @@ class BasePlaylistFeature : public BaseTrackSetFeature { private: void initActions(); virtual QString getRootViewHtml() const = 0; + void markTreeItem(TreeItem* pTreeItem); TrackPointer m_pSelectedTrack; }; diff --git a/src/library/trackset/playlistfeature.cpp b/src/library/trackset/playlistfeature.cpp index 9f39b162c739..e1190b35ddef 100644 --- a/src/library/trackset/playlistfeature.cpp +++ b/src/library/trackset/playlistfeature.cpp @@ -57,11 +57,6 @@ QIcon PlaylistFeature::getIcon() { return m_icon; } -void PlaylistFeature::bindSidebarWidget(WLibrarySidebar* pSidebarWidget) { - // store the sidebar widget pointer for later use in onRightClickChild - m_pSidebarWidget = pSidebarWidget; -} - void PlaylistFeature::onRightClick(const QPoint& globalPos) { m_lastRightClickedIndex = QModelIndex(); QMenu menu(m_pSidebarWidget); diff --git a/src/library/trackset/playlistfeature.h b/src/library/trackset/playlistfeature.h index 5389e492c2b3..57ade17dca29 100644 --- a/src/library/trackset/playlistfeature.h +++ b/src/library/trackset/playlistfeature.h @@ -27,8 +27,6 @@ class PlaylistFeature : public BasePlaylistFeature { QVariant title() override; QIcon getIcon() override; - void bindSidebarWidget(WLibrarySidebar* pSidebarWidget) override; - bool dropAcceptChild(const QModelIndex& index, const QList& urls, QObject* pSource) override; @@ -52,5 +50,4 @@ class PlaylistFeature : public BasePlaylistFeature { private: QString getRootViewHtml() const override; const QIcon m_icon; - QPointer m_pSidebarWidget; }; diff --git a/src/library/trackset/setlogfeature.cpp b/src/library/trackset/setlogfeature.cpp index 770086ef1fa1..fac828981771 100644 --- a/src/library/trackset/setlogfeature.cpp +++ b/src/library/trackset/setlogfeature.cpp @@ -85,11 +85,6 @@ void SetlogFeature::bindLibraryWidget( m_libraryWidget = libraryWidget; } -void SetlogFeature::bindSidebarWidget(WLibrarySidebar* pSidebarWidget) { - // store the sidebar widget pointer for later use in onRightClickChild - m_pSidebarWidget = pSidebarWidget; -} - void SetlogFeature::onRightClick(const QPoint& globalPos) { Q_UNUSED(globalPos); m_lastRightClickedIndex = QModelIndex(); @@ -340,9 +335,11 @@ void SetlogFeature::slotJoinWithPrevious() { << " previous:" << previousPlaylistId; if (m_playlistDao.copyPlaylistTracks( currentPlaylistId, previousPlaylistId)) { + m_lastRightClickedIndex = constructChildModel(previousPlaylistId); m_playlistDao.deletePlaylist(currentPlaylistId); reloadChildModel(previousPlaylistId); // For moving selection emit showTrackModel(m_pPlaylistTableModel); + emit activatePlaylist(previousPlaylistId); } } } diff --git a/src/library/trackset/setlogfeature.h b/src/library/trackset/setlogfeature.h index b7c1de0699df..ca885c7da751 100644 --- a/src/library/trackset/setlogfeature.h +++ b/src/library/trackset/setlogfeature.h @@ -20,7 +20,6 @@ class SetlogFeature : public BasePlaylistFeature { void bindLibraryWidget(WLibrary* libraryWidget, KeyboardEventFilter* keyboard) override; - void bindSidebarWidget(WLibrarySidebar* pSidebarWidget) override; void activatePlaylist(int playlistId) override; public slots: @@ -50,6 +49,5 @@ class SetlogFeature : public BasePlaylistFeature { QAction* m_pGetNewPlaylist; int m_playlistId; WLibrary* m_libraryWidget; - QPointer m_pSidebarWidget; const QIcon m_icon; }; diff --git a/src/library/treeitemmodel.cpp b/src/library/treeitemmodel.cpp index b9c5905cdc7b..d9f555f8b8dc 100644 --- a/src/library/treeitemmodel.cpp +++ b/src/library/treeitemmodel.cpp @@ -129,8 +129,10 @@ QModelIndex TreeItemModel::parent(const QModelIndex& index) const { TreeItem *childItem = static_cast(index.internalPointer()); TreeItem *parentItem = childItem->parent(); - if (parentItem == getRootItem()) { + if (parentItem == nullptr) { return QModelIndex(); + } if (parentItem == getRootItem()) { + return createIndex(0, 0, getRootItem()); } else { return createIndex(parentItem->parentRow(), 0, parentItem); } @@ -161,6 +163,12 @@ TreeItem* TreeItemModel::setRootItem(std::unique_ptr pRootItem) { return getRootItem(); } +/** + * Returns the QModelIndex of the Root element. + */ +QModelIndex TreeItemModel::getRootIndex() { + return createIndex(0, 0, getRootItem()); +} /** * Before you can resize the data model dynamically by using 'insertRows' and 'removeRows' * make sure you have initialized diff --git a/src/library/treeitemmodel.h b/src/library/treeitemmodel.h index 0856f36721c5..3b3fed93fd07 100644 --- a/src/library/treeitemmodel.h +++ b/src/library/treeitemmodel.h @@ -37,6 +37,7 @@ class TreeItemModel : public QAbstractItemModel { TreeItem* getRootItem() const { return m_pRootItem.get(); } + QModelIndex getRootIndex(); // Return the underlying TreeItem. // If the index is invalid, the root item is returned. From d351d9d8f79515bed6575c12308b3c1fa6388c70 Mon Sep 17 00:00:00 2001 From: Daniel Poelzleithner Date: Mon, 21 Sep 2020 00:35:47 +0200 Subject: [PATCH 14/86] Delete empty histroy playlists on start Clear database from empty histroy playlists that accumulate from crashes or closing mixxx with ctrl+c --- src/library/dao/playlistdao.cpp | 21 +++++++++++++++++++++ src/library/dao/playlistdao.h | 2 ++ src/library/trackset/setlogfeature.cpp | 3 +++ 3 files changed, 26 insertions(+) diff --git a/src/library/dao/playlistdao.cpp b/src/library/dao/playlistdao.cpp index 522eea5f186c..bc5f0baf59b8 100644 --- a/src/library/dao/playlistdao.cpp +++ b/src/library/dao/playlistdao.cpp @@ -227,6 +227,27 @@ void PlaylistDAO::deletePlaylist(const int playlistId) { } } +void PlaylistDAO::deleteEmptyPlaylists(const PlaylistDAO::HiddenType type) { + //qDebug() << "PlaylistDAO::deletePlaylist" << QThread::currentThread() << m_database.connectionName(); + ScopedTransaction transaction(m_database); + + // Get the playlist id for this + QSqlQuery query(m_database); + + // Delete the row in the Playlists table. + query.prepare(QStringLiteral( + "DELETE FROM Playlists " + "WHERE NOT EXISTS (SELECT playlist_id FROM PlaylistTracks WHERE Playlists.ID = PlaylistTracks.playlist_id) AND " + "Playlists.hidden = :hidden")); + query.bindValue(":hidden", static_cast(type)); + if (!query.exec()) { + LOG_FAILED_QUERY(query); + return; + } + + transaction.commit(); +} + void PlaylistDAO::renamePlaylist(const int playlistId, const QString& newName) { QSqlQuery query(m_database); query.prepare(QStringLiteral( diff --git a/src/library/dao/playlistdao.h b/src/library/dao/playlistdao.h index d1bd32088724..2c708ad8d3f1 100644 --- a/src/library/dao/playlistdao.h +++ b/src/library/dao/playlistdao.h @@ -59,6 +59,8 @@ class PlaylistDAO : public QObject, public virtual DAO { int createUniquePlaylist(QString* pName, const HiddenType type = PLHT_NOT_HIDDEN); // Delete a playlist void deletePlaylist(const int playlistId); + /// Deletes an empty Playlist + void deleteEmptyPlaylists(const PlaylistDAO::HiddenType type); // Rename a playlist void renamePlaylist(const int playlistId, const QString& newName); // Lock or unlock a playlist diff --git a/src/library/trackset/setlogfeature.cpp b/src/library/trackset/setlogfeature.cpp index fac828981771..9ffec55d03e4 100644 --- a/src/library/trackset/setlogfeature.cpp +++ b/src/library/trackset/setlogfeature.cpp @@ -37,6 +37,9 @@ SetlogFeature::SetlogFeature( m_playlistId(-1), m_libraryWidget(nullptr), m_icon(QStringLiteral(":/images/library/ic_library_history.svg")) { + // clear old empty entries + m_playlistDao.deleteEmptyPlaylists(PlaylistDAO::HiddenType::PLHT_SET_LOG); + //construct child model m_childModel.setRootItem(TreeItem::newRoot(this)); constructChildModel(-1); From cc209c115dd8c13751438f5e00c116d60405680b Mon Sep 17 00:00:00 2001 From: Daniel Poelzleithner Date: Mon, 21 Sep 2020 00:37:07 +0200 Subject: [PATCH 15/86] Use / to seperate same date history entries. Replace directory seperator with - when exporting playlists. --- src/library/trackset/baseplaylistfeature.cpp | 2 ++ src/library/trackset/setlogfeature.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/library/trackset/baseplaylistfeature.cpp b/src/library/trackset/baseplaylistfeature.cpp index 6c4350d98cfd..340638a18a25 100644 --- a/src/library/trackset/baseplaylistfeature.cpp +++ b/src/library/trackset/baseplaylistfeature.cpp @@ -463,6 +463,8 @@ void BasePlaylistFeature::slotExportPlaylist() { return; } QString playlistName = m_playlistDao.getPlaylistName(playlistId); + // replace separator character with something generic + playlistName = playlistName.replace(QDir::separator(), "-"); qDebug() << "Export playlist" << playlistName; QString lastPlaylistDirectory = m_pConfig->getValue( diff --git a/src/library/trackset/setlogfeature.cpp b/src/library/trackset/setlogfeature.cpp index 9ffec55d03e4..e4c54e4ab498 100644 --- a/src/library/trackset/setlogfeature.cpp +++ b/src/library/trackset/setlogfeature.cpp @@ -269,7 +269,7 @@ void SetlogFeature::slotGetNewPlaylist() { QString set_log_name; set_log_name = QDate::currentDate().toString(Qt::ISODate); - set_log_name_format = set_log_name + " (%1)"; + set_log_name_format = set_log_name + " / %1"; int i = 1; // calculate name of the todays setlog From 164d49da2075cd0819f5fc7f879f6ca02d1c1ea8 Mon Sep 17 00:00:00 2001 From: Daniel Poelzleithner Date: Mon, 21 Sep 2020 01:06:24 +0200 Subject: [PATCH 16/86] fix crash when index is obsolete due rebuilding of the model --- src/library/trackset/baseplaylistfeature.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/library/trackset/baseplaylistfeature.cpp b/src/library/trackset/baseplaylistfeature.cpp index 340638a18a25..43460d8c5acf 100644 --- a/src/library/trackset/baseplaylistfeature.cpp +++ b/src/library/trackset/baseplaylistfeature.cpp @@ -351,10 +351,9 @@ void BasePlaylistFeature::slotDeletePlaylist() { if (nextId != -1) { activatePlaylist(nextId); if (m_pSidebarWidget) { - // FIXME: this index is for the current model of the feature, while - // the sidebar uses the sidebarmodel. Using the scrollTo on this index - // crashes the widget - // m_pSidebarWidget->scrollTo(next); + // FIXME: this does not scroll to the correct position for some reason + next = indexFromPlaylistId(nextId); + m_pSidebarWidget->scrollTo(next); } } } From 2654c7182506acbd868ef802c859bb3af0b2fdff Mon Sep 17 00:00:00 2001 From: Daniel Poelzleithner Date: Sat, 26 Sep 2020 03:12:15 +0200 Subject: [PATCH 17/86] use # seperator for history extra counter --- src/library/trackset/setlogfeature.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/library/trackset/setlogfeature.cpp b/src/library/trackset/setlogfeature.cpp index e4c54e4ab498..37cdfcb76722 100644 --- a/src/library/trackset/setlogfeature.cpp +++ b/src/library/trackset/setlogfeature.cpp @@ -269,7 +269,7 @@ void SetlogFeature::slotGetNewPlaylist() { QString set_log_name; set_log_name = QDate::currentDate().toString(Qt::ISODate); - set_log_name_format = set_log_name + " / %1"; + set_log_name_format = set_log_name + " #%1"; int i = 1; // calculate name of the todays setlog From 7971acb79613799a9bd433ceece1801ff48c3129 Mon Sep 17 00:00:00 2001 From: Daniel Poelzleithner Date: Thu, 8 Oct 2020 21:53:47 +0200 Subject: [PATCH 18/86] Fix formatting issues from review --- src/library/trackset/baseplaylistfeature.cpp | 27 ++++++------ src/library/trackset/playlistfeature.cpp | 10 ++--- src/library/trackset/setlogfeature.cpp | 45 ++++++++++---------- src/library/treeitemmodel.cpp | 7 ++- 4 files changed, 42 insertions(+), 47 deletions(-) diff --git a/src/library/trackset/baseplaylistfeature.cpp b/src/library/trackset/baseplaylistfeature.cpp index 43460d8c5acf..73f5a4111204 100644 --- a/src/library/trackset/baseplaylistfeature.cpp +++ b/src/library/trackset/baseplaylistfeature.cpp @@ -329,8 +329,8 @@ void BasePlaylistFeature::slotCreatePlaylist() { void BasePlaylistFeature::slotDeletePlaylist() { //qDebug() << "slotDeletePlaylist() row:" << m_lastRightClickedIndex.data(); int playlistId = playlistIdFromIndex(m_lastRightClickedIndex); - QModelIndex next = m_lastRightClickedIndex.siblingAtRow(m_lastRightClickedIndex.row() + 1); - int nextId = playlistIdFromIndex(next); + QModelIndex nextIndex = m_lastRightClickedIndex.siblingAtRow(m_lastRightClickedIndex.row() + 1); + int nextId = playlistIdFromIndex(nextIndex); if (playlistId == -1) { return; } @@ -352,8 +352,8 @@ void BasePlaylistFeature::slotDeletePlaylist() { activatePlaylist(nextId); if (m_pSidebarWidget) { // FIXME: this does not scroll to the correct position for some reason - next = indexFromPlaylistId(nextId); - m_pSidebarWidget->scrollTo(next); + nextIndex = indexFromPlaylistId(nextId); + m_pSidebarWidget->scrollTo(nextIndex); } } } @@ -653,14 +653,14 @@ void BasePlaylistFeature::clearChildModel() { QModelIndex BasePlaylistFeature::indexFromPlaylistId(int playlistId) { QVariant variantId = QVariant(playlistId); - auto results = m_childModel.match( - m_childModel.getRootIndex(), - TreeItemModel::kDataRole, - variantId, - 1, - Qt::MatchWrap | Qt::MatchExactly | Qt::MatchRecursive); + QModelIndexList results = m_childModel.match( + m_childModel.getRootIndex(), + TreeItemModel::kDataRole, + variantId, + 1, + Qt::MatchWrap | Qt::MatchExactly | Qt::MatchRecursive); qDebug() << "indexFromPlaylistId: len:" << results.length(); - if (results.length()) { + if (!results.isEmpty()) { return results.front(); } return QModelIndex(); @@ -698,10 +698,9 @@ void BasePlaylistFeature::markTreeItem(TreeItem* pTreeItem) { } } if (pTreeItem->hasChildren()) { - auto children = pTreeItem->children(); - QList::const_iterator i; + QList children = pTreeItem->children(); - for (i = children.constBegin(); i != children.constEnd(); ++i) { + for (auto i = children.constBegin(); i != children.constEnd(); ++i) { markTreeItem(*i); } } diff --git a/src/library/trackset/playlistfeature.cpp b/src/library/trackset/playlistfeature.cpp index e1190b35ddef..b94a5c36f542 100644 --- a/src/library/trackset/playlistfeature.cpp +++ b/src/library/trackset/playlistfeature.cpp @@ -231,12 +231,10 @@ QString PlaylistFeature::fetchPlaylistLabel(int playlistId) { return QString(); } -/** - * Purpose: When inserting or removing playlists, - * we require the sidebar model not to reset. - * This method queries the database and does dynamic insertion - * @param selectedId entry which should be selected -*/ +/// Purpose: When inserting or removing playlists, +/// we require the sidebar model not to reset. +/// This method queries the database and does dynamic insertion +/// @param selectedId entry which should be selected QModelIndex PlaylistFeature::constructChildModel(int selectedId) { QList data_list; int selectedRow = -1; diff --git a/src/library/trackset/setlogfeature.cpp b/src/library/trackset/setlogfeature.cpp index 37cdfcb76722..559ebb9739db 100644 --- a/src/library/trackset/setlogfeature.cpp +++ b/src/library/trackset/setlogfeature.cpp @@ -141,15 +141,13 @@ void SetlogFeature::onRightClickChild(const QPoint& globalPos, const QModelIndex menu.exec(globalPos); } -/** - * Purpose: When inserting or removing playlists, - * we require the sidebar model not to reset. - * This method queries the database and does dynamic insertion - * Use a custom model in the history for grouping by year - * @param selectedId row which should be selected -*/ +/// Purpose: When inserting or removing playlists, +/// we require the sidebar model not to reset. +/// This method queries the database and does dynamic insertion +/// Use a custom model in the history for grouping by year +/// @param selectedId row which should be selected QModelIndex SetlogFeature::constructChildModel(int selectedId) { - int selected_row = -1; + int selectedRow = -1; // Setup the sidebar playlist model QSqlTableModel playlistTableModel(this, @@ -167,10 +165,11 @@ QModelIndex SetlogFeature::constructChildModel(int selectedId) { int idColumn = record.indexOf("id"); int createdColumn = record.indexOf("date_created"); - auto groups = QMap(); + QMap groups; - QList data_list; - data_list.reserve(playlistTableModel.rowCount()); + QList itemList; + // Generous estimate (number of years the db is used ;)) + itemList.reserve(kNumDirectHistoryEntries + 15); for (int row = 0; row < playlistTableModel.rowCount(); ++row) { int id = @@ -181,28 +180,28 @@ QModelIndex SetlogFeature::constructChildModel(int selectedId) { playlistTableModel .data(playlistTableModel.index(row, nameColumn)) .toString(); - QDateTime created = + QDateTime dateCreated = playlistTableModel .data(playlistTableModel.index(row, createdColumn)) .toDateTime(); if (selectedId == id) { // save index for selection - selected_row = row; + selectedRow = row; } // Create the TreeItem whose parent is the invisible root item if (row >= kNumDirectHistoryEntries ) { - int year = created.date().year(); + int yearCreated = dateCreated.date().year(); - QMap::const_iterator i = groups.find(year); + auto i = groups.find(yearCreated); TreeItem* groupItem; - if (i != groups.end() && i.key() == year) { + if (i != groups.end() && i.key() == yearCreated) { groupItem = i.value(); } else { - groupItem = new TreeItem(QString("%1").arg(year), -1); - groups.insert(year, groupItem); - data_list.append(groupItem); + groupItem = new TreeItem(QString("%1").arg(yearCreated), -1); + groups.insert(yearCreated, groupItem); + itemList.append(groupItem); } std::unique_ptr item (new TreeItem(name, id)); @@ -217,16 +216,16 @@ QModelIndex SetlogFeature::constructChildModel(int selectedId) { decorateChild(item, id); - data_list.append(item); + itemList.append(item); } } // Append all the newly created TreeItems in a dynamic way to the childmodel - m_childModel.insertTreeItemRows(data_list, 0); - if (selected_row == -1) { + m_childModel.insertTreeItemRows(itemList, 0); + if (selectedRow == -1) { return QModelIndex(); } - return m_childModel.index(selected_row, 0); + return m_childModel.index(selectedRow, 0); } QString SetlogFeature::fetchPlaylistLabel(int playlistId) { diff --git a/src/library/treeitemmodel.cpp b/src/library/treeitemmodel.cpp index d9f555f8b8dc..283096b68ef1 100644 --- a/src/library/treeitemmodel.cpp +++ b/src/library/treeitemmodel.cpp @@ -129,7 +129,7 @@ QModelIndex TreeItemModel::parent(const QModelIndex& index) const { TreeItem *childItem = static_cast(index.internalPointer()); TreeItem *parentItem = childItem->parent(); - if (parentItem == nullptr) { + if (!parentItem) { return QModelIndex(); } if (parentItem == getRootItem()) { return createIndex(0, 0, getRootItem()); @@ -163,12 +163,11 @@ TreeItem* TreeItemModel::setRootItem(std::unique_ptr pRootItem) { return getRootItem(); } -/** - * Returns the QModelIndex of the Root element. - */ +/// Returns the QModelIndex of the Root element. QModelIndex TreeItemModel::getRootIndex() { return createIndex(0, 0, getRootItem()); } + /** * Before you can resize the data model dynamically by using 'insertRows' and 'removeRows' * make sure you have initialized From 8aba0cf855595e75c6bfd635c3b9dcda7dad1de9 Mon Sep 17 00:00:00 2001 From: Daniel Poelzleithner Date: Fri, 9 Oct 2020 00:43:58 +0200 Subject: [PATCH 19/86] fix formatting and use const where possible --- src/library/dao/playlistdao.cpp | 5 +++-- src/library/dao/playlistdao.h | 4 ++-- src/library/trackset/baseplaylistfeature.cpp | 19 +++++++++++-------- src/library/trackset/baseplaylistfeature.h | 2 +- src/library/trackset/setlogfeature.cpp | 8 ++++---- src/library/treeitemmodel.cpp | 5 ++--- src/library/treeitemmodel.h | 3 ++- 7 files changed, 25 insertions(+), 21 deletions(-) diff --git a/src/library/dao/playlistdao.cpp b/src/library/dao/playlistdao.cpp index bc5f0baf59b8..32af6024b9a4 100644 --- a/src/library/dao/playlistdao.cpp +++ b/src/library/dao/playlistdao.cpp @@ -227,7 +227,7 @@ void PlaylistDAO::deletePlaylist(const int playlistId) { } } -void PlaylistDAO::deleteEmptyPlaylists(const PlaylistDAO::HiddenType type) { +void PlaylistDAO::deleteAllEmptyPlaylists(PlaylistDAO::HiddenType type) { //qDebug() << "PlaylistDAO::deletePlaylist" << QThread::currentThread() << m_database.connectionName(); ScopedTransaction transaction(m_database); @@ -237,7 +237,8 @@ void PlaylistDAO::deleteEmptyPlaylists(const PlaylistDAO::HiddenType type) { // Delete the row in the Playlists table. query.prepare(QStringLiteral( "DELETE FROM Playlists " - "WHERE NOT EXISTS (SELECT playlist_id FROM PlaylistTracks WHERE Playlists.ID = PlaylistTracks.playlist_id) AND " + "WHERE NOT EXISTS (SELECT playlist_id FROM PlaylistTracks WHERE " + "Playlists.ID = PlaylistTracks.playlist_id) AND " "Playlists.hidden = :hidden")); query.bindValue(":hidden", static_cast(type)); if (!query.exec()) { diff --git a/src/library/dao/playlistdao.h b/src/library/dao/playlistdao.h index 2c708ad8d3f1..f27ccbeef5e7 100644 --- a/src/library/dao/playlistdao.h +++ b/src/library/dao/playlistdao.h @@ -59,8 +59,8 @@ class PlaylistDAO : public QObject, public virtual DAO { int createUniquePlaylist(QString* pName, const HiddenType type = PLHT_NOT_HIDDEN); // Delete a playlist void deletePlaylist(const int playlistId); - /// Deletes an empty Playlist - void deleteEmptyPlaylists(const PlaylistDAO::HiddenType type); + /// Deletes all empty Playlist + void deleteAllEmptyPlaylists(PlaylistDAO::HiddenType type); // Rename a playlist void renamePlaylist(const int playlistId, const QString& newName); // Lock or unlock a playlist diff --git a/src/library/trackset/baseplaylistfeature.cpp b/src/library/trackset/baseplaylistfeature.cpp index 73f5a4111204..e4ea8ca5cc86 100644 --- a/src/library/trackset/baseplaylistfeature.cpp +++ b/src/library/trackset/baseplaylistfeature.cpp @@ -23,6 +23,10 @@ #include "widget/wlibrarysidebar.h" #include "widget/wlibrarytextbrowser.h" +namespace { +const char* kUnsafeFilenameReplacement = "-"; +} + BasePlaylistFeature::BasePlaylistFeature( Library* pLibrary, UserSettingsPointer pConfig, @@ -463,7 +467,7 @@ void BasePlaylistFeature::slotExportPlaylist() { } QString playlistName = m_playlistDao.getPlaylistName(playlistId); // replace separator character with something generic - playlistName = playlistName.replace(QDir::separator(), "-"); + playlistName = playlistName.replace(QDir::separator(), kUnsafeFilenameReplacement); qDebug() << "Export playlist" << playlistName; QString lastPlaylistDirectory = m_pConfig->getValue( @@ -654,12 +658,11 @@ void BasePlaylistFeature::clearChildModel() { QModelIndex BasePlaylistFeature::indexFromPlaylistId(int playlistId) { QVariant variantId = QVariant(playlistId); QModelIndexList results = m_childModel.match( - m_childModel.getRootIndex(), - TreeItemModel::kDataRole, - variantId, - 1, - Qt::MatchWrap | Qt::MatchExactly | Qt::MatchRecursive); - qDebug() << "indexFromPlaylistId: len:" << results.length(); + m_childModel.getRootIndex(), + TreeItemModel::kDataRole, + variantId, + 1, + Qt::MatchWrap | Qt::MatchExactly | Qt::MatchRecursive); if (!results.isEmpty()) { return results.front(); } @@ -687,7 +690,7 @@ void BasePlaylistFeature::slotTrackSelected(TrackPointer pTrack) { void BasePlaylistFeature::markTreeItem(TreeItem* pTreeItem) { bool ok; int playlistId = pTreeItem->getData().toInt(&ok); - if(ok) { + if (ok) { bool shouldBold = m_playlistsSelectedTrackIsIn.contains(playlistId); pTreeItem->setBold(shouldBold); if (shouldBold && pTreeItem->hasParent()) { diff --git a/src/library/trackset/baseplaylistfeature.h b/src/library/trackset/baseplaylistfeature.h index 278f73c115b3..505256862b31 100644 --- a/src/library/trackset/baseplaylistfeature.h +++ b/src/library/trackset/baseplaylistfeature.h @@ -4,8 +4,8 @@ #include #include #include -#include #include +#include #include #include #include diff --git a/src/library/trackset/setlogfeature.cpp b/src/library/trackset/setlogfeature.cpp index 559ebb9739db..fc1f18b3cab1 100644 --- a/src/library/trackset/setlogfeature.cpp +++ b/src/library/trackset/setlogfeature.cpp @@ -19,7 +19,7 @@ #include "widget/wtracktableview.h" namespace { - constexpr int kNumDirectHistoryEntries = 5; +constexpr int kNumDirectHistoryEntries = 5; } SetlogFeature::SetlogFeature( @@ -38,7 +38,7 @@ SetlogFeature::SetlogFeature( m_libraryWidget(nullptr), m_icon(QStringLiteral(":/images/library/ic_library_history.svg")) { // clear old empty entries - m_playlistDao.deleteEmptyPlaylists(PlaylistDAO::HiddenType::PLHT_SET_LOG); + m_playlistDao.deleteAllEmptyPlaylists(PlaylistDAO::HiddenType::PLHT_SET_LOG); //construct child model m_childModel.setRootItem(TreeItem::newRoot(this)); @@ -191,7 +191,7 @@ QModelIndex SetlogFeature::constructChildModel(int selectedId) { } // Create the TreeItem whose parent is the invisible root item - if (row >= kNumDirectHistoryEntries ) { + if (row >= kNumDirectHistoryEntries) { int yearCreated = dateCreated.date().year(); auto i = groups.find(yearCreated); @@ -204,7 +204,7 @@ QModelIndex SetlogFeature::constructChildModel(int selectedId) { itemList.append(groupItem); } - std::unique_ptr item (new TreeItem(name, id)); + std::unique_ptr item(new TreeItem(name, id)); item->setBold(m_playlistsSelectedTrackIsIn.contains(id)); decorateChild(item.get(), id); diff --git a/src/library/treeitemmodel.cpp b/src/library/treeitemmodel.cpp index 283096b68ef1..2e5f678b8fa4 100644 --- a/src/library/treeitemmodel.cpp +++ b/src/library/treeitemmodel.cpp @@ -131,7 +131,7 @@ QModelIndex TreeItemModel::parent(const QModelIndex& index) const { TreeItem *parentItem = childItem->parent(); if (!parentItem) { return QModelIndex(); - } if (parentItem == getRootItem()) { + } else if (parentItem == getRootItem()) { return createIndex(0, 0, getRootItem()); } else { return createIndex(parentItem->parentRow(), 0, parentItem); @@ -163,8 +163,7 @@ TreeItem* TreeItemModel::setRootItem(std::unique_ptr pRootItem) { return getRootItem(); } -/// Returns the QModelIndex of the Root element. -QModelIndex TreeItemModel::getRootIndex() { +const QModelIndex TreeItemModel::getRootIndex() { return createIndex(0, 0, getRootItem()); } diff --git a/src/library/treeitemmodel.h b/src/library/treeitemmodel.h index 3b3fed93fd07..0bed90e31d87 100644 --- a/src/library/treeitemmodel.h +++ b/src/library/treeitemmodel.h @@ -37,7 +37,8 @@ class TreeItemModel : public QAbstractItemModel { TreeItem* getRootItem() const { return m_pRootItem.get(); } - QModelIndex getRootIndex(); + /// Returns the QModelIndex of the Root element. + const QModelIndex getRootIndex(); // Return the underlying TreeItem. // If the index is invalid, the root item is returned. From a0608a979cb1f72f8398d053a9230416d7d77c5a Mon Sep 17 00:00:00 2001 From: Daniel Poelzleithner Date: Fri, 9 Oct 2020 00:49:37 +0200 Subject: [PATCH 20/86] use older lookup method for sibilings --- src/library/trackset/baseplaylistfeature.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/library/trackset/baseplaylistfeature.cpp b/src/library/trackset/baseplaylistfeature.cpp index e4ea8ca5cc86..8240e4d6e78f 100644 --- a/src/library/trackset/baseplaylistfeature.cpp +++ b/src/library/trackset/baseplaylistfeature.cpp @@ -333,7 +333,7 @@ void BasePlaylistFeature::slotCreatePlaylist() { void BasePlaylistFeature::slotDeletePlaylist() { //qDebug() << "slotDeletePlaylist() row:" << m_lastRightClickedIndex.data(); int playlistId = playlistIdFromIndex(m_lastRightClickedIndex); - QModelIndex nextIndex = m_lastRightClickedIndex.siblingAtRow(m_lastRightClickedIndex.row() + 1); + QModelIndex nextIndex = m_lastRightClickedIndex.sibling(m_lastRightClickedIndex.row() + 1, m_lastRightClickedIndex.column()); int nextId = playlistIdFromIndex(nextIndex); if (playlistId == -1) { return; From e895dc9cd9a0935312df409882576897646964cc Mon Sep 17 00:00:00 2001 From: Daniel Poelzleithner Date: Fri, 9 Oct 2020 01:57:56 +0200 Subject: [PATCH 21/86] fix formatting --- src/library/trackset/baseplaylistfeature.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/library/trackset/baseplaylistfeature.cpp b/src/library/trackset/baseplaylistfeature.cpp index 8240e4d6e78f..75e464e53377 100644 --- a/src/library/trackset/baseplaylistfeature.cpp +++ b/src/library/trackset/baseplaylistfeature.cpp @@ -333,7 +333,9 @@ void BasePlaylistFeature::slotCreatePlaylist() { void BasePlaylistFeature::slotDeletePlaylist() { //qDebug() << "slotDeletePlaylist() row:" << m_lastRightClickedIndex.data(); int playlistId = playlistIdFromIndex(m_lastRightClickedIndex); - QModelIndex nextIndex = m_lastRightClickedIndex.sibling(m_lastRightClickedIndex.row() + 1, m_lastRightClickedIndex.column()); + QModelIndex nextIndex = + m_lastRightClickedIndex.sibling(m_lastRightClickedIndex.row() + 1, + m_lastRightClickedIndex.column()); int nextId = playlistIdFromIndex(nextIndex); if (playlistId == -1) { return; From f6781becc1a9d3d655a63b23174fdc7ad8a51fe8 Mon Sep 17 00:00:00 2001 From: Daniel Poelzleithner Date: Fri, 9 Oct 2020 02:27:55 +0200 Subject: [PATCH 22/86] Remove transaction from playlist removeal --- src/library/dao/playlistdao.cpp | 4 ---- src/library/trackset/baseplaylistfeature.cpp | 2 +- src/library/trackset/playlistfeature.h | 2 +- src/library/trackset/setlogfeature.cpp | 3 ++- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/library/dao/playlistdao.cpp b/src/library/dao/playlistdao.cpp index 32af6024b9a4..876d2e4634ca 100644 --- a/src/library/dao/playlistdao.cpp +++ b/src/library/dao/playlistdao.cpp @@ -229,8 +229,6 @@ void PlaylistDAO::deletePlaylist(const int playlistId) { void PlaylistDAO::deleteAllEmptyPlaylists(PlaylistDAO::HiddenType type) { //qDebug() << "PlaylistDAO::deletePlaylist" << QThread::currentThread() << m_database.connectionName(); - ScopedTransaction transaction(m_database); - // Get the playlist id for this QSqlQuery query(m_database); @@ -245,8 +243,6 @@ void PlaylistDAO::deleteAllEmptyPlaylists(PlaylistDAO::HiddenType type) { LOG_FAILED_QUERY(query); return; } - - transaction.commit(); } void PlaylistDAO::renamePlaylist(const int playlistId, const QString& newName) { diff --git a/src/library/trackset/baseplaylistfeature.cpp b/src/library/trackset/baseplaylistfeature.cpp index 75e464e53377..125e426d6be7 100644 --- a/src/library/trackset/baseplaylistfeature.cpp +++ b/src/library/trackset/baseplaylistfeature.cpp @@ -697,7 +697,7 @@ void BasePlaylistFeature::markTreeItem(TreeItem* pTreeItem) { pTreeItem->setBold(shouldBold); if (shouldBold && pTreeItem->hasParent()) { TreeItem* item = pTreeItem; - while ((item = item->parent())) { + while (item = item->parent()) { item->setBold(true); } } diff --git a/src/library/trackset/playlistfeature.h b/src/library/trackset/playlistfeature.h index 57ade17dca29..2fe64869d8c8 100644 --- a/src/library/trackset/playlistfeature.h +++ b/src/library/trackset/playlistfeature.h @@ -44,7 +44,7 @@ class PlaylistFeature : public BasePlaylistFeature { protected: QString fetchPlaylistLabel(int playlistId) override; void decorateChild(TreeItem* pChild, int playlistId) override; - virtual QList createPlaylistLabels(); + QList createPlaylistLabels(); QModelIndex constructChildModel(int selectedId); private: diff --git a/src/library/trackset/setlogfeature.cpp b/src/library/trackset/setlogfeature.cpp index fc1f18b3cab1..e83aff2d105f 100644 --- a/src/library/trackset/setlogfeature.cpp +++ b/src/library/trackset/setlogfeature.cpp @@ -199,7 +199,7 @@ QModelIndex SetlogFeature::constructChildModel(int selectedId) { if (i != groups.end() && i.key() == yearCreated) { groupItem = i.value(); } else { - groupItem = new TreeItem(QString("%1").arg(yearCreated), -1); + groupItem = new TreeItem(QString::number(yearCreated), -1); groups.insert(yearCreated, groupItem); itemList.append(groupItem); } @@ -474,5 +474,6 @@ void SetlogFeature::activatePlaylist(int playlistId) { } QString SetlogFeature::getRootViewHtml() const { + // Instead of the help text, the history shows the current entry instead return QString(); } From dac5abcb685d8534c5e7f478bee33c8924d65839 Mon Sep 17 00:00:00 2001 From: Daniel Poelzleithner Date: Sat, 10 Oct 2020 01:07:51 +0200 Subject: [PATCH 23/86] fix build warning on ubuntu MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit /home/travis/build/mixxxdj/mixxx/src/library/trackset/baseplaylistfeature.cpp: In member function ‘void BasePlaylistFeature::markTreeItem(TreeItem*)’: /home/travis/build/mixxxdj/mixxx/src/library/trackset/baseplaylistfeature.cpp:699:25: error: suggest parentheses around assignment used as truth value [-Werror=parentheses] while (item = item->parent()) { ~~~~~^~~~~~~~~~~~~~~~ cc1plus: all warnings being treated as errors --- src/library/trackset/baseplaylistfeature.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/library/trackset/baseplaylistfeature.cpp b/src/library/trackset/baseplaylistfeature.cpp index 125e426d6be7..e5fdcc3e3fc3 100644 --- a/src/library/trackset/baseplaylistfeature.cpp +++ b/src/library/trackset/baseplaylistfeature.cpp @@ -697,7 +697,8 @@ void BasePlaylistFeature::markTreeItem(TreeItem* pTreeItem) { pTreeItem->setBold(shouldBold); if (shouldBold && pTreeItem->hasParent()) { TreeItem* item = pTreeItem; - while (item = item->parent()) { + // extra parents, because -Werror=parentheses + while ((item = item->parent())) { item->setBold(true); } } From b31cf4b61e071afd864a29f707f54b5af3f82607 Mon Sep 17 00:00:00 2001 From: Daniel Poelzleithner Date: Wed, 4 Nov 2020 03:58:55 +0100 Subject: [PATCH 24/86] simplify code --- src/library/trackset/baseplaylistfeature.cpp | 4 ++-- src/library/trackset/setlogfeature.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/library/trackset/baseplaylistfeature.cpp b/src/library/trackset/baseplaylistfeature.cpp index e5fdcc3e3fc3..86559219c39d 100644 --- a/src/library/trackset/baseplaylistfeature.cpp +++ b/src/library/trackset/baseplaylistfeature.cpp @@ -706,8 +706,8 @@ void BasePlaylistFeature::markTreeItem(TreeItem* pTreeItem) { if (pTreeItem->hasChildren()) { QList children = pTreeItem->children(); - for (auto i = children.constBegin(); i != children.constEnd(); ++i) { - markTreeItem(*i); + for (int i = 0; i < children.size(); i++) { + markTreeItem(children.at(i)); } } } diff --git a/src/library/trackset/setlogfeature.cpp b/src/library/trackset/setlogfeature.cpp index e83aff2d105f..2dd529177166 100644 --- a/src/library/trackset/setlogfeature.cpp +++ b/src/library/trackset/setlogfeature.cpp @@ -204,7 +204,7 @@ QModelIndex SetlogFeature::constructChildModel(int selectedId) { itemList.append(groupItem); } - std::unique_ptr item(new TreeItem(name, id)); + auto item = std::make_unique(name, id); item->setBold(m_playlistsSelectedTrackIsIn.contains(id)); decorateChild(item.get(), id); From f9d3f02e6863ce57738cd234612a870afcb34312 Mon Sep 17 00:00:00 2001 From: Daniel Poelzleithner Date: Wed, 4 Nov 2020 20:04:55 +0100 Subject: [PATCH 25/86] Properly open all submenus when using selectIndex on features --- src/library/trackset/baseplaylistfeature.cpp | 2 +- src/widget/wlibrarysidebar.cpp | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/library/trackset/baseplaylistfeature.cpp b/src/library/trackset/baseplaylistfeature.cpp index 86559219c39d..fc41b58ae191 100644 --- a/src/library/trackset/baseplaylistfeature.cpp +++ b/src/library/trackset/baseplaylistfeature.cpp @@ -359,7 +359,7 @@ void BasePlaylistFeature::slotDeletePlaylist() { if (m_pSidebarWidget) { // FIXME: this does not scroll to the correct position for some reason nextIndex = indexFromPlaylistId(nextId); - m_pSidebarWidget->scrollTo(nextIndex); + m_pSidebarWidget->selectIndex(nextIndex); } } } diff --git a/src/widget/wlibrarysidebar.cpp b/src/widget/wlibrarysidebar.cpp index 93fe776e23f1..f080437598c5 100644 --- a/src/widget/wlibrarysidebar.cpp +++ b/src/widget/wlibrarysidebar.cpp @@ -215,9 +215,16 @@ void WLibrarySidebar::selectIndex(const QModelIndex& index) { pModel->select(index, QItemSelectionModel::Select); setSelectionModel(pModel); - if (index.parent().isValid()) { - expand(index.parent()); +//FIXME(XXX): use expandRecursively when +#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) + QModelIndex parentIndex = index.parent(); + if (parentIndex.isValid()) { + expand(parentIndex); + parentIndex = parentIndex.parent(); } +#else + expandRecursively(index); +#endif scrollTo(index); } From 7e0069421733981bf7f2f3283858c3d047ad6409 Mon Sep 17 00:00:00 2001 From: Daniel Poelzleithner Date: Thu, 26 Nov 2020 00:58:57 +0100 Subject: [PATCH 26/86] Add functions to scroll to the correct child on the sidebar Use new utility functions to scroll to the next item after the deleted one. --- src/library/sidebarmodel.cpp | 9 ++++++-- src/library/sidebarmodel.h | 4 ++++ src/library/trackset/baseplaylistfeature.cpp | 2 +- src/library/trackset/setlogfeature.cpp | 2 +- src/widget/wlibrarysidebar.cpp | 24 ++++++++++++++------ src/widget/wlibrarysidebar.h | 1 + 6 files changed, 31 insertions(+), 11 deletions(-) diff --git a/src/library/sidebarmodel.cpp b/src/library/sidebarmodel.cpp index 697a6a30a249..6ea3fa5096a4 100644 --- a/src/library/sidebarmodel.cpp +++ b/src/library/sidebarmodel.cpp @@ -374,8 +374,6 @@ bool SidebarModel::dragMoveAccept(const QModelIndex& index, const QUrl& url) { // Translates an index from the child models to an index of the sidebar models QModelIndex SidebarModel::translateSourceIndex(const QModelIndex& index) { - QModelIndex translatedIndex; - /* These method is called from the slot functions below. * QObject::sender() return the object which emitted the signal * handled by the slot functions. @@ -388,6 +386,13 @@ QModelIndex SidebarModel::translateSourceIndex(const QModelIndex& index) { return QModelIndex(); } + return translateIndex(index, model); +} + +QModelIndex SidebarModel::translateIndex( + const QModelIndex& index, const QAbstractItemModel* model) { + QModelIndex translatedIndex; + if (index.isValid()) { TreeItem* item = (TreeItem*)index.internalPointer(); translatedIndex = createIndex(index.row(), index.column(), item); diff --git a/src/library/sidebarmodel.h b/src/library/sidebarmodel.h index 807e893200c3..2a331785c7b2 100644 --- a/src/library/sidebarmodel.h +++ b/src/library/sidebarmodel.h @@ -40,6 +40,9 @@ class SidebarModel : public QAbstractItemModel { bool dragMoveAccept(const QModelIndex& index, const QUrl& url); bool hasChildren(const QModelIndex& parent = QModelIndex()) const override; bool hasTrackTable(const QModelIndex& index) const; + QModelIndex translateChildIndex(const QModelIndex& index) { + return translateIndex(index, index.model()); + } public slots: void pressed(const QModelIndex& index); @@ -76,6 +79,7 @@ class SidebarModel : public QAbstractItemModel { private: QModelIndex translateSourceIndex(const QModelIndex& parent); + QModelIndex translateIndex(const QModelIndex& index, const QAbstractItemModel* model); void featureRenamed(LibraryFeature*); QList m_sFeatures; unsigned int m_iDefaultSelectedIndex; /** Index of the item in the sidebar model to select at startup. */ diff --git a/src/library/trackset/baseplaylistfeature.cpp b/src/library/trackset/baseplaylistfeature.cpp index fc41b58ae191..3a2a7eb24332 100644 --- a/src/library/trackset/baseplaylistfeature.cpp +++ b/src/library/trackset/baseplaylistfeature.cpp @@ -359,7 +359,7 @@ void BasePlaylistFeature::slotDeletePlaylist() { if (m_pSidebarWidget) { // FIXME: this does not scroll to the correct position for some reason nextIndex = indexFromPlaylistId(nextId); - m_pSidebarWidget->selectIndex(nextIndex); + m_pSidebarWidget->selectChildIndex(nextIndex); } } } diff --git a/src/library/trackset/setlogfeature.cpp b/src/library/trackset/setlogfeature.cpp index 2dd529177166..4c5741f2d169 100644 --- a/src/library/trackset/setlogfeature.cpp +++ b/src/library/trackset/setlogfeature.cpp @@ -341,7 +341,7 @@ void SetlogFeature::slotJoinWithPrevious() { m_playlistDao.deletePlaylist(currentPlaylistId); reloadChildModel(previousPlaylistId); // For moving selection emit showTrackModel(m_pPlaylistTableModel); - emit activatePlaylist(previousPlaylistId); + activatePlaylist(previousPlaylistId); } } } diff --git a/src/widget/wlibrarysidebar.cpp b/src/widget/wlibrarysidebar.cpp index f080437598c5..781f9d344ca1 100644 --- a/src/widget/wlibrarysidebar.cpp +++ b/src/widget/wlibrarysidebar.cpp @@ -215,17 +215,27 @@ void WLibrarySidebar::selectIndex(const QModelIndex& index) { pModel->select(index, QItemSelectionModel::Select); setSelectionModel(pModel); -//FIXME(XXX): use expandRecursively when -#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) - QModelIndex parentIndex = index.parent(); + scrollTo(index); +} + +/// Selects a child index from a feature and ensures visibility +void WLibrarySidebar::selectChildIndex(const QModelIndex& index) { + auto pModel = new QItemSelectionModel(model()); + SidebarModel* sidebarModel = qobject_cast(model()); + VERIFY_OR_DEBUG_ASSERT(sidebarModel) { + qDebug() << "model() is not SidebarModel"; + return; + } + QModelIndex translated = sidebarModel->translateChildIndex(index); + pModel->select(index, QItemSelectionModel::Select); + setSelectionModel(pModel); + + QModelIndex parentIndex = translated.parent(); if (parentIndex.isValid()) { expand(parentIndex); parentIndex = parentIndex.parent(); } -#else - expandRecursively(index); -#endif - scrollTo(index); + scrollTo(translated, PositionAtCenter); } bool WLibrarySidebar::event(QEvent* pEvent) { diff --git a/src/widget/wlibrarysidebar.h b/src/widget/wlibrarysidebar.h index 8539e8a541e3..871f8f063ea5 100644 --- a/src/widget/wlibrarysidebar.h +++ b/src/widget/wlibrarysidebar.h @@ -30,6 +30,7 @@ class WLibrarySidebar : public QTreeView, public WBaseWidget { public slots: void selectIndex(const QModelIndex&); + void selectChildIndex(const QModelIndex&); void slotSetFont(const QFont& font); signals: From e2abe3f149d29baa2dcefb483a8d6cf489e5b966 Mon Sep 17 00:00:00 2001 From: Daniel Poelzleithner Date: Thu, 26 Nov 2020 01:14:18 +0100 Subject: [PATCH 27/86] Use new child selection method for join with previous --- src/library/trackset/setlogfeature.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/library/trackset/setlogfeature.cpp b/src/library/trackset/setlogfeature.cpp index 4c5741f2d169..b8beaebcf827 100644 --- a/src/library/trackset/setlogfeature.cpp +++ b/src/library/trackset/setlogfeature.cpp @@ -342,6 +342,8 @@ void SetlogFeature::slotJoinWithPrevious() { reloadChildModel(previousPlaylistId); // For moving selection emit showTrackModel(m_pPlaylistTableModel); activatePlaylist(previousPlaylistId); + QModelIndex previousIndex = indexFromPlaylistId(previousPlaylistId); + m_pSidebarWidget->selectChildIndex(previousIndex); } } } From 7f685124b73364b3561b4df6aba3f978a9556b17 Mon Sep 17 00:00:00 2001 From: Daniel Poelzleithner Date: Thu, 26 Nov 2020 01:22:56 +0100 Subject: [PATCH 28/86] Restore expansion code --- src/widget/wlibrarysidebar.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/widget/wlibrarysidebar.cpp b/src/widget/wlibrarysidebar.cpp index 781f9d344ca1..1802c21dfc59 100644 --- a/src/widget/wlibrarysidebar.cpp +++ b/src/widget/wlibrarysidebar.cpp @@ -214,7 +214,9 @@ void WLibrarySidebar::selectIndex(const QModelIndex& index) { auto pModel = new QItemSelectionModel(model()); pModel->select(index, QItemSelectionModel::Select); setSelectionModel(pModel); - + if (index.parent().isValid()) { + expand(index.parent()); + } scrollTo(index); } @@ -231,7 +233,7 @@ void WLibrarySidebar::selectChildIndex(const QModelIndex& index) { setSelectionModel(pModel); QModelIndex parentIndex = translated.parent(); - if (parentIndex.isValid()) { + while (parentIndex.isValid()) { expand(parentIndex); parentIndex = parentIndex.parent(); } From a8a93f02e44751d42e9673d622dcd0233c024feb Mon Sep 17 00:00:00 2001 From: Daniel Poelzleithner Date: Thu, 26 Nov 2020 23:30:53 +0100 Subject: [PATCH 29/86] Cleanup child selection code --- src/library/trackset/baseplaylistfeature.cpp | 28 +++++++++++++++----- src/library/trackset/baseplaylistfeature.h | 1 + src/library/trackset/setlogfeature.cpp | 25 ++++++++--------- src/widget/wlibrarysidebar.cpp | 2 +- 4 files changed, 34 insertions(+), 22 deletions(-) diff --git a/src/library/trackset/baseplaylistfeature.cpp b/src/library/trackset/baseplaylistfeature.cpp index 3a2a7eb24332..c847675343d2 100644 --- a/src/library/trackset/baseplaylistfeature.cpp +++ b/src/library/trackset/baseplaylistfeature.cpp @@ -114,11 +114,17 @@ void BasePlaylistFeature::initActions() { connect(&m_playlistDao, &PlaylistDAO::added, this, - &BasePlaylistFeature::slotPlaylistTableChanged); + [this](int playlistId) { + slotPlaylistTableChanged(playlistId); + selectPlaylistInSidebar(playlistId); + }); connect(&m_playlistDao, &PlaylistDAO::lockChanged, this, - &BasePlaylistFeature::slotPlaylistTableChanged); + [this](int playlistId) { + slotPlaylistTableChanged(playlistId); + selectPlaylistInSidebar(playlistId); + }); connect(&m_playlistDao, &PlaylistDAO::deleted, this, @@ -157,6 +163,16 @@ int BasePlaylistFeature::playlistIdFromIndex(const QModelIndex& index) { } } +void BasePlaylistFeature::selectPlaylistInSidebar(int playlistId) { + if (playlistId == -1) { + return; + } + QModelIndex index = indexFromPlaylistId(playlistId); + if (index.isValid() && m_pSidebarWidget) { + m_pSidebarWidget->selectChildIndex(index); + } +} + void BasePlaylistFeature::activateChild(const QModelIndex& index) { //qDebug() << "BasePlaylistFeature::activateChild()" << index; int playlistId = playlistIdFromIndex(index); @@ -164,6 +180,9 @@ void BasePlaylistFeature::activateChild(const QModelIndex& index) { m_pPlaylistTableModel->setTableModel(playlistId); emit showTrackModel(m_pPlaylistTableModel); emit enableCoverArtDisplay(true); + if (m_pSidebarWidget) { + m_pSidebarWidget->selectChildIndex(index); + } } } @@ -356,11 +375,6 @@ void BasePlaylistFeature::slotDeletePlaylist() { activate(); if (nextId != -1) { activatePlaylist(nextId); - if (m_pSidebarWidget) { - // FIXME: this does not scroll to the correct position for some reason - nextIndex = indexFromPlaylistId(nextId); - m_pSidebarWidget->selectChildIndex(nextIndex); - } } } } diff --git a/src/library/trackset/baseplaylistfeature.h b/src/library/trackset/baseplaylistfeature.h index 505256862b31..7d09a49230af 100644 --- a/src/library/trackset/baseplaylistfeature.h +++ b/src/library/trackset/baseplaylistfeature.h @@ -36,6 +36,7 @@ class BasePlaylistFeature : public BaseTrackSetFeature { void bindLibraryWidget(WLibrary* libraryWidget, KeyboardEventFilter* keyboard) override; void bindSidebarWidget(WLibrarySidebar* pSidebarWidget) override; + void selectPlaylistInSidebar(int playlistId); public slots: void activateChild(const QModelIndex& index) override; diff --git a/src/library/trackset/setlogfeature.cpp b/src/library/trackset/setlogfeature.cpp index b8beaebcf827..7603a673cbc4 100644 --- a/src/library/trackset/setlogfeature.cpp +++ b/src/library/trackset/setlogfeature.cpp @@ -147,8 +147,6 @@ void SetlogFeature::onRightClickChild(const QPoint& globalPos, const QModelIndex /// Use a custom model in the history for grouping by year /// @param selectedId row which should be selected QModelIndex SetlogFeature::constructChildModel(int selectedId) { - int selectedRow = -1; - // Setup the sidebar playlist model QSqlTableModel playlistTableModel(this, m_pLibrary->trackCollections()->internalCollection()->database()); @@ -185,11 +183,6 @@ QModelIndex SetlogFeature::constructChildModel(int selectedId) { .data(playlistTableModel.index(row, createdColumn)) .toDateTime(); - if (selectedId == id) { - // save index for selection - selectedRow = row; - } - // Create the TreeItem whose parent is the invisible root item if (row >= kNumDirectHistoryEntries) { int yearCreated = dateCreated.date().year(); @@ -222,10 +215,11 @@ QModelIndex SetlogFeature::constructChildModel(int selectedId) { // Append all the newly created TreeItems in a dynamic way to the childmodel m_childModel.insertTreeItemRows(itemList, 0); - if (selectedRow == -1) { - return QModelIndex(); + + if (selectedId) { + return indexFromPlaylistId(selectedId); } - return m_childModel.index(selectedRow, 0); + return QModelIndex(); } QString SetlogFeature::fetchPlaylistLabel(int playlistId) { @@ -342,8 +336,6 @@ void SetlogFeature::slotJoinWithPrevious() { reloadChildModel(previousPlaylistId); // For moving selection emit showTrackModel(m_pPlaylistTableModel); activatePlaylist(previousPlaylistId); - QModelIndex previousIndex = indexFromPlaylistId(previousPlaylistId); - m_pSidebarWidget->selectChildIndex(previousIndex); } } } @@ -428,6 +420,9 @@ void SetlogFeature::reloadChildModel(int playlistId) { type == PlaylistDAO::PLHT_UNKNOWN) { // In case of a deleted Playlist clearChildModel(); m_lastRightClickedIndex = constructChildModel(playlistId); + if (m_pSidebarWidget) { + m_pSidebarWidget->selectChildIndex(m_lastRightClickedIndex); + } } } @@ -469,8 +464,10 @@ void SetlogFeature::activatePlaylist(int playlistId) { emit enableCoverArtDisplay(true); // Update selection only, if it is not the current playlist if (playlistId != m_playlistId) { - emit featureSelect(this, m_lastRightClickedIndex); - activateChild(m_lastRightClickedIndex); + emit featureSelect(this, index); + activateChild(index); + } else if (m_pSidebarWidget) { + m_pSidebarWidget->selectChildIndex(index); } } } diff --git a/src/widget/wlibrarysidebar.cpp b/src/widget/wlibrarysidebar.cpp index 1802c21dfc59..0763c868e15a 100644 --- a/src/widget/wlibrarysidebar.cpp +++ b/src/widget/wlibrarysidebar.cpp @@ -237,7 +237,7 @@ void WLibrarySidebar::selectChildIndex(const QModelIndex& index) { expand(parentIndex); parentIndex = parentIndex.parent(); } - scrollTo(translated, PositionAtCenter); + scrollTo(translated, EnsureVisible); } bool WLibrarySidebar::event(QEvent* pEvent) { From b53d9c9b1856f3a5ebc20c7689c909805454b96e Mon Sep 17 00:00:00 2001 From: Daniel Poelzleithner Date: Thu, 26 Nov 2020 23:31:13 +0100 Subject: [PATCH 30/86] Fix memory leak in selection model --- src/widget/wlibrarysidebar.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/widget/wlibrarysidebar.cpp b/src/widget/wlibrarysidebar.cpp index 0763c868e15a..1f7ce2e076b4 100644 --- a/src/widget/wlibrarysidebar.cpp +++ b/src/widget/wlibrarysidebar.cpp @@ -213,6 +213,9 @@ void WLibrarySidebar::keyPressEvent(QKeyEvent* event) { void WLibrarySidebar::selectIndex(const QModelIndex& index) { auto pModel = new QItemSelectionModel(model()); pModel->select(index, QItemSelectionModel::Select); + if (selectionModel()) { + selectionModel()->deleteLater(); + } setSelectionModel(pModel); if (index.parent().isValid()) { expand(index.parent()); @@ -222,14 +225,17 @@ void WLibrarySidebar::selectIndex(const QModelIndex& index) { /// Selects a child index from a feature and ensures visibility void WLibrarySidebar::selectChildIndex(const QModelIndex& index) { - auto pModel = new QItemSelectionModel(model()); SidebarModel* sidebarModel = qobject_cast(model()); VERIFY_OR_DEBUG_ASSERT(sidebarModel) { qDebug() << "model() is not SidebarModel"; return; } QModelIndex translated = sidebarModel->translateChildIndex(index); - pModel->select(index, QItemSelectionModel::Select); + auto pModel = new QItemSelectionModel(sidebarModel); + pModel->select(translated, QItemSelectionModel::Select); + if (selectionModel()) { + selectionModel()->deleteLater(); + } setSelectionModel(pModel); QModelIndex parentIndex = translated.parent(); From b1a512b4e6a48d0a1d946e8a54956a48735e39b2 Mon Sep 17 00:00:00 2001 From: Daniel Poelzleithner Date: Thu, 26 Nov 2020 23:48:11 +0100 Subject: [PATCH 31/86] Fix join with previous criteria logic --- src/library/trackset/setlogfeature.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/library/trackset/setlogfeature.cpp b/src/library/trackset/setlogfeature.cpp index 7603a673cbc4..09e4c3946836 100644 --- a/src/library/trackset/setlogfeature.cpp +++ b/src/library/trackset/setlogfeature.cpp @@ -128,7 +128,7 @@ void SetlogFeature::onRightClickChild(const QPoint& globalPos, const QModelIndex menu.addAction(m_pDeletePlaylistAction); menu.addAction(m_pLockPlaylistAction); } - if (index.row() > 0) { + if (index.sibling(index.row() + 1, index.column()).isValid()) { // The very first setlog cannot be joint menu.addAction(m_pJoinWithPreviousAction); } From d133c4b66e4f341a51ed78baaf594660fded5275 Mon Sep 17 00:00:00 2001 From: Daniel Poelzleithner Date: Fri, 27 Nov 2020 01:19:18 +0100 Subject: [PATCH 32/86] Fix foorloop clazy warning --- src/library/trackset/playlistfeature.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/library/trackset/playlistfeature.cpp b/src/library/trackset/playlistfeature.cpp index b94a5c36f542..5af90668e5f5 100644 --- a/src/library/trackset/playlistfeature.cpp +++ b/src/library/trackset/playlistfeature.cpp @@ -240,7 +240,8 @@ QModelIndex PlaylistFeature::constructChildModel(int selectedId) { int selectedRow = -1; int row = 0; - for (const IdAndLabel& idAndLabel : createPlaylistLabels()) { + const QList playlistLabels = createPlaylistLabels(); + for (const auto& idAndLabel : playlistLabels) { int playlistId = idAndLabel.id; QString playlistLabel = idAndLabel.label; From a64f89e4c970c2ff7ecb3c8d630d8fa949901d01 Mon Sep 17 00:00:00 2001 From: Daniel Poelzleithner Date: Fri, 27 Nov 2020 11:30:54 +0100 Subject: [PATCH 33/86] Remove lambda due false positive of clazy --- src/library/trackset/baseplaylistfeature.cpp | 10 ++-------- src/library/trackset/baseplaylistfeature.h | 4 ++++ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/library/trackset/baseplaylistfeature.cpp b/src/library/trackset/baseplaylistfeature.cpp index c847675343d2..0d9c82ee5226 100644 --- a/src/library/trackset/baseplaylistfeature.cpp +++ b/src/library/trackset/baseplaylistfeature.cpp @@ -114,17 +114,11 @@ void BasePlaylistFeature::initActions() { connect(&m_playlistDao, &PlaylistDAO::added, this, - [this](int playlistId) { - slotPlaylistTableChanged(playlistId); - selectPlaylistInSidebar(playlistId); - }); + &BasePlaylistFeature::slotPlaylistTableChangedAndSelect); connect(&m_playlistDao, &PlaylistDAO::lockChanged, this, - [this](int playlistId) { - slotPlaylistTableChanged(playlistId); - selectPlaylistInSidebar(playlistId); - }); + &BasePlaylistFeature::slotPlaylistTableChangedAndSelect); connect(&m_playlistDao, &PlaylistDAO::deleted, this, diff --git a/src/library/trackset/baseplaylistfeature.h b/src/library/trackset/baseplaylistfeature.h index 7d09a49230af..5e36c40b6daf 100644 --- a/src/library/trackset/baseplaylistfeature.h +++ b/src/library/trackset/baseplaylistfeature.h @@ -44,6 +44,10 @@ class BasePlaylistFeature : public BaseTrackSetFeature { virtual void htmlLinkClicked(const QUrl& link); virtual void slotPlaylistTableChanged(int playlistId) = 0; + void slotPlaylistTableChangedAndSelect(int playlistId) { + slotPlaylistTableChanged(playlistId); + selectPlaylistInSidebar(playlistId); + }; virtual void slotPlaylistTableRenamed(int playlistId, const QString& newName) = 0; virtual void slotPlaylistContentChanged(QSet playlistIds) = 0; void slotCreatePlaylist(); From 4d50c7135a9728b620b49898e9934e568a77fb17 Mon Sep 17 00:00:00 2001 From: Daniel Poelzleithner Date: Sat, 28 Nov 2020 00:10:24 +0100 Subject: [PATCH 34/86] Make playlist cleanup more versatile. Allow to delete playlists with less then n tracks. --- src/library/dao/playlistdao.cpp | 15 +++++++++++---- src/library/dao/playlistdao.h | 2 +- src/library/trackset/setlogfeature.cpp | 2 +- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/library/dao/playlistdao.cpp b/src/library/dao/playlistdao.cpp index 876d2e4634ca..c1b2fab30323 100644 --- a/src/library/dao/playlistdao.cpp +++ b/src/library/dao/playlistdao.cpp @@ -227,22 +227,29 @@ void PlaylistDAO::deletePlaylist(const int playlistId) { } } -void PlaylistDAO::deleteAllEmptyPlaylists(PlaylistDAO::HiddenType type) { +void PlaylistDAO::deleteAllPlaylistsWithFewerItems(PlaylistDAO::HiddenType type, int length) { //qDebug() << "PlaylistDAO::deletePlaylist" << QThread::currentThread() << m_database.connectionName(); // Get the playlist id for this QSqlQuery query(m_database); // Delete the row in the Playlists table. query.prepare(QStringLiteral( - "DELETE FROM Playlists " - "WHERE NOT EXISTS (SELECT playlist_id FROM PlaylistTracks WHERE " - "Playlists.ID = PlaylistTracks.playlist_id) AND " + "SELECT id FROM Playlists " + "WHERE (SELECT count(playlist_id) FROM PlaylistTracks WHERE " + "Playlists.ID = PlaylistTracks.playlist_id) < :length AND " "Playlists.hidden = :hidden")); query.bindValue(":hidden", static_cast(type)); + query.bindValue(":length", length); if (!query.exec()) { LOG_FAILED_QUERY(query); return; } + + while (query.next()) { + int id = query.value(0).toInt(); + qDebug() << "Delete playlist" << id; + deletePlaylist(id); + } } void PlaylistDAO::renamePlaylist(const int playlistId, const QString& newName) { diff --git a/src/library/dao/playlistdao.h b/src/library/dao/playlistdao.h index f27ccbeef5e7..96765eee8e27 100644 --- a/src/library/dao/playlistdao.h +++ b/src/library/dao/playlistdao.h @@ -60,7 +60,7 @@ class PlaylistDAO : public QObject, public virtual DAO { // Delete a playlist void deletePlaylist(const int playlistId); /// Deletes all empty Playlist - void deleteAllEmptyPlaylists(PlaylistDAO::HiddenType type); + void deleteAllPlaylistsWithFewerItems(PlaylistDAO::HiddenType type, int length); // Rename a playlist void renamePlaylist(const int playlistId, const QString& newName); // Lock or unlock a playlist diff --git a/src/library/trackset/setlogfeature.cpp b/src/library/trackset/setlogfeature.cpp index 09e4c3946836..1d31c18e1266 100644 --- a/src/library/trackset/setlogfeature.cpp +++ b/src/library/trackset/setlogfeature.cpp @@ -38,7 +38,7 @@ SetlogFeature::SetlogFeature( m_libraryWidget(nullptr), m_icon(QStringLiteral(":/images/library/ic_library_history.svg")) { // clear old empty entries - m_playlistDao.deleteAllEmptyPlaylists(PlaylistDAO::HiddenType::PLHT_SET_LOG); + m_playlistDao.deleteAllPlaylistsWithFewerItems(PlaylistDAO::HiddenType::PLHT_SET_LOG, 1); //construct child model m_childModel.setRootItem(TreeItem::newRoot(this)); From 8e79b0b8aa849244252ed2953af801d09cf1c37c Mon Sep 17 00:00:00 2001 From: Daniel Poelzleithner Date: Sat, 28 Nov 2020 00:16:54 +0100 Subject: [PATCH 35/86] Use constant for indicating invalid playlist id --- src/library/trackset/baseplaylistfeature.cpp | 45 ++++++++++---------- src/library/trackset/baseplaylistfeature.h | 2 + src/library/trackset/playlistfeature.cpp | 2 +- src/library/trackset/setlogfeature.cpp | 16 +++---- 4 files changed, 33 insertions(+), 32 deletions(-) diff --git a/src/library/trackset/baseplaylistfeature.cpp b/src/library/trackset/baseplaylistfeature.cpp index 0d9c82ee5226..9efbc25e3a1b 100644 --- a/src/library/trackset/baseplaylistfeature.cpp +++ b/src/library/trackset/baseplaylistfeature.cpp @@ -145,7 +145,7 @@ void BasePlaylistFeature::initActions() { int BasePlaylistFeature::playlistIdFromIndex(const QModelIndex& index) { TreeItem* item = static_cast(index.internalPointer()); if (item == nullptr) { - return -1; + return kInvalidPlaylistId; } bool ok = false; @@ -153,12 +153,15 @@ int BasePlaylistFeature::playlistIdFromIndex(const QModelIndex& index) { if (ok) { return playlistId; } else { - return -1; + return kInvalidPlaylistId; } } void BasePlaylistFeature::selectPlaylistInSidebar(int playlistId) { - if (playlistId == -1) { + if (!m_pSidebarWidget) { + return; + } + if (playlistId == kInvalidPlaylistId) { return; } QModelIndex index = indexFromPlaylistId(playlistId); @@ -170,7 +173,7 @@ void BasePlaylistFeature::selectPlaylistInSidebar(int playlistId) { void BasePlaylistFeature::activateChild(const QModelIndex& index) { //qDebug() << "BasePlaylistFeature::activateChild()" << index; int playlistId = playlistIdFromIndex(index); - if (playlistId != -1) { + if (playlistId != kInvalidPlaylistId) { m_pPlaylistTableModel->setTableModel(playlistId); emit showTrackModel(m_pPlaylistTableModel); emit enableCoverArtDisplay(true); @@ -183,7 +186,7 @@ void BasePlaylistFeature::activateChild(const QModelIndex& index) { void BasePlaylistFeature::activatePlaylist(int playlistId) { // qDebug() << "BasePlaylistFeature::activatePlaylist()" << playlistId; QModelIndex index = indexFromPlaylistId(playlistId); - if (playlistId != -1 && index.isValid()) { + if (playlistId != kInvalidPlaylistId && index.isValid()) { m_lastRightClickedIndex = index; m_pPlaylistTableModel->setTableModel(playlistId); emit showTrackModel(m_pPlaylistTableModel); @@ -196,7 +199,7 @@ void BasePlaylistFeature::activatePlaylist(int playlistId) { void BasePlaylistFeature::slotRenamePlaylist() { int playlistId = playlistIdFromIndex(m_lastRightClickedIndex); - if (playlistId == -1) { + if (playlistId == kInvalidPlaylistId) { return; } QString oldName = m_playlistDao.getPlaylistName(playlistId); @@ -225,7 +228,7 @@ void BasePlaylistFeature::slotRenamePlaylist() { int existingId = m_playlistDao.getPlaylistIdFromName(newName); - if (existingId != -1) { + if (existingId != kInvalidPlaylistId) { QMessageBox::warning(NULL, tr("Renaming Playlist Failed"), tr("A playlist by that name already exists.")); @@ -243,7 +246,7 @@ void BasePlaylistFeature::slotRenamePlaylist() { void BasePlaylistFeature::slotDuplicatePlaylist() { int oldPlaylistId = playlistIdFromIndex(m_lastRightClickedIndex); - if (oldPlaylistId == -1) { + if (oldPlaylistId == kInvalidPlaylistId) { return; } @@ -268,7 +271,7 @@ void BasePlaylistFeature::slotDuplicatePlaylist() { int existingId = m_playlistDao.getPlaylistIdFromName(name); - if (existingId != -1) { + if (existingId != kInvalidPlaylistId) { QMessageBox::warning(NULL, tr("Playlist Creation Failed"), tr("A playlist by that name already exists.")); @@ -283,7 +286,7 @@ void BasePlaylistFeature::slotDuplicatePlaylist() { int newPlaylistId = m_playlistDao.createPlaylist(name); - if (newPlaylistId != -1 && + if (newPlaylistId != kInvalidPlaylistId && m_playlistDao.copyPlaylistTracks(oldPlaylistId, newPlaylistId)) { activatePlaylist(newPlaylistId); } @@ -291,7 +294,7 @@ void BasePlaylistFeature::slotDuplicatePlaylist() { void BasePlaylistFeature::slotTogglePlaylistLock() { int playlistId = playlistIdFromIndex(m_lastRightClickedIndex); - if (playlistId == -1) { + if (playlistId == kInvalidPlaylistId) { return; } bool locked = !m_playlistDao.isPlaylistLocked(playlistId); @@ -319,7 +322,7 @@ void BasePlaylistFeature::slotCreatePlaylist() { int existingId = m_playlistDao.getPlaylistIdFromName(name); - if (existingId != -1) { + if (existingId != kInvalidPlaylistId) { QMessageBox::warning(NULL, tr("Playlist Creation Failed"), tr("A playlist by that name already exists.")); @@ -334,7 +337,7 @@ void BasePlaylistFeature::slotCreatePlaylist() { int playlistId = m_playlistDao.createPlaylist(name); - if (playlistId != -1) { + if (playlistId != kInvalidPlaylistId) { activatePlaylist(playlistId); } else { QMessageBox::warning(NULL, @@ -346,11 +349,7 @@ void BasePlaylistFeature::slotCreatePlaylist() { void BasePlaylistFeature::slotDeletePlaylist() { //qDebug() << "slotDeletePlaylist() row:" << m_lastRightClickedIndex.data(); int playlistId = playlistIdFromIndex(m_lastRightClickedIndex); - QModelIndex nextIndex = - m_lastRightClickedIndex.sibling(m_lastRightClickedIndex.row() + 1, - m_lastRightClickedIndex.column()); - int nextId = playlistIdFromIndex(nextIndex); - if (playlistId == -1) { + if (playlistId == kInvalidPlaylistId) { return; } @@ -367,7 +366,7 @@ void BasePlaylistFeature::slotDeletePlaylist() { m_playlistDao.deletePlaylist(playlistId); activate(); - if (nextId != -1) { + if (nextId != kInvalidPlaylistId) { activatePlaylist(nextId); } } @@ -430,7 +429,7 @@ void BasePlaylistFeature::slotCreateImportPlaylist() { m_pConfig->set(ConfigKey("[Library]", "LastImportExportPlaylistDirectory"), ConfigValue(fileName.dir().absolutePath())); - int lastPlaylistId = -1; + int lastPlaylistId = kInvalidPlaylistId; // For each selected element create a different playlist. for (const QString& playlistFile : playlist_files) { @@ -451,12 +450,12 @@ void BasePlaylistFeature::slotCreateImportPlaylist() { // Check name int existingId = m_playlistDao.getPlaylistIdFromName(name); - validNameGiven = (existingId == -1); + validNameGiven = (existingId == kInvalidPlaylistId); ++i; } lastPlaylistId = m_playlistDao.createPlaylist(name); - if (lastPlaylistId != -1) { + if (lastPlaylistId != kInvalidPlaylistId) { m_pPlaylistTableModel->setTableModel(lastPlaylistId); } else { QMessageBox::warning(NULL, @@ -472,7 +471,7 @@ void BasePlaylistFeature::slotCreateImportPlaylist() { void BasePlaylistFeature::slotExportPlaylist() { int playlistId = playlistIdFromIndex(m_lastRightClickedIndex); - if (playlistId == -1) { + if (playlistId == kInvalidPlaylistId) { return; } QString playlistName = m_playlistDao.getPlaylistName(playlistId); diff --git a/src/library/trackset/baseplaylistfeature.h b/src/library/trackset/baseplaylistfeature.h index 5e36c40b6daf..5e3ce2a39117 100644 --- a/src/library/trackset/baseplaylistfeature.h +++ b/src/library/trackset/baseplaylistfeature.h @@ -21,6 +21,8 @@ class TrackCollectionManager; class TreeItem; class WLibrarySidebar; +const int kInvalidPlaylistId = -1; + class BasePlaylistFeature : public BaseTrackSetFeature { Q_OBJECT diff --git a/src/library/trackset/playlistfeature.cpp b/src/library/trackset/playlistfeature.cpp index 5af90668e5f5..d5be0690c8e9 100644 --- a/src/library/trackset/playlistfeature.cpp +++ b/src/library/trackset/playlistfeature.cpp @@ -46,7 +46,7 @@ PlaylistFeature::PlaylistFeature(Library* pLibrary, UserSettingsPointer pConfig) // construct child model std::unique_ptr pRootItem = TreeItem::newRoot(this); m_childModel.setRootItem(std::move(pRootItem)); - constructChildModel(-1); + constructChildModel(kInvalidPlaylistId); } QVariant PlaylistFeature::title() { diff --git a/src/library/trackset/setlogfeature.cpp b/src/library/trackset/setlogfeature.cpp index 1d31c18e1266..32046a738185 100644 --- a/src/library/trackset/setlogfeature.cpp +++ b/src/library/trackset/setlogfeature.cpp @@ -34,7 +34,7 @@ SetlogFeature::SetlogFeature( "mixxx.db.model.setlog", /*keep deleted tracks*/ true), QStringLiteral("SETLOGHOME")), - m_playlistId(-1), + m_playlistId(kInvalidPlaylistId), m_libraryWidget(nullptr), m_icon(QStringLiteral(":/images/library/ic_library_history.svg")) { // clear old empty entries @@ -42,7 +42,7 @@ SetlogFeature::SetlogFeature( //construct child model m_childModel.setRootItem(TreeItem::newRoot(this)); - constructChildModel(-1); + constructChildModel(kInvalidPlaylistId); m_pJoinWithPreviousAction = new QAction(tr("Join with previous"), this); connect(m_pJoinWithPreviousAction, @@ -64,7 +64,7 @@ SetlogFeature::~SetlogFeature() { // If the history playlist we created doesn't have any tracks in it then // delete it so we don't end up with tons of empty playlists. This is mostly // for developers since they regularly open Mixxx without loading a track. - if (m_playlistId != -1 && + if (m_playlistId != kInvalidPlaylistId && m_playlistDao.tracksInPlaylist(m_playlistId) == 0) { m_playlistDao.deletePlaylist(m_playlistId); } @@ -105,7 +105,7 @@ void SetlogFeature::onRightClickChild(const QPoint& globalPos, const QModelIndex int playlistId = index.data(TreeItemModel::kDataRole).toInt(); // not a real entry - if (playlistId == -1) { + if (playlistId == kInvalidPlaylistId) { return; } @@ -192,7 +192,7 @@ QModelIndex SetlogFeature::constructChildModel(int selectedId) { if (i != groups.end() && i.key() == yearCreated) { groupItem = i.value(); } else { - groupItem = new TreeItem(QString::number(yearCreated), -1); + groupItem = new TreeItem(QString::number(yearCreated), kInvalidPlaylistId); groups.insert(yearCreated, groupItem); itemList.append(groupItem); } @@ -266,7 +266,7 @@ void SetlogFeature::slotGetNewPlaylist() { int i = 1; // calculate name of the todays setlog - while (m_playlistDao.getPlaylistIdFromName(set_log_name) != -1) { + while (m_playlistDao.getPlaylistIdFromName(set_log_name) != kInvalidPlaylistId) { set_log_name = set_log_name_format.arg(++i); } @@ -274,7 +274,7 @@ void SetlogFeature::slotGetNewPlaylist() { m_playlistId = m_playlistDao.createPlaylist( set_log_name, PlaylistDAO::PLHT_SET_LOG); - if (m_playlistId == -1) { + if (m_playlistId == kInvalidPlaylistId) { qDebug() << "Setlog playlist Creation Failed"; qDebug() << "An unknown error occurred while creating playlist: " << set_log_name; @@ -458,7 +458,7 @@ void SetlogFeature::activate() { void SetlogFeature::activatePlaylist(int playlistId) { //qDebug() << "BasePlaylistFeature::activatePlaylist()" << playlistId; QModelIndex index = indexFromPlaylistId(playlistId); - if (playlistId != -1 && index.isValid()) { + if (playlistId != kInvalidPlaylistId && index.isValid()) { m_pPlaylistTableModel->setTableModel(playlistId); emit showTrackModel(m_pPlaylistTableModel); emit enableCoverArtDisplay(true); From 87d238cb14e8556da4f21728af24870b628627b4 Mon Sep 17 00:00:00 2001 From: Daniel Poelzleithner Date: Sat, 28 Nov 2020 00:18:51 +0100 Subject: [PATCH 36/86] Try to select a sibiling on the same level as the deleted entry --- src/library/trackset/baseplaylistfeature.cpp | 18 ++++++++++++++++++ src/library/trackset/baseplaylistfeature.h | 1 + 2 files changed, 19 insertions(+) diff --git a/src/library/trackset/baseplaylistfeature.cpp b/src/library/trackset/baseplaylistfeature.cpp index 9efbc25e3a1b..a1e5ba7d21b9 100644 --- a/src/library/trackset/baseplaylistfeature.cpp +++ b/src/library/trackset/baseplaylistfeature.cpp @@ -346,6 +346,22 @@ void BasePlaylistFeature::slotCreatePlaylist() { } } +/// Returns a playlist that is a sibling inside the same parent +/// as the start index +int BasePlaylistFeature::selectSiblingPlaylistId(QModelIndex& start) { + for (int i = start.row() + 1; i >= (start.row() - 1); i -= 2) { + QModelIndex nextIndex = start.sibling(i, start.column()); + if (nextIndex.isValid()) { + TreeItem* pTreeItem = m_childModel.getItem(nextIndex); + DEBUG_ASSERT(pTreeItem != nullptr); + if (!pTreeItem->hasChildren()) { + return playlistIdFromIndex(nextIndex); + } + } + } + return kInvalidPlaylistId; +} + void BasePlaylistFeature::slotDeletePlaylist() { //qDebug() << "slotDeletePlaylist() row:" << m_lastRightClickedIndex.data(); int playlistId = playlistIdFromIndex(m_lastRightClickedIndex); @@ -363,6 +379,7 @@ void BasePlaylistFeature::slotDeletePlaylist() { VERIFY_OR_DEBUG_ASSERT(playlistId >= 0) { return; } + int nextId = selectSiblingPlaylistId(m_lastRightClickedIndex); m_playlistDao.deletePlaylist(playlistId); activate(); @@ -629,6 +646,7 @@ void BasePlaylistFeature::bindLibraryWidget(WLibrary* libraryWidget, void BasePlaylistFeature::bindSidebarWidget(WLibrarySidebar* pSidebarWidget) { // store the sidebar widget pointer for later use in onRightClickChild + DEBUG_ASSERT(!m_pSidebarWidget); m_pSidebarWidget = pSidebarWidget; } diff --git a/src/library/trackset/baseplaylistfeature.h b/src/library/trackset/baseplaylistfeature.h index 5e3ce2a39117..fbe7386e5c0c 100644 --- a/src/library/trackset/baseplaylistfeature.h +++ b/src/library/trackset/baseplaylistfeature.h @@ -39,6 +39,7 @@ class BasePlaylistFeature : public BaseTrackSetFeature { KeyboardEventFilter* keyboard) override; void bindSidebarWidget(WLibrarySidebar* pSidebarWidget) override; void selectPlaylistInSidebar(int playlistId); + int selectSiblingPlaylistId(QModelIndex& start); public slots: void activateChild(const QModelIndex& index) override; From 22223b66f7ac869678934a6d096e5a4886e4bb01 Mon Sep 17 00:00:00 2001 From: Daniel Poelzleithner Date: Sat, 28 Nov 2020 00:21:05 +0100 Subject: [PATCH 37/86] Name cleanup. Don't select on root item --- src/library/trackset/baseplaylistfeature.cpp | 4 ++-- src/library/trackset/baseplaylistfeature.h | 2 +- src/library/trackset/playlistfeature.cpp | 2 +- src/library/trackset/setlogfeature.cpp | 13 ++++++------- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/library/trackset/baseplaylistfeature.cpp b/src/library/trackset/baseplaylistfeature.cpp index a1e5ba7d21b9..390a40f7214e 100644 --- a/src/library/trackset/baseplaylistfeature.cpp +++ b/src/library/trackset/baseplaylistfeature.cpp @@ -702,7 +702,7 @@ void BasePlaylistFeature::slotTrackSelected(TrackPointer pTrack) { if (pTrack) { trackId = pTrack->getId(); } - m_playlistDao.getPlaylistsTrackIsIn(trackId, &m_playlistsSelectedTrackIsIn); + m_playlistDao.getPlaylistsTrackIsIn(trackId, &m_playlistIdsOfSelectedTrack); for (int row = 0; row < m_childModel.rowCount(); ++row) { QModelIndex index = m_childModel.index(row, 0); @@ -718,7 +718,7 @@ void BasePlaylistFeature::markTreeItem(TreeItem* pTreeItem) { bool ok; int playlistId = pTreeItem->getData().toInt(&ok); if (ok) { - bool shouldBold = m_playlistsSelectedTrackIsIn.contains(playlistId); + bool shouldBold = m_playlistIdsOfSelectedTrack.contains(playlistId); pTreeItem->setBold(shouldBold); if (shouldBold && pTreeItem->hasParent()) { TreeItem* item = pTreeItem; diff --git a/src/library/trackset/baseplaylistfeature.h b/src/library/trackset/baseplaylistfeature.h index fbe7386e5c0c..35bf0100570a 100644 --- a/src/library/trackset/baseplaylistfeature.h +++ b/src/library/trackset/baseplaylistfeature.h @@ -107,7 +107,7 @@ class BasePlaylistFeature : public BaseTrackSetFeature { QAction* m_pAnalyzePlaylistAction; PlaylistTableModel* m_pPlaylistTableModel; - QSet m_playlistsSelectedTrackIsIn; + QSet m_playlistIdsOfSelectedTrack; private slots: void slotTrackSelected(TrackPointer pTrack); diff --git a/src/library/trackset/playlistfeature.cpp b/src/library/trackset/playlistfeature.cpp index d5be0690c8e9..0dd6180bb7f2 100644 --- a/src/library/trackset/playlistfeature.cpp +++ b/src/library/trackset/playlistfeature.cpp @@ -252,7 +252,7 @@ QModelIndex PlaylistFeature::constructChildModel(int selectedId) { // Create the TreeItem whose parent is the invisible root item TreeItem* item = new TreeItem(playlistLabel, playlistId); - item->setBold(m_playlistsSelectedTrackIsIn.contains(playlistId)); + item->setBold(m_playlistIdsOfSelectedTrack.contains(playlistId)); decorateChild(item, playlistId); data_list.append(item); diff --git a/src/library/trackset/setlogfeature.cpp b/src/library/trackset/setlogfeature.cpp index 32046a738185..8730a82e5d34 100644 --- a/src/library/trackset/setlogfeature.cpp +++ b/src/library/trackset/setlogfeature.cpp @@ -19,7 +19,7 @@ #include "widget/wtracktableview.h" namespace { -constexpr int kNumDirectHistoryEntries = 5; +constexpr int kNumToplevelHistoryEntries = 5; } SetlogFeature::SetlogFeature( @@ -167,7 +167,7 @@ QModelIndex SetlogFeature::constructChildModel(int selectedId) { QList itemList; // Generous estimate (number of years the db is used ;)) - itemList.reserve(kNumDirectHistoryEntries + 15); + itemList.reserve(kNumToplevelHistoryEntries + 15); for (int row = 0; row < playlistTableModel.rowCount(); ++row) { int id = @@ -184,7 +184,7 @@ QModelIndex SetlogFeature::constructChildModel(int selectedId) { .toDateTime(); // Create the TreeItem whose parent is the invisible root item - if (row >= kNumDirectHistoryEntries) { + if (row >= kNumToplevelHistoryEntries) { int yearCreated = dateCreated.date().year(); auto i = groups.find(yearCreated); @@ -198,14 +198,14 @@ QModelIndex SetlogFeature::constructChildModel(int selectedId) { } auto item = std::make_unique(name, id); - item->setBold(m_playlistsSelectedTrackIsIn.contains(id)); + item->setBold(m_playlistIdsOfSelectedTrack.contains(id)); decorateChild(item.get(), id); groupItem->appendChild(std::move(item)); } else { TreeItem* item = new TreeItem(name, id); - item->setBold(m_playlistsSelectedTrackIsIn.contains(id)); + item->setBold(m_playlistIdsOfSelectedTrack.contains(id)); decorateChild(item, id); @@ -463,11 +463,10 @@ void SetlogFeature::activatePlaylist(int playlistId) { emit showTrackModel(m_pPlaylistTableModel); emit enableCoverArtDisplay(true); // Update selection only, if it is not the current playlist + // since we want the root item to be the current playlist as well if (playlistId != m_playlistId) { emit featureSelect(this, index); activateChild(index); - } else if (m_pSidebarWidget) { - m_pSidebarWidget->selectChildIndex(index); } } } From 54a2edfc195c6666b53fcc0b5bfdae588dd235fb Mon Sep 17 00:00:00 2001 From: Daniel Poelzleithner Date: Sat, 28 Nov 2020 00:23:57 +0100 Subject: [PATCH 38/86] eager return in error case --- src/library/trackset/baseplaylistfeature.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/library/trackset/baseplaylistfeature.cpp b/src/library/trackset/baseplaylistfeature.cpp index 390a40f7214e..3a28091bd6d7 100644 --- a/src/library/trackset/baseplaylistfeature.cpp +++ b/src/library/trackset/baseplaylistfeature.cpp @@ -185,8 +185,11 @@ void BasePlaylistFeature::activateChild(const QModelIndex& index) { void BasePlaylistFeature::activatePlaylist(int playlistId) { // qDebug() << "BasePlaylistFeature::activatePlaylist()" << playlistId; + if (playlistId == kInvalidPlaylistId) { + return; + } QModelIndex index = indexFromPlaylistId(playlistId); - if (playlistId != kInvalidPlaylistId && index.isValid()) { + if (index.isValid()) { m_lastRightClickedIndex = index; m_pPlaylistTableModel->setTableModel(playlistId); emit showTrackModel(m_pPlaylistTableModel); From b86cbdc9b36e78b1f20f7f68e6a2cc4eb123e1a0 Mon Sep 17 00:00:00 2001 From: Daniel Poelzleithner Date: Sat, 28 Nov 2020 00:34:30 +0100 Subject: [PATCH 39/86] simplify slotDeletePlaylist() --- src/library/trackset/baseplaylistfeature.cpp | 22 +++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/library/trackset/baseplaylistfeature.cpp b/src/library/trackset/baseplaylistfeature.cpp index 3a28091bd6d7..76cbb726d143 100644 --- a/src/library/trackset/baseplaylistfeature.cpp +++ b/src/library/trackset/baseplaylistfeature.cpp @@ -367,10 +367,17 @@ int BasePlaylistFeature::selectSiblingPlaylistId(QModelIndex& start) { void BasePlaylistFeature::slotDeletePlaylist() { //qDebug() << "slotDeletePlaylist() row:" << m_lastRightClickedIndex.data(); + if (!m_lastRightClickedIndex.isValid()) { + return; + } + int playlistId = playlistIdFromIndex(m_lastRightClickedIndex); if (playlistId == kInvalidPlaylistId) { return; } + VERIFY_OR_DEBUG_ASSERT(playlistId >= 0) { + return; + } bool locked = m_playlistDao.isPlaylistLocked(playlistId); if (locked) { @@ -378,17 +385,12 @@ void BasePlaylistFeature::slotDeletePlaylist() { return; } - if (m_lastRightClickedIndex.isValid()) { - VERIFY_OR_DEBUG_ASSERT(playlistId >= 0) { - return; - } - int nextId = selectSiblingPlaylistId(m_lastRightClickedIndex); + int nextId = selectSiblingPlaylistId(m_lastRightClickedIndex); - m_playlistDao.deletePlaylist(playlistId); - activate(); - if (nextId != kInvalidPlaylistId) { - activatePlaylist(nextId); - } + m_playlistDao.deletePlaylist(playlistId); + activate(); + if (nextId != kInvalidPlaylistId) { + activatePlaylist(nextId); } } From 83cc92b77f6d0482dd3da48fc1a1ff69b5e13189 Mon Sep 17 00:00:00 2001 From: Daniel Poelzleithner Date: Sat, 28 Nov 2020 01:29:35 +0100 Subject: [PATCH 40/86] simplify code --- src/library/trackset/baseplaylistfeature.cpp | 37 ++++++++++++-------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/src/library/trackset/baseplaylistfeature.cpp b/src/library/trackset/baseplaylistfeature.cpp index 76cbb726d143..adc71679f771 100644 --- a/src/library/trackset/baseplaylistfeature.cpp +++ b/src/library/trackset/baseplaylistfeature.cpp @@ -173,14 +173,18 @@ void BasePlaylistFeature::selectPlaylistInSidebar(int playlistId) { void BasePlaylistFeature::activateChild(const QModelIndex& index) { //qDebug() << "BasePlaylistFeature::activateChild()" << index; int playlistId = playlistIdFromIndex(index); - if (playlistId != kInvalidPlaylistId) { - m_pPlaylistTableModel->setTableModel(playlistId); - emit showTrackModel(m_pPlaylistTableModel); - emit enableCoverArtDisplay(true); - if (m_pSidebarWidget) { - m_pSidebarWidget->selectChildIndex(index); - } + if (playlistId == kInvalidPlaylistId) { + return; } + + m_pPlaylistTableModel->setTableModel(playlistId); + emit showTrackModel(m_pPlaylistTableModel); + emit enableCoverArtDisplay(true); + + if (!m_pSidebarWidget) { + return; + } + m_pSidebarWidget->selectChildIndex(index); } void BasePlaylistFeature::activatePlaylist(int playlistId) { @@ -189,15 +193,17 @@ void BasePlaylistFeature::activatePlaylist(int playlistId) { return; } QModelIndex index = indexFromPlaylistId(playlistId); - if (index.isValid()) { - m_lastRightClickedIndex = index; - m_pPlaylistTableModel->setTableModel(playlistId); - emit showTrackModel(m_pPlaylistTableModel); - emit enableCoverArtDisplay(true); - // Update selection - emit featureSelect(this, m_lastRightClickedIndex); - activateChild(m_lastRightClickedIndex); + if (!index.isValid()) { + return; } + + m_lastRightClickedIndex = index; + m_pPlaylistTableModel->setTableModel(playlistId); + emit showTrackModel(m_pPlaylistTableModel); + emit enableCoverArtDisplay(true); + // Update selection + emit featureSelect(this, m_lastRightClickedIndex); + activateChild(m_lastRightClickedIndex); } void BasePlaylistFeature::slotRenamePlaylist() { @@ -389,6 +395,7 @@ void BasePlaylistFeature::slotDeletePlaylist() { m_playlistDao.deletePlaylist(playlistId); activate(); + if (nextId != kInvalidPlaylistId) { activatePlaylist(nextId); } From de3ef16c40a38b229b0b93fec55fae20f8baaea0 Mon Sep 17 00:00:00 2001 From: Jan Holthuis Date: Sat, 28 Nov 2020 23:28:35 +0100 Subject: [PATCH 41/86] pre-commit: Replace deprecated check_byte-order-marker hook --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index be362dd1030c..37b908690c8f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -47,7 +47,7 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v3.3.0 hooks: - - id: check-byte-order-marker + - id: fix-byte-order-marker exclude: ^.*(\.cbproj|\.groupproj|\.props|\.sln|\.vcxproj|\.vcxproj.filters)$ - id: check-case-conflict - id: check-json From bc9d7a47eaab965d4367a0ce0278acb9c534bbe0 Mon Sep 17 00:00:00 2001 From: Jan Holthuis Date: Sat, 28 Nov 2020 23:03:55 +0100 Subject: [PATCH 42/86] GitHub Actions: Deduplicate pre-commit job --- .github/workflows/pre-commit.yml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index e1f6e70933d2..1d62f305ed89 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -8,30 +8,30 @@ jobs: pre-commit: name: Detecting code style issues runs-on: ubuntu-latest - if: github.event_name == 'push' steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 + - name: "Check out repository" + uses: actions/checkout@v2 + with: + fetch-depth: 2 + + - name: "Set up Python" + uses: actions/setup-python@v2 + - name: Install clang-format run: sudo apt-get update && sudo apt-get install -y --no-install-recommends clang-format-10 - - uses: pre-commit/action@v2.0.0 + + - name: "Detect code style issues (push)" + uses: pre-commit/action@v2.0.0 + if: github.event_name == 'push' # There are too many files in the repo that have formatting issues. We'll # disable these checks for now when pushing directly (but still run these # on Pull Requests!). env: SKIP: end-of-file-fixer,trailing-whitespace,clang-format,eslint,no-commit-to-branch - pre-commit-pr: - name: Detecting code style issues - runs-on: ubuntu-latest - if: github.event_name == 'pull_request' - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 2 - - uses: actions/setup-python@v2 - - name: Install clang-format - run: sudo apt-get update && sudo apt-get install -y --no-install-recommends clang-format-10 - - uses: pre-commit/action@v2.0.0 + + - name: "Detect code style issues (pull_request)" + uses: pre-commit/action@v2.0.0 + if: github.event_name == 'pull_request' env: SKIP: no-commit-to-branch with: From f120489c57fc84ed01fdb0cb47392e1f7ca597d3 Mon Sep 17 00:00:00 2001 From: Jan Holthuis Date: Sat, 28 Nov 2020 23:15:47 +0100 Subject: [PATCH 43/86] GitHub Actions: Upload patch artifact --- .github/workflows/pre-commit.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 1d62f305ed89..87e7b66f1c15 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -38,3 +38,18 @@ jobs: # HEAD is the not yet integrated PR merge commit +refs/pull/xxxx/merge # HEAD^1 is the PR target branch and HEAD^2 is the HEAD of the source branch extra_args: --from-ref HEAD^1 --to-ref HEAD + + - name: "Generate patch file" + if: failure() + run: | + git diff-index -p HEAD > "${PATCH_FILE}" + [ -s "${PATCH_FILE}" ] && echo "UPLOAD_PATCH_FILE=${PATCH_FILE}" >> "${GITHUB_ENV}" + env: + PATCH_FILE: pre-commit.patch + + - name: "Upload patch artifact" + if: failure() && env.UPLOAD_PATCH_FILE != null + uses: actions/upload-artifact@v2 + with: + name: ${{ env.UPLOAD_PATCH_FILE }} + path: ${{ env.UPLOAD_PATCH_FILE }} From 2bde5088a448ddd3000c268db6f160d8cfe5d318 Mon Sep 17 00:00:00 2001 From: Uwe Klotz Date: Sun, 29 Nov 2020 02:08:19 +0100 Subject: [PATCH 44/86] MSVC: Define _USE_MATH_DEFINES in CMakeLists.txt --- CMakeLists.txt | 11 +++++++++++ lib/reverb/basics.h | 2 -- src/util/math.h | 20 ++++++-------------- 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 52de57bf3df0..b4aea98ebc05 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1004,6 +1004,11 @@ if(APPLE) endif() endif() +# Windows-specific options +if(MSVC) + target_compile_definitions(mixxx-lib PUBLIC _USE_MATH_DEFINES) +endif() + # # Installation directories # @@ -1949,6 +1954,9 @@ target_link_libraries(mixxx-lib PRIVATE ReplayGain) # Reverb add_library(Reverb STATIC EXCLUDE_FROM_ALL lib/reverb/Reverb.cc) +if(MSVC) + target_compile_definitions(Reverb PUBLIC _USE_MATH_DEFINES) +endif() target_include_directories(Reverb PRIVATE src) target_link_libraries(Reverb PUBLIC Qt5::Core) target_include_directories(mixxx-lib SYSTEM PRIVATE lib/reverb) @@ -1994,6 +2002,9 @@ if(SoundTouch_STATIC) lib/soundtouch/sse_optimized.cpp ) target_include_directories(SoundTouch SYSTEM PUBLIC lib) + if(MSVC) + target_compile_definitions(SoundTouch PUBLIC _USE_MATH_DEFINES) + endif() target_link_libraries(mixxx-lib PUBLIC SoundTouch) else() message(STATUS "Linking libSoundTouch dynamically") diff --git a/lib/reverb/basics.h b/lib/reverb/basics.h index 8fe92b68faf7..bae7aa1dabad 100644 --- a/lib/reverb/basics.h +++ b/lib/reverb/basics.h @@ -32,8 +32,6 @@ #ifndef BASICS_H #define BASICS_H -// NOTE(rryan): 3/2014 Added for MSVC support. (missing M_PI) -#define _USE_MATH_DEFINES #include #include diff --git a/src/util/math.h b/src/util/math.h index 1cd2c84210cb..5e842a8bfc99 100644 --- a/src/util/math.h +++ b/src/util/math.h @@ -1,20 +1,12 @@ #pragma once -// Causes MSVC to define M_PI and friends. -// http://msdn.microsoft.com/en-us/library/4hwaceh6.aspx -// Our SConscript defines this but check anyway. -#ifdef __WINDOWS__ -#ifndef _USE_MATH_DEFINES -#define _USE_MATH_DEFINES -#endif -#endif - #include -#include -// Note: Because of our fpclassify hack, we actually need to include both, -// the c and the c++ version of the math header. -// From GCC 6.1.1 math.h depends on cmath, which fails to compile if included -// after our fpclassify hack + +#include +// Note: Because of our fpclassify hack, we actually need to include both, +// the c and the c++ version of the math header. +// From GCC 6.1.1 math.h depends on cmath, which fails to compile if included +// after our fpclassify hack #include #include From 7f3fae237c36a5d1729f0e8f6f2ec547ae4b5869 Mon Sep 17 00:00:00 2001 From: Uwe Klotz Date: Sun, 29 Nov 2020 10:45:41 +0100 Subject: [PATCH 45/86] Windows: Remove obsolete _ATL_XP_TARGETING define --- CMakeLists.txt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b4aea98ebc05..34a1b8823d54 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1034,10 +1034,6 @@ endif() if(WIN32) target_compile_definitions(mixxx-lib PRIVATE __WINDOWS__) - # Restrict ATL to XP-compatible SDK functions. - # TODO(rryan): Remove once we ditch XP support. - target_compile_definitions(mixxx-lib PUBLIC _ATL_XP_TARGETING) - # Helps prevent duplicate symbols target_compile_definitions(mixxx-lib PUBLIC _ATL_MIN_CRT) From 82a9eb570bfa52af1d92bb319b122bce6f34e594 Mon Sep 17 00:00:00 2001 From: Uwe Klotz Date: Sun, 29 Nov 2020 11:02:19 +0100 Subject: [PATCH 46/86] Windows: Define minimum version in CMakeLists.txt --- CMakeLists.txt | 10 ++++++++-- src/util/battery/batterywindows.cpp | 3 --- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 34a1b8823d54..c57973d5e168 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1005,8 +1005,14 @@ if(APPLE) endif() # Windows-specific options -if(MSVC) - target_compile_definitions(mixxx-lib PUBLIC _USE_MATH_DEFINES) +if(WIN32) + # https://docs.microsoft.com/en-us/cpp/porting/modifying-winver-and-win32-winnt + # _WIN32_WINNT_WIN7 = 0x0601 + target_compile_definitions(mixxx-lib PUBLIC WINVER=0x0601) + target_compile_definitions(mixxx-lib PUBLIC _WIN32_WINNT=0x0601) + if(MSVC) + target_compile_definitions(mixxx-lib PUBLIC _USE_MATH_DEFINES) + endif() endif() # diff --git a/src/util/battery/batterywindows.cpp b/src/util/battery/batterywindows.cpp index 1482dea7ec66..437e9072d619 100644 --- a/src/util/battery/batterywindows.cpp +++ b/src/util/battery/batterywindows.cpp @@ -1,8 +1,5 @@ #include "util/battery/batterywindows.h" -// tell windows we target XP and later -// http://msdn.microsoft.com/en-us/library/windows/desktop/aa372693(v=vs.85).aspx -#define _WIN32_WINNT 0x0400 #include #include #include From ad7fa93ec2d4ae93a0316fcde97df2b31233497e Mon Sep 17 00:00:00 2001 From: JoergAtGithub Date: Sun, 29 Nov 2020 12:46:54 +0100 Subject: [PATCH 47/86] Fixed quoting of strings Used delayed expansion of variables inside if conditions Used IF NOT DEFINED to check if a variable is defined Used REM instead of # for comments --- tools/windows_buildenv.bat | 49 +++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 24 deletions(-) diff --git a/tools/windows_buildenv.bat b/tools/windows_buildenv.bat index b168187a8efd..c1234333475e 100644 --- a/tools/windows_buildenv.bat +++ b/tools/windows_buildenv.bat @@ -4,20 +4,16 @@ SETLOCAL ENABLEDELAYEDEXPANSION CALL :REALPATH %~dp0\.. SET MIXXX_ROOT=%RETVAL% -IF "%PLATFORM%"=="" ( +IF NOT DEFINED PLATFORM ( SET PLATFORM=x64 ) -IF "%CONFIGURATION%"=="" ( +IF NOT DEFINED CONFIGURATION ( SET CONFIGURATION=release-fastbuild ) -IF "%BUILDENV_BASEPATH%"=="" ( - SET BUILDENV_BASEPATH="%MIXXX_ROOT%\buildenv" -) - -IF "%BUILDENV_BASEPATH%"=="" ( - SET BUILDENV_BASEPATH="%MIXXX_ROOT%\buildenv" +IF NOT DEFINED BUILDENV_BASEPATH ( + SET BUILDENV_BASEPATH=%MIXXX_ROOT%\buildenv ) CALL :COMMAND_%1 @@ -27,7 +23,7 @@ EXIT /B 0 CALL :READ_ENVNAME ECHO "%RETVAL%" IF "%CI%" == "true" ( - ECHO BUILDENV_NAME=!RETVAL! >> %GITHUB_ENV% + ECHO BUILDENV_NAME=!RETVAL! >> !GITHUB_ENV! ) GOTO :EOF @@ -35,28 +31,33 @@ EXIT /B 0 CALL :READ_ENVNAME SET BUILDENV_NAME=%RETVAL% SET BUILDENV_PATH=%BUILDENV_BASEPATH%\%BUILDENV_NAME% - MD %BUILDENV_BASEPATH% + + IF NOT EXIST %BUILDENV_BASEPATH% ( + MD %BUILDENV_BASEPATH% + ) IF NOT EXIST %BUILDENV_PATH% ( SET BUILDENV_URL=https://downloads.mixxx.org/builds/buildserver/2.3.x-windows/%BUILDENV_NAME%.zip - ECHO Downloading !BUILDENV_URL! - BITSADMIN /transfer buildenvjob /download /priority normal !BUILDENV_URL! !BUILDENV_PATH!.zip - REM TODO: verify download using sha256sum? - ECHO Unpacking %BUILDENV_PATH%.zip - CALL :UNZIP "%BUILDENV_PATH%.zip" "%BUILDENV_BASEPATH%" + IF NOT EXIST !BUILDENV_PATH!.zip ( + ECHO Downloading !BUILDENV_URL! + BITSADMIN /transfer buildenvjob /download /priority normal !BUILDENV_URL! !BUILDENV_PATH!.zip + REM TODO: verify download using sha256sum? + ) + ECHO Unpacking !BUILDENV_PATH!.zip + CALL :UNZIP "!BUILDENV_PATH!.zip" "!BUILDENV_BASEPATH!" ECHO Unpacking complete. DEL /f /q %BUILDENV_PATH%.zip ) - ECHO Using build environment: %BUILDENV_PATH% + ECHO Using build environment: !BUILDENV_PATH! ENDLOCAL SET PATH=!BUILDENV_PATH!\bin;!PATH! - # Remove C:\Program Files\Git\usr\bin from the PATH - # This works around an issue on the windows-2016 builder provided by GitHub - # Actions, see this for details: - # - https://github.com/actions/cache/issues/333 - # - https://github.com/actions/virtual-environments/issues/480 + REM Remove C:\Program Files\Git\usr\bin from the PATH + REM This works around an issue on the windows-2016 builder provided by GitHub + REM Actions, see this for details: + REM - https://github.com/actions/cache/issues/333 + REM - https://github.com/actions/virtual-environments/issues/480 SET PATH=%PATH:C:\Program Files\Git\usr\bin;=% FOR /D %%G IN (%BUILDENV_PATH%\Qt-*) DO (SET Qt5_DIR=%%G) @@ -67,9 +68,9 @@ EXIT /B 0 ECHO ^CMake Configuration: ECHO ^- CMAKE_PREFIX_PATH=!CMAKE_PREFIX_PATH! - IF NOT "%GITHUB_ENV%" == "" ( - ECHO CMAKE_PREFIX_PATH=!CMAKE_PREFIX_PATH!>>%GITHUB_ENV% - ECHO PATH=!PATH!>>%GITHUB_ENV% + IF DEFINED GITHUB_ENV ( + ECHO CMAKE_PREFIX_PATH=!CMAKE_PREFIX_PATH!>>!GITHUB_ENV! + ECHO PATH=!PATH!>>!GITHUB_ENV! ) GOTO :EOF From 9015a08c50cfe3f50e0642c725667ca5f6e4de64 Mon Sep 17 00:00:00 2001 From: JoergAtGithub Date: Sun, 29 Nov 2020 14:10:14 +0100 Subject: [PATCH 48/86] Suggested changes by Jan --- tools/windows_buildenv.bat | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/tools/windows_buildenv.bat b/tools/windows_buildenv.bat index c1234333475e..af9e70502678 100644 --- a/tools/windows_buildenv.bat +++ b/tools/windows_buildenv.bat @@ -22,7 +22,7 @@ EXIT /B 0 :COMMAND_name CALL :READ_ENVNAME ECHO "%RETVAL%" - IF "%CI%" == "true" ( + IF DEFINED GITHUB_ENV ( ECHO BUILDENV_NAME=!RETVAL! >> !GITHUB_ENV! ) GOTO :EOF @@ -53,12 +53,6 @@ EXIT /B 0 ENDLOCAL SET PATH=!BUILDENV_PATH!\bin;!PATH! - REM Remove C:\Program Files\Git\usr\bin from the PATH - REM This works around an issue on the windows-2016 builder provided by GitHub - REM Actions, see this for details: - REM - https://github.com/actions/cache/issues/333 - REM - https://github.com/actions/virtual-environments/issues/480 - SET PATH=%PATH:C:\Program Files\Git\usr\bin;=% FOR /D %%G IN (%BUILDENV_PATH%\Qt-*) DO (SET Qt5_DIR=%%G) SET CMAKE_PREFIX_PATH=!BUILDENV_PATH!;!Qt5_DIR! From 0ce9b4de0d16dbdf11bd4620f1b05e38e982fd70 Mon Sep 17 00:00:00 2001 From: Daniel Poelzleithner Date: Sun, 29 Nov 2020 17:36:56 +0100 Subject: [PATCH 49/86] Speedup playlist deletion logic --- src/library/dao/playlistdao.cpp | 37 ++++++++++++++++++++++++++------- src/library/dao/playlistdao.h | 5 +++-- src/util/db/fwdsqlquery.h | 4 ++++ 3 files changed, 36 insertions(+), 10 deletions(-) diff --git a/src/library/dao/playlistdao.cpp b/src/library/dao/playlistdao.cpp index c1b2fab30323..346768cae24c 100644 --- a/src/library/dao/playlistdao.cpp +++ b/src/library/dao/playlistdao.cpp @@ -11,6 +11,7 @@ #include "library/trackcollection.h" #include "track/track.h" #include "util/compatibility.h" +#include "util/db/fwdsqlquery.h" #include "util/math.h" PlaylistDAO::PlaylistDAO() @@ -227,12 +228,10 @@ void PlaylistDAO::deletePlaylist(const int playlistId) { } } -void PlaylistDAO::deleteAllPlaylistsWithFewerItems(PlaylistDAO::HiddenType type, int length) { - //qDebug() << "PlaylistDAO::deletePlaylist" << QThread::currentThread() << m_database.connectionName(); - // Get the playlist id for this +int PlaylistDAO::deleteAllPlaylistsWithFewerItems(PlaylistDAO::HiddenType type, int length) { QSqlQuery query(m_database); - // Delete the row in the Playlists table. + ScopedTransaction transaction(m_database); query.prepare(QStringLiteral( "SELECT id FROM Playlists " "WHERE (SELECT count(playlist_id) FROM PlaylistTracks WHERE " @@ -242,14 +241,36 @@ void PlaylistDAO::deleteAllPlaylistsWithFewerItems(PlaylistDAO::HiddenType type, query.bindValue(":length", length); if (!query.exec()) { LOG_FAILED_QUERY(query); - return; + return -1; } + QStringList idStringList; while (query.next()) { - int id = query.value(0).toInt(); - qDebug() << "Delete playlist" << id; - deletePlaylist(id); + idStringList.append(query.value(0).toString()); } + QString idString = idStringList.join(","); + + qDebug() << "Delete Playlists: " << idString; + + auto deletePlaylists = FwdSqlQuery(m_database, + QString("DELETE FROM Playlists WHERE id IN (%1)").arg(idString)); + if (deletePlaylists.hasError()) { + LOG_FAILED_QUERY(deletePlaylists); + return -1; + } + deletePlaylists.execPrepared(); + + auto deleteTracks = FwdSqlQuery(m_database, + QString("DELETE FROM PlaylistTracks WHERE playlist_id IN (%1)") + .arg(idString)); + if (deleteTracks.hasError()) { + LOG_FAILED_QUERY(deleteTracks); + return -1; + } + deleteTracks.execPrepared(); + + transaction.commit(); + return idStringList.length(); } void PlaylistDAO::renamePlaylist(const int playlistId, const QString& newName) { diff --git a/src/library/dao/playlistdao.h b/src/library/dao/playlistdao.h index 96765eee8e27..f55e5c1b3a05 100644 --- a/src/library/dao/playlistdao.h +++ b/src/library/dao/playlistdao.h @@ -59,8 +59,9 @@ class PlaylistDAO : public QObject, public virtual DAO { int createUniquePlaylist(QString* pName, const HiddenType type = PLHT_NOT_HIDDEN); // Delete a playlist void deletePlaylist(const int playlistId); - /// Deletes all empty Playlist - void deleteAllPlaylistsWithFewerItems(PlaylistDAO::HiddenType type, int length); + /// Delete Playlists with fewer entries then "length" + /// @return number of deleted playlists, -1 on error + int deleteAllPlaylistsWithFewerItems(PlaylistDAO::HiddenType type, int length); // Rename a playlist void renamePlaylist(const int playlistId, const QString& newName); // Lock or unlock a playlist diff --git a/src/util/db/fwdsqlquery.h b/src/util/db/fwdsqlquery.h index 2ab241358746..39a0463023c3 100644 --- a/src/util/db/fwdsqlquery.h +++ b/src/util/db/fwdsqlquery.h @@ -60,6 +60,10 @@ class FwdSqlQuery: protected QSqlQuery { bindValue(placeholder, value.toVariant()); } + QString executedQuery() const { + return QSqlQuery::executedQuery(); + } + // Execute the prepared query and log errors on failure. // // Please note, that the member function exec() inherited From 7dca1bd066408158969896e128d42883c5a97250 Mon Sep 17 00:00:00 2001 From: Daniel Poelzleithner Date: Sun, 29 Nov 2020 17:37:32 +0100 Subject: [PATCH 50/86] Always show start new playlist and focus on change --- src/library/trackset/setlogfeature.cpp | 10 ++++++---- src/library/trackset/setlogfeature.h | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/library/trackset/setlogfeature.cpp b/src/library/trackset/setlogfeature.cpp index 8730a82e5d34..a423061eab0a 100644 --- a/src/library/trackset/setlogfeature.cpp +++ b/src/library/trackset/setlogfeature.cpp @@ -50,8 +50,8 @@ SetlogFeature::SetlogFeature( this, &SetlogFeature::slotJoinWithPrevious); - m_pGetNewPlaylist = new QAction(tr("Create new history playlist"), this); - connect(m_pGetNewPlaylist, + m_pStartNewPlaylist = new QAction(tr("Finish current and start new"), this); + connect(m_pStartNewPlaylist, &QAction::triggered, this, &SetlogFeature::slotGetNewPlaylist); @@ -132,9 +132,10 @@ void SetlogFeature::onRightClickChild(const QPoint& globalPos, const QModelIndex // The very first setlog cannot be joint menu.addAction(m_pJoinWithPreviousAction); } - if (playlistId == m_playlistId && m_playlistDao.tracksInPlaylist(m_playlistId) != 0) { + if (playlistId == m_playlistId) { // Todays playlists can change ! - menu.addAction(m_pGetNewPlaylist); + m_pStartNewPlaylist->setEnabled(m_playlistDao.tracksInPlaylist(m_playlistId) > 0); + menu.addAction(m_pStartNewPlaylist); } menu.addSeparator(); menu.addAction(m_pExportPlaylistAction); @@ -282,6 +283,7 @@ void SetlogFeature::slotGetNewPlaylist() { reloadChildModel(m_playlistId); // For moving selection emit showTrackModel(m_pPlaylistTableModel); + activatePlaylist(m_playlistId); } void SetlogFeature::slotJoinWithPrevious() { diff --git a/src/library/trackset/setlogfeature.h b/src/library/trackset/setlogfeature.h index ca885c7da751..70fa0083c822 100644 --- a/src/library/trackset/setlogfeature.h +++ b/src/library/trackset/setlogfeature.h @@ -46,7 +46,7 @@ class SetlogFeature : public BasePlaylistFeature { std::list m_recentTracks; QAction* m_pJoinWithPreviousAction; - QAction* m_pGetNewPlaylist; + QAction* m_pStartNewPlaylist; int m_playlistId; WLibrary* m_libraryWidget; const QIcon m_icon; From c8917c3bf8bad51a56bd1f447e72fbc5ede97243 Mon Sep 17 00:00:00 2001 From: Uwe Klotz Date: Sun, 29 Nov 2020 16:43:38 +0100 Subject: [PATCH 51/86] fidlib: Remove obsolete hacks --- lib/fidlib/fidlib.c | 4 ---- lib/fidlib/fidmkf.h | 3 --- 2 files changed, 7 deletions(-) diff --git a/lib/fidlib/fidlib.c b/lib/fidlib/fidlib.c index 8dcef23b0177..3f4678eef5ea 100644 --- a/lib/fidlib/fidlib.c +++ b/lib/fidlib/fidlib.c @@ -248,10 +248,6 @@ #include #include "fidlib.h" -#ifndef M_PI -#define M_PI 3.14159265358979323846 -#endif - extern FidFilter *mkfilter(char *, ...); // diff --git a/lib/fidlib/fidmkf.h b/lib/fidlib/fidmkf.h index 687abb547a5c..5b1c84620253 100644 --- a/lib/fidlib/fidmkf.h +++ b/lib/fidlib/fidmkf.h @@ -139,10 +139,7 @@ #endif #endif -//Hacks for crappy linker error in MSVC... - Albert #ifdef T_MSVC - #undef HUGE_VAL - #define HUGE_VAL 1.797693134862315E+308 #define INF HUGE_VAL #endif From c98fb3cf9b0ce4dcb30cad4c9e2d718d06efc687 Mon Sep 17 00:00:00 2001 From: Uwe Klotz Date: Sun, 29 Nov 2020 16:49:11 +0100 Subject: [PATCH 52/86] Restrict visibility of _USE_MATH_DEFINES --- CMakeLists.txt | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c57973d5e168..5d817c726347 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1581,6 +1581,7 @@ endif() add_library(fidlib STATIC EXCLUDE_FROM_ALL lib/fidlib/fidlib.c) if(MSVC) target_compile_definitions(fidlib PRIVATE T_MSVC) + target_compile_definitions(fidlib PRIVATE _USE_MATH_DEFINES) elseif(MINGW) target_compile_definitions(fidlib PRIVATE T_MINGW) else() @@ -1942,7 +1943,7 @@ elseif(MSVC) # http://msdn.microsoft.com/en-us/library/4hwaceh6.aspx We could define this # in our headers but then include order matters since headers we don't control # may include cmath first. - target_compile_definitions(QueenMaryDsp PUBLIC _USE_MATH_DEFINES) + target_compile_definitions(QueenMaryDsp PRIVATE _USE_MATH_DEFINES) endif() target_include_directories(QueenMaryDsp SYSTEM PUBLIC lib/qm-dsp lib/qm-dsp/include) target_link_libraries(mixxx-lib PUBLIC QueenMaryDsp) @@ -1957,7 +1958,7 @@ target_link_libraries(mixxx-lib PRIVATE ReplayGain) # Reverb add_library(Reverb STATIC EXCLUDE_FROM_ALL lib/reverb/Reverb.cc) if(MSVC) - target_compile_definitions(Reverb PUBLIC _USE_MATH_DEFINES) + target_compile_definitions(Reverb PRIVATE _USE_MATH_DEFINES) endif() target_include_directories(Reverb PRIVATE src) target_link_libraries(Reverb PUBLIC Qt5::Core) @@ -2004,9 +2005,6 @@ if(SoundTouch_STATIC) lib/soundtouch/sse_optimized.cpp ) target_include_directories(SoundTouch SYSTEM PUBLIC lib) - if(MSVC) - target_compile_definitions(SoundTouch PUBLIC _USE_MATH_DEFINES) - endif() target_link_libraries(mixxx-lib PUBLIC SoundTouch) else() message(STATUS "Linking libSoundTouch dynamically") From c7e4f6e8e6d61cc6fca3c970ca092d1fd0276679 Mon Sep 17 00:00:00 2001 From: Jan Holthuis Date: Sun, 29 Nov 2020 21:59:23 +0100 Subject: [PATCH 53/86] DlgPrefController: Put constant into anonymous namespace --- src/controllers/dlgprefcontroller.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/controllers/dlgprefcontroller.cpp b/src/controllers/dlgprefcontroller.cpp index 7146e0b38e03..4d3e02e6bb88 100644 --- a/src/controllers/dlgprefcontroller.cpp +++ b/src/controllers/dlgprefcontroller.cpp @@ -24,7 +24,9 @@ #include "preferences/usersettings.h" #include "util/version.h" +namespace { const QString kPresetExt(".midi.xml"); +} DlgPrefController::DlgPrefController(QWidget* parent, Controller* controller, From 966e62744974e324ca1a15d2b8c6ebe3ece7c152 Mon Sep 17 00:00:00 2001 From: Daniel Poelzleithner Date: Sun, 29 Nov 2020 22:34:51 +0100 Subject: [PATCH 54/86] Move transaction outside of DAO --- src/library/dao/playlistdao.cpp | 34 +++++++++++++++----------- src/library/dao/playlistdao.h | 3 ++- src/library/trackset/setlogfeature.cpp | 5 +++- 3 files changed, 26 insertions(+), 16 deletions(-) diff --git a/src/library/dao/playlistdao.cpp b/src/library/dao/playlistdao.cpp index 346768cae24c..c4b4c1c3c219 100644 --- a/src/library/dao/playlistdao.cpp +++ b/src/library/dao/playlistdao.cpp @@ -228,17 +228,20 @@ void PlaylistDAO::deletePlaylist(const int playlistId) { } } -int PlaylistDAO::deleteAllPlaylistsWithFewerItems(PlaylistDAO::HiddenType type, int length) { - QSqlQuery query(m_database); +int PlaylistDAO::deleteAllPlaylistsWithFewerTracks( + PlaylistDAO::HiddenType type, int minNumberOfTracks) { + VERIFY_OR_DEBUG_ASSERT(minNumberOfTracks > 0) { + return 0; // nothing to do, probably unintended invocation + } - ScopedTransaction transaction(m_database); + QSqlQuery query(m_database); query.prepare(QStringLiteral( "SELECT id FROM Playlists " "WHERE (SELECT count(playlist_id) FROM PlaylistTracks WHERE " "Playlists.ID = PlaylistTracks.playlist_id) < :length AND " "Playlists.hidden = :hidden")); query.bindValue(":hidden", static_cast(type)); - query.bindValue(":length", length); + query.bindValue(":length", minNumberOfTracks); if (!query.exec()) { LOG_FAILED_QUERY(query); return -1; @@ -248,17 +251,13 @@ int PlaylistDAO::deleteAllPlaylistsWithFewerItems(PlaylistDAO::HiddenType type, while (query.next()) { idStringList.append(query.value(0).toString()); } + if (idStringList.isEmpty()) { + return 0; + } QString idString = idStringList.join(","); - qDebug() << "Delete Playlists: " << idString; - - auto deletePlaylists = FwdSqlQuery(m_database, - QString("DELETE FROM Playlists WHERE id IN (%1)").arg(idString)); - if (deletePlaylists.hasError()) { - LOG_FAILED_QUERY(deletePlaylists); - return -1; - } - deletePlaylists.execPrepared(); + qInfo() << "Deleting" << idStringList.size() << "playlists of type" << type + << "that contain fewer than" << minNumberOfTracks << "tracks"; auto deleteTracks = FwdSqlQuery(m_database, QString("DELETE FROM PlaylistTracks WHERE playlist_id IN (%1)") @@ -269,7 +268,14 @@ int PlaylistDAO::deleteAllPlaylistsWithFewerItems(PlaylistDAO::HiddenType type, } deleteTracks.execPrepared(); - transaction.commit(); + auto deletePlaylists = FwdSqlQuery(m_database, + QString("DELETE FROM Playlists WHERE id IN (%1)").arg(idString)); + if (deletePlaylists.hasError()) { + LOG_FAILED_QUERY(deletePlaylists); + return -1; + } + deletePlaylists.execPrepared(); + return idStringList.length(); } diff --git a/src/library/dao/playlistdao.h b/src/library/dao/playlistdao.h index f55e5c1b3a05..a9de3d8e2a88 100644 --- a/src/library/dao/playlistdao.h +++ b/src/library/dao/playlistdao.h @@ -60,8 +60,9 @@ class PlaylistDAO : public QObject, public virtual DAO { // Delete a playlist void deletePlaylist(const int playlistId); /// Delete Playlists with fewer entries then "length" + /// Needs to be called inside a transaction. /// @return number of deleted playlists, -1 on error - int deleteAllPlaylistsWithFewerItems(PlaylistDAO::HiddenType type, int length); + int deleteAllPlaylistsWithFewerTracks(PlaylistDAO::HiddenType type, int minNumberOfTracks); // Rename a playlist void renamePlaylist(const int playlistId, const QString& newName); // Lock or unlock a playlist diff --git a/src/library/trackset/setlogfeature.cpp b/src/library/trackset/setlogfeature.cpp index a423061eab0a..d9a5cc2bf432 100644 --- a/src/library/trackset/setlogfeature.cpp +++ b/src/library/trackset/setlogfeature.cpp @@ -7,6 +7,7 @@ #include "control/controlobject.h" #include "library/library.h" #include "library/playlisttablemodel.h" +#include "library/queryutil.h" #include "library/trackcollection.h" #include "library/trackcollectionmanager.h" #include "library/treeitem.h" @@ -38,7 +39,9 @@ SetlogFeature::SetlogFeature( m_libraryWidget(nullptr), m_icon(QStringLiteral(":/images/library/ic_library_history.svg")) { // clear old empty entries - m_playlistDao.deleteAllPlaylistsWithFewerItems(PlaylistDAO::HiddenType::PLHT_SET_LOG, 1); + ScopedTransaction transaction(pLibrary->trackCollections()->internalCollection()->database()); + m_playlistDao.deleteAllPlaylistsWithFewerTracks(PlaylistDAO::HiddenType::PLHT_SET_LOG, 1); + transaction.commit(); //construct child model m_childModel.setRootItem(TreeItem::newRoot(this)); From 3a52a4d4cf4dd309ba2026a515fa0c1112561d79 Mon Sep 17 00:00:00 2001 From: Daniel Poelzleithner Date: Sun, 29 Nov 2020 22:36:28 +0100 Subject: [PATCH 55/86] Print info instead of debug when transaction failed --- src/library/queryutil.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/library/queryutil.h b/src/library/queryutil.h index fe28dba77799..f3e7d8a544da 100644 --- a/src/library/queryutil.h +++ b/src/library/queryutil.h @@ -42,9 +42,14 @@ class ScopedTransaction { return false; } bool result = m_database.commit(); - qDebug() << "Committing transaction on" - << m_database.connectionName() - << "result:" << result; + if (result) { + qDebug() << "Committing transaction successfully on" + << m_database.connectionName(); + } else { + qInfo() << "Committing transaction failed on" + << m_database.connectionName() + << ":" << m_database.lastError(); + } m_active = false; return result; } From d96aad87321214fc63aa30d050500a64ef36f8a9 Mon Sep 17 00:00:00 2001 From: ronso0 Date: Sun, 29 Nov 2020 20:41:03 +0100 Subject: [PATCH 56/86] DlgController: add link to xml file --- src/controllers/dlgprefcontroller.cpp | 23 ++++++++++++++++------- src/controllers/dlgprefcontroller.h | 2 +- src/controllers/dlgprefcontrollerdlg.ui | 2 +- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/src/controllers/dlgprefcontroller.cpp b/src/controllers/dlgprefcontroller.cpp index 4d3e02e6bb88..9585f2e87f72 100644 --- a/src/controllers/dlgprefcontroller.cpp +++ b/src/controllers/dlgprefcontroller.cpp @@ -271,14 +271,24 @@ QString DlgPrefController::presetManualLink( return url; } -QString DlgPrefController::presetScriptFileLinks( +QString DlgPrefController::presetFileLinks( const ControllerPresetPointer pPreset) const { - if (!pPreset || pPreset->getScriptFiles().empty()) { - return tr("No Scripts"); + if (!pPreset) { + return QString(); } + const QString builtinFileSuffix = QStringLiteral(" (") + tr("built-in") + QStringLiteral(")"); QString systemPresetPath = resourcePresetsPath(m_pConfig); QStringList linkList; + QString xmlFileName = QFileInfo(pPreset->filePath()).fileName(); + QString xmlFileLink = QStringLiteral("filePath() + QStringLiteral("\">") + + xmlFileName + QStringLiteral(""); + if (pPreset->filePath().startsWith(systemPresetPath)) { + xmlFileLink += builtinFileSuffix; + } + linkList << xmlFileLink; + for (const auto& script : pPreset->getScriptFiles()) { QString scriptFileLink = QStringLiteral("") + @@ -289,8 +299,7 @@ QString DlgPrefController::presetScriptFileLinks( QStringLiteral(" (") + tr("missing") + QStringLiteral(")"); } else if (script.file.absoluteFilePath().startsWith( systemPresetPath)) { - scriptFileLink += - QStringLiteral(" (") + tr("built-in") + QStringLiteral(")"); + scriptFileLink += builtinFileSuffix; } linkList << scriptFileLink; @@ -666,8 +675,8 @@ void DlgPrefController::slotShowPreset(ControllerPresetPointer preset) { QString support = supportLinks.join("  "); m_ui.labelLoadedPresetSupportLinks->setText(support); - QString scriptFiles = presetScriptFileLinks(preset); - m_ui.labelLoadedPresetScriptFileLinks->setText(scriptFiles); + QString mappingFileLinks = presetFileLinks(preset); + m_ui.labelLoadedPresetScriptFileLinks->setText(mappingFileLinks); // We mutate this preset so keep a reference to it while we are using it. // TODO(rryan): Clone it? Technically a waste since nothing else uses this diff --git a/src/controllers/dlgprefcontroller.h b/src/controllers/dlgprefcontroller.h index 2e1e9d112e40..844e61f26201 100644 --- a/src/controllers/dlgprefcontroller.h +++ b/src/controllers/dlgprefcontroller.h @@ -74,7 +74,7 @@ class DlgPrefController : public DlgPreferencePage { QString presetForumLink(const ControllerPresetPointer pPreset) const; QString presetManualLink(const ControllerPresetPointer pPreset) const; QString presetWikiLink(const ControllerPresetPointer pPreset) const; - QString presetScriptFileLinks(const ControllerPresetPointer pPreset) const; + QString presetFileLinks(const ControllerPresetPointer pPreset) const; void applyPresetChanges(); void savePreset(); void initTableView(QTableView* pTable); diff --git a/src/controllers/dlgprefcontrollerdlg.ui b/src/controllers/dlgprefcontrollerdlg.ui index e523bf02ff06..28cc5d9f49b0 100644 --- a/src/controllers/dlgprefcontrollerdlg.ui +++ b/src/controllers/dlgprefcontrollerdlg.ui @@ -318,7 +318,7 @@ - Script Files: + Preset Files: Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing From d4822852e69f3c44d523ee3a2fdbb9d56f1e04c7 Mon Sep 17 00:00:00 2001 From: ronso0 Date: Sun, 29 Nov 2020 21:38:34 +0100 Subject: [PATCH 57/86] DlgController/s: switch from 'preset' to 'mapping' in user strings --- src/controllers/dlgprefcontroller.cpp | 20 ++++++++++---------- src/controllers/dlgprefcontrollerdlg.ui | 18 +++++++++--------- src/controllers/dlgprefcontrollersdlg.ui | 8 ++++---- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/controllers/dlgprefcontroller.cpp b/src/controllers/dlgprefcontroller.cpp index 9585f2e87f72..342181ffe848 100644 --- a/src/controllers/dlgprefcontroller.cpp +++ b/src/controllers/dlgprefcontroller.cpp @@ -484,7 +484,7 @@ void DlgPrefController::slotPresetSelected(int chosenIndex) { applyPresetChanges(); if (m_pPreset && m_pPreset->isDirty()) { if (QMessageBox::question(this, - tr("Preset has been edited"), + tr("Mapping has been edited"), tr("Do you want to save the changes?")) == QMessageBox::Yes) { savePreset(); @@ -507,7 +507,7 @@ void DlgPrefController::savePreset() { } if (!m_pPreset->isDirty()) { - qDebug() << "Preset has not been edited, no need to save it."; + qDebug() << "Mapping is not dirty, no need to save it."; return; } @@ -565,13 +565,13 @@ void DlgPrefController::savePreset() { if (!saveAsNew) { newFilePath = oldFilePath; } else { - QString savePresetTitle = tr("Save user preset"); - QString savePresetLabel = tr("Enter the name for saving the preset to the user folder."); - QString savingFailedTitle = tr("Saving preset failed"); + QString savePresetTitle = tr("Save user mapping"); + QString savePresetLabel = tr("Enter the name for saving the mapping to the user folder."); + QString savingFailedTitle = tr("Saving mapping failed"); QString invalidNameLabel = - tr("A preset cannot have a blank name and may not contain " + tr("A mapping cannot have a blank name and may not contain " "special characters."); - QString fileExistsLabel = tr("A preset file with that name already exists."); + QString fileExistsLabel = tr("A mapping file with that name already exists."); // Only allow the name to contain letters, numbers, whitespaces and _-+()/ const QRegExp rxRemove = QRegExp("[^[(a-zA-Z0-9\\_\\-\\+\\(\\)\\/|\\s]"); @@ -609,14 +609,14 @@ void DlgPrefController::savePreset() { validPresetName = true; } m_pPreset->setName(presetName); - qDebug() << "Preset renamed to" << m_pPreset->name(); + qDebug() << "Mapping renamed to" << m_pPreset->name(); } if (!m_pPreset->savePreset(newFilePath)) { - qDebug() << "Failed to save preset as" << newFilePath; + qDebug() << "Failed to save mapping as" << newFilePath; return; } - qDebug() << "Preset saved as" << newFilePath; + qDebug() << "Mapping saved as" << newFilePath; m_pPreset->setFilePath(newFilePath); m_pPreset->setDirty(false); diff --git a/src/controllers/dlgprefcontrollerdlg.ui b/src/controllers/dlgprefcontrollerdlg.ui index 28cc5d9f49b0..87b030458642 100644 --- a/src/controllers/dlgprefcontrollerdlg.ui +++ b/src/controllers/dlgprefcontrollerdlg.ui @@ -116,7 +116,7 @@ - Load Preset: + Load Mapping: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter @@ -145,11 +145,11 @@ - Preset Info + Mapping Info - + 0 @@ -182,7 +182,7 @@ - (preset name goes here) + (mapping name goes here) true @@ -214,7 +214,7 @@ - (preset author goes here) + (mapping author goes here) @@ -255,7 +255,7 @@ - (preset description goes here) even when it is a damn long text which should wrap but does not + (mapping description goes here) even when it is a damn long text which should wrap but does not Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter @@ -299,7 +299,7 @@ Qt::ImhUrlCharactersOnly - (forum link for preset goes here) + (forum link for mapping goes here) true @@ -318,7 +318,7 @@ - Preset Files: + Mapping Files: Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing @@ -343,7 +343,7 @@ Qt::ImhUrlCharactersOnly - (links to loaded preset script files go here) + (links to loaded mapping script files go here) false diff --git a/src/controllers/dlgprefcontrollersdlg.ui b/src/controllers/dlgprefcontrollersdlg.ui index a3ec8586eb00..45894afc14f2 100644 --- a/src/controllers/dlgprefcontrollersdlg.ui +++ b/src/controllers/dlgprefcontrollersdlg.ui @@ -76,7 +76,7 @@ - Presets + Mappings @@ -88,7 +88,7 @@ - Mixxx uses "presets" to connect messages from your controller to controls in Mixxx. If you do not see a preset for your controller in the "Load Preset" menu when you click on your controller on the left sidebar, you may be able to download one online from the <a href="https://mixxx.discourse.group/c/controller-mappings/10">Mixxx Forum</a>. Place the XML (.xml) and Javascript (.js) file(s) in the "User Preset Folder" then restart Mixxx. If you download a mapping in a ZIP file, extract the XML and Javascript file(s) from the ZIP file to your "User Preset Folder" then restart Mixxx: + Mixxx uses "mappings" to connect messages from your controller to controls in Mixxx. If you do not see a mapping for your controller in the "Load Mapping" menu when you click on your controller on the left sidebar, you may be able to download one online from the <a href="https://mixxx.discourse.group/c/controller-mappings/10">Mixxx Forum</a>. Place the XML (.xml) and Javascript (.js) file(s) in the "User Mapping Folder" then restart Mixxx. If you download a mapping in a ZIP file, extract the XML and Javascript file(s) from the ZIP file to your "User Mapping Folder" then restart Mixxx: true @@ -107,7 +107,7 @@ - Open User Preset Folder + Open User Mapping Folder @@ -159,7 +159,7 @@ - <a href="https://github.com/mixxxdj/mixxx/wiki/Midi-Controller-Mapping-File-Format">MIDI Preset File Format</a> + <a href="https://github.com/mixxxdj/mixxx/wiki/Midi-Controller-Mapping-File-Format">MIDI Mapping File Format</a> true From b68a20c31ac9a5122a72530cac8f979134ca646f Mon Sep 17 00:00:00 2001 From: Daniel Poelzleithner Date: Mon, 30 Nov 2020 00:13:50 +0100 Subject: [PATCH 58/86] Don't double log on errors --- src/library/dao/playlistdao.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/library/dao/playlistdao.cpp b/src/library/dao/playlistdao.cpp index c4b4c1c3c219..045bc570de9f 100644 --- a/src/library/dao/playlistdao.cpp +++ b/src/library/dao/playlistdao.cpp @@ -262,19 +262,15 @@ int PlaylistDAO::deleteAllPlaylistsWithFewerTracks( auto deleteTracks = FwdSqlQuery(m_database, QString("DELETE FROM PlaylistTracks WHERE playlist_id IN (%1)") .arg(idString)); - if (deleteTracks.hasError()) { - LOG_FAILED_QUERY(deleteTracks); + if (!deleteTracks.execPrepared()) { return -1; } - deleteTracks.execPrepared(); auto deletePlaylists = FwdSqlQuery(m_database, QString("DELETE FROM Playlists WHERE id IN (%1)").arg(idString)); - if (deletePlaylists.hasError()) { - LOG_FAILED_QUERY(deletePlaylists); + if (!deletePlaylists.execPrepared()) { return -1; } - deletePlaylists.execPrepared(); return idStringList.length(); } From a05573b9eed290c05039b5a2921deca9503eb570 Mon Sep 17 00:00:00 2001 From: Daniel Poelzleithner Date: Tue, 1 Dec 2020 02:07:08 +0100 Subject: [PATCH 59/86] use constexpr when possible. Clearify join wording --- src/library/trackset/baseplaylistfeature.cpp | 9 +++++++-- src/library/trackset/baseplaylistfeature.h | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/library/trackset/baseplaylistfeature.cpp b/src/library/trackset/baseplaylistfeature.cpp index adc71679f771..c9ff442931e8 100644 --- a/src/library/trackset/baseplaylistfeature.cpp +++ b/src/library/trackset/baseplaylistfeature.cpp @@ -24,7 +24,7 @@ #include "widget/wlibrarytextbrowser.h" namespace { -const char* kUnsafeFilenameReplacement = "-"; +auto kUnsafeFilenameReplacement = QLatin1String("-"); } BasePlaylistFeature::BasePlaylistFeature( @@ -180,6 +180,8 @@ void BasePlaylistFeature::activateChild(const QModelIndex& index) { m_pPlaylistTableModel->setTableModel(playlistId); emit showTrackModel(m_pPlaylistTableModel); emit enableCoverArtDisplay(true); + // Update selection + emit featureSelect(this, m_lastRightClickedIndex); if (!m_pSidebarWidget) { return; @@ -203,7 +205,10 @@ void BasePlaylistFeature::activatePlaylist(int playlistId) { emit enableCoverArtDisplay(true); // Update selection emit featureSelect(this, m_lastRightClickedIndex); - activateChild(m_lastRightClickedIndex); + if (!m_pSidebarWidget) { + return; + } + m_pSidebarWidget->selectChildIndex(m_lastRightClickedIndex); } void BasePlaylistFeature::slotRenamePlaylist() { diff --git a/src/library/trackset/baseplaylistfeature.h b/src/library/trackset/baseplaylistfeature.h index 35bf0100570a..c831e0158ab8 100644 --- a/src/library/trackset/baseplaylistfeature.h +++ b/src/library/trackset/baseplaylistfeature.h @@ -21,7 +21,7 @@ class TrackCollectionManager; class TreeItem; class WLibrarySidebar; -const int kInvalidPlaylistId = -1; +constexpr int kInvalidPlaylistId = -1; class BasePlaylistFeature : public BaseTrackSetFeature { Q_OBJECT From 6cabebd384330d85ff3c0956297abb37e8c199de Mon Sep 17 00:00:00 2001 From: Daniel Poelzleithner Date: Tue, 1 Dec 2020 02:08:29 +0100 Subject: [PATCH 60/86] Don't activate when not expected. Only activate playlists when already in focus. Add option to scroll but not select sidebar items. --- src/library/trackset/baseplaylistfeature.cpp | 24 +++++++++++++------- src/library/trackset/baseplaylistfeature.h | 8 +++++-- src/library/trackset/setlogfeature.cpp | 11 +++++---- src/widget/wlibrarysidebar.cpp | 15 +++++++----- src/widget/wlibrarysidebar.h | 2 +- 5 files changed, 38 insertions(+), 22 deletions(-) diff --git a/src/library/trackset/baseplaylistfeature.cpp b/src/library/trackset/baseplaylistfeature.cpp index c9ff442931e8..01df3b7f64a1 100644 --- a/src/library/trackset/baseplaylistfeature.cpp +++ b/src/library/trackset/baseplaylistfeature.cpp @@ -118,7 +118,7 @@ void BasePlaylistFeature::initActions() { connect(&m_playlistDao, &PlaylistDAO::lockChanged, this, - &BasePlaylistFeature::slotPlaylistTableChangedAndSelect); + &BasePlaylistFeature::slotPlaylistTableChangedAndScrollTo); connect(&m_playlistDao, &PlaylistDAO::deleted, this, @@ -157,7 +157,7 @@ int BasePlaylistFeature::playlistIdFromIndex(const QModelIndex& index) { } } -void BasePlaylistFeature::selectPlaylistInSidebar(int playlistId) { +void BasePlaylistFeature::selectPlaylistInSidebar(int playlistId, bool select) { if (!m_pSidebarWidget) { return; } @@ -166,7 +166,7 @@ void BasePlaylistFeature::selectPlaylistInSidebar(int playlistId) { } QModelIndex index = indexFromPlaylistId(playlistId); if (index.isValid() && m_pSidebarWidget) { - m_pSidebarWidget->selectChildIndex(index); + m_pSidebarWidget->selectChildIndex(index, select); } } @@ -362,7 +362,7 @@ void BasePlaylistFeature::slotCreatePlaylist() { /// Returns a playlist that is a sibling inside the same parent /// as the start index -int BasePlaylistFeature::selectSiblingPlaylistId(QModelIndex& start) { +int BasePlaylistFeature::getSiblingPlaylistIdOf(QModelIndex& start) { for (int i = start.row() + 1; i >= (start.row() - 1); i -= 2) { QModelIndex nextIndex = start.sibling(i, start.column()); if (nextIndex.isValid()) { @@ -386,6 +386,10 @@ void BasePlaylistFeature::slotDeletePlaylist() { if (playlistId == kInvalidPlaylistId) { return; } + + // we will switch to the sibling if the deleted playlist is currently active + bool wasActive = m_pPlaylistTableModel->getPlaylist() == playlistId; + VERIFY_OR_DEBUG_ASSERT(playlistId >= 0) { return; } @@ -396,13 +400,17 @@ void BasePlaylistFeature::slotDeletePlaylist() { return; } - int nextId = selectSiblingPlaylistId(m_lastRightClickedIndex); + int siblingId = getSiblingPlaylistIdOf(m_lastRightClickedIndex); m_playlistDao.deletePlaylist(playlistId); - activate(); - if (nextId != kInvalidPlaylistId) { - activatePlaylist(nextId); + if (siblingId == kInvalidPlaylistId) { + return; + } + if (wasActive) { + activatePlaylist(siblingId); + } else if (m_pSidebarWidget) { + m_pSidebarWidget->selectChildIndex(indexFromPlaylistId(siblingId), false); } } diff --git a/src/library/trackset/baseplaylistfeature.h b/src/library/trackset/baseplaylistfeature.h index c831e0158ab8..60b18cb9a33a 100644 --- a/src/library/trackset/baseplaylistfeature.h +++ b/src/library/trackset/baseplaylistfeature.h @@ -38,8 +38,8 @@ class BasePlaylistFeature : public BaseTrackSetFeature { void bindLibraryWidget(WLibrary* libraryWidget, KeyboardEventFilter* keyboard) override; void bindSidebarWidget(WLibrarySidebar* pSidebarWidget) override; - void selectPlaylistInSidebar(int playlistId); - int selectSiblingPlaylistId(QModelIndex& start); + void selectPlaylistInSidebar(int playlistId, bool select = true); + int getSiblingPlaylistIdOf(QModelIndex& start); public slots: void activateChild(const QModelIndex& index) override; @@ -51,6 +51,10 @@ class BasePlaylistFeature : public BaseTrackSetFeature { slotPlaylistTableChanged(playlistId); selectPlaylistInSidebar(playlistId); }; + void slotPlaylistTableChangedAndScrollTo(int playlistId) { + slotPlaylistTableChanged(playlistId); + selectPlaylistInSidebar(playlistId, false); + }; virtual void slotPlaylistTableRenamed(int playlistId, const QString& newName) = 0; virtual void slotPlaylistContentChanged(QSet playlistIds) = 0; void slotCreatePlaylist(); diff --git a/src/library/trackset/setlogfeature.cpp b/src/library/trackset/setlogfeature.cpp index d9a5cc2bf432..2ec9120a2361 100644 --- a/src/library/trackset/setlogfeature.cpp +++ b/src/library/trackset/setlogfeature.cpp @@ -47,7 +47,7 @@ SetlogFeature::SetlogFeature( m_childModel.setRootItem(TreeItem::newRoot(this)); constructChildModel(kInvalidPlaylistId); - m_pJoinWithPreviousAction = new QAction(tr("Join with previous"), this); + m_pJoinWithPreviousAction = new QAction(tr("Join with previous (below)"), this); connect(m_pJoinWithPreviousAction, &QAction::triggered, this, @@ -425,9 +425,6 @@ void SetlogFeature::reloadChildModel(int playlistId) { type == PlaylistDAO::PLHT_UNKNOWN) { // In case of a deleted Playlist clearChildModel(); m_lastRightClickedIndex = constructChildModel(playlistId); - if (m_pSidebarWidget) { - m_pSidebarWidget->selectChildIndex(m_lastRightClickedIndex); - } } } @@ -451,7 +448,11 @@ void SetlogFeature::slotPlaylistTableRenamed(int playlistId, const QString& newN clearChildModel(); m_lastRightClickedIndex = constructChildModel(playlistId); if (type != PlaylistDAO::PLHT_UNKNOWN) { - activatePlaylist(playlistId); + if (playlistId == m_pPlaylistTableModel->getPlaylist()) { + activatePlaylist(playlistId); + } else if (m_pSidebarWidget) { + m_pSidebarWidget->selectChildIndex(indexFromPlaylistId(playlistId), false); + } } } } diff --git a/src/widget/wlibrarysidebar.cpp b/src/widget/wlibrarysidebar.cpp index 1f7ce2e076b4..74c0439a9dd5 100644 --- a/src/widget/wlibrarysidebar.cpp +++ b/src/widget/wlibrarysidebar.cpp @@ -224,19 +224,22 @@ void WLibrarySidebar::selectIndex(const QModelIndex& index) { } /// Selects a child index from a feature and ensures visibility -void WLibrarySidebar::selectChildIndex(const QModelIndex& index) { +void WLibrarySidebar::selectChildIndex(const QModelIndex& index, bool selectItem) { SidebarModel* sidebarModel = qobject_cast(model()); VERIFY_OR_DEBUG_ASSERT(sidebarModel) { qDebug() << "model() is not SidebarModel"; return; } QModelIndex translated = sidebarModel->translateChildIndex(index); - auto pModel = new QItemSelectionModel(sidebarModel); - pModel->select(translated, QItemSelectionModel::Select); - if (selectionModel()) { - selectionModel()->deleteLater(); + + if (selectItem) { + auto pModel = new QItemSelectionModel(sidebarModel); + pModel->select(translated, QItemSelectionModel::Select); + if (selectionModel()) { + selectionModel()->deleteLater(); + } + setSelectionModel(pModel); } - setSelectionModel(pModel); QModelIndex parentIndex = translated.parent(); while (parentIndex.isValid()) { diff --git a/src/widget/wlibrarysidebar.h b/src/widget/wlibrarysidebar.h index 871f8f063ea5..784458365f24 100644 --- a/src/widget/wlibrarysidebar.h +++ b/src/widget/wlibrarysidebar.h @@ -30,7 +30,7 @@ class WLibrarySidebar : public QTreeView, public WBaseWidget { public slots: void selectIndex(const QModelIndex&); - void selectChildIndex(const QModelIndex&); + void selectChildIndex(const QModelIndex&, bool selectItem = true); void slotSetFont(const QFont& font); signals: From 08172c27fe0c8cf45b566e31f9e836d61fb29757 Mon Sep 17 00:00:00 2001 From: Be Date: Mon, 30 Nov 2020 22:19:13 -0600 Subject: [PATCH 61/86] disable Travis --- .travis.yml | 250 ---------------------------------------------------- 1 file changed, 250 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 986e207cdb12..000000000000 --- a/.travis.yml +++ /dev/null @@ -1,250 +0,0 @@ -# Enable build config validation (opt-in) -version: ~> 1.0 - -# Default build environment -os: linux -dist: bionic - -# Default programming language -language: cpp - -# Build flags common to OS X and Linux. -# Parallel builds are important for avoiding OSX build timeouts. -# We turn off verbose output to avoid going over the 4MB output limit. -env: - global: - # For SCons builds - - SCONSFLAGS="battery=1 bulk=1 debug_assertions_fatal=1 hid=1 hss1394=0 lilv=1 opus=1 qtkeychain=1 shoutcast=1 test=1 verbose=0 vinylcontrol=1 virtualize=0" - # For CMake builds - # TODO: Set -DDEBUG_ASSERTIONS_FATAL=OFF before deploying CI builds as releases!!! - - CMAKEFLAGS="-DCMAKE_BUILD_TYPE=Release -DBATTERY=ON -DBROADCAST=ON -DBULK=ON -DDEBUG_ASSERTIONS_FATAL=ON -DHID=ON -DLILV=ON -DOPUS=ON -DQTKEYCHAIN=ON -DVINYLCONTROL=ON" - - GTEST_COLOR=1 - - CTEST_OUTPUT_ON_FAILURE=1 - # Render analyzer waveform tests to an offscreen buffer - - QT_QPA_PLATFORM=offscreen - # DOWNLOADS_HOSTGATOR_DOT_MIXXX_DOT_ORG_KEY_PASSWORD for deploys. - - secure: aS40s8gx1mM01oRj2pskFqR+rBID1nnTY7hwSqkT1bgJT+JF0tMZt/SkMjR08bp+3soNbBtqJgZKAhQ6Tts2DtkWQGbUiXgU5QpowUcecTxge/jqxZeWdJWThpB+qWs70Fm0QhzZXIyBPM8EGljWbLum5ncR7AUBEasRboNZ0P8= - # Code signing secrets: - - MACOS_CODESIGN_CERTIFICATE=cmake/macos_developer_id_codesign_certificate.p12 - # MACOS_CODESIGN_CERTIFICATE_PASSWORD: - - secure: MnQzTJBkeHsRkNov7yoNIlEM5Exo6JvdmRS+z6OPQFuJn+yc8WyeUrW2JhVtVsGFO/fCqcIyymIOSFIEz78eoRj1PL0w2tj3ptBqUAJWupP2mmobKcPY3NYTOhOmOsv8rqlJbPdLxop1pyLaLBFWyGKOgI2xJz8LPHGN5ZINfCY= - # MACOS_CODESIGN_OPENSSL_PASSWORD: - - secure: NJegC0Dag0V8hotFB7u3rSPGnGQzp0JQpRTH1qL8bveUmrTOL26viPeX4vLXwn/RJKZkuUsDBxDSFy/sfVvfaLdAgd5USOV9QLF7lc3z1+t4BWbZ4xDBXCYOWuaQlgqE1k5W7s9wl1DgDFNxBSc46X04h9BZNonz1z0A9IAhn+k= - -jobs: - include: - - name: Ubuntu/gcc/SCons build - compiler: gcc - # Ubuntu Bionic build prerequisites - before_install: - - sudo apt install -y scons - install: - # TODO for Ubuntu Focal: faad=0 ffmpeg=1 - - scons -j "$(nproc)" faad=1 ffmpeg=0 localecompare=1 mad=1 modplug=1 wv=1 - script: - # NOTE(sblaisot): 2018-01-02 removing gdb wrapper on linux due to a bug in - # return code in order to avoid having a successful build when a test fail. - # https://bugs.launchpad.net/mixxx/+bug/1699689 - - ./mixxx-test --logLevel info - - - name: Ubuntu/gcc/CMake build - compiler: gcc - cache: ccache - # Ubuntu Bionic build prerequisites - # TODO for Ubuntu Focal: Replace "-DFAAD=ON" with "-DFFMPEG=ON" - env: CMAKEFLAGS_EXTRA="-DFAAD=ON -DKEYFINDER=ON -DLOCALECOMPARE=ON -DMAD=ON -DMODPLUG=ON -DWAVPACK=ON -DWARNINGS_FATAL=ON" - before_install: - - export CMAKE_BUILD_PARALLEL_LEVEL="$(nproc)" - - export CTEST_PARALLEL_LEVEL="$(nproc)" - - export PATH="$HOME/.local/bin:$PATH" - - pip install --user cmake - - cmake --version - - ccache -s - install: - - mkdir cmake_build - - cd cmake_build - - cmake -L $CMAKEFLAGS $CMAKEFLAGS_EXTRA .. - - cmake --build . - - cpack -G DEB - script: - # Run tests and benchmarks - - ctest --timeout 45 - - cmake --build . --target benchmark - - - name: OSX/clang/SCons build - os: osx - # The XCode version should match that on the build server! - osx_image: xcode9.4 - compiler: clang - cache: - directories: - - $HOME/Library/Caches/Homebrew - - /usr/local/Homebrew - addons: - homebrew: - update: true - packages: - - chromaprint - - flac - - lame - - libsndfile - - libogg - - libvorbis - - libshout - - libid3tag - - libmad - - lilv - - opusfile - - portaudio - - portmidi - - protobuf - - qt5 - - qtkeychain - - rubberband - - sound-touch - - taglib - # Workaround for bug in libopus's opus.h including - # instead of . - env: >- - CFLAGS="-isystem /usr/local/include/opus" - CXXFLAGS="-isystem /usr/local/include/opus" - before_install: - - brew install scons - - export QTDIR="$(find /usr/local/Cellar/qt -d 1 | tail -n 1)" - - echo "QTDIR=$QTDIR" - install: - # We are hardcoding 4 threads here since "$(sysctl -n hw.ncpu)" only - # returns 2 and makes the travis job run into a timeout: - # https://docs.travis-ci.com/user/reference/overview/#virtualization-environments - - scons -j4 coreaudio=1 - script: - # lldb doesn't provide an easy way to exit 1 on error: - # https://bugs.llvm.org/show_bug.cgi?id=27326 - - lldb ./mixxx-test --batch -o run -o quit -k 'thread backtrace all' -k "script import os; os._exit(1)" -- --logLevel info - before_cache: - # Avoid indefinite cache growth - - brew cleanup - # Cache only .git files under "/usr/local/Homebrew" so "brew update" - # does not take 5min every build - # Source: https://discourse.brew.sh/t/best-practice-for-homebrew-on-travis-brew-update-is-5min-to-build-time/5215/12 - - find /usr/local/Homebrew \! -regex ".+\.git.+" -delete - - - name: OSX/clang/CMake build - os: osx - # The XCode version should match that on the build server! - osx_image: xcode9.4 - compiler: clang - cache: - ccache: true - directories: - - $HOME/Library/Caches/Homebrew - - /usr/local/Homebrew - # Workaround for bug in libopus's opus.h including - # instead of . - # Virtual X (Xvfb) is needed for analyzer waveform tests - addons: - homebrew: - update: true - packages: - - ccache - env: >- - MIXXX_ENVPATH="${HOME}/buildenv" - CMAKEFLAGS_EXTRA="-DCOREAUDIO=ON -DHSS1394=ON" - PATH="/usr/local/opt/ccache/bin:$PATH" - CMAKE_BUILD_PARALLEL_LEVEL=4 - CTEST_PARALLEL_LEVEL=1 - before_install: - # Print some information about CMake and ccache - - cmake --version - - ccache -s - # Download and prepare our build environment - - mkdir "${MIXXX_ENVPATH}" - - read -r MIXXX_ENVNAME < build/osx/golden_environment - - curl "https://downloads.mixxx.org/builds/buildserver/2.3.x-macosx/${MIXXX_ENVNAME}.tar.gz" | tar xzf - --strip 1 -C "${MIXXX_ENVPATH}" - # FIXME: This fixes some wrong hardcoded paths inside pkg-config files of the build environment (e.g. in "lib/pkgconfig/taglib.pc") - # This will only work if neither MIXXX_ENVNAME nor MIXXX_ENVPATH contain special regex characters! - - find "${MIXXX_ENVPATH}" -name "*.pc" -or -path "*/bin/taglib-config" -exec sed -i".orig" -e "s|/Users/mixxx/bs-2.3-mac/amd64/environment/${MIXXX_ENVNAME}|${MIXXX_ENVPATH}|g" {} \; - - export QT_DIR="$(find "${MIXXX_ENVPATH}" -type d -path "*/cmake/Qt5")" - - export QT_QPA_PLATFORM_PLUGIN_PATH="$(find "${MIXXX_ENVPATH}" -type d -path "*/plugins")" - - | - if [ "$TRAVIS_REPO_SLUG" = "mixxxdj/mixxx" ] && [ "$TRAVIS_PULL_REQUEST" = "false" ]; then - # Create a temporary keychain for the certificate and import it. - openssl enc -aes-256-cbc -d -md sha512 -k ${MACOS_CODESIGN_OPENSSL_PASSWORD} -in ${MACOS_CODESIGN_CERTIFICATE}.enc -out ${MACOS_CODESIGN_CERTIFICATE}; - security create-keychain -p mixxx Mixxx.keychain; - security unlock-keychain -p mixxx Mixxx.keychain; - security import ${MACOS_CODESIGN_CERTIFICATE} -k Mixxx.keychain -P ${MACOS_CODESIGN_CERTIFICATE_PASSWORD} -T /usr/bin/codesign; - security set-key-partition-list -S apple-tool:,apple: -k mixxx Mixxx.keychain - # Add keychain to search list - security list-keychains -s Mixxx.keychain; - export APPLE_CODESIGN_IDENTITY=2C2B5D3EDCE82BA55E22E9A67F16F8D03E390870; - fi - - install: - - mkdir cmake_build - - cd cmake_build - - cmake -L $CMAKEFLAGS $CMAKEFLAGS_EXTRA -DMACOS_BUNDLE=ON -DCMAKE_PREFIX_PATH=${MIXXX_ENVPATH} -DQt5_DIR=${QT_DIR} -DAPPLE_CODESIGN_IDENTITY=${APPLE_CODESIGN_IDENTITY} .. - - cmake --build . - - cpack -G DragNDrop -V - # cpack codesigns the Mixxx.app inside the DMG package, but the DMG package also needs to be signed - - | - if ! [ -z $APPLE_CODESIGN_IDENTITY ]; then - codesign --verbose=4 --deep --force --options runtime --sign $APPLE_CODESIGN_IDENTITY --entitlements ../build/osx/entitlements.plist *.dmg; - fi - script: - # Run tests and benchmarks - - ctest --timeout 45 - - cmake --build . --target benchmark - before_cache: - # Cache only .git files under "/usr/local/Homebrew" so "brew update" - # does not take 5min every build - # Source: https://discourse.brew.sh/t/best-practice-for-homebrew-on-travis-brew-update-is-5min-to-build-time/5215/12 - - find /usr/local/Homebrew \! -regex ".+\.git.+" -delete - -git: - depth: 1 - -# Common Addons -addons: - apt: - sources: - - ubuntu-toolchain-r-test - packages: - - libavformat-dev - - libchromaprint-dev - - libebur128-dev - - libfaad-dev - - libfftw3-dev - - libflac-dev - - libid3tag0-dev - - liblilv-dev - - libmad0-dev - - libmodplug-dev - - libmp3lame-dev - - libmp4v2-dev - - libopus-dev - - libopusfile-dev - - libportmidi-dev - - libprotobuf-dev - - libqt5opengl5-dev - - libqt5sql5-sqlite - - libqt5svg5-dev - - libqt5x11extras5-dev - - librubberband-dev - - libshout3-dev - - libsndfile1-dev - - libsoundtouch-dev - - libsqlite3-dev - - libtag1-dev - - libupower-glib-dev - - libusb-1.0-0-dev - - libwavpack-dev - - portaudio19-dev - - protobuf-compiler - - qt5-default - - qtscript5-dev - - qt5keychain-dev - - -notifications: - webhooks: - - https://mixxx.zulipchat.com/api/v1/external/travis?stream=travis&topic=build-status&api_key=$ZULIP_API_KEY From 4d69a40aa876f679e65ad3d6425f05b1510396bb Mon Sep 17 00:00:00 2001 From: Daniel Poelzleithner Date: Tue, 1 Dec 2020 17:11:03 +0100 Subject: [PATCH 62/86] use QChar instead of StringLiteral --- src/library/trackset/baseplaylistfeature.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/library/trackset/baseplaylistfeature.cpp b/src/library/trackset/baseplaylistfeature.cpp index 01df3b7f64a1..e679d031549d 100644 --- a/src/library/trackset/baseplaylistfeature.cpp +++ b/src/library/trackset/baseplaylistfeature.cpp @@ -24,7 +24,7 @@ #include "widget/wlibrarytextbrowser.h" namespace { -auto kUnsafeFilenameReplacement = QLatin1String("-"); +constexpr QChar kUnsafeFilenameReplacement = '-'; } BasePlaylistFeature::BasePlaylistFeature( From b2184951baa46eb11d9292a2f73b8c58c3027728 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= Date: Tue, 1 Dec 2020 22:54:31 +0100 Subject: [PATCH 63/86] Fix CMake install of fonts --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5d817c726347..fe49e003c41f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1209,7 +1209,7 @@ install( install( DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/res/fonts" - "DESTINATION" + DESTINATION "${MIXXX_INSTALL_DATADIR}" ) From 935c2b0850d5a2c5db6255d847ff77336012354b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= Date: Wed, 2 Dec 2020 09:31:59 +0100 Subject: [PATCH 64/86] Remove redundant mixxx folder inside the doc dir --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5d817c726347..81a0335245b2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1033,7 +1033,7 @@ elseif (UNIX) include(GNUInstallDirs) set(MIXXX_INSTALL_BINDIR "${CMAKE_INSTALL_BINDIR}") set(MIXXX_INSTALL_DATADIR "${CMAKE_INSTALL_DATADIR}/mixxx") - set(MIXXX_INSTALL_DOCDIR "${CMAKE_INSTALL_DOCDIR}/mixxx") + set(MIXXX_INSTALL_DOCDIR "${CMAKE_INSTALL_DOCDIR}") set(MIXXX_INSTALL_LICENSEDIR "${CMAKE_INSTALL_DATADIR}/licenses/mixxx") endif() From d2dba5696cba796b89da460884cbef323e90ba5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= Date: Wed, 2 Dec 2020 09:53:05 +0100 Subject: [PATCH 65/86] move licenses to doc folder and use CMAKE_PROJECT_NAME macro --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 81a0335245b2..304f048c5a4a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1032,9 +1032,9 @@ if (APPLE AND MACOS_BUNDLE) elseif (UNIX) include(GNUInstallDirs) set(MIXXX_INSTALL_BINDIR "${CMAKE_INSTALL_BINDIR}") - set(MIXXX_INSTALL_DATADIR "${CMAKE_INSTALL_DATADIR}/mixxx") + set(MIXXX_INSTALL_DATADIR "${CMAKE_INSTALL_DATADIR}/${CMAKE_PROJECT_NAME}") set(MIXXX_INSTALL_DOCDIR "${CMAKE_INSTALL_DOCDIR}") - set(MIXXX_INSTALL_LICENSEDIR "${CMAKE_INSTALL_DATADIR}/licenses/mixxx") + set(MIXXX_INSTALL_LICENSEDIR "${CMAKE_INSTALL_DOCDIR}") endif() if(WIN32) From dbd820122c454720db86a3a58f3e1a8daa0d2f7f Mon Sep 17 00:00:00 2001 From: Daniel Poelzleithner Date: Wed, 2 Dec 2020 22:01:03 +0100 Subject: [PATCH 66/86] Add missing reset rating action --- src/widget/wtrackmenu.cpp | 27 +++++++++++++++++++++++++++ src/widget/wtrackmenu.h | 2 ++ 2 files changed, 29 insertions(+) diff --git a/src/widget/wtrackmenu.cpp b/src/widget/wtrackmenu.cpp index 4d59925d2fe7..0af17ffa1708 100644 --- a/src/widget/wtrackmenu.cpp +++ b/src/widget/wtrackmenu.cpp @@ -234,6 +234,9 @@ void WTrackMenu::createActions() { m_pClearPlayCountAction = new QAction(tr("Play Count"), m_pClearMetadataMenu); connect(m_pClearPlayCountAction, &QAction::triggered, this, &WTrackMenu::slotClearPlayCount); + m_pClearRatingAction = new QAction(tr("Rating"), m_pClearMetadataMenu); + connect(m_pClearRatingAction, &QAction::triggered, this, &WTrackMenu::slotClearRating); + m_pClearMainCueAction = new QAction(tr("Cue Point"), m_pClearMetadataMenu); connect(m_pClearMainCueAction, &QAction::triggered, this, &WTrackMenu::slotClearMainCue); @@ -407,6 +410,7 @@ void WTrackMenu::setupActions() { if (featureIsEnabled(Feature::Reset)) { m_pClearMetadataMenu->addAction(m_pClearBeatsAction); m_pClearMetadataMenu->addAction(m_pClearPlayCountAction); + m_pClearMetadataMenu->addAction(m_pClearRatingAction); // FIXME: Why is clearing the loop not working? m_pClearMetadataMenu->addAction(m_pClearMainCueAction); m_pClearMetadataMenu->addAction(m_pClearHotCuesAction); @@ -1279,6 +1283,29 @@ void WTrackMenu::slotClearBeats() { namespace { +class ClearRatingTrackPointerOperation : public mixxx::TrackPointerOperation { + private: + void doApply( + const TrackPointer& pTrack) const override { + pTrack->setRating(0); + } +}; + +} // anonymous namespace + +//slot for reset played count, sets count to 0 of one or more tracks +void WTrackMenu::slotClearRating() { + const auto progressLabelText = + tr("Clear rating of %n track(s)", "", getTrackCount()); + const auto trackOperator = + ClearRatingTrackPointerOperation(); + applyTrackPointerOperation( + progressLabelText, + &trackOperator); +} + +namespace { + class RemoveCuesOfTypeTrackPointerOperation : public mixxx::TrackPointerOperation { public: explicit RemoveCuesOfTypeTrackPointerOperation(mixxx::CueType cueType) diff --git a/src/widget/wtrackmenu.h b/src/widget/wtrackmenu.h index 703664a47427..059937b06f62 100644 --- a/src/widget/wtrackmenu.h +++ b/src/widget/wtrackmenu.h @@ -84,6 +84,7 @@ class WTrackMenu : public QMenu { // Reset void slotClearBeats(); void slotClearPlayCount(); + void slotClearRating(); void slotClearMainCue(); void slotClearHotCues(); void slotClearIntroCue(); @@ -246,6 +247,7 @@ class WTrackMenu : public QMenu { // Clear track metadata actions QAction* m_pClearBeatsAction{}; QAction* m_pClearPlayCountAction{}; + QAction* m_pClearRatingAction{}; QAction* m_pClearMainCueAction{}; QAction* m_pClearHotCuesAction{}; QAction* m_pClearIntroCueAction{}; From d8a47d4903b5e7af028284f6235a1e0ddac75cbf Mon Sep 17 00:00:00 2001 From: Daniel Poelzleithner Date: Wed, 2 Dec 2020 23:12:11 +0100 Subject: [PATCH 67/86] fix wording --- src/widget/wtrackmenu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widget/wtrackmenu.cpp b/src/widget/wtrackmenu.cpp index 0af17ffa1708..f4692728c4c8 100644 --- a/src/widget/wtrackmenu.cpp +++ b/src/widget/wtrackmenu.cpp @@ -1296,7 +1296,7 @@ class ClearRatingTrackPointerOperation : public mixxx::TrackPointerOperation { //slot for reset played count, sets count to 0 of one or more tracks void WTrackMenu::slotClearRating() { const auto progressLabelText = - tr("Clear rating of %n track(s)", "", getTrackCount()); + tr("Clearing rating of %n track(s)", "", getTrackCount()); const auto trackOperator = ClearRatingTrackPointerOperation(); applyTrackPointerOperation( From 7de86ab62b3cc83566745097e098059078106138 Mon Sep 17 00:00:00 2001 From: Be Date: Wed, 2 Dec 2020 17:57:23 -0600 Subject: [PATCH 68/86] DlgPrefWaveform: sync waveform zoom by default --- src/preferences/dialog/dlgprefwaveform.cpp | 3 +-- src/waveform/waveformwidgetfactory.cpp | 10 +++------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/preferences/dialog/dlgprefwaveform.cpp b/src/preferences/dialog/dlgprefwaveform.cpp index 75e376082db0..2c79c91f24c6 100644 --- a/src/preferences/dialog/dlgprefwaveform.cpp +++ b/src/preferences/dialog/dlgprefwaveform.cpp @@ -215,8 +215,7 @@ void DlgPrefWaveform::slotResetToDefaults() { // Default zoom level is 3 in WaveformWidgetFactory. defaultZoomComboBox->setCurrentIndex(3 + 1); - // Don't synchronize zoom by default. - synchronizeZoomCheckBox->setChecked(false); + synchronizeZoomCheckBox->setChecked(true); // RGB overview. waveformOverviewComboBox->setCurrentIndex(2); diff --git a/src/waveform/waveformwidgetfactory.cpp b/src/waveform/waveformwidgetfactory.cpp index 4d8a7062f377..17988e5856b8 100644 --- a/src/waveform/waveformwidgetfactory.cpp +++ b/src/waveform/waveformwidgetfactory.cpp @@ -105,7 +105,7 @@ WaveformWidgetFactory::WaveformWidgetFactory() m_frameRate(30), m_endOfTrackWarningTime(30), m_defaultZoom(WaveformWidgetRenderer::s_waveformDefaultZoom), - m_zoomSync(false), + m_zoomSync(true), m_overviewNormalized(false), m_openGlAvailable(false), m_openGlesAvailable(false), @@ -303,12 +303,8 @@ bool WaveformWidgetFactory::setConfig(UserSettingsPointer config) { m_config->set(ConfigKey("[Waveform]","DefaultZoom"), ConfigValue(m_defaultZoom)); } - int zoomSync = m_config->getValueString(ConfigKey("[Waveform]","ZoomSynchronization")).toInt(&ok); - if (ok) { - setZoomSync(static_cast(zoomSync)); - } else { - m_config->set(ConfigKey("[Waveform]","ZoomSynchronization"), ConfigValue(m_zoomSync)); - } + bool zoomSync = m_config->getValue(ConfigKey("[Waveform]", "ZoomSynchronization"), m_zoomSync); + setZoomSync(zoomSync); int beatGridAlpha = m_config->getValue(ConfigKey("[Waveform]", "beatGridAlpha"), m_beatGridAlpha); setDisplayBeatGridAlpha(beatGridAlpha); From cab9eb22d7a3ba244f38e4207959447f2906a0d9 Mon Sep 17 00:00:00 2001 From: Jan Holthuis Date: Thu, 3 Dec 2020 19:24:26 +0100 Subject: [PATCH 69/86] WNumberRate: Fix wrong calculation of display value --- src/widget/wnumberrate.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/widget/wnumberrate.cpp b/src/widget/wnumberrate.cpp index 116ca55297cc..a54f1bec9257 100644 --- a/src/widget/wnumberrate.cpp +++ b/src/widget/wnumberrate.cpp @@ -29,9 +29,11 @@ WNumberRate::WNumberRate(const char * group, QWidget * parent) } void WNumberRate::setValue(double dValue) { - double digitFactor = pow(10, m_iNoDigits); + const double rateRange = m_pRateRangeControl->get(); + const double rateDir = m_pRateDirControl->get(); + const double digitFactor = pow(10, m_iNoDigits); // Calculate percentage rounded to the number of digits specified by iNoDigits - double percentage = round((dValue - 1) * 100.0 * digitFactor) / digitFactor; + const double percentage = round(dValue * rateRange * rateDir * 100.0 * digitFactor) / digitFactor; QString sign(' '); if (percentage > 0) { From e61e96021fcb6de6c1f5339a10a6f5180f7ba88e Mon Sep 17 00:00:00 2001 From: Jan Holthuis Date: Thu, 3 Dec 2020 19:25:35 +0100 Subject: [PATCH 70/86] WNumberRate: Move sign logic into inline function in anon namespace --- src/widget/wnumberrate.cpp | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/src/widget/wnumberrate.cpp b/src/widget/wnumberrate.cpp index a54f1bec9257..dba4a6ced652 100644 --- a/src/widget/wnumberrate.cpp +++ b/src/widget/wnumberrate.cpp @@ -16,6 +16,19 @@ #include "control/controlproxy.h" #include "util/math.h" +namespace { + +inline QChar sign(double number) { + if (number > 0) { + return '+'; + } + if (number < 0) { + return '-'; + } + return ' '; +} +} + WNumberRate::WNumberRate(const char * group, QWidget * parent) : WNumber(parent) { m_pRateRangeControl = new ControlProxy(group, "rateRange", this); @@ -35,13 +48,5 @@ void WNumberRate::setValue(double dValue) { // Calculate percentage rounded to the number of digits specified by iNoDigits const double percentage = round(dValue * rateRange * rateDir * 100.0 * digitFactor) / digitFactor; - QString sign(' '); - if (percentage > 0) { - sign = '+'; - } - if (percentage < 0) { - sign = '-'; - } - - setText(m_skinText + sign + QString::number(fabs(percentage), 'f', m_iNoDigits)); + setText(m_skinText + sign(percentage) + QString::number(fabs(percentage), 'f', m_iNoDigits)); } From 679e8b467c33a982758dde920d14748b5d7ed7d0 Mon Sep 17 00:00:00 2001 From: Uwe Klotz Date: Fri, 4 Dec 2020 20:27:53 +0100 Subject: [PATCH 71/86] Use Qt platform plugin "offscreen" for tests --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1c1d51d1ce7f..303f47ab0acb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1425,6 +1425,12 @@ gtest_add_tests( WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" TEST_LIST testsuite ) +if (NOT WIN32) + # Default to offscreen rendering during tests. + # This is required if the build system like Fedora koji/mock does not + # allow to pass environment variables into the ctest macro expansion. + set_tests_properties(${testsuite} PROPERTIES ENVIRONMENT "QT_QPA_PLATFORM=offscreen") +endif() # Benchmarking add_custom_target(mixxx-benchmark From edc52841de58ad23c5e9d3833afdb65f5865b97e Mon Sep 17 00:00:00 2001 From: Daniel Poelzleithner Date: Sat, 5 Dec 2020 02:49:17 +0100 Subject: [PATCH 72/86] Apply reset rating on reset all operation as well --- src/widget/wtrackmenu.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/widget/wtrackmenu.cpp b/src/widget/wtrackmenu.cpp index f4692728c4c8..640982683ba5 100644 --- a/src/widget/wtrackmenu.cpp +++ b/src/widget/wtrackmenu.cpp @@ -1283,7 +1283,7 @@ void WTrackMenu::slotClearBeats() { namespace { -class ClearRatingTrackPointerOperation : public mixxx::TrackPointerOperation { +class ResetRatingTrackPointerOperation : public mixxx::TrackPointerOperation { private: void doApply( const TrackPointer& pTrack) const override { @@ -1298,7 +1298,7 @@ void WTrackMenu::slotClearRating() { const auto progressLabelText = tr("Clearing rating of %n track(s)", "", getTrackCount()); const auto trackOperator = - ClearRatingTrackPointerOperation(); + ResetRatingTrackPointerOperation(); applyTrackPointerOperation( progressLabelText, &trackOperator); @@ -1474,6 +1474,7 @@ class ClearAllPerformanceMetadataTrackPointerOperation : public mixxx::TrackPoin m_resetKeys.apply(pTrack); m_resetReplayGain.apply(pTrack); m_resetWaveform.apply(pTrack); + m_resetRating.apply(pTrack); } const ResetBeatsTrackPointerOperation m_resetBeats; @@ -1486,6 +1487,7 @@ class ClearAllPerformanceMetadataTrackPointerOperation : public mixxx::TrackPoin const ResetKeysTrackPointerOperation m_resetKeys; const ResetReplayGainTrackPointerOperation m_resetReplayGain; const ResetWaveformTrackPointerOperation m_resetWaveform; + const ResetRatingTrackPointerOperation m_resetRating; }; } // anonymous namespace From 9a555c600267e63eec6da1c24606149bf92bb164 Mon Sep 17 00:00:00 2001 From: Be Date: Sat, 5 Dec 2020 00:45:22 -0600 Subject: [PATCH 73/86] Sandbox: remove deprecated API for no longer supported macOS version --- src/util/sandbox.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/util/sandbox.cpp b/src/util/sandbox.cpp index 2dc305cacb4f..842bd47853d2 100644 --- a/src/util/sandbox.cpp +++ b/src/util/sandbox.cpp @@ -32,12 +32,9 @@ void Sandbox::initialize(const QString& permissionsFile) { #ifdef Q_OS_MAC #if __MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7 - // If we are running on at least 10.7.0 and have the com.apple.security.app-sandbox - // entitlement, we are in a sandbox - SInt32 version = 0; - Gestalt(gestaltSystemVersion, &version); +#ifdef __APPLE__ SecCodeRef secCodeSelf; - if (version >= 0x1070 && SecCodeCopySelf(kSecCSDefaultFlags, &secCodeSelf) == errSecSuccess) { + if (SecCodeCopySelf(kSecCSDefaultFlags, &secCodeSelf) == errSecSuccess) { SecRequirementRef sandboxReq; CFStringRef entitlement = CFSTR("entitlement [\"com.apple.security.app-sandbox\"]"); if (SecRequirementCreateWithString(entitlement, kSecCSDefaultFlags, From 7c385057c66f88b2e82ed9379370cdfa035df5a3 Mon Sep 17 00:00:00 2001 From: Be Date: Sat, 5 Dec 2020 00:45:38 -0600 Subject: [PATCH 74/86] Sandbox: cleanup #ifdefs --- src/util/sandbox.cpp | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/src/util/sandbox.cpp b/src/util/sandbox.cpp index 842bd47853d2..e229a927faf3 100644 --- a/src/util/sandbox.cpp +++ b/src/util/sandbox.cpp @@ -30,8 +30,6 @@ void Sandbox::initialize(const QString& permissionsFile) { s_pSandboxPermissions = QSharedPointer>( new ConfigObject(permissionsFile)); -#ifdef Q_OS_MAC -#if __MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7 #ifdef __APPLE__ SecCodeRef secCodeSelf; if (SecCodeCopySelf(kSecCSDefaultFlags, &secCodeSelf) == errSecSuccess) { @@ -48,7 +46,6 @@ void Sandbox::initialize(const QString& permissionsFile) { CFRelease(secCodeSelf); } #endif -#endif } // static @@ -153,8 +150,7 @@ bool Sandbox::createSecurityToken(const QString& canonicalPath, return false; } -#ifdef Q_OS_MAC -#if __MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7 +#ifdef __APPLE__ CFURLRef url = CFURLCreateWithFileSystemPath( kCFAllocatorDefault, QStringToCFString(canonicalPath), kCFURLPOSIXPathStyle, isDirectory); @@ -188,7 +184,6 @@ bool Sandbox::createSecurityToken(const QString& canonicalPath, qDebug() << "Failed to create security-scoped bookmark URL for" << canonicalPath; } } -#endif #endif return false; } @@ -319,8 +314,7 @@ SecurityTokenPointer Sandbox::openSecurityToken(const QDir& dir, bool create) { SecurityTokenPointer Sandbox::openTokenFromBookmark(const QString& canonicalPath, const QString& bookmarkBase64) { -#ifdef Q_OS_MAC -#if __MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7 +#ifdef __APPLE__ QByteArray bookmarkBA = QByteArray::fromBase64(bookmarkBase64.toLatin1()); if (!bookmarkBA.isEmpty()) { CFDataRef bookmarkData = CFDataCreate( @@ -357,7 +351,6 @@ SecurityTokenPointer Sandbox::openTokenFromBookmark(const QString& canonicalPath } } } -#endif #else Q_UNUSED(canonicalPath); Q_UNUSED(bookmarkBase64); @@ -366,7 +359,7 @@ SecurityTokenPointer Sandbox::openTokenFromBookmark(const QString& canonicalPath return SecurityTokenPointer(); } -#ifdef Q_OS_MAC +#ifdef __APPLE__ SandboxSecurityToken::SandboxSecurityToken(const QString& path, CFURLRef url) : m_path(path), m_url(url) { @@ -379,16 +372,14 @@ SandboxSecurityToken::SandboxSecurityToken(const QString& path, CFURLRef url) #endif SandboxSecurityToken::~SandboxSecurityToken() { -#ifdef Q_OS_MAC +#ifdef __APPLE__ if (sDebug) { qDebug() << "~SandboxSecurityToken" << m_path; } -#if __MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7 if (m_url) { CFURLStopAccessingSecurityScopedResource(m_url); CFRelease(m_url); m_url = 0; } #endif -#endif } From ea2c78c5b30fef59d83aa7cb49927cb554eca569 Mon Sep 17 00:00:00 2001 From: Daniel Poelzleithner Date: Sun, 6 Dec 2020 00:53:12 +0100 Subject: [PATCH 75/86] Add track.resetRating() and use it in reset menu --- src/track/track.h | 4 ++++ src/widget/wtrackmenu.cpp | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/track/track.h b/src/track/track.h index 7e58b3953714..84da9037eee7 100644 --- a/src/track/track.h +++ b/src/track/track.h @@ -214,6 +214,10 @@ class Track : public QObject { int getRating() const; // Sets rating void setRating(int); + /// Resets the rating + void resetRating() { + setRating(mixxx::TrackRecord::kNoRating); + } // Get URL for track QString getURL() const; diff --git a/src/widget/wtrackmenu.cpp b/src/widget/wtrackmenu.cpp index 640982683ba5..605e46b2ae91 100644 --- a/src/widget/wtrackmenu.cpp +++ b/src/widget/wtrackmenu.cpp @@ -1287,7 +1287,7 @@ class ResetRatingTrackPointerOperation : public mixxx::TrackPointerOperation { private: void doApply( const TrackPointer& pTrack) const override { - pTrack->setRating(0); + pTrack->resetRating(); } }; From b66dd0195157908691a649ec4403403fe8f0319a Mon Sep 17 00:00:00 2001 From: Be Date: Sat, 5 Dec 2020 02:14:11 -0600 Subject: [PATCH 76/86] migrate old settings path into sandbox on macOS --- src/main.cpp | 9 ----- src/mixxx.cpp | 18 ++++++++++ src/util/sandbox.cpp | 86 ++++++++++++++++++++++++++++++++++++++++++++ src/util/sandbox.h | 2 ++ 4 files changed, 106 insertions(+), 9 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 0e3bf3d62e8f..9828c58462e3 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -101,17 +101,8 @@ int main(int argc, char * argv[]) { // the main thread. Bug #1748636. ErrorDialogHandler::instance(); - mixxx::Logging::initialize(args.getSettingsPath(), - args.getLogLevel(), - args.getLogFlushLevel(), - args.getDebugAssertBreak()); - MixxxApplication app(argc, argv); - VERIFY_OR_DEBUG_ASSERT(SoundSourceProxy::registerProviders()) { - qCritical() << "Failed to register any SoundSource providers"; - return kFatalErrorOnStartupExitCode; - } #ifdef __APPLE__ QDir dir(QApplication::applicationDirPath()); diff --git a/src/mixxx.cpp b/src/mixxx.cpp index 3f3a4bfa07a7..6166b9579719 100644 --- a/src/mixxx.cpp +++ b/src/mixxx.cpp @@ -168,6 +168,24 @@ MixxxMainWindow::MixxxMainWindow(QApplication* pApp, const CmdlineArgs& args) m_runtime_timer.start(); mixxx::Time::start(); + QString settingsPath = args.getSettingsPath(); +#ifdef __APPLE__ + if (!args.getSettingsPathSet()) { + settingsPath = Sandbox::migrateOldSettings(); + } +#endif + + mixxx::Logging::initialize( + settingsPath, + args.getLogLevel(), + args.getLogFlushLevel(), + args.getDebugAssertBreak()); + + VERIFY_OR_DEBUG_ASSERT(SoundSourceProxy::registerProviders()) { + qCritical() << "Failed to register any SoundSource providers"; + return; + } + Version::logBuildDetails(); // Only record stats in developer mode. diff --git a/src/util/sandbox.cpp b/src/util/sandbox.cpp index e229a927faf3..d9424114b09c 100644 --- a/src/util/sandbox.cpp +++ b/src/util/sandbox.cpp @@ -359,6 +359,92 @@ SecurityTokenPointer Sandbox::openTokenFromBookmark(const QString& canonicalPath return SecurityTokenPointer(); } +QString Sandbox::migrateOldSettings() { + // QStandardPaths::DataLocation returns a different location depending on whether the build + // is signed (and therefore sandboxed with the hardened runtime), so use the absolute path + // that the sandbox uses regardless of whether this build is actually sandboxed. + // Otherwise, developers would need to run with --settingsPath every time or symlink + // to use the same settings directory with signed and unsigned builds. + + // QDir::homePath returns a path inside the sandbox. + QString homePath = QLatin1String("/Users/") + qgetenv("USER"); + + QString sandboxedPath = homePath + + QLatin1String( + "/Library/Containers/org.mixxx.mixxx/Data/Library/Application Support/Mixxx"); + QDir sandboxedSettings(sandboxedPath); + + if (sandboxedSettings.exists() && !sandboxedSettings.isEmpty()) { + return sandboxedPath; + } + + // Because Mixxx cannot test if the old path exists before getting permission to access it + // outside the sandbox, unfortunately it is necessary to annoy the user with this popup + // even if they are installing Mixxx >= 2.3.0 without having installed an old version of Mixxx. + QString title = QObject::tr("Upgrading old Mixxx settings"); + QString oldPath = homePath + QLatin1String("/Library/Application Support/Mixxx"); + QMessageBox::information(nullptr, + title, + QObject::tr( + "Due to Mac sandboxing, Mixxx needs your permission to " + "access your music library " + "and settings from Mixxx versions before 2.3.0. After " + "clicking OK, you will see a file picker. " + "To give Mixxx permission, press the Ok button in the file " + "picker." + "\n\n" + "If you do not want to grant Mixxx access click Cancel on " + "the file picker.")); + QString result = QFileDialog::getExistingDirectory( + nullptr, + title, + oldPath); + if (result != oldPath) { + qInfo() << "Sandbox::migrateOldSettings: User declined to migrate " + "old settings from" + << oldPath << "User selected" << result; + return sandboxedPath; + } + + // Sandbox::askForAccess cannot be used here because it depends on settings being + // initialized. There is no need to store the bookmark anyway because this is a + // one time process. +#ifdef __APPLE__ + CFURLRef url = CFURLCreateWithFileSystemPath( + kCFAllocatorDefault, QStringToCFString(oldPath), kCFURLPOSIXPathStyle, true); + if (url) { + CFErrorRef error = NULL; + CFDataRef bookmark = CFURLCreateBookmarkData( + kCFAllocatorDefault, + url, + kCFURLBookmarkCreationWithSecurityScope, + nil, + nil, + &error); + CFRelease(url); + if (bookmark) { + QFile oldSettings(oldPath); + if (oldSettings.rename(sandboxedPath)) { + qInfo() << "Sandbox::migrateOldSettings: Successfully " + "migrated old settings from" + << oldPath << "to new path" << sandboxedPath; + } else { + qWarning() << "Sandbox::migrateOldSettings: Failed to migrate " + "old settings from" + << oldPath << "to new path" << sandboxedPath; + } + } else { + qWarning() << "Sandbox::migrateOldSettings: Failed to access old " + "settings path" + << oldPath << "Cannot migrate to new path" + << sandboxedPath; + } + CFRelease(bookmark); + } +#endif + return sandboxedPath; +} + #ifdef __APPLE__ SandboxSecurityToken::SandboxSecurityToken(const QString& path, CFURLRef url) : m_path(path), diff --git a/src/util/sandbox.h b/src/util/sandbox.h index 404a093bed9d..4076a44c1ea4 100644 --- a/src/util/sandbox.h +++ b/src/util/sandbox.h @@ -32,6 +32,8 @@ class Sandbox { static void initialize(const QString& permissionsFile); static void shutdown(); + static QString migrateOldSettings(); + // Returns true if we are in a sandbox. static bool enabled() { return s_bInSandbox; From e77124c39828cbc120f6bf566db084869a04b42d Mon Sep 17 00:00:00 2001 From: Daniel Poelzleithner Date: Mon, 7 Dec 2020 12:10:56 +0100 Subject: [PATCH 77/86] Slimdown moc_compilation.cpp The moc_compilation file became unbearable large, easily taking 10 minutes to compile whenever a Q_OBJECT changes. AUTOMOC scans for _moc.cpp includes and does not add the file to the moc_compilation whenever it is included in the propper cpp file. After this patch, moc_compilation.cpp is empty and the mocs are compiled with the approptial cpp, increasing recompile speeds by a factor of 10 when just a header file changed. --- src/analyzer/analyzerthread.cpp | 1 + src/analyzer/trackanalysisscheduler.cpp | 3 +- src/broadcast/broadcastmanager.cpp | 4 +- src/control/control.cpp | 1 + src/control/controlaudiotaperpot.cpp | 2 + src/control/controleffectknob.cpp | 3 +- src/control/controlencoder.cpp | 2 + src/control/controlindicator.cpp | 2 + src/control/controllinpotmeter.cpp | 2 + src/control/controllogpotmeter.cpp | 2 + src/control/controlmodel.cpp | 2 + src/control/controlobject.cpp | 8 ++-- src/control/controlobjectscript.cpp | 4 +- src/control/controlpotmeter.cpp | 4 +- src/control/controlproxy.cpp | 4 +- src/control/controlpushbutton.cpp | 2 + src/control/controlttrotary.cpp | 2 + src/controllers/bulk/bulkcontroller.cpp | 8 ++-- src/controllers/colormapperjsproxy.cpp | 4 +- src/controllers/controller.cpp | 4 +- src/controllers/controllerengine.cpp | 8 ++-- src/controllers/controllerenumerator.cpp | 2 + .../controllerinputmappingtablemodel.cpp | 8 ++-- .../controllerlearningeventfilter.cpp | 10 +++-- src/controllers/controllermanager.cpp | 11 ++--- .../controllermappingtablemodel.cpp | 2 + .../controlleroutputmappingtablemodel.cpp | 7 ++-- src/controllers/controlpickermenu.cpp | 1 + src/controllers/delegates/controldelegate.cpp | 6 ++- .../delegates/midioptionsdelegate.cpp | 6 ++- src/controllers/dlgcontrollerlearning.cpp | 4 +- src/controllers/dlgprefcontroller.cpp | 1 + src/controllers/dlgprefcontrollers.cpp | 1 + src/controllers/hid/hidcontroller.cpp | 1 + .../keyboard/keyboardeventfilter.cpp | 8 ++-- src/controllers/midi/hss1394controller.cpp | 4 +- src/controllers/midi/hss1394enumerator.cpp | 4 +- src/controllers/midi/midicontroller.cpp | 7 ++-- src/controllers/midi/midienumerator.cpp | 2 + src/controllers/midi/midioutputhandler.cpp | 8 ++-- src/controllers/midi/portmidicontroller.cpp | 4 +- src/controllers/midi/portmidienumerator.cpp | 6 ++- src/database/mixxxdb.cpp | 3 +- src/dialog/dlgabout.cpp | 5 ++- src/dialog/dlgdevelopertools.cpp | 3 +- src/dialog/dlgreplacecuecolor.cpp | 1 + src/effects/builtin/builtinbackend.cpp | 18 ++++---- src/effects/effect.cpp | 6 ++- src/effects/effectbuttonparameterslot.cpp | 6 ++- src/effects/effectchain.cpp | 5 ++- src/effects/effectchainmanager.cpp | 10 +++-- src/effects/effectchainslot.cpp | 9 ++-- src/effects/effectparameter.cpp | 6 ++- src/effects/effectparameterslot.cpp | 6 ++- src/effects/effectparameterslotbase.cpp | 4 +- src/effects/effectrack.cpp | 4 +- src/effects/effectsbackend.cpp | 4 +- src/effects/effectslot.cpp | 5 ++- src/effects/effectsmanager.cpp | 6 +-- src/effects/lv2/lv2backend.cpp | 2 + .../bufferscalers/enginebufferscale.cpp | 1 + .../enginebufferscalerubberband.cpp | 1 + .../bufferscalers/enginebufferscalest.cpp | 2 + src/engine/cachingreader/cachingreader.cpp | 11 ++--- .../cachingreader/cachingreaderworker.cpp | 1 + src/engine/channels/engineaux.cpp | 3 +- src/engine/channels/enginechannel.cpp | 1 + src/engine/channels/enginedeck.cpp | 1 + src/engine/channels/enginemicrophone.cpp | 3 +- src/engine/controls/bpmcontrol.cpp | 1 + src/engine/controls/clockcontrol.cpp | 1 + src/engine/controls/cuecontrol.cpp | 1 + src/engine/controls/enginecontrol.cpp | 4 +- src/engine/controls/keycontrol.cpp | 1 + src/engine/controls/loopingcontrol.cpp | 6 ++- src/engine/controls/quantizecontrol.cpp | 1 + src/engine/controls/ratecontrol.cpp | 19 +++++---- src/engine/controls/vinylcontrolcontrol.cpp | 1 + src/engine/enginebuffer.cpp | 1 + src/engine/enginedelay.cpp | 3 +- src/engine/enginemaster.cpp | 11 +++-- src/engine/engineobject.cpp | 5 +-- src/engine/enginetalkoverducking.cpp | 4 +- src/engine/enginetalkoverducking.h | 2 + src/engine/enginevumeter.cpp | 3 +- src/engine/engineworker.cpp | 2 + src/engine/engineworkerscheduler.cpp | 4 +- src/engine/filters/enginefilter.cpp | 2 + src/engine/filters/enginefilterbessel4.cpp | 2 + src/engine/filters/enginefilterbessel8.cpp | 2 + src/engine/filters/enginefilterbiquad1.cpp | 5 ++- .../filters/enginefilterbutterworth4.cpp | 2 + .../filters/enginefilterbutterworth8.cpp | 2 + .../filters/enginefilterlinkwitzriley2.cpp | 2 + .../filters/enginefilterlinkwitzriley4.cpp | 2 + .../filters/enginefilterlinkwitzriley8.cpp | 2 + .../filters/enginefiltermoogladder4.cpp | 3 +- src/engine/sidechain/enginerecord.cpp | 1 + src/engine/sidechain/enginesidechain.cpp | 5 ++- src/engine/sidechain/shoutconnection.cpp | 4 +- src/engine/sync/internalclock.cpp | 1 + src/engine/sync/synccontrol.cpp | 1 + src/errordialoghandler.cpp | 4 +- src/library/analysisfeature.cpp | 14 +++---- src/library/analysislibrarytablemodel.cpp | 2 + src/library/autodj/autodjfeature.cpp | 1 + src/library/autodj/autodjprocessor.cpp | 1 + src/library/autodj/dlgautodj.cpp | 1 + src/library/banshee/bansheefeature.cpp | 1 + src/library/banshee/bansheeplaylistmodel.cpp | 1 + src/library/baseexternallibraryfeature.cpp | 3 +- src/library/baseexternalplaylistmodel.cpp | 1 + src/library/baseexternaltrackmodel.cpp | 1 + src/library/baseplaylistfeature.cpp | 1 + src/library/basesqltablemodel.cpp | 1 + src/library/basetrackcache.cpp | 1 + src/library/basetracksetfeature.cpp | 2 + src/library/basetracktablemodel.cpp | 1 + src/library/bpmdelegate.cpp | 12 +++--- src/library/browse/browsefeature.cpp | 6 ++- src/library/browse/browsetablemodel.cpp | 1 + src/library/browse/browsethread.cpp | 3 ++ src/library/browse/foldertreemodel.cpp | 5 ++- src/library/colordelegate.cpp | 1 + src/library/columncache.cpp | 6 +-- src/library/coverartcache.cpp | 1 + src/library/coverartdelegate.cpp | 1 + src/library/crate/cratefeature.cpp | 1 + src/library/crate/cratefeaturehelper.cpp | 2 +- src/library/crate/cratetablemodel.cpp | 1 + src/library/dao/autodjcratesdao.cpp | 2 + src/library/dao/playlistdao.cpp | 2 + src/library/dao/trackdao.cpp | 1 + src/library/dlganalysis.cpp | 14 ++++--- src/library/dlgcoverartfullsize.cpp | 1 + src/library/dlghidden.cpp | 3 +- src/library/dlgmissing.cpp | 3 +- src/library/dlgtagfetcher.cpp | 1 + src/library/dlgtrackinfo.cpp | 1 + src/library/dlgtrackmetadataexport.cpp | 1 + src/library/export/trackexportdlg.cpp | 3 +- src/library/export/trackexportwizard.cpp | 3 +- src/library/export/trackexportworker.cpp | 1 + src/library/externaltrackcollection.cpp | 1 + src/library/hiddentablemodel.cpp | 4 +- src/library/itunes/itunesfeature.cpp | 23 ++++++----- src/library/library.cpp | 41 ++++++++----------- src/library/librarycontrol.cpp | 5 ++- src/library/libraryfeature.cpp | 5 ++- src/library/librarytablemodel.cpp | 4 +- src/library/locationdelegate.cpp | 1 + src/library/missingtablemodel.cpp | 3 +- src/library/mixxxlibraryfeature.cpp | 1 + src/library/parsercsv.cpp | 6 ++- src/library/parserm3u.cpp | 6 ++- src/library/parserpls.cpp | 6 ++- src/library/playlistfeature.cpp | 1 + src/library/playlisttablemodel.cpp | 2 +- src/library/previewbuttondelegate.cpp | 1 + src/library/recording/dlgrecording.cpp | 1 + src/library/recording/recordingfeature.cpp | 12 +++--- src/library/rekordbox/rekordboxfeature.cpp | 1 + src/library/rhythmbox/rhythmboxfeature.cpp | 11 ++--- src/library/scanner/importfilestask.cpp | 1 + src/library/scanner/libraryscanner.cpp | 1 + src/library/scanner/libraryscannerdlg.cpp | 4 +- .../scanner/recursivescandirectorytask.cpp | 7 ++-- src/library/scanner/scannertask.cpp | 2 + src/library/serato/seratofeature.cpp | 1 + src/library/setlogfeature.cpp | 1 + src/library/sidebarmodel.cpp | 10 +++-- src/library/songdownloader.cpp | 1 + src/library/stardelegate.cpp | 1 + src/library/stareditor.cpp | 4 +- src/library/tableitemdelegate.cpp | 1 + src/library/trackcollection.cpp | 5 ++- src/library/trackcollectionmanager.cpp | 1 + src/library/trackloader.cpp | 3 +- src/library/trackprocessing.cpp | 1 + src/library/traktor/traktorfeature.cpp | 13 +++--- src/library/treeitemmodel.cpp | 1 + src/mixer/auxiliary.cpp | 3 +- src/mixer/baseplayer.cpp | 2 + src/mixer/basetrackplayer.cpp | 1 + src/mixer/deck.cpp | 2 + src/mixer/microphone.cpp | 3 +- src/mixer/playerinfo.cpp | 1 + src/mixer/playermanager.cpp | 1 + src/mixer/previewdeck.cpp | 2 + src/mixer/sampler.cpp | 1 + src/mixer/samplerbank.cpp | 1 + src/mixxx.cpp | 1 + src/mixxxapplication.cpp | 9 ++-- src/musicbrainz/chromaprinter.cpp | 1 + src/musicbrainz/tagfetcher.cpp | 1 + src/musicbrainz/web/acoustidlookuptask.cpp | 1 + .../web/musicbrainzrecordingstask.cpp | 1 + src/network/jsonwebtask.cpp | 2 + src/network/webtask.cpp | 1 + src/preferences/broadcastprofile.cpp | 10 ++--- src/preferences/broadcastsettings.cpp | 8 ++-- src/preferences/broadcastsettingsmodel.cpp | 4 +- src/preferences/colorpaletteeditor.cpp | 1 + src/preferences/colorpaletteeditormodel.cpp | 2 + src/preferences/dialog/dlgprefautodj.cpp | 2 + src/preferences/dialog/dlgprefbeats.cpp | 1 + src/preferences/dialog/dlgprefbroadcast.cpp | 5 ++- src/preferences/dialog/dlgprefcolors.cpp | 1 + src/preferences/dialog/dlgprefcrossfader.cpp | 4 +- src/preferences/dialog/dlgprefdeck.cpp | 10 +++-- src/preferences/dialog/dlgprefeffects.cpp | 3 +- src/preferences/dialog/dlgprefeq.cpp | 1 + src/preferences/dialog/dlgpreferences.cpp | 15 +++---- src/preferences/dialog/dlgprefinterface.cpp | 1 + src/preferences/dialog/dlgprefkey.cpp | 1 + src/preferences/dialog/dlgpreflibrary.cpp | 12 +++--- src/preferences/dialog/dlgpreflv2.cpp | 14 ++++--- src/preferences/dialog/dlgprefmodplug.cpp | 5 ++- src/preferences/dialog/dlgprefnovinyl.cpp | 4 +- src/preferences/dialog/dlgprefrecord.cpp | 8 ++-- src/preferences/dialog/dlgprefreplaygain.cpp | 1 + src/preferences/dialog/dlgprefsound.cpp | 11 +++-- src/preferences/dialog/dlgprefsounditem.cpp | 4 +- src/preferences/dialog/dlgprefvinyl.cpp | 9 ++-- src/preferences/dialog/dlgprefwaveform.cpp | 9 ++-- src/preferences/dlgpreferencepage.cpp | 1 + src/preferences/effectsettingsmodel.cpp | 3 +- src/recording/recordingmanager.cpp | 11 ++--- src/skin/launchimage.cpp | 3 +- src/skin/legacyskinparser.cpp | 1 + src/skin/tooltips.cpp | 2 + src/soundio/sounddevicenetwork.cpp | 11 ++--- src/soundio/soundmanager.cpp | 9 ++-- src/test/trackexport_test.cpp | 1 + src/track/beats.cpp | 2 + src/track/cue.cpp | 1 + src/track/globaltrackcache.cpp | 1 + src/track/track.cpp | 1 + src/util/battery/battery.cpp | 2 + src/util/sleepableqthread.cpp | 1 + src/util/sleepableqthread.h | 1 + src/util/statmodel.cpp | 4 +- src/util/statsmanager.cpp | 10 +++-- src/util/tapfilter.cpp | 2 + src/util/task.cpp | 4 +- src/util/taskmonitor.cpp | 1 + src/util/timer.cpp | 1 + src/util/widgetrendertimer.cpp | 1 + src/util/workerthread.cpp | 1 + src/vinylcontrol/vinylcontrolmanager.cpp | 1 + src/vinylcontrol/vinylcontrolprocessor.cpp | 5 ++- src/vinylcontrol/vinylcontrolsignalwidget.cpp | 2 + .../renderers/glslwaveformrenderersignal.cpp | 2 + src/waveform/renderers/waveformrendermark.cpp | 9 ++-- src/waveform/visualplayposition.cpp | 3 +- src/waveform/vsyncthread.cpp | 9 ++-- src/waveform/waveformwidgetfactory.cpp | 1 + src/waveform/widgets/emptywaveformwidget.cpp | 7 ++-- src/waveform/widgets/glrgbwaveformwidget.cpp | 14 +++---- .../widgets/glsimplewaveformwidget.cpp | 14 +++---- src/waveform/widgets/glslwaveformwidget.cpp | 12 +++--- src/waveform/widgets/glvsynctestwidget.cpp | 16 ++++---- src/waveform/widgets/glwaveformwidget.cpp | 18 ++++---- src/waveform/widgets/hsvwaveformwidget.cpp | 11 ++--- src/waveform/widgets/qthsvwaveformwidget.cpp | 17 ++++---- src/waveform/widgets/qtrgbwaveformwidget.cpp | 17 ++++---- .../widgets/qtsimplewaveformwidget.cpp | 14 +++---- src/waveform/widgets/qtvsynctestwidget.cpp | 20 ++++----- src/waveform/widgets/qtwaveformwidget.cpp | 18 ++++---- src/waveform/widgets/rgbwaveformwidget.cpp | 11 ++--- .../widgets/softwarewaveformwidget.cpp | 11 ++--- src/widget/controlwidgetconnection.cpp | 8 ++-- src/widget/hexspinbox.cpp | 2 + src/widget/wbattery.cpp | 4 +- src/widget/wbeatspinbox.cpp | 5 ++- src/widget/wcolorpicker.cpp | 1 + src/widget/wcolorpickeraction.cpp | 2 + src/widget/wcombobox.cpp | 6 ++- src/widget/wcoverart.cpp | 1 + src/widget/wcoverartlabel.cpp | 1 + src/widget/wcoverartmenu.cpp | 4 +- src/widget/wcuemenupopup.cpp | 1 + src/widget/wdisplay.cpp | 7 ++-- src/widget/weffect.cpp | 5 ++- src/widget/weffectbuttonparameter.cpp | 4 +- src/widget/weffectchain.cpp | 4 +- src/widget/weffectparameter.cpp | 4 +- src/widget/weffectparameterbase.cpp | 4 +- src/widget/weffectparameterknob.cpp | 4 +- src/widget/weffectparameterknobcomposed.cpp | 5 ++- src/widget/weffectpushbutton.cpp | 1 + src/widget/weffectselector.cpp | 5 ++- src/widget/whotcuebutton.cpp | 1 + src/widget/wkey.cpp | 2 + src/widget/wknob.cpp | 6 ++- src/widget/wknobcomposed.cpp | 6 ++- src/widget/wlabel.cpp | 1 + src/widget/wlibrary.cpp | 10 +++-- src/widget/wlibrarysidebar.cpp | 3 +- src/widget/wlibrarytableview.cpp | 1 + src/widget/wlibrarytextbrowser.cpp | 2 + src/widget/wmainmenubar.cpp | 1 + src/widget/wnumber.cpp | 2 + src/widget/wnumberdb.cpp | 3 +- src/widget/wnumberpos.cpp | 4 +- src/widget/wnumberrate.cpp | 1 + src/widget/woverview.cpp | 1 + src/widget/wpushbutton.cpp | 13 +++--- src/widget/wrecordingduration.cpp | 2 + src/widget/wsearchlineedit.cpp | 10 ++--- src/widget/wsingletoncontainer.cpp | 4 +- src/widget/wsizeawarestack.cpp | 8 ++-- src/widget/wslidercomposed.cpp | 11 ++--- src/widget/wspinny.cpp | 1 + src/widget/wsplitter.cpp | 4 +- src/widget/wstarrating.cpp | 1 + src/widget/wstatuslight.cpp | 6 ++- src/widget/wtime.cpp | 8 ++-- src/widget/wtrackmenu.cpp | 1 + src/widget/wtrackproperty.cpp | 1 + src/widget/wtracktableview.cpp | 1 + src/widget/wtracktableviewheader.cpp | 4 +- src/widget/wtracktext.cpp | 1 + src/widget/wtrackwidgetgroup.cpp | 1 + src/widget/wvumeter.cpp | 9 ++-- src/widget/wwaveformviewer.cpp | 1 + src/widget/wwidget.cpp | 6 ++- src/widget/wwidgetgroup.cpp | 5 ++- src/widget/wwidgetstack.cpp | 6 ++- 329 files changed, 924 insertions(+), 502 deletions(-) diff --git a/src/analyzer/analyzerthread.cpp b/src/analyzer/analyzerthread.cpp index b561529e66a6..2402ab273491 100644 --- a/src/analyzer/analyzerthread.cpp +++ b/src/analyzer/analyzerthread.cpp @@ -11,6 +11,7 @@ #include "analyzer/constants.h" #include "engine/engine.h" #include "library/dao/analysisdao.h" +#include "moc_analyzerthread.cpp" #include "sources/audiosourcestereoproxy.h" #include "sources/soundsourceproxy.h" #include "track/track.h" diff --git a/src/analyzer/trackanalysisscheduler.cpp b/src/analyzer/trackanalysisscheduler.cpp index 876b6e496397..f4c639a89d18 100644 --- a/src/analyzer/trackanalysisscheduler.cpp +++ b/src/analyzer/trackanalysisscheduler.cpp @@ -2,10 +2,9 @@ #include "library/library.h" #include "library/trackcollection.h" - +#include "moc_trackanalysisscheduler.cpp" #include "util/logger.h" - namespace { mixxx::Logger kLogger("TrackAnalysisScheduler"); diff --git a/src/broadcast/broadcastmanager.cpp b/src/broadcast/broadcastmanager.cpp index 0831d806cf6c..18a9801b8efc 100644 --- a/src/broadcast/broadcastmanager.cpp +++ b/src/broadcast/broadcastmanager.cpp @@ -7,15 +7,15 @@ #undef WIN32 #endif +#include "broadcast/broadcastmanager.h" #include "broadcast/defs_broadcast.h" #include "engine/enginemaster.h" #include "engine/sidechain/enginenetworkstream.h" #include "engine/sidechain/enginesidechain.h" +#include "moc_broadcastmanager.cpp" #include "soundio/soundmanager.h" #include "util/logger.h" -#include "broadcast/broadcastmanager.h" - namespace { const mixxx::Logger kLogger("BroadcastManager"); } diff --git a/src/control/control.cpp b/src/control/control.cpp index 6f988913f391..5ea6a51dad57 100644 --- a/src/control/control.cpp +++ b/src/control/control.cpp @@ -1,6 +1,7 @@ #include "control/control.h" #include "control/controlobject.h" +#include "moc_control.cpp" #include "util/stat.h" //static diff --git a/src/control/controlaudiotaperpot.cpp b/src/control/controlaudiotaperpot.cpp index 9264b67774c6..d5f8000a1021 100644 --- a/src/control/controlaudiotaperpot.cpp +++ b/src/control/controlaudiotaperpot.cpp @@ -1,6 +1,8 @@ #include "control/controlaudiotaperpot.h" +#include "moc_controlaudiotaperpot.cpp" + ControlAudioTaperPot::ControlAudioTaperPot(const ConfigKey& key, double minDB, double maxDB, diff --git a/src/control/controleffectknob.cpp b/src/control/controleffectknob.cpp index cf01306458b7..1dfd28d592d7 100644 --- a/src/control/controleffectknob.cpp +++ b/src/control/controleffectknob.cpp @@ -1,7 +1,8 @@ #include "control/controleffectknob.h" -#include "util/math.h" #include "effects/effectmanifestparameter.h" +#include "moc_controleffectknob.cpp" +#include "util/math.h" ControlEffectKnob::ControlEffectKnob(const ConfigKey& key, double dMinValue, double dMaxValue) : ControlPotmeter(key, dMinValue, dMaxValue) { diff --git a/src/control/controlencoder.cpp b/src/control/controlencoder.cpp index 3dd146a6e96e..be9b6893ab0a 100644 --- a/src/control/controlencoder.cpp +++ b/src/control/controlencoder.cpp @@ -1,5 +1,7 @@ #include "control/controlencoder.h" +#include "moc_controlencoder.cpp" + ControlEncoder::ControlEncoder(const ConfigKey& key, bool bIgnoreNops) : ControlObject(key, bIgnoreNops) { if (m_pControl) { diff --git a/src/control/controlindicator.cpp b/src/control/controlindicator.cpp index 2d655b02b03a..3dc77a108ac0 100644 --- a/src/control/controlindicator.cpp +++ b/src/control/controlindicator.cpp @@ -1,5 +1,7 @@ #include "control/controlindicator.h" + #include "control/controlproxy.h" +#include "moc_controlindicator.cpp" #include "util/math.h" ControlIndicator::ControlIndicator(const ConfigKey& key) diff --git a/src/control/controllinpotmeter.cpp b/src/control/controllinpotmeter.cpp index deaa65f91af3..72a2fc721d21 100644 --- a/src/control/controllinpotmeter.cpp +++ b/src/control/controllinpotmeter.cpp @@ -1,5 +1,7 @@ #include "control/controllinpotmeter.h" +#include "moc_controllinpotmeter.cpp" + ControlLinPotmeter::ControlLinPotmeter(const ConfigKey& key, double dMinValue, double dMaxValue, diff --git a/src/control/controllogpotmeter.cpp b/src/control/controllogpotmeter.cpp index b0c4e4016317..ad84a38380f0 100644 --- a/src/control/controllogpotmeter.cpp +++ b/src/control/controllogpotmeter.cpp @@ -17,6 +17,8 @@ #include "control/controllogpotmeter.h" +#include "moc_controllogpotmeter.cpp" + ControlLogpotmeter::ControlLogpotmeter(const ConfigKey& key, double dMaxValue, double minDB) : ControlPotmeter(key, 0, dMaxValue) { // Override ControlPotmeters default value of 0.5 diff --git a/src/control/controlmodel.cpp b/src/control/controlmodel.cpp index 923be754b2d3..33824eb52ff8 100644 --- a/src/control/controlmodel.cpp +++ b/src/control/controlmodel.cpp @@ -1,5 +1,7 @@ #include "control/controlmodel.h" +#include "moc_controlmodel.cpp" + ControlModel::ControlModel(QObject* pParent) : QAbstractTableModel(pParent) { diff --git a/src/control/controlobject.cpp b/src/control/controlobject.cpp index 5aa71b84ce22..98736f6138ef 100644 --- a/src/control/controlobject.cpp +++ b/src/control/controlobject.cpp @@ -15,13 +15,15 @@ * * ***************************************************************************/ -#include +#include "control/controlobject.h" + #include -#include #include +#include +#include -#include "control/controlobject.h" #include "control/control.h" +#include "moc_controlobject.cpp" #include "util/stat.h" #include "util/timer.h" diff --git a/src/control/controlobjectscript.cpp b/src/control/controlobjectscript.cpp index ae6438e87e6a..501967b4b34a 100644 --- a/src/control/controlobjectscript.cpp +++ b/src/control/controlobjectscript.cpp @@ -1,6 +1,8 @@ +#include "control/controlobjectscript.h" + #include -#include "control/controlobjectscript.h" +#include "moc_controlobjectscript.cpp" ControlObjectScript::ControlObjectScript(const ConfigKey& key, QObject* pParent) : ControlProxy(key, pParent, ControlFlag::NoAssertIfMissing) { diff --git a/src/control/controlpotmeter.cpp b/src/control/controlpotmeter.cpp index a62b77ef4312..667358f7aaf1 100644 --- a/src/control/controlpotmeter.cpp +++ b/src/control/controlpotmeter.cpp @@ -15,9 +15,11 @@ * * ***************************************************************************/ -#include "control/controlpushbutton.h" #include "control/controlpotmeter.h" + #include "control/controlproxy.h" +#include "control/controlpushbutton.h" +#include "moc_controlpotmeter.cpp" ControlPotmeter::ControlPotmeter(const ConfigKey& key, double dMinValue, diff --git a/src/control/controlproxy.cpp b/src/control/controlproxy.cpp index 5ca1f0463049..51e7876f1ae1 100644 --- a/src/control/controlproxy.cpp +++ b/src/control/controlproxy.cpp @@ -1,7 +1,9 @@ +#include "control/controlproxy.h" + #include -#include "control/controlproxy.h" #include "control/control.h" +#include "moc_controlproxy.cpp" ControlProxy::ControlProxy(const QString& g, const QString& i, QObject* pParent, ControlFlags flags) : ControlProxy(ConfigKey(g, i), pParent, flags) { diff --git a/src/control/controlpushbutton.cpp b/src/control/controlpushbutton.cpp index 29c4e9dd9b14..e4a9200b4121 100644 --- a/src/control/controlpushbutton.cpp +++ b/src/control/controlpushbutton.cpp @@ -17,6 +17,8 @@ #include "control/controlpushbutton.h" +#include "moc_controlpushbutton.cpp" + /* -------- ------------------------------------------------------ Purpose: Creates a new simulated latching push-button. Input: key - Key for the configuration file diff --git a/src/control/controlttrotary.cpp b/src/control/controlttrotary.cpp index 930c8c48d6fc..cb0961ac9f68 100644 --- a/src/control/controlttrotary.cpp +++ b/src/control/controlttrotary.cpp @@ -16,6 +16,8 @@ #include "control/controlttrotary.h" +#include "moc_controlttrotary.cpp" + /* -------- ------------------------------------------------------ Purpose: Creates a new rotary encoder Input: key diff --git a/src/controllers/bulk/bulkcontroller.cpp b/src/controllers/bulk/bulkcontroller.cpp index b1b9e0bf0a9b..ca426f59f9ef 100644 --- a/src/controllers/bulk/bulkcontroller.cpp +++ b/src/controllers/bulk/bulkcontroller.cpp @@ -5,15 +5,17 @@ * @brief USB Bulk controller backend * */ +#include "controllers/bulk/bulkcontroller.h" + #include -#include "controllers/bulk/bulkcontroller.h" #include "controllers/bulk/bulksupported.h" -#include "controllers/defs_controllers.h" #include "controllers/controllerdebug.h" +#include "controllers/defs_controllers.h" +#include "moc_bulkcontroller.cpp" #include "util/compatibility.h" -#include "util/trace.h" #include "util/time.h" +#include "util/trace.h" BulkReader::BulkReader(libusb_device_handle *handle, unsigned char in_epaddr) : QThread(), diff --git a/src/controllers/colormapperjsproxy.cpp b/src/controllers/colormapperjsproxy.cpp index 3272bd049451..52b6500a2ae4 100644 --- a/src/controllers/colormapperjsproxy.cpp +++ b/src/controllers/colormapperjsproxy.cpp @@ -1,6 +1,8 @@ +#include "controllers/colormapperjsproxy.h" + #include -#include "controllers/colormapperjsproxy.h" +#include "moc_colormapperjsproxy.cpp" ColorMapperJSProxy::ColorMapperJSProxy(QScriptEngine* pScriptEngine, const QMap& availableColors) diff --git a/src/controllers/controller.cpp b/src/controllers/controller.cpp index 0b816e01329d..dac39b1e4464 100644 --- a/src/controllers/controller.cpp +++ b/src/controllers/controller.cpp @@ -5,12 +5,14 @@ * @brief Base class representing a physical (or software) controller. */ +#include "controllers/controller.h" + #include #include -#include "controllers/controller.h" #include "controllers/controllerdebug.h" #include "controllers/defs_controllers.h" +#include "moc_controller.cpp" #include "util/screensaver.h" Controller::Controller(UserSettingsPointer pConfig) diff --git a/src/controllers/controllerengine.cpp b/src/controllers/controllerengine.cpp index 7002f3cb8537..76ff047973db 100644 --- a/src/controllers/controllerengine.cpp +++ b/src/controllers/controllerengine.cpp @@ -6,14 +6,16 @@ email : spappalardo@mixxx.org ***************************************************************************/ -#include "controllers/colormapperjsproxy.h" #include "controllers/controllerengine.h" -#include "controllers/controller.h" -#include "controllers/controllerdebug.h" + #include "control/controlobject.h" #include "control/controlobjectscript.h" +#include "controllers/colormapperjsproxy.h" +#include "controllers/controller.h" +#include "controllers/controllerdebug.h" #include "errordialoghandler.h" #include "mixer/playermanager.h" +#include "moc_controllerengine.cpp" // to tell the msvs compiler about `isnan` #include "util/math.h" #include "util/time.h" diff --git a/src/controllers/controllerenumerator.cpp b/src/controllers/controllerenumerator.cpp index b0c4812620fe..c3ddd88f0fe5 100644 --- a/src/controllers/controllerenumerator.cpp +++ b/src/controllers/controllerenumerator.cpp @@ -10,6 +10,8 @@ #include "controllers/controllerenumerator.h" +#include "moc_controllerenumerator.cpp" + ControllerEnumerator::ControllerEnumerator() : QObject() { } diff --git a/src/controllers/controllerinputmappingtablemodel.cpp b/src/controllers/controllerinputmappingtablemodel.cpp index 73db610044bf..e2b629b97d4e 100644 --- a/src/controllers/controllerinputmappingtablemodel.cpp +++ b/src/controllers/controllerinputmappingtablemodel.cpp @@ -1,11 +1,13 @@ #include "controllers/controllerinputmappingtablemodel.h" -#include "controllers/midi/midimessage.h" -#include "controllers/midi/midiutils.h" + #include "controllers/delegates/controldelegate.h" +#include "controllers/delegates/midibytedelegate.h" #include "controllers/delegates/midichanneldelegate.h" #include "controllers/delegates/midiopcodedelegate.h" -#include "controllers/delegates/midibytedelegate.h" #include "controllers/delegates/midioptionsdelegate.h" +#include "controllers/midi/midimessage.h" +#include "controllers/midi/midiutils.h" +#include "moc_controllerinputmappingtablemodel.cpp" ControllerInputMappingTableModel::ControllerInputMappingTableModel(QObject* pParent) : ControllerMappingTableModel(pParent) { diff --git a/src/controllers/controllerlearningeventfilter.cpp b/src/controllers/controllerlearningeventfilter.cpp index bdf96d547210..64828e53ac22 100644 --- a/src/controllers/controllerlearningeventfilter.cpp +++ b/src/controllers/controllerlearningeventfilter.cpp @@ -1,12 +1,14 @@ -#include -#include +#include "controllers/controllerlearningeventfilter.h" + #include +#include +#include -#include "widget/wwidget.h" +#include "moc_controllerlearningeventfilter.cpp" #include "widget/wknob.h" #include "widget/wknobcomposed.h" #include "widget/wslidercomposed.h" -#include "controllers/controllerlearningeventfilter.h" +#include "widget/wwidget.h" ControllerLearningEventFilter::ControllerLearningEventFilter(QObject* pParent) : QObject(pParent), diff --git a/src/controllers/controllermanager.cpp b/src/controllers/controllermanager.cpp index f7cee2c94f15..655f7573f256 100644 --- a/src/controllers/controllermanager.cpp +++ b/src/controllers/controllermanager.cpp @@ -5,16 +5,17 @@ * @brief Manages creation/enumeration/deletion of hardware controllers. */ +#include "controllers/controllermanager.h" + #include -#include "util/trace.h" -#include "controllers/controllermanager.h" -#include "controllers/defs_controllers.h" #include "controllers/controllerlearningeventfilter.h" +#include "controllers/defs_controllers.h" +#include "controllers/midi/portmidienumerator.h" +#include "moc_controllermanager.cpp" #include "util/cmdlineargs.h" #include "util/time.h" - -#include "controllers/midi/portmidienumerator.h" +#include "util/trace.h" #ifdef __HSS1394__ #include "controllers/midi/hss1394enumerator.h" #endif diff --git a/src/controllers/controllermappingtablemodel.cpp b/src/controllers/controllermappingtablemodel.cpp index 918da8dfc5c6..bd014c1f2c5e 100644 --- a/src/controllers/controllermappingtablemodel.cpp +++ b/src/controllers/controllermappingtablemodel.cpp @@ -1,5 +1,7 @@ #include "controllers/controllermappingtablemodel.h" +#include "moc_controllermappingtablemodel.cpp" + ControllerMappingTableModel::ControllerMappingTableModel(QObject* pParent) : QAbstractTableModel(pParent), m_pMidiPreset(NULL), diff --git a/src/controllers/controlleroutputmappingtablemodel.cpp b/src/controllers/controlleroutputmappingtablemodel.cpp index 676442cb1e2c..b724726677cd 100644 --- a/src/controllers/controlleroutputmappingtablemodel.cpp +++ b/src/controllers/controlleroutputmappingtablemodel.cpp @@ -1,11 +1,12 @@ #include "controllers/controlleroutputmappingtablemodel.h" -#include "controllers/midi/midimessage.h" -#include "controllers/midi/midiutils.h" #include "controllers/delegates/controldelegate.h" +#include "controllers/delegates/midibytedelegate.h" #include "controllers/delegates/midichanneldelegate.h" #include "controllers/delegates/midiopcodedelegate.h" -#include "controllers/delegates/midibytedelegate.h" +#include "controllers/midi/midimessage.h" +#include "controllers/midi/midiutils.h" +#include "moc_controlleroutputmappingtablemodel.cpp" ControllerOutputMappingTableModel::ControllerOutputMappingTableModel(QObject* pParent) : ControllerMappingTableModel(pParent) { diff --git a/src/controllers/controlpickermenu.cpp b/src/controllers/controlpickermenu.cpp index b26e9055b13c..e5887bf0a2ec 100644 --- a/src/controllers/controlpickermenu.cpp +++ b/src/controllers/controlpickermenu.cpp @@ -7,6 +7,7 @@ #include "engine/controls/cuecontrol.h" #include "engine/controls/loopingcontrol.h" #include "mixer/playermanager.h" +#include "moc_controlpickermenu.cpp" #include "recording/defs_recording.h" #include "vinylcontrol/defs_vinylcontrol.h" diff --git a/src/controllers/delegates/controldelegate.cpp b/src/controllers/delegates/controldelegate.cpp index 6c6a33006022..e22a7ec87a74 100644 --- a/src/controllers/delegates/controldelegate.cpp +++ b/src/controllers/delegates/controldelegate.cpp @@ -1,9 +1,11 @@ -#include +#include "controllers/delegates/controldelegate.h" + #include #include +#include -#include "controllers/delegates/controldelegate.h" #include "controllers/midi/midimessage.h" +#include "moc_controldelegate.cpp" ControlDelegate::ControlDelegate(QObject* pParent) : QStyledItemDelegate(pParent), diff --git a/src/controllers/delegates/midioptionsdelegate.cpp b/src/controllers/delegates/midioptionsdelegate.cpp index 3b6e45db52ec..868f492b5bfb 100644 --- a/src/controllers/delegates/midioptionsdelegate.cpp +++ b/src/controllers/delegates/midioptionsdelegate.cpp @@ -1,10 +1,12 @@ -#include +#include "controllers/delegates/midioptionsdelegate.h" + #include #include +#include -#include "controllers/delegates/midioptionsdelegate.h" #include "controllers/midi/midimessage.h" #include "controllers/midi/midiutils.h" +#include "moc_midioptionsdelegate.cpp" MidiOptionsDelegate::MidiOptionsDelegate(QObject* pParent) : QStyledItemDelegate(pParent) { diff --git a/src/controllers/dlgcontrollerlearning.cpp b/src/controllers/dlgcontrollerlearning.cpp index 589bf5d687cb..fed032650d4b 100644 --- a/src/controllers/dlgcontrollerlearning.cpp +++ b/src/controllers/dlgcontrollerlearning.cpp @@ -6,12 +6,14 @@ * */ +#include "controllers/dlgcontrollerlearning.h" + #include #include "control/controlobject.h" -#include "controllers/dlgcontrollerlearning.h" #include "controllers/learningutils.h" #include "controllers/midi/midiutils.h" +#include "moc_dlgcontrollerlearning.cpp" #include "util/version.h" namespace { diff --git a/src/controllers/dlgprefcontroller.cpp b/src/controllers/dlgprefcontroller.cpp index 342181ffe848..13c02c4ef12b 100644 --- a/src/controllers/dlgprefcontroller.cpp +++ b/src/controllers/dlgprefcontroller.cpp @@ -21,6 +21,7 @@ #include "controllers/controllermanager.h" #include "controllers/defs_controllers.h" #include "defs_urls.h" +#include "moc_dlgprefcontroller.cpp" #include "preferences/usersettings.h" #include "util/version.h" diff --git a/src/controllers/dlgprefcontrollers.cpp b/src/controllers/dlgprefcontrollers.cpp index f6d28a95f40d..c734944bad64 100644 --- a/src/controllers/dlgprefcontrollers.cpp +++ b/src/controllers/dlgprefcontrollers.cpp @@ -6,6 +6,7 @@ #include "controllers/defs_controllers.h" #include "controllers/dlgprefcontroller.h" #include "defs_urls.h" +#include "moc_dlgprefcontrollers.cpp" #include "preferences/dialog/dlgpreferences.h" DlgPrefControllers::DlgPrefControllers(DlgPreferences* pPreferences, diff --git a/src/controllers/hid/hidcontroller.cpp b/src/controllers/hid/hidcontroller.cpp index 26eccace4d9a..3d49b04216cc 100644 --- a/src/controllers/hid/hidcontroller.cpp +++ b/src/controllers/hid/hidcontroller.cpp @@ -13,6 +13,7 @@ #include "controllers/controllerdebug.h" #include "controllers/defs_controllers.h" +#include "moc_hidcontroller.cpp" #include "util/path.h" // for PATH_MAX on Windows #include "util/time.h" #include "util/trace.h" diff --git a/src/controllers/keyboard/keyboardeventfilter.cpp b/src/controllers/keyboard/keyboardeventfilter.cpp index 28305f59ff55..8722ab770e4a 100644 --- a/src/controllers/keyboard/keyboardeventfilter.cpp +++ b/src/controllers/keyboard/keyboardeventfilter.cpp @@ -1,10 +1,12 @@ +#include "controllers/keyboard/keyboardeventfilter.h" + +#include +#include #include #include -#include -#include -#include "controllers/keyboard/keyboardeventfilter.h" #include "control/controlobject.h" +#include "moc_keyboardeventfilter.cpp" #include "util/cmdlineargs.h" KeyboardEventFilter::KeyboardEventFilter(ConfigObject* pKbdConfigObject, diff --git a/src/controllers/midi/hss1394controller.cpp b/src/controllers/midi/hss1394controller.cpp index 5af00d84b018..bd434c404635 100644 --- a/src/controllers/midi/hss1394controller.cpp +++ b/src/controllers/midi/hss1394controller.cpp @@ -5,9 +5,11 @@ * @brief HSS1394-based MIDI backend */ -#include "controllers/midi/midiutils.h" #include "controllers/midi/hss1394controller.h" + #include "controllers/controllerdebug.h" +#include "controllers/midi/midiutils.h" +#include "moc_hss1394controller.cpp" #include "util/time.h" DeviceChannelListener::DeviceChannelListener(QObject* pParent, QString name) diff --git a/src/controllers/midi/hss1394enumerator.cpp b/src/controllers/midi/hss1394enumerator.cpp index 9c29ac98ee30..a5201e964f12 100644 --- a/src/controllers/midi/hss1394enumerator.cpp +++ b/src/controllers/midi/hss1394enumerator.cpp @@ -4,10 +4,12 @@ * @date Thu 15 Mar 2012 */ +#include "controllers/midi/hss1394enumerator.h" + #include #include "controllers/midi/hss1394controller.h" -#include "controllers/midi/hss1394enumerator.h" +#include "moc_hss1394enumerator.cpp" Hss1394Enumerator::Hss1394Enumerator(UserSettingsPointer pConfig) : MidiEnumerator(), diff --git a/src/controllers/midi/midicontroller.cpp b/src/controllers/midi/midicontroller.cpp index 14adcc463e58..935960b094f0 100644 --- a/src/controllers/midi/midicontroller.cpp +++ b/src/controllers/midi/midicontroller.cpp @@ -8,12 +8,13 @@ #include "controllers/midi/midicontroller.h" -#include "controllers/midi/midiutils.h" -#include "controllers/defs_controllers.h" -#include "controllers/controllerdebug.h" #include "control/controlobject.h" +#include "controllers/controllerdebug.h" +#include "controllers/defs_controllers.h" +#include "controllers/midi/midiutils.h" #include "errordialoghandler.h" #include "mixer/playermanager.h" +#include "moc_midicontroller.cpp" #include "util/math.h" #include "util/screensaver.h" diff --git a/src/controllers/midi/midienumerator.cpp b/src/controllers/midi/midienumerator.cpp index 1cbee7223f88..f7067f343c4f 100644 --- a/src/controllers/midi/midienumerator.cpp +++ b/src/controllers/midi/midienumerator.cpp @@ -8,6 +8,8 @@ #include "controllers/midi/midienumerator.h" +#include "moc_midienumerator.cpp" + MidiEnumerator::MidiEnumerator() : ControllerEnumerator() { } diff --git a/src/controllers/midi/midioutputhandler.cpp b/src/controllers/midi/midioutputhandler.cpp index f2ad6aac90bd..1d38401c783e 100644 --- a/src/controllers/midi/midioutputhandler.cpp +++ b/src/controllers/midi/midioutputhandler.cpp @@ -6,12 +6,14 @@ * */ +#include "controllers/midi/midioutputhandler.h" + #include -#include "controllers/midi/midioutputhandler.h" -#include "controllers/midi/midicontroller.h" -#include "controllers/controllerdebug.h" #include "control/controlobject.h" +#include "controllers/controllerdebug.h" +#include "controllers/midi/midicontroller.h" +#include "moc_midioutputhandler.cpp" MidiOutputHandler::MidiOutputHandler(MidiController* controller, const MidiOutputMapping& mapping) diff --git a/src/controllers/midi/portmidicontroller.cpp b/src/controllers/midi/portmidicontroller.cpp index 521ee0dd210a..545f4cef3a3b 100644 --- a/src/controllers/midi/portmidicontroller.cpp +++ b/src/controllers/midi/portmidicontroller.cpp @@ -7,9 +7,11 @@ * */ -#include "controllers/midi/midiutils.h" #include "controllers/midi/portmidicontroller.h" + #include "controllers/controllerdebug.h" +#include "controllers/midi/midiutils.h" +#include "moc_portmidicontroller.cpp" PortMidiController::PortMidiController(const PmDeviceInfo* inputDeviceInfo, const PmDeviceInfo* outputDeviceInfo, diff --git a/src/controllers/midi/portmidienumerator.cpp b/src/controllers/midi/portmidienumerator.cpp index 05edd277e529..e434107480f1 100644 --- a/src/controllers/midi/portmidienumerator.cpp +++ b/src/controllers/midi/portmidienumerator.cpp @@ -5,12 +5,14 @@ * @brief This class handles discovery and enumeration of DJ controller devices that appear under the PortMIDI cross-platform API. */ +#include "controllers/midi/portmidienumerator.h" + #include -#include -#include "controllers/midi/portmidienumerator.h" +#include #include "controllers/midi/portmidicontroller.h" +#include "moc_portmidienumerator.cpp" #include "util/cmdlineargs.h" namespace { diff --git a/src/database/mixxxdb.cpp b/src/database/mixxxdb.cpp index ab01999a95ac..0cee5949a156 100644 --- a/src/database/mixxxdb.cpp +++ b/src/database/mixxxdb.cpp @@ -1,11 +1,10 @@ #include "database/mixxxdb.h" #include "database/schemamanager.h" - +#include "moc_mixxxdb.cpp" #include "util/assert.h" #include "util/logger.h" - // The schema XML is baked into the binary via Qt resources. //static const QString MixxxDb::kDefaultSchemaFile(":/schema.xml"); diff --git a/src/dialog/dlgabout.cpp b/src/dialog/dlgabout.cpp index 58b0e5ea7ade..3afc55ab4b18 100644 --- a/src/dialog/dlgabout.cpp +++ b/src/dialog/dlgabout.cpp @@ -1,7 +1,10 @@ #include "dialog/dlgabout.h" -#include "util/version.h" + #include +#include "moc_dlgabout.cpp" +#include "util/version.h" + DlgAbout::DlgAbout(QWidget* parent) : QDialog(parent), Ui::DlgAboutDlg() { setupUi(this); diff --git a/src/dialog/dlgdevelopertools.cpp b/src/dialog/dlgdevelopertools.cpp index d6fe5951dd23..22e73f2cc254 100644 --- a/src/dialog/dlgdevelopertools.cpp +++ b/src/dialog/dlgdevelopertools.cpp @@ -3,9 +3,10 @@ #include #include "control/control.h" +#include "moc_dlgdevelopertools.cpp" #include "util/cmdlineargs.h" -#include "util/statsmanager.h" #include "util/logging.h" +#include "util/statsmanager.h" DlgDeveloperTools::DlgDeveloperTools(QWidget* pParent, UserSettingsPointer pConfig) diff --git a/src/dialog/dlgreplacecuecolor.cpp b/src/dialog/dlgreplacecuecolor.cpp index 0a68619bc519..b1047173e58b 100644 --- a/src/dialog/dlgreplacecuecolor.cpp +++ b/src/dialog/dlgreplacecuecolor.cpp @@ -10,6 +10,7 @@ #include "engine/controls/cuecontrol.h" #include "library/dao/cuedao.h" #include "library/queryutil.h" +#include "moc_dlgreplacecuecolor.cpp" #include "preferences/colorpalettesettings.h" #include "track/track.h" #include "util/color/predefinedcolorpalettes.h" diff --git a/src/effects/builtin/builtinbackend.cpp b/src/effects/builtin/builtinbackend.cpp index 9c870a0aba1f..28a59e6b83b4 100644 --- a/src/effects/builtin/builtinbackend.cpp +++ b/src/effects/builtin/builtinbackend.cpp @@ -1,19 +1,21 @@ +#include "effects/builtin/builtinbackend.h" + #include -#include "effects/builtin/builtinbackend.h" -#include "effects/builtin/flangereffect.h" -#include "effects/builtin/bitcrushereffect.h" #include "effects/builtin/balanceeffect.h" -#include "effects/builtin/linkwitzriley8eqeffect.h" -#include "effects/builtin/bessel8lvmixeqeffect.h" #include "effects/builtin/bessel4lvmixeqeffect.h" -#include "effects/builtin/threebandbiquadeqeffect.h" +#include "effects/builtin/bessel8lvmixeqeffect.h" #include "effects/builtin/biquadfullkilleqeffect.h" -#include "effects/builtin/graphiceqeffect.h" -#include "effects/builtin/parametriceqeffect.h" +#include "effects/builtin/bitcrushereffect.h" #include "effects/builtin/filtereffect.h" +#include "effects/builtin/flangereffect.h" +#include "effects/builtin/graphiceqeffect.h" +#include "effects/builtin/linkwitzriley8eqeffect.h" #include "effects/builtin/moogladder4filtereffect.h" +#include "effects/builtin/parametriceqeffect.h" +#include "effects/builtin/threebandbiquadeqeffect.h" +#include "moc_builtinbackend.cpp" #ifndef __MACAPPSTORE__ #include "effects/builtin/reverbeffect.h" #endif diff --git a/src/effects/effect.cpp b/src/effects/effect.cpp index 295565fa7dbc..7fbe2ab5183a 100644 --- a/src/effects/effect.cpp +++ b/src/effects/effect.cpp @@ -1,11 +1,13 @@ +#include "effects/effect.h" + #include -#include "effects/effect.h" #include "effects/effectprocessor.h" #include "effects/effectsmanager.h" #include "effects/effectxmlelements.h" -#include "engine/effects/engineeffectchain.h" #include "engine/effects/engineeffect.h" +#include "engine/effects/engineeffectchain.h" +#include "moc_effect.cpp" #include "util/xml.h" Effect::Effect(EffectsManager* pEffectsManager, diff --git a/src/effects/effectbuttonparameterslot.cpp b/src/effects/effectbuttonparameterslot.cpp index bd74ca82e96c..8b4314866397 100644 --- a/src/effects/effectbuttonparameterslot.cpp +++ b/src/effects/effectbuttonparameterslot.cpp @@ -1,10 +1,12 @@ +#include "effects/effectbuttonparameterslot.h" + #include #include "control/controleffectknob.h" -#include "effects/effectbuttonparameterslot.h" -#include "effects/effectxmlelements.h" #include "control/controlobject.h" #include "control/controlpushbutton.h" +#include "effects/effectxmlelements.h" +#include "moc_effectbuttonparameterslot.cpp" #include "util/math.h" #include "util/xml.h" diff --git a/src/effects/effectchain.cpp b/src/effects/effectchain.cpp index c24442a90f5e..c87cbb050b64 100644 --- a/src/effects/effectchain.cpp +++ b/src/effects/effectchain.cpp @@ -1,13 +1,14 @@ #include "effects/effectchain.h" -#include "engine/engine.h" #include "effects/effectchainmanager.h" -#include "effects/effectsmanager.h" #include "effects/effectprocessor.h" +#include "effects/effectsmanager.h" #include "effects/effectxmlelements.h" #include "engine/effects/engineeffectchain.h" #include "engine/effects/engineeffectrack.h" #include "engine/effects/message.h" +#include "engine/engine.h" +#include "moc_effectchain.cpp" #include "util/defs.h" #include "util/sample.h" #include "util/xml.h" diff --git a/src/effects/effectchainmanager.cpp b/src/effects/effectchainmanager.cpp index 13eeef9d8815..e4c7114a70db 100644 --- a/src/effects/effectchainmanager.cpp +++ b/src/effects/effectchainmanager.cpp @@ -1,11 +1,13 @@ #include "effects/effectchainmanager.h" -#include "effects/effectsmanager.h" -#include "effects/effectxmlelements.h" -#include +#include #include #include -#include +#include + +#include "effects/effectsmanager.h" +#include "effects/effectxmlelements.h" +#include "moc_effectchainmanager.cpp" EffectChainManager::EffectChainManager(UserSettingsPointer pConfig, EffectsManager* pEffectsManager) diff --git a/src/effects/effectchainslot.cpp b/src/effects/effectchainslot.cpp index 277e63eaed3f..e0b82a1d3151 100644 --- a/src/effects/effectchainslot.cpp +++ b/src/effects/effectchainslot.cpp @@ -1,12 +1,13 @@ #include "effects/effectchainslot.h" -#include "effects/effectrack.h" -#include "effects/effectxmlelements.h" -#include "effects/effectslot.h" +#include "control/controlencoder.h" #include "control/controlpotmeter.h" #include "control/controlpushbutton.h" -#include "control/controlencoder.h" +#include "effects/effectrack.h" +#include "effects/effectslot.h" +#include "effects/effectxmlelements.h" #include "mixer/playermanager.h" +#include "moc_effectchainslot.cpp" #include "util/math.h" #include "util/xml.h" diff --git a/src/effects/effectparameter.cpp b/src/effects/effectparameter.cpp index f0bd3c983708..38855618b5c8 100644 --- a/src/effects/effectparameter.cpp +++ b/src/effects/effectparameter.cpp @@ -1,8 +1,10 @@ +#include "effects/effectparameter.h" + #include -#include "effects/effectparameter.h" -#include "effects/effectsmanager.h" #include "effects/effect.h" +#include "effects/effectsmanager.h" +#include "moc_effectparameter.cpp" #include "util/assert.h" EffectParameter::EffectParameter(Effect* pEffect, EffectsManager* pEffectsManager, diff --git a/src/effects/effectparameterslot.cpp b/src/effects/effectparameterslot.cpp index 706416aa04fa..653f691364aa 100644 --- a/src/effects/effectparameterslot.cpp +++ b/src/effects/effectparameterslot.cpp @@ -1,11 +1,13 @@ +#include "effects/effectparameterslot.h" + #include #include "control/controleffectknob.h" -#include "effects/effectparameterslot.h" -#include "effects/effectxmlelements.h" #include "control/controlobject.h" #include "control/controlpushbutton.h" #include "controllers/softtakeover.h" +#include "effects/effectxmlelements.h" +#include "moc_effectparameterslot.cpp" #include "util/xml.h" EffectParameterSlot::EffectParameterSlot(const QString& group, const unsigned int iParameterSlotNumber) diff --git a/src/effects/effectparameterslotbase.cpp b/src/effects/effectparameterslotbase.cpp index 4f1b32049038..376746219116 100644 --- a/src/effects/effectparameterslotbase.cpp +++ b/src/effects/effectparameterslotbase.cpp @@ -1,9 +1,11 @@ +#include "effects/effectparameterslotbase.h" + #include #include "control/controleffectknob.h" -#include "effects/effectparameterslotbase.h" #include "control/controlobject.h" #include "control/controlpushbutton.h" +#include "moc_effectparameterslotbase.cpp" EffectParameterSlotBase::EffectParameterSlotBase(const QString& group, const unsigned int iParameterSlotNumber) diff --git a/src/effects/effectrack.cpp b/src/effects/effectrack.cpp index 7995d796e89f..888abd5d42e1 100644 --- a/src/effects/effectrack.cpp +++ b/src/effects/effectrack.cpp @@ -1,10 +1,10 @@ #include "effects/effectrack.h" -#include "effects/effectsmanager.h" #include "effects/effectchainmanager.h" #include "effects/effectslot.h" +#include "effects/effectsmanager.h" #include "engine/effects/engineeffectrack.h" - +#include "moc_effectrack.cpp" #include "util/assert.h" EffectRack::EffectRack(EffectsManager* pEffectsManager, diff --git a/src/effects/effectsbackend.cpp b/src/effects/effectsbackend.cpp index e6a3674d38b6..aedc07eab622 100644 --- a/src/effects/effectsbackend.cpp +++ b/src/effects/effectsbackend.cpp @@ -1,7 +1,9 @@ +#include "effects/effectsbackend.h" + #include -#include "effects/effectsbackend.h" #include "effects/effectsmanager.h" +#include "moc_effectsbackend.cpp" EffectsBackend::EffectsBackend(QObject* pParent, EffectBackendType type) diff --git a/src/effects/effectslot.cpp b/src/effects/effectslot.cpp index a93e09baf037..fe7cc5e13cb6 100644 --- a/src/effects/effectslot.cpp +++ b/src/effects/effectslot.cpp @@ -1,11 +1,12 @@ #include "effects/effectslot.h" -#include "effects/effectxmlelements.h" #include -#include "control/controlpushbutton.h" #include "control/controlencoder.h" #include "control/controlproxy.h" +#include "control/controlpushbutton.h" +#include "effects/effectxmlelements.h" +#include "moc_effectslot.cpp" #include "util/math.h" #include "util/xml.h" diff --git a/src/effects/effectsmanager.cpp b/src/effects/effectsmanager.cpp index 5bd859d39c2f..925fced754ff 100644 --- a/src/effects/effectsmanager.cpp +++ b/src/effects/effectsmanager.cpp @@ -1,16 +1,16 @@ #include "effects/effectsmanager.h" #include - #include -#include "engine/effects/engineeffectsmanager.h" #include "effects/effectchainmanager.h" #include "effects/effectsbackend.h" #include "effects/effectslot.h" #include "engine/effects/engineeffect.h" -#include "engine/effects/engineeffectrack.h" #include "engine/effects/engineeffectchain.h" +#include "engine/effects/engineeffectrack.h" +#include "engine/effects/engineeffectsmanager.h" +#include "moc_effectsmanager.cpp" #include "util/assert.h" namespace { diff --git a/src/effects/lv2/lv2backend.cpp b/src/effects/lv2/lv2backend.cpp index 2a5090805ce3..0bf4d973cbaa 100644 --- a/src/effects/lv2/lv2backend.cpp +++ b/src/effects/lv2/lv2backend.cpp @@ -1,5 +1,7 @@ #include "effects/lv2/lv2backend.h" + #include "effects/lv2/lv2manifest.h" +#include "moc_lv2backend.cpp" LV2Backend::LV2Backend(QObject* pParent) : EffectsBackend(pParent, EffectBackendType::LV2) { diff --git a/src/engine/bufferscalers/enginebufferscale.cpp b/src/engine/bufferscalers/enginebufferscale.cpp index 028c30a3d467..563e5d530dff 100644 --- a/src/engine/bufferscalers/enginebufferscale.cpp +++ b/src/engine/bufferscalers/enginebufferscale.cpp @@ -1,6 +1,7 @@ #include "engine/bufferscalers/enginebufferscale.h" #include "engine/engine.h" +#include "moc_enginebufferscale.cpp" #include "util/defs.h" EngineBufferScale::EngineBufferScale() diff --git a/src/engine/bufferscalers/enginebufferscalerubberband.cpp b/src/engine/bufferscalers/enginebufferscalerubberband.cpp index fd100a6c14a6..e1b5f0254269 100644 --- a/src/engine/bufferscalers/enginebufferscalerubberband.cpp +++ b/src/engine/bufferscalers/enginebufferscalerubberband.cpp @@ -6,6 +6,7 @@ #include "control/controlobject.h" #include "engine/readaheadmanager.h" +#include "moc_enginebufferscalerubberband.cpp" #include "track/keyutils.h" #include "util/counter.h" #include "util/defs.h" diff --git a/src/engine/bufferscalers/enginebufferscalest.cpp b/src/engine/bufferscalers/enginebufferscalest.cpp index 88ed71f33864..f23aa4b936dc 100644 --- a/src/engine/bufferscalers/enginebufferscalest.cpp +++ b/src/engine/bufferscalers/enginebufferscalest.cpp @@ -1,5 +1,7 @@ #include "engine/bufferscalers/enginebufferscalest.h" +#include "moc_enginebufferscalest.cpp" + // Fixes redefinition warnings from SoundTouch. #include diff --git a/src/engine/cachingreader/cachingreader.cpp b/src/engine/cachingreader/cachingreader.cpp index 592371a68636..7399e665499f 100644 --- a/src/engine/cachingreader/cachingreader.cpp +++ b/src/engine/cachingreader/cachingreader.cpp @@ -1,16 +1,17 @@ -#include +#include "engine/cachingreader/cachingreader.h" + #include +#include -#include "engine/cachingreader/cachingreader.h" #include "control/controlobject.h" +#include "moc_cachingreader.cpp" #include "track/track.h" #include "util/assert.h" +#include "util/compatibility.h" #include "util/counter.h" +#include "util/logger.h" #include "util/math.h" #include "util/sample.h" -#include "util/logger.h" -#include "util/compatibility.h" - namespace { diff --git a/src/engine/cachingreader/cachingreaderworker.cpp b/src/engine/cachingreader/cachingreaderworker.cpp index aefd482d0408..5353b7b1058a 100644 --- a/src/engine/cachingreader/cachingreaderworker.cpp +++ b/src/engine/cachingreader/cachingreaderworker.cpp @@ -5,6 +5,7 @@ #include #include "control/controlobject.h" +#include "moc_cachingreaderworker.cpp" #include "sources/soundsourceproxy.h" #include "track/track.h" #include "util/compatibility.h" diff --git a/src/engine/channels/engineaux.cpp b/src/engine/channels/engineaux.cpp index 9f75ec6d6822..71530a67eac8 100644 --- a/src/engine/channels/engineaux.cpp +++ b/src/engine/channels/engineaux.cpp @@ -7,10 +7,11 @@ #include #include "control/control.h" -#include "preferences/usersettings.h" #include "control/controlaudiotaperpot.h" #include "effects/effectsmanager.h" #include "engine/effects/engineeffectsmanager.h" +#include "moc_engineaux.cpp" +#include "preferences/usersettings.h" #include "util/sample.h" EngineAux::EngineAux(const ChannelHandleAndGroup& handle_group, EffectsManager* pEffectsManager) diff --git a/src/engine/channels/enginechannel.cpp b/src/engine/channels/enginechannel.cpp index 9ecd33c9ceb7..01a80b42ddf7 100644 --- a/src/engine/channels/enginechannel.cpp +++ b/src/engine/channels/enginechannel.cpp @@ -19,6 +19,7 @@ #include "control/controlobject.h" #include "control/controlpushbutton.h" +#include "moc_enginechannel.cpp" EngineChannel::EngineChannel(const ChannelHandleAndGroup& handle_group, EngineChannel::ChannelOrientation defaultOrientation, diff --git a/src/engine/channels/enginedeck.cpp b/src/engine/channels/enginedeck.cpp index 8eeb3d1bade3..670d3b46f68d 100644 --- a/src/engine/channels/enginedeck.cpp +++ b/src/engine/channels/enginedeck.cpp @@ -23,6 +23,7 @@ #include "engine/enginebuffer.h" #include "engine/enginepregain.h" #include "engine/enginevumeter.h" +#include "moc_enginedeck.cpp" #include "util/sample.h" #include "waveform/waveformwidgetfactory.h" diff --git a/src/engine/channels/enginemicrophone.cpp b/src/engine/channels/enginemicrophone.cpp index ceefe6f5b15c..759e651ca3fb 100644 --- a/src/engine/channels/enginemicrophone.cpp +++ b/src/engine/channels/enginemicrophone.cpp @@ -5,11 +5,12 @@ #include -#include "preferences/usersettings.h" #include "control/control.h" #include "control/controlaudiotaperpot.h" #include "effects/effectsmanager.h" #include "engine/effects/engineeffectsmanager.h" +#include "moc_enginemicrophone.cpp" +#include "preferences/usersettings.h" #include "util/sample.h" EngineMicrophone::EngineMicrophone(const ChannelHandleAndGroup& handle_group, diff --git a/src/engine/controls/bpmcontrol.cpp b/src/engine/controls/bpmcontrol.cpp index 52370da16db4..98202c30d61d 100644 --- a/src/engine/controls/bpmcontrol.cpp +++ b/src/engine/controls/bpmcontrol.cpp @@ -9,6 +9,7 @@ #include "engine/channels/enginechannel.h" #include "engine/enginebuffer.h" #include "engine/enginemaster.h" +#include "moc_bpmcontrol.cpp" #include "track/track.h" #include "util/assert.h" #include "util/duration.h" diff --git a/src/engine/controls/clockcontrol.cpp b/src/engine/controls/clockcontrol.cpp index f48660bb4ce6..22cd4707bc9e 100644 --- a/src/engine/controls/clockcontrol.cpp +++ b/src/engine/controls/clockcontrol.cpp @@ -3,6 +3,7 @@ #include "control/controlobject.h" #include "control/controlproxy.h" #include "engine/controls/enginecontrol.h" +#include "moc_clockcontrol.cpp" #include "preferences/usersettings.h" #include "track/track.h" diff --git a/src/engine/controls/cuecontrol.cpp b/src/engine/controls/cuecontrol.cpp index 039b01932666..5e0bee31b9de 100644 --- a/src/engine/controls/cuecontrol.cpp +++ b/src/engine/controls/cuecontrol.cpp @@ -9,6 +9,7 @@ #include "control/controlobject.h" #include "control/controlpushbutton.h" #include "engine/enginebuffer.h" +#include "moc_cuecontrol.cpp" #include "preferences/colorpalettesettings.h" #include "track/track.h" #include "util/color/color.h" diff --git a/src/engine/controls/enginecontrol.cpp b/src/engine/controls/enginecontrol.cpp index 22eaa2ab01bf..29d80ae5422a 100644 --- a/src/engine/controls/enginecontrol.cpp +++ b/src/engine/controls/enginecontrol.cpp @@ -2,10 +2,12 @@ // Created 7/5/2009 by RJ Ryan (rryan@mit.edu) #include "engine/controls/enginecontrol.h" -#include "engine/enginemaster.h" + #include "engine/enginebuffer.h" +#include "engine/enginemaster.h" #include "engine/sync/enginesync.h" #include "mixer/playermanager.h" +#include "moc_enginecontrol.cpp" EngineControl::EngineControl(const QString& group, UserSettingsPointer pConfig) diff --git a/src/engine/controls/keycontrol.cpp b/src/engine/controls/keycontrol.cpp index 8fac74c1fd5b..874cdf5cb53a 100644 --- a/src/engine/controls/keycontrol.cpp +++ b/src/engine/controls/keycontrol.cpp @@ -8,6 +8,7 @@ #include "control/controlproxy.h" #include "control/controlpushbutton.h" #include "engine/enginebuffer.h" +#include "moc_keycontrol.cpp" #include "track/keyutils.h" //static const double kLockOriginalKey = 0; diff --git a/src/engine/controls/loopingcontrol.cpp b/src/engine/controls/loopingcontrol.cpp index 6888b821b334..59190de3b47f 100644 --- a/src/engine/controls/loopingcontrol.cpp +++ b/src/engine/controls/loopingcontrol.cpp @@ -2,19 +2,21 @@ // Created on Sep 23, 2008 // Author: asantoni, rryan +#include "engine/controls/loopingcontrol.h" + #include #include "control/controlobject.h" #include "control/controlpushbutton.h" #include "engine/controls/bpmcontrol.h" #include "engine/controls/enginecontrol.h" -#include "engine/controls/loopingcontrol.h" #include "engine/enginebuffer.h" +#include "moc_loopingcontrol.cpp" #include "preferences/usersettings.h" +#include "track/track.h" #include "util/compatibility.h" #include "util/math.h" #include "util/sample.h" -#include "track/track.h" double LoopingControl::s_dBeatSizes[] = { 0.03125, 0.0625, 0.125, 0.25, 0.5, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512 }; diff --git a/src/engine/controls/quantizecontrol.cpp b/src/engine/controls/quantizecontrol.cpp index 28e70e274a7a..e4e954700662 100644 --- a/src/engine/controls/quantizecontrol.cpp +++ b/src/engine/controls/quantizecontrol.cpp @@ -9,6 +9,7 @@ #include "control/controlobject.h" #include "control/controlpushbutton.h" #include "engine/controls/enginecontrol.h" +#include "moc_quantizecontrol.cpp" #include "preferences/usersettings.h" #include "track/track.h" #include "util/assert.h" diff --git a/src/engine/controls/ratecontrol.cpp b/src/engine/controls/ratecontrol.cpp index 99333b5b3662..5f01865643e4 100644 --- a/src/engine/controls/ratecontrol.cpp +++ b/src/engine/controls/ratecontrol.cpp @@ -1,21 +1,22 @@ // ratecontrol.cpp // Created 7/4/2009 by RJ Ryan (rryan@mit.edu) +#include "engine/controls/ratecontrol.h" + +#include + #include "control/controlobject.h" -#include "control/controlpushbutton.h" #include "control/controlpotmeter.h" -#include "control/controlttrotary.h" #include "control/controlproxy.h" -#include "util/rotary.h" -#include "util/math.h" -#include "vinylcontrol/defs_vinylcontrol.h" - +#include "control/controlpushbutton.h" +#include "control/controlttrotary.h" #include "engine/controls/bpmcontrol.h" #include "engine/controls/enginecontrol.h" -#include "engine/controls/ratecontrol.h" #include "engine/positionscratchcontroller.h" - -#include +#include "moc_ratecontrol.cpp" +#include "util/math.h" +#include "util/rotary.h" +#include "vinylcontrol/defs_vinylcontrol.h" namespace { constexpr int kRateSensitivityMin = 100; diff --git a/src/engine/controls/vinylcontrolcontrol.cpp b/src/engine/controls/vinylcontrolcontrol.cpp index 951552d44abe..0684d4ea412e 100644 --- a/src/engine/controls/vinylcontrolcontrol.cpp +++ b/src/engine/controls/vinylcontrolcontrol.cpp @@ -1,5 +1,6 @@ #include "engine/controls/vinylcontrolcontrol.h" +#include "moc_vinylcontrolcontrol.cpp" #include "track/track.h" #include "util/math.h" #include "vinylcontrol/vinylcontrol.h" diff --git a/src/engine/enginebuffer.cpp b/src/engine/enginebuffer.cpp index 36be2816b50d..49392829f1f3 100644 --- a/src/engine/enginebuffer.cpp +++ b/src/engine/enginebuffer.cpp @@ -26,6 +26,7 @@ #include "engine/readaheadmanager.h" #include "engine/sync/enginesync.h" #include "engine/sync/synccontrol.h" +#include "moc_enginebuffer.cpp" #include "preferences/usersettings.h" #include "track/beatfactory.h" #include "track/keyutils.h" diff --git a/src/engine/enginedelay.cpp b/src/engine/enginedelay.cpp index 7a44c3bd2433..43425eeec1db 100644 --- a/src/engine/enginedelay.cpp +++ b/src/engine/enginedelay.cpp @@ -16,9 +16,10 @@ #include "enginedelay.h" -#include "control/controlproxy.h" #include "control/controlpotmeter.h" +#include "control/controlproxy.h" #include "engine/engine.h" +#include "moc_enginedelay.cpp" #include "util/assert.h" #include "util/sample.h" diff --git a/src/engine/enginemaster.cpp b/src/engine/enginemaster.cpp index 9e49dc18de82..79b99636a558 100644 --- a/src/engine/enginemaster.cpp +++ b/src/engine/enginemaster.cpp @@ -1,21 +1,18 @@ #include "engine/enginemaster.h" -#include #include #include +#include -#include "preferences/usersettings.h" -#include "control/controlaudiotaperpot.h" #include "control/controlaudiotaperpot.h" #include "control/controlpotmeter.h" #include "control/controlpushbutton.h" #include "effects/effectsmanager.h" #include "engine/channelmixer.h" -#include "engine/effects/engineeffectsmanager.h" -#include "engine/enginebuffer.h" -#include "engine/enginebuffer.h" #include "engine/channels/enginechannel.h" #include "engine/channels/enginedeck.h" +#include "engine/effects/engineeffectsmanager.h" +#include "engine/enginebuffer.h" #include "engine/enginedelay.h" #include "engine/enginetalkoverducking.h" #include "engine/enginevumeter.h" @@ -24,6 +21,8 @@ #include "engine/sidechain/enginesidechain.h" #include "engine/sync/enginesync.h" #include "mixer/playermanager.h" +#include "moc_enginemaster.cpp" +#include "preferences/usersettings.h" #include "util/defs.h" #include "util/sample.h" #include "util/timer.h" diff --git a/src/engine/engineobject.cpp b/src/engine/engineobject.cpp index abdef17380a1..d729308b9981 100644 --- a/src/engine/engineobject.cpp +++ b/src/engine/engineobject.cpp @@ -17,6 +17,8 @@ #include "engineobject.h" +#include "moc_engineobject.cpp" + EngineObject::EngineObject() { } @@ -28,6 +30,3 @@ EngineObjectConstIn::EngineObjectConstIn() { EngineObjectConstIn::~EngineObjectConstIn() { } - - - diff --git a/src/engine/enginetalkoverducking.cpp b/src/engine/enginetalkoverducking.cpp index d6f41ebea927..e4e6f9f5f015 100644 --- a/src/engine/enginetalkoverducking.cpp +++ b/src/engine/enginetalkoverducking.cpp @@ -1,6 +1,8 @@ -#include "control/controlproxy.h" #include "engine/enginetalkoverducking.h" +#include "control/controlproxy.h" +#include "moc_enginetalkoverducking.cpp" + namespace { constexpr CSAMPLE kDuckThreshold = 0.1f; diff --git a/src/engine/enginetalkoverducking.h b/src/engine/enginetalkoverducking.h index 090b683af8c8..584cca291d40 100644 --- a/src/engine/enginetalkoverducking.h +++ b/src/engine/enginetalkoverducking.h @@ -1,3 +1,5 @@ +#pragma once + #include "engine/enginesidechaincompressor.h" #include "control/controlpotmeter.h" #include "control/controlpushbutton.h" diff --git a/src/engine/enginevumeter.cpp b/src/engine/enginevumeter.cpp index 666ea72f5d7d..07c761ff0954 100644 --- a/src/engine/enginevumeter.cpp +++ b/src/engine/enginevumeter.cpp @@ -1,7 +1,8 @@ #include "engine/enginevumeter.h" -#include "control/controlproxy.h" #include "control/controlpotmeter.h" +#include "control/controlproxy.h" +#include "moc_enginevumeter.cpp" #include "util/math.h" #include "util/sample.h" diff --git a/src/engine/engineworker.cpp b/src/engine/engineworker.cpp index 43e99141a01c..c00ac202f421 100644 --- a/src/engine/engineworker.cpp +++ b/src/engine/engineworker.cpp @@ -2,7 +2,9 @@ // Created 6/2/2010 by RJ Ryan (rryan@mit.edu) #include "engine/engineworker.h" + #include "engine/engineworkerscheduler.h" +#include "moc_engineworker.cpp" EngineWorker::EngineWorker() : m_pScheduler(nullptr) { diff --git a/src/engine/engineworkerscheduler.cpp b/src/engine/engineworkerscheduler.cpp index f44f296642c9..1fe5c6023309 100644 --- a/src/engine/engineworkerscheduler.cpp +++ b/src/engine/engineworkerscheduler.cpp @@ -1,10 +1,12 @@ // engineworkerscheduler.cpp // Created 6/2/2010 by RJ Ryan (rryan@mit.edu) +#include "engine/engineworkerscheduler.h" + #include #include "engine/engineworker.h" -#include "engine/engineworkerscheduler.h" +#include "moc_engineworkerscheduler.cpp" #include "util/event.h" EngineWorkerScheduler::EngineWorkerScheduler(QObject* pParent) diff --git a/src/engine/filters/enginefilter.cpp b/src/engine/filters/enginefilter.cpp index 28ba93bc969d..630ebf86179f 100644 --- a/src/engine/filters/enginefilter.cpp +++ b/src/engine/filters/enginefilter.cpp @@ -16,8 +16,10 @@ ***************************************************************************/ #include "engine/filters/enginefilter.h" + #include +#include "moc_enginefilter.cpp" EngineFilter::EngineFilter(char * conf, int predefinedType) : iir(0), diff --git a/src/engine/filters/enginefilterbessel4.cpp b/src/engine/filters/enginefilterbessel4.cpp index a47c9a46c336..8b559090a00c 100644 --- a/src/engine/filters/enginefilterbessel4.cpp +++ b/src/engine/filters/enginefilterbessel4.cpp @@ -1,4 +1,6 @@ #include "engine/filters/enginefilterbessel4.h" + +#include "moc_enginefilterbessel4.cpp" #include "util/math.h" namespace { diff --git a/src/engine/filters/enginefilterbessel8.cpp b/src/engine/filters/enginefilterbessel8.cpp index fa97b01fc75c..9a5900d8f4ce 100644 --- a/src/engine/filters/enginefilterbessel8.cpp +++ b/src/engine/filters/enginefilterbessel8.cpp @@ -1,4 +1,6 @@ #include "engine/filters/enginefilterbessel8.h" + +#include "moc_enginefilterbessel8.cpp" #include "util/math.h" namespace { diff --git a/src/engine/filters/enginefilterbiquad1.cpp b/src/engine/filters/enginefilterbiquad1.cpp index ee9572befba8..c0376bc9c6f8 100644 --- a/src/engine/filters/enginefilterbiquad1.cpp +++ b/src/engine/filters/enginefilterbiquad1.cpp @@ -1,6 +1,9 @@ -#include #include "engine/filters/enginefilterbiquad1.h" +#include + +#include "moc_enginefilterbiquad1.cpp" + EngineFilterBiquad1LowShelving::EngineFilterBiquad1LowShelving(int sampleRate, double centerFreq, double Q) { diff --git a/src/engine/filters/enginefilterbutterworth4.cpp b/src/engine/filters/enginefilterbutterworth4.cpp index 6abe565b195c..4d97777aa2e3 100644 --- a/src/engine/filters/enginefilterbutterworth4.cpp +++ b/src/engine/filters/enginefilterbutterworth4.cpp @@ -1,5 +1,7 @@ #include "engine/filters/enginefilterbutterworth4.h" +#include "moc_enginefilterbutterworth4.cpp" + namespace { constexpr char kFidSpecLowPassButterworth4[] = "LpBu4"; constexpr char kFidSpecBandPassButterworth4[] = "BpBu4"; diff --git a/src/engine/filters/enginefilterbutterworth8.cpp b/src/engine/filters/enginefilterbutterworth8.cpp index ea5a134b4a27..00e503af0079 100644 --- a/src/engine/filters/enginefilterbutterworth8.cpp +++ b/src/engine/filters/enginefilterbutterworth8.cpp @@ -1,5 +1,7 @@ #include "engine/filters/enginefilterbutterworth8.h" +#include "moc_enginefilterbutterworth8.cpp" + namespace { constexpr char kFidSpecLowPassButterworth8[] = "LpBu8"; constexpr char kFidSpecBandPassButterworth8[] = "BpBu8"; diff --git a/src/engine/filters/enginefilterlinkwitzriley2.cpp b/src/engine/filters/enginefilterlinkwitzriley2.cpp index 44527f454bfc..ef5704ef4b2e 100644 --- a/src/engine/filters/enginefilterlinkwitzriley2.cpp +++ b/src/engine/filters/enginefilterlinkwitzriley2.cpp @@ -1,5 +1,7 @@ #include "engine/filters/enginefilterlinkwitzriley2.h" +#include "moc_enginefilterlinkwitzriley2.cpp" + namespace { constexpr char kFidSpecLowPassButterworth1[] = "LpBu1"; constexpr char kFidSpecHighPassButterworth1[] = "HpBu1"; diff --git a/src/engine/filters/enginefilterlinkwitzriley4.cpp b/src/engine/filters/enginefilterlinkwitzriley4.cpp index 378314c1b726..3fec25a068e5 100644 --- a/src/engine/filters/enginefilterlinkwitzriley4.cpp +++ b/src/engine/filters/enginefilterlinkwitzriley4.cpp @@ -1,5 +1,7 @@ #include "engine/filters/enginefilterlinkwitzriley4.h" +#include "moc_enginefilterlinkwitzriley4.cpp" + namespace { constexpr char kFidSpecLowPassButterworth2[] = "LpBu2"; constexpr char kFidSpecHighPassButterworth2[] = "HpBu2"; diff --git a/src/engine/filters/enginefilterlinkwitzriley8.cpp b/src/engine/filters/enginefilterlinkwitzriley8.cpp index 775460590fc4..c59b7e526ff1 100644 --- a/src/engine/filters/enginefilterlinkwitzriley8.cpp +++ b/src/engine/filters/enginefilterlinkwitzriley8.cpp @@ -1,5 +1,7 @@ #include "engine/filters/enginefilterlinkwitzriley8.h" +#include "moc_enginefilterlinkwitzriley8.cpp" + namespace { constexpr char kFidSpecLowPassButterworth4[] = "LpBu4"; constexpr char kFidSpecHighPassButterworth4[] = "HpBu4"; diff --git a/src/engine/filters/enginefiltermoogladder4.cpp b/src/engine/filters/enginefiltermoogladder4.cpp index 9f3d153d5e01..dd71f71c0d9c 100644 --- a/src/engine/filters/enginefiltermoogladder4.cpp +++ b/src/engine/filters/enginefiltermoogladder4.cpp @@ -1,5 +1,6 @@ #include "engine/filters/enginefiltermoogladder4.h" +#include "moc_enginefiltermoogladder4.cpp" EngineFilterMoogLadder4Low::EngineFilterMoogLadder4Low(int sampleRate, double freqCorner1, @@ -12,5 +13,3 @@ EngineFilterMoogLadder4High::EngineFilterMoogLadder4High(int sampleRate, double resonance) : EngineFilterMoogLadderBase(sampleRate, (float)freqCorner1, (float)resonance) { } - - diff --git a/src/engine/sidechain/enginerecord.cpp b/src/engine/sidechain/enginerecord.cpp index 005faae1d250..122efe7edf4f 100644 --- a/src/engine/sidechain/enginerecord.cpp +++ b/src/engine/sidechain/enginerecord.cpp @@ -12,6 +12,7 @@ #include "control/controlproxy.h" #include "encoder/encoder.h" #include "mixer/playerinfo.h" +#include "moc_enginerecord.cpp" #include "preferences/usersettings.h" #include "recording/defs_recording.h" #include "track/track.h" diff --git a/src/engine/sidechain/enginesidechain.cpp b/src/engine/sidechain/enginesidechain.cpp index 2e095de39353..1677c3233c84 100644 --- a/src/engine/sidechain/enginesidechain.cpp +++ b/src/engine/sidechain/enginesidechain.cpp @@ -24,11 +24,12 @@ #include "engine/sidechain/enginesidechain.h" -#include #include +#include -#include "engine/sidechain/sidechainworker.h" #include "engine/engine.h" +#include "engine/sidechain/sidechainworker.h" +#include "moc_enginesidechain.cpp" #include "util/counter.h" #include "util/event.h" #include "util/sample.h" diff --git a/src/engine/sidechain/shoutconnection.cpp b/src/engine/sidechain/shoutconnection.cpp index a9f400af3516..c7e2d150955a 100644 --- a/src/engine/sidechain/shoutconnection.cpp +++ b/src/engine/sidechain/shoutconnection.cpp @@ -25,14 +25,14 @@ #ifdef __OPUS__ #include "encoder/encoderopus.h" #endif +#include "engine/sidechain/shoutconnection.h" #include "mixer/playerinfo.h" +#include "moc_shoutconnection.cpp" #include "preferences/usersettings.h" #include "recording/defs_recording.h" #include "track/track.h" #include "util/logger.h" -#include - namespace { const int kConnectRetries = 30; diff --git a/src/engine/sync/internalclock.cpp b/src/engine/sync/internalclock.cpp index 9b1b1a819d55..d12eebfdf499 100644 --- a/src/engine/sync/internalclock.cpp +++ b/src/engine/sync/internalclock.cpp @@ -6,6 +6,7 @@ #include "control/controlobject.h" #include "control/controlpushbutton.h" #include "engine/sync/enginesync.h" +#include "moc_internalclock.cpp" #include "preferences/usersettings.h" #include "util/logger.h" diff --git a/src/engine/sync/synccontrol.cpp b/src/engine/sync/synccontrol.cpp index acdf45eb46ea..dbbf5c6e7c83 100644 --- a/src/engine/sync/synccontrol.cpp +++ b/src/engine/sync/synccontrol.cpp @@ -7,6 +7,7 @@ #include "engine/controls/bpmcontrol.h" #include "engine/controls/ratecontrol.h" #include "engine/enginebuffer.h" +#include "moc_synccontrol.cpp" #include "track/track.h" #include "util/assert.h" #include "util/logger.h" diff --git a/src/errordialoghandler.cpp b/src/errordialoghandler.cpp index 650a6f5dbdde..4acde4ee50db 100644 --- a/src/errordialoghandler.cpp +++ b/src/errordialoghandler.cpp @@ -15,13 +15,15 @@ * * ***************************************************************************/ +#include "errordialoghandler.h" + #include #include #include #include #include -#include "errordialoghandler.h" +#include "moc_errordialoghandler.cpp" #include "util/assert.h" #include "util/version.h" diff --git a/src/library/analysisfeature.cpp b/src/library/analysisfeature.cpp index e03220f8e7ee..ebdc605105e8 100644 --- a/src/library/analysisfeature.cpp +++ b/src/library/analysisfeature.cpp @@ -2,21 +2,21 @@ // Created 8/23/2009 by RJ Ryan (rryan@mit.edu) // Forked 11/11/2009 by Albert Santoni (alberts@mixxx.org) -#include - -#include "library/library.h" #include "library/analysisfeature.h" +#include + +#include "controllers/keyboard/keyboardeventfilter.h" +#include "library/dlganalysis.h" #include "library/library.h" #include "library/librarytablemodel.h" #include "library/trackcollection.h" -#include "library/dlganalysis.h" -#include "widget/wlibrary.h" -#include "controllers/keyboard/keyboardeventfilter.h" +#include "moc_analysisfeature.cpp" #include "sources/soundsourceproxy.h" -#include "util/dnd.h" #include "util/debug.h" +#include "util/dnd.h" #include "util/logger.h" +#include "widget/wlibrary.h" namespace { diff --git a/src/library/analysislibrarytablemodel.cpp b/src/library/analysislibrarytablemodel.cpp index 2e726fb6aaae..4eeccbf5e1b5 100644 --- a/src/library/analysislibrarytablemodel.cpp +++ b/src/library/analysislibrarytablemodel.cpp @@ -1,5 +1,7 @@ #include "library/analysislibrarytablemodel.h" +#include "moc_analysislibrarytablemodel.cpp" + namespace { const QString RECENT_FILTER = "datetime_added > datetime('now', '-7 days')"; diff --git a/src/library/autodj/autodjfeature.cpp b/src/library/autodj/autodjfeature.cpp index 16d728fd1c7a..b0d881016f4b 100644 --- a/src/library/autodj/autodjfeature.cpp +++ b/src/library/autodj/autodjfeature.cpp @@ -18,6 +18,7 @@ #include "library/trackcollectionmanager.h" #include "library/treeitem.h" #include "mixer/playermanager.h" +#include "moc_autodjfeature.cpp" #include "sources/soundsourceproxy.h" #include "track/track.h" #include "util/compatibility.h" diff --git a/src/library/autodj/autodjprocessor.cpp b/src/library/autodj/autodjprocessor.cpp index 5c5ebf2ea806..029876bbb313 100644 --- a/src/library/autodj/autodjprocessor.cpp +++ b/src/library/autodj/autodjprocessor.cpp @@ -6,6 +6,7 @@ #include "library/trackcollection.h" #include "mixer/basetrackplayer.h" #include "mixer/playermanager.h" +#include "moc_autodjprocessor.cpp" #include "track/track.h" #include "util/math.h" diff --git a/src/library/autodj/dlgautodj.cpp b/src/library/autodj/dlgautodj.cpp index aede1ad54c90..f56c0054e4fd 100644 --- a/src/library/autodj/dlgautodj.cpp +++ b/src/library/autodj/dlgautodj.cpp @@ -4,6 +4,7 @@ #include "library/playlisttablemodel.h" #include "library/trackcollectionmanager.h" +#include "moc_dlgautodj.cpp" #include "track/track.h" #include "util/assert.h" #include "util/compatibility.h" diff --git a/src/library/banshee/bansheefeature.cpp b/src/library/banshee/bansheefeature.cpp index ee6f9a833314..faed634666ce 100644 --- a/src/library/banshee/bansheefeature.cpp +++ b/src/library/banshee/bansheefeature.cpp @@ -10,6 +10,7 @@ #include "library/dao/settingsdao.h" #include "library/library.h" #include "library/trackcollectionmanager.h" +#include "moc_bansheefeature.cpp" #include "track/track.h" const QString BansheeFeature::BANSHEE_MOUNT_KEY = "mixxx.BansheeFeature.mount"; diff --git a/src/library/banshee/bansheeplaylistmodel.cpp b/src/library/banshee/bansheeplaylistmodel.cpp index 61d0c919e8e9..f3a7b70eba81 100644 --- a/src/library/banshee/bansheeplaylistmodel.cpp +++ b/src/library/banshee/bansheeplaylistmodel.cpp @@ -8,6 +8,7 @@ #include "library/starrating.h" #include "library/trackcollectionmanager.h" #include "mixer/playermanager.h" +#include "moc_bansheeplaylistmodel.cpp" #include "track/beatfactory.h" #include "track/beats.h" #include "track/track.h" diff --git a/src/library/baseexternallibraryfeature.cpp b/src/library/baseexternallibraryfeature.cpp index 7f4604e0cbc4..32b4160c04ca 100644 --- a/src/library/baseexternallibraryfeature.cpp +++ b/src/library/baseexternallibraryfeature.cpp @@ -6,8 +6,9 @@ #include "library/library.h" #include "library/trackcollection.h" #include "library/trackcollectionmanager.h" -#include "widget/wlibrarysidebar.h" +#include "moc_baseexternallibraryfeature.cpp" #include "util/logger.h" +#include "widget/wlibrarysidebar.h" namespace { diff --git a/src/library/baseexternalplaylistmodel.cpp b/src/library/baseexternalplaylistmodel.cpp index 77b39dcf2f8b..c419cdba6be5 100644 --- a/src/library/baseexternalplaylistmodel.cpp +++ b/src/library/baseexternalplaylistmodel.cpp @@ -5,6 +5,7 @@ #include "library/trackcollection.h" #include "library/trackcollectionmanager.h" #include "mixer/playermanager.h" +#include "moc_baseexternalplaylistmodel.cpp" #include "track/track.h" BaseExternalPlaylistModel::BaseExternalPlaylistModel(QObject* parent, diff --git a/src/library/baseexternaltrackmodel.cpp b/src/library/baseexternaltrackmodel.cpp index 96b909d95743..ca48510a0865 100644 --- a/src/library/baseexternaltrackmodel.cpp +++ b/src/library/baseexternaltrackmodel.cpp @@ -4,6 +4,7 @@ #include "library/queryutil.h" #include "library/trackcollectionmanager.h" #include "mixer/playermanager.h" +#include "moc_baseexternaltrackmodel.cpp" #include "track/track.h" BaseExternalTrackModel::BaseExternalTrackModel(QObject* parent, diff --git a/src/library/baseplaylistfeature.cpp b/src/library/baseplaylistfeature.cpp index 9f7d897f803f..c6be5113513e 100644 --- a/src/library/baseplaylistfeature.cpp +++ b/src/library/baseplaylistfeature.cpp @@ -16,6 +16,7 @@ #include "library/trackcollection.h" #include "library/trackcollectionmanager.h" #include "library/treeitem.h" +#include "moc_baseplaylistfeature.cpp" #include "track/track.h" #include "util/assert.h" #include "widget/wlibrary.h" diff --git a/src/library/basesqltablemodel.cpp b/src/library/basesqltablemodel.cpp index bc5e40759a00..4a4b73da5903 100644 --- a/src/library/basesqltablemodel.cpp +++ b/src/library/basesqltablemodel.cpp @@ -12,6 +12,7 @@ #include "library/trackcollection.h" #include "library/trackcollectionmanager.h" #include "mixer/playermanager.h" +#include "moc_basesqltablemodel.cpp" #include "track/keyutils.h" #include "track/track.h" #include "track/trackmetadata.h" diff --git a/src/library/basetrackcache.cpp b/src/library/basetrackcache.cpp index e98ee5f535e7..9788fedc234f 100644 --- a/src/library/basetrackcache.cpp +++ b/src/library/basetrackcache.cpp @@ -6,6 +6,7 @@ #include "library/queryutil.h" #include "library/searchqueryparser.h" #include "library/trackcollection.h" +#include "moc_basetrackcache.cpp" #include "track/globaltrackcache.h" #include "track/keyutils.h" #include "track/track.h" diff --git a/src/library/basetracksetfeature.cpp b/src/library/basetracksetfeature.cpp index f3160a6659fb..05218957778c 100644 --- a/src/library/basetracksetfeature.cpp +++ b/src/library/basetracksetfeature.cpp @@ -1,5 +1,7 @@ #include "library/basetracksetfeature.h" +#include "moc_basetracksetfeature.cpp" + BaseTrackSetFeature::BaseTrackSetFeature( Library* pLibrary, UserSettingsPointer pConfig, diff --git a/src/library/basetracktablemodel.cpp b/src/library/basetracktablemodel.cpp index bff1873cb25c..b7881f23c6b7 100644 --- a/src/library/basetracktablemodel.cpp +++ b/src/library/basetracktablemodel.cpp @@ -13,6 +13,7 @@ #include "library/trackcollectionmanager.h" #include "mixer/playerinfo.h" #include "mixer/playermanager.h" +#include "moc_basetracktablemodel.cpp" #include "track/track.h" #include "util/assert.h" #include "util/compatibility.h" diff --git a/src/library/bpmdelegate.cpp b/src/library/bpmdelegate.cpp index 826b7ce82b89..6c8b5d8eb576 100644 --- a/src/library/bpmdelegate.cpp +++ b/src/library/bpmdelegate.cpp @@ -1,13 +1,15 @@ -#include -#include +#include "library/bpmdelegate.h" + #include -#include +#include +#include +#include #include +#include #include -#include -#include "library/bpmdelegate.h" #include "library/trackmodel.h" +#include "moc_bpmdelegate.cpp" // We override the typical QDoubleSpinBox editor by registering this class with // a QItemEditorFactory for the BPMDelegate. diff --git a/src/library/browse/browsefeature.cpp b/src/library/browse/browsefeature.cpp index 3906e03e1457..c851c8f18e9b 100644 --- a/src/library/browse/browsefeature.cpp +++ b/src/library/browse/browsefeature.cpp @@ -1,6 +1,8 @@ // browsefeature.cpp // Created 9/8/2009 by RJ Ryan (rryan@mit.edu) +#include "library/browse/browsefeature.h" + #include #include #include @@ -11,16 +13,16 @@ #include #include "controllers/keyboard/keyboardeventfilter.h" -#include "library/browse/browsefeature.h" #include "library/library.h" #include "library/trackcollection.h" #include "library/trackcollectionmanager.h" #include "library/treeitem.h" +#include "moc_browsefeature.cpp" #include "track/track.h" #include "util/memory.h" #include "widget/wlibrary.h" -#include "widget/wlibrarytextbrowser.h" #include "widget/wlibrarysidebar.h" +#include "widget/wlibrarytextbrowser.h" namespace { diff --git a/src/library/browse/browsetablemodel.cpp b/src/library/browse/browsetablemodel.cpp index 67c60c9eedd9..6d1ac08f92c9 100644 --- a/src/library/browse/browsetablemodel.cpp +++ b/src/library/browse/browsetablemodel.cpp @@ -15,6 +15,7 @@ #include "library/trackcollectionmanager.h" #include "mixer/playerinfo.h" #include "mixer/playermanager.h" +#include "moc_browsetablemodel.cpp" #include "track/track.h" #include "util/compatibility.h" #include "widget/wlibrarytableview.h" diff --git a/src/library/browse/browsethread.cpp b/src/library/browse/browsethread.cpp index a6d9e520c884..24a9a250f5a5 100644 --- a/src/library/browse/browsethread.cpp +++ b/src/library/browse/browsethread.cpp @@ -2,12 +2,15 @@ * browsethread.cpp (C) 2011 Tobias Rafreider */ +#include "library/browse/browsethread.h" + #include #include #include #include #include "library/browse/browsetablemodel.h" +#include "moc_browsethread.cpp" #include "sources/soundsourceproxy.h" #include "track/track.h" #include "util/datetime.h" diff --git a/src/library/browse/foldertreemodel.cpp b/src/library/browse/foldertreemodel.cpp index b55d2de62897..b8081529dcb1 100644 --- a/src/library/browse/foldertreemodel.cpp +++ b/src/library/browse/foldertreemodel.cpp @@ -12,9 +12,10 @@ #include -#include "library/treeitem.h" -#include "library/browse/foldertreemodel.h" #include "library/browse/browsefeature.h" +#include "library/browse/foldertreemodel.h" +#include "library/treeitem.h" +#include "moc_foldertreemodel.cpp" #include "util/file.h" FolderTreeModel::FolderTreeModel(QObject *parent) diff --git a/src/library/colordelegate.cpp b/src/library/colordelegate.cpp index 49d2c4edeb16..453939c96eca 100644 --- a/src/library/colordelegate.cpp +++ b/src/library/colordelegate.cpp @@ -6,6 +6,7 @@ #include #include "library/trackmodel.h" +#include "moc_colordelegate.cpp" #include "util/color/rgbcolor.h" ColorDelegate::ColorDelegate(QTableView* pTableView) diff --git a/src/library/columncache.cpp b/src/library/columncache.cpp index 9ef90a67d326..a8461ac430df 100644 --- a/src/library/columncache.cpp +++ b/src/library/columncache.cpp @@ -1,10 +1,10 @@ #include "library/columncache.h" -#include "library/dao/trackschema.h" #include "library/dao/playlistdao.h" +#include "library/dao/trackschema.h" +#include "moc_columncache.cpp" - - ColumnCache::ColumnCache(const QStringList& columns) { +ColumnCache::ColumnCache(const QStringList& columns) { m_pKeyNotationCP = new ControlProxy("[Library]", "key_notation", this); m_pKeyNotationCP->connectValueChanged(this, &ColumnCache::slotSetKeySortOrder); diff --git a/src/library/coverartcache.cpp b/src/library/coverartcache.cpp index 054794b6be16..656107ce8aac 100644 --- a/src/library/coverartcache.cpp +++ b/src/library/coverartcache.cpp @@ -6,6 +6,7 @@ #include #include "library/coverartutils.h" +#include "moc_coverartcache.cpp" #include "track/track.h" #include "util/compatibility.h" #include "util/logger.h" diff --git a/src/library/coverartdelegate.cpp b/src/library/coverartdelegate.cpp index 3cecd19f8a7d..4d92f44f17e3 100644 --- a/src/library/coverartdelegate.cpp +++ b/src/library/coverartdelegate.cpp @@ -6,6 +6,7 @@ #include "library/coverartcache.h" #include "library/dao/trackschema.h" #include "library/trackmodel.h" +#include "moc_coverartdelegate.cpp" #include "track/track.h" #include "util/logger.h" #include "widget/wlibrarytableview.h" diff --git a/src/library/crate/cratefeature.cpp b/src/library/crate/cratefeature.cpp index bad303891cc6..66724c244720 100644 --- a/src/library/crate/cratefeature.cpp +++ b/src/library/crate/cratefeature.cpp @@ -18,6 +18,7 @@ #include "library/trackcollection.h" #include "library/trackcollectionmanager.h" #include "library/treeitem.h" +#include "moc_cratefeature.cpp" #include "sources/soundsourceproxy.h" #include "track/track.h" #include "util/dnd.h" diff --git a/src/library/crate/cratefeaturehelper.cpp b/src/library/crate/cratefeaturehelper.cpp index d28eab411380..71717f4083ce 100644 --- a/src/library/crate/cratefeaturehelper.cpp +++ b/src/library/crate/cratefeaturehelper.cpp @@ -4,7 +4,7 @@ #include #include "library/trackcollection.h" - +#include "moc_cratefeaturehelper.cpp" CrateFeatureHelper::CrateFeatureHelper( TrackCollection* pTrackCollection, diff --git a/src/library/crate/cratetablemodel.cpp b/src/library/crate/cratetablemodel.cpp index 701728bf4493..b5887b529530 100644 --- a/src/library/crate/cratetablemodel.cpp +++ b/src/library/crate/cratetablemodel.cpp @@ -7,6 +7,7 @@ #include "library/trackcollection.h" #include "library/trackcollectionmanager.h" #include "mixer/playermanager.h" +#include "moc_cratetablemodel.cpp" #include "track/track.h" #include "util/db/fwdsqlquery.h" diff --git a/src/library/dao/autodjcratesdao.cpp b/src/library/dao/autodjcratesdao.cpp index 90c745f91cac..149e7a1e89fc 100644 --- a/src/library/dao/autodjcratesdao.cpp +++ b/src/library/dao/autodjcratesdao.cpp @@ -1,5 +1,7 @@ #include "library/dao/autodjcratesdao.h" +#include "moc_autodjcratesdao.cpp" + #if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)) #include #endif diff --git a/src/library/dao/playlistdao.cpp b/src/library/dao/playlistdao.cpp index 34e1368755ce..8a0248717fb4 100644 --- a/src/library/dao/playlistdao.cpp +++ b/src/library/dao/playlistdao.cpp @@ -1,5 +1,7 @@ #include "library/dao/playlistdao.h" +#include "moc_playlistdao.cpp" + #if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)) #include #endif diff --git a/src/library/dao/trackdao.cpp b/src/library/dao/trackdao.cpp index e51ee5fbfd74..2888750d1461 100644 --- a/src/library/dao/trackdao.cpp +++ b/src/library/dao/trackdao.cpp @@ -18,6 +18,7 @@ #include "library/dao/playlistdao.h" #include "library/dao/trackschema.h" #include "library/queryutil.h" +#include "moc_trackdao.cpp" #include "sources/soundsourceproxy.h" #include "track/beatfactory.h" #include "track/beats.h" diff --git a/src/library/dlganalysis.cpp b/src/library/dlganalysis.cpp index 92ac221593c0..0912de810bcb 100644 --- a/src/library/dlganalysis.cpp +++ b/src/library/dlganalysis.cpp @@ -1,15 +1,17 @@ +#include "library/dlganalysis.h" + #include -#include "widget/wwidget.h" -#include "widget/wskincolor.h" -#include "widget/wanalysislibrarytableview.h" #include "analyzer/analyzerprogress.h" #include "library/dao/trackschema.h" -#include "library/trackcollectionmanager.h" -#include "library/dlganalysis.h" #include "library/library.h" -#include "widget/wlibrary.h" +#include "library/trackcollectionmanager.h" +#include "moc_dlganalysis.cpp" #include "util/assert.h" +#include "widget/wanalysislibrarytableview.h" +#include "widget/wlibrary.h" +#include "widget/wskincolor.h" +#include "widget/wwidget.h" DlgAnalysis::DlgAnalysis(WLibrary* parent, UserSettingsPointer pConfig, diff --git a/src/library/dlgcoverartfullsize.cpp b/src/library/dlgcoverartfullsize.cpp index 7d25c4417beb..b7309af19313 100644 --- a/src/library/dlgcoverartfullsize.cpp +++ b/src/library/dlgcoverartfullsize.cpp @@ -7,6 +7,7 @@ #include "library/coverartcache.h" #include "library/coverartutils.h" +#include "moc_dlgcoverartfullsize.cpp" #include "track/track.h" #include "util/widgethelper.h" diff --git a/src/library/dlghidden.cpp b/src/library/dlghidden.cpp index a19b8d29322c..bdd451e13d8e 100644 --- a/src/library/dlghidden.cpp +++ b/src/library/dlghidden.cpp @@ -2,9 +2,10 @@ #include "library/hiddentablemodel.h" #include "library/trackcollectionmanager.h" +#include "moc_dlghidden.cpp" +#include "util/assert.h" #include "widget/wlibrary.h" #include "widget/wtracktableview.h" -#include "util/assert.h" DlgHidden::DlgHidden( WLibrary* parent, diff --git a/src/library/dlgmissing.cpp b/src/library/dlgmissing.cpp index 60eb30a240b2..ffa65cd64fff 100644 --- a/src/library/dlgmissing.cpp +++ b/src/library/dlgmissing.cpp @@ -2,9 +2,10 @@ #include "library/missingtablemodel.h" #include "library/trackcollectionmanager.h" +#include "moc_dlgmissing.cpp" +#include "util/assert.h" #include "widget/wlibrary.h" #include "widget/wtracktableview.h" -#include "util/assert.h" DlgMissing::DlgMissing( WLibrary* parent, diff --git a/src/library/dlgtagfetcher.cpp b/src/library/dlgtagfetcher.cpp index 86fe9551f0ce..fef419f9f1be 100644 --- a/src/library/dlgtagfetcher.cpp +++ b/src/library/dlgtagfetcher.cpp @@ -3,6 +3,7 @@ #include #include +#include "moc_dlgtagfetcher.cpp" #include "track/track.h" #include "track/tracknumbers.h" diff --git a/src/library/dlgtrackinfo.cpp b/src/library/dlgtrackinfo.cpp index e53722e6c815..15063c224c2c 100644 --- a/src/library/dlgtrackinfo.cpp +++ b/src/library/dlgtrackinfo.cpp @@ -8,6 +8,7 @@ #include "library/coverartutils.h" #include "library/dlgtagfetcher.h" #include "library/trackmodel.h" +#include "moc_dlgtrackinfo.cpp" #include "preferences/colorpalettesettings.h" #include "sources/soundsourceproxy.h" #include "track/beatfactory.h" diff --git a/src/library/dlgtrackmetadataexport.cpp b/src/library/dlgtrackmetadataexport.cpp index 7c580717f1cd..15dd2997db0f 100644 --- a/src/library/dlgtrackmetadataexport.cpp +++ b/src/library/dlgtrackmetadataexport.cpp @@ -2,6 +2,7 @@ #include +#include "moc_dlgtrackmetadataexport.cpp" namespace mixxx { diff --git a/src/library/export/trackexportdlg.cpp b/src/library/export/trackexportdlg.cpp index 8efdea6aae55..d185e3904333 100644 --- a/src/library/export/trackexportdlg.cpp +++ b/src/library/export/trackexportdlg.cpp @@ -1,9 +1,10 @@ #include "library/export/trackexportdlg.h" -#include #include +#include #include +#include "moc_trackexportdlg.cpp" #include "util/assert.h" TrackExportDlg::TrackExportDlg(QWidget *parent, diff --git a/src/library/export/trackexportwizard.cpp b/src/library/export/trackexportwizard.cpp index ddbfa8fd56aa..12aee6081a36 100644 --- a/src/library/export/trackexportwizard.cpp +++ b/src/library/export/trackexportwizard.cpp @@ -2,9 +2,10 @@ #include #include -#include #include +#include +#include "moc_trackexportwizard.cpp" #include "util/assert.h" void TrackExportWizard::exportTracks() { diff --git a/src/library/export/trackexportworker.cpp b/src/library/export/trackexportworker.cpp index 38406eccdc54..dd9a16f56772 100644 --- a/src/library/export/trackexportworker.cpp +++ b/src/library/export/trackexportworker.cpp @@ -4,6 +4,7 @@ #include #include +#include "moc_trackexportworker.cpp" #include "track/track.h" namespace { diff --git a/src/library/externaltrackcollection.cpp b/src/library/externaltrackcollection.cpp index ce5f38b21146..13556b7a30f5 100644 --- a/src/library/externaltrackcollection.cpp +++ b/src/library/externaltrackcollection.cpp @@ -1,5 +1,6 @@ #include "library/externaltrackcollection.h" +#include "moc_externaltrackcollection.cpp" void ExternalTrackCollection::relocateTracks( const QList& relocatedTracks) { diff --git a/src/library/hiddentablemodel.cpp b/src/library/hiddentablemodel.cpp index 7bc955e08e3c..3a2b3425ffbc 100644 --- a/src/library/hiddentablemodel.cpp +++ b/src/library/hiddentablemodel.cpp @@ -1,9 +1,9 @@ #include "library/hiddentablemodel.h" +#include "library/dao/trackschema.h" #include "library/trackcollection.h" #include "library/trackcollectionmanager.h" -#include "library/dao/trackschema.h" - +#include "moc_hiddentablemodel.cpp" HiddenTableModel::HiddenTableModel(QObject* parent, TrackCollectionManager* pTrackCollectionManager) diff --git a/src/library/itunes/itunesfeature.cpp b/src/library/itunes/itunesfeature.cpp index 524720e7c245..d7fc40a5f5f6 100644 --- a/src/library/itunes/itunesfeature.cpp +++ b/src/library/itunes/itunesfeature.cpp @@ -1,22 +1,23 @@ -#include -#include -#include -#include +#include "library/itunes/itunesfeature.h" + +#include #include +#include #include -#include +#include +#include #include -#include - -#include "library/itunes/itunesfeature.h" +#include +#include +#include "library/baseexternalplaylistmodel.h" +#include "library/baseexternaltrackmodel.h" #include "library/basetrackcache.h" #include "library/dao/settingsdao.h" -#include "library/baseexternaltrackmodel.h" -#include "library/baseexternalplaylistmodel.h" -#include "library/queryutil.h" #include "library/library.h" +#include "library/queryutil.h" #include "library/trackcollectionmanager.h" +#include "moc_itunesfeature.cpp" #include "util/lcs.h" #include "util/sandbox.h" #include "widget/wlibrarysidebar.h" diff --git a/src/library/library.cpp b/src/library/library.cpp index 1d8b45e26c36..2a17646969ce 100644 --- a/src/library/library.cpp +++ b/src/library/library.cpp @@ -1,31 +1,27 @@ // library.cpp // Created 8/23/2009 by RJ Ryan (rryan@mit.edu) +#include "library/library.h" + +#include #include #include -#include -#include #include +#include +#include "controllers/keyboard/keyboardeventfilter.h" #include "database/mixxxdb.h" - -#include "library/library.h" -#include "library/library_preferences.h" -#include "library/librarycontrol.h" -#include "library/libraryfeature.h" -#include "library/librarytablemodel.h" -#include "library/sidebarmodel.h" -#include "library/trackcollection.h" -#include "library/externaltrackcollection.h" -#include "library/trackcollectionmanager.h" -#include "library/trackmodel.h" - #include "library/analysisfeature.h" #include "library/autodj/autodjfeature.h" #include "library/banshee/bansheefeature.h" #include "library/browse/browsefeature.h" #include "library/crate/cratefeature.h" +#include "library/externaltrackcollection.h" #include "library/itunes/itunesfeature.h" +#include "library/library_preferences.h" +#include "library/librarycontrol.h" +#include "library/libraryfeature.h" +#include "library/librarytablemodel.h" #include "library/mixxxlibraryfeature.h" #include "library/playlistfeature.h" #include "library/recording/recordingfeature.h" @@ -33,23 +29,22 @@ #include "library/rhythmbox/rhythmboxfeature.h" #include "library/serato/seratofeature.h" #include "library/setlogfeature.h" +#include "library/sidebarmodel.h" +#include "library/trackcollection.h" +#include "library/trackcollectionmanager.h" +#include "library/trackmodel.h" #include "library/traktor/traktorfeature.h" - #include "mixer/playermanager.h" - +#include "moc_library.cpp" #include "recording/recordingmanager.h" - +#include "util/assert.h" #include "util/db/dbconnectionpooled.h" -#include "util/sandbox.h" #include "util/logger.h" -#include "util/assert.h" - -#include "widget/wtracktableview.h" +#include "util/sandbox.h" #include "widget/wlibrary.h" #include "widget/wlibrarysidebar.h" #include "widget/wsearchlineedit.h" - -#include "controllers/keyboard/keyboardeventfilter.h" +#include "widget/wtracktableview.h" namespace { diff --git a/src/library/librarycontrol.cpp b/src/library/librarycontrol.cpp index 05942d112203..7ba09d103686 100644 --- a/src/library/librarycontrol.cpp +++ b/src/library/librarycontrol.cpp @@ -8,13 +8,14 @@ #include "control/controlobject.h" #include "control/controlpushbutton.h" +#include "library/library.h" +#include "library/libraryview.h" #include "mixer/playermanager.h" +#include "moc_librarycontrol.cpp" #include "widget/wlibrary.h" #include "widget/wlibrarysidebar.h" #include "widget/wsearchlineedit.h" #include "widget/wtracktableview.h" -#include "library/library.h" -#include "library/libraryview.h" LoadToGroupController::LoadToGroupController(LibraryControl* pParent, const QString& group) : QObject(pParent), diff --git a/src/library/libraryfeature.cpp b/src/library/libraryfeature.cpp index 1458ad1cf670..153be49c21c2 100644 --- a/src/library/libraryfeature.cpp +++ b/src/library/libraryfeature.cpp @@ -1,13 +1,14 @@ // libraryfeature.cpp // Created 8/17/2009 by RJ Ryan (rryan@mit.edu) -#include - #include "library/libraryfeature.h" +#include + #include "library/library.h" #include "library/parserm3u.h" #include "library/parserpls.h" +#include "moc_libraryfeature.cpp" #include "util/logger.h" // KEEP THIS cpp file to tell scons that moc should be called on the class!!! diff --git a/src/library/librarytablemodel.cpp b/src/library/librarytablemodel.cpp index 336ac3bb61f0..3921a493c6ac 100644 --- a/src/library/librarytablemodel.cpp +++ b/src/library/librarytablemodel.cpp @@ -1,11 +1,11 @@ #include "library/librarytablemodel.h" #include "library/dao/trackschema.h" +#include "library/queryutil.h" #include "library/trackcollection.h" #include "library/trackcollectionmanager.h" -#include "library/queryutil.h" - #include "mixer/playermanager.h" +#include "moc_librarytablemodel.cpp" namespace { diff --git a/src/library/locationdelegate.cpp b/src/library/locationdelegate.cpp index cf48a9a1a71d..43438d58e6e1 100644 --- a/src/library/locationdelegate.cpp +++ b/src/library/locationdelegate.cpp @@ -2,6 +2,7 @@ #include +#include "moc_locationdelegate.cpp" LocationDelegate::LocationDelegate(QTableView* pTableView) : TableItemDelegate(pTableView) { diff --git a/src/library/missingtablemodel.cpp b/src/library/missingtablemodel.cpp index 933f016063f9..6e4af6cab523 100644 --- a/src/library/missingtablemodel.cpp +++ b/src/library/missingtablemodel.cpp @@ -1,8 +1,9 @@ #include "library/missingtablemodel.h" +#include "library/dao/trackschema.h" #include "library/trackcollection.h" #include "library/trackcollectionmanager.h" -#include "library/dao/trackschema.h" +#include "moc_missingtablemodel.cpp" namespace { diff --git a/src/library/mixxxlibraryfeature.cpp b/src/library/mixxxlibraryfeature.cpp index 5e20198ab02d..a7dc2f899cfa 100644 --- a/src/library/mixxxlibraryfeature.cpp +++ b/src/library/mixxxlibraryfeature.cpp @@ -18,6 +18,7 @@ #include "library/trackcollection.h" #include "library/trackcollectionmanager.h" #include "library/treeitem.h" +#include "moc_mixxxlibraryfeature.cpp" #include "sources/soundsourceproxy.h" #include "util/dnd.h" #include "widget/wlibrary.h" diff --git a/src/library/parsercsv.cpp b/src/library/parsercsv.cpp index 9e237bcbfde0..83a0dd10651c 100644 --- a/src/library/parsercsv.cpp +++ b/src/library/parsercsv.cpp @@ -14,10 +14,12 @@ #include "library/parsercsv.h" -#include -#include #include #include +#include +#include + +#include "moc_parsercsv.cpp" ParserCsv::ParserCsv() : Parser() { } diff --git a/src/library/parserm3u.cpp b/src/library/parserm3u.cpp index fbd5dbc60562..1a6bb13f1d11 100644 --- a/src/library/parserm3u.cpp +++ b/src/library/parserm3u.cpp @@ -13,11 +13,13 @@ #include "library/parserm3u.h" -#include #include #include -#include #include +#include +#include + +#include "moc_parserm3u.cpp" /** @author Ingo Kossyk (kossyki@cs.tu-berlin.de) diff --git a/src/library/parserpls.cpp b/src/library/parserpls.cpp index e224aec67be0..5e33d304b849 100644 --- a/src/library/parserpls.cpp +++ b/src/library/parserpls.cpp @@ -12,11 +12,13 @@ // #include "library/parserpls.h" -#include -#include #include #include +#include #include +#include + +#include "moc_parserpls.cpp" /** @author Ingo Kossyk (kossyki@cs.tu-berlin.de) diff --git a/src/library/playlistfeature.cpp b/src/library/playlistfeature.cpp index f9ba23e0bb5e..f2f979cb9578 100644 --- a/src/library/playlistfeature.cpp +++ b/src/library/playlistfeature.cpp @@ -12,6 +12,7 @@ #include "library/trackcollection.h" #include "library/trackcollectionmanager.h" #include "library/treeitem.h" +#include "moc_playlistfeature.cpp" #include "sources/soundsourceproxy.h" #include "util/db/dbconnection.h" #include "util/dnd.h" diff --git a/src/library/playlisttablemodel.cpp b/src/library/playlisttablemodel.cpp index 624689ff9857..6cdacc89ec59 100644 --- a/src/library/playlisttablemodel.cpp +++ b/src/library/playlisttablemodel.cpp @@ -5,8 +5,8 @@ #include "library/queryutil.h" #include "library/trackcollection.h" #include "library/trackcollectionmanager.h" - #include "mixer/playermanager.h" +#include "moc_playlisttablemodel.cpp" PlaylistTableModel::PlaylistTableModel(QObject* parent, TrackCollectionManager* pTrackCollectionManager, diff --git a/src/library/previewbuttondelegate.cpp b/src/library/previewbuttondelegate.cpp index b244c68ac82f..f97f05089241 100644 --- a/src/library/previewbuttondelegate.cpp +++ b/src/library/previewbuttondelegate.cpp @@ -8,6 +8,7 @@ #include "library/trackmodel.h" #include "mixer/playerinfo.h" #include "mixer/playermanager.h" +#include "moc_previewbuttondelegate.cpp" #include "track/track.h" #include "widget/wlibrarytableview.h" diff --git a/src/library/recording/dlgrecording.cpp b/src/library/recording/dlgrecording.cpp index b0b4839366e6..37bd815f3aed 100644 --- a/src/library/recording/dlgrecording.cpp +++ b/src/library/recording/dlgrecording.cpp @@ -4,6 +4,7 @@ #include "control/controlobject.h" #include "library/trackcollectionmanager.h" +#include "moc_dlgrecording.cpp" #include "util/assert.h" #include "widget/wlibrary.h" #include "widget/wskincolor.h" diff --git a/src/library/recording/recordingfeature.cpp b/src/library/recording/recordingfeature.cpp index 26a8998fa990..96f428fa544a 100644 --- a/src/library/recording/recordingfeature.cpp +++ b/src/library/recording/recordingfeature.cpp @@ -1,14 +1,16 @@ // recordingfeature.cpp // Created 03/26/2010 by Tobias Rafreider -#include "library/recording/dlgrecording.h" -#include "track/track.h" -#include "library/treeitem.h" #include "library/recording/recordingfeature.h" -#include "library/library.h" -#include "widget/wlibrary.h" + #include "controllers/keyboard/keyboardeventfilter.h" +#include "library/library.h" +#include "library/recording/dlgrecording.h" +#include "library/treeitem.h" +#include "moc_recordingfeature.cpp" #include "recording/recordingmanager.h" +#include "track/track.h" +#include "widget/wlibrary.h" namespace { diff --git a/src/library/rekordbox/rekordboxfeature.cpp b/src/library/rekordbox/rekordboxfeature.cpp index e60b5698aa4a..8b4539ee72df 100644 --- a/src/library/rekordbox/rekordboxfeature.cpp +++ b/src/library/rekordbox/rekordboxfeature.cpp @@ -21,6 +21,7 @@ #include "library/trackcollection.h" #include "library/trackcollectionmanager.h" #include "library/treeitem.h" +#include "moc_rekordboxfeature.cpp" #include "track/beatmap.h" #include "track/cue.h" #include "track/keyfactory.h" diff --git a/src/library/rhythmbox/rhythmboxfeature.cpp b/src/library/rhythmbox/rhythmboxfeature.cpp index 3ae7f61ba03b..7c907aa85bc2 100644 --- a/src/library/rhythmbox/rhythmboxfeature.cpp +++ b/src/library/rhythmbox/rhythmboxfeature.cpp @@ -1,17 +1,18 @@ +#include "library/rhythmbox/rhythmboxfeature.h" + #include -#include #include #include +#include -#include "library/rhythmbox/rhythmboxfeature.h" - -#include "library/baseexternaltrackmodel.h" #include "library/baseexternalplaylistmodel.h" +#include "library/baseexternaltrackmodel.h" #include "library/library.h" +#include "library/queryutil.h" #include "library/trackcollection.h" #include "library/trackcollectionmanager.h" #include "library/treeitem.h" -#include "library/queryutil.h" +#include "moc_rhythmboxfeature.cpp" RhythmboxFeature::RhythmboxFeature(Library* pLibrary, UserSettingsPointer pConfig) : BaseExternalLibraryFeature(pLibrary, pConfig), diff --git a/src/library/scanner/importfilestask.cpp b/src/library/scanner/importfilestask.cpp index 7d124cb28606..7b3b6704409e 100644 --- a/src/library/scanner/importfilestask.cpp +++ b/src/library/scanner/importfilestask.cpp @@ -1,6 +1,7 @@ #include "library/scanner/importfilestask.h" #include "library/scanner/libraryscanner.h" +#include "moc_importfilestask.cpp" #include "track/trackfile.h" #include "util/timer.h" diff --git a/src/library/scanner/libraryscanner.cpp b/src/library/scanner/libraryscanner.cpp index 5c82ee5288f1..5aa3e2858e51 100644 --- a/src/library/scanner/libraryscanner.cpp +++ b/src/library/scanner/libraryscanner.cpp @@ -6,6 +6,7 @@ #include "library/scanner/recursivescandirectorytask.h" #include "library/scanner/scannertask.h" #include "library/scanner/scannerutil.h" +#include "moc_libraryscanner.cpp" #include "sources/soundsourceproxy.h" #include "track/track.h" #include "util/db/dbconnectionpooled.h" diff --git a/src/library/scanner/libraryscannerdlg.cpp b/src/library/scanner/libraryscannerdlg.cpp index ff1ee8ec12b3..514f06161bca 100644 --- a/src/library/scanner/libraryscannerdlg.cpp +++ b/src/library/scanner/libraryscannerdlg.cpp @@ -16,12 +16,14 @@ * * ***************************************************************************/ +#include "library/scanner/libraryscannerdlg.h" + #include #include #include #include -#include "library/scanner/libraryscannerdlg.h" +#include "moc_libraryscannerdlg.cpp" LibraryScannerDlg::LibraryScannerDlg(QWidget* parent, Qt::WindowFlags f) : QWidget(parent, f), diff --git a/src/library/scanner/recursivescandirectorytask.cpp b/src/library/scanner/recursivescandirectorytask.cpp index a2ce203f043e..243a552a6df8 100644 --- a/src/library/scanner/recursivescandirectorytask.cpp +++ b/src/library/scanner/recursivescandirectorytask.cpp @@ -1,10 +1,11 @@ +#include "library/scanner/recursivescandirectorytask.h" + #include #include -#include "library/scanner/recursivescandirectorytask.h" - -#include "library/scanner/libraryscanner.h" #include "library/scanner/importfilestask.h" +#include "library/scanner/libraryscanner.h" +#include "moc_recursivescandirectorytask.cpp" #include "util/timer.h" RecursiveScanDirectoryTask::RecursiveScanDirectoryTask( diff --git a/src/library/scanner/scannertask.cpp b/src/library/scanner/scannertask.cpp index 27f80daa292b..6d55a4151247 100644 --- a/src/library/scanner/scannertask.cpp +++ b/src/library/scanner/scannertask.cpp @@ -1,5 +1,7 @@ #include "library/scanner/scannertask.h" + #include "library/scanner/libraryscanner.h" +#include "moc_scannertask.cpp" ScannerTask::ScannerTask(LibraryScanner* pScanner, const ScannerGlobalPointer scannerGlobal) diff --git a/src/library/serato/seratofeature.cpp b/src/library/serato/seratofeature.cpp index 63688d1e1ec4..2b85d74afc3b 100644 --- a/src/library/serato/seratofeature.cpp +++ b/src/library/serato/seratofeature.cpp @@ -15,6 +15,7 @@ #include "library/trackcollection.h" #include "library/trackcollectionmanager.h" #include "library/treeitem.h" +#include "moc_seratofeature.cpp" #include "track/beatfactory.h" #include "track/cue.h" #include "track/keyfactory.h" diff --git a/src/library/setlogfeature.cpp b/src/library/setlogfeature.cpp index e7c38b1afc3f..dc2256d00eff 100644 --- a/src/library/setlogfeature.cpp +++ b/src/library/setlogfeature.cpp @@ -12,6 +12,7 @@ #include "library/treeitem.h" #include "mixer/playerinfo.h" #include "mixer/playermanager.h" +#include "moc_setlogfeature.cpp" #include "track/track.h" #include "util/compatibility.h" #include "widget/wlibrary.h" diff --git a/src/library/sidebarmodel.cpp b/src/library/sidebarmodel.cpp index 697a6a30a249..38f4e7b36486 100644 --- a/src/library/sidebarmodel.cpp +++ b/src/library/sidebarmodel.cpp @@ -1,11 +1,13 @@ -#include -#include +#include "library/sidebarmodel.h" + #include +#include +#include +#include "library/browse/browsefeature.h" #include "library/libraryfeature.h" -#include "library/sidebarmodel.h" #include "library/treeitem.h" -#include "library/browse/browsefeature.h" +#include "moc_sidebarmodel.cpp" #include "util/assert.h" namespace { diff --git a/src/library/songdownloader.cpp b/src/library/songdownloader.cpp index 1eb211dd761c..ad95cf784e4d 100644 --- a/src/library/songdownloader.cpp +++ b/src/library/songdownloader.cpp @@ -5,6 +5,7 @@ #include #include +#include "moc_songdownloader.cpp" #include "util/compatibility.h" #include "util/version.h" diff --git a/src/library/stardelegate.cpp b/src/library/stardelegate.cpp index 125a058076b1..370027b0d312 100644 --- a/src/library/stardelegate.cpp +++ b/src/library/stardelegate.cpp @@ -23,6 +23,7 @@ #include "library/stareditor.h" #include "library/starrating.h" #include "library/tableitemdelegate.h" +#include "moc_stardelegate.cpp" StarDelegate::StarDelegate(QTableView* pTableView) : TableItemDelegate(pTableView), diff --git a/src/library/stareditor.cpp b/src/library/stareditor.cpp index 37cf43a1a1cc..ab6bd2420d18 100644 --- a/src/library/stareditor.cpp +++ b/src/library/stareditor.cpp @@ -24,10 +24,12 @@ * see http://doc.trolltech.com/4.5/itemviews-stardelegate.html * ***************************************************************************/ +#include "library/stareditor.h" + #include -#include "library/stareditor.h" #include "library/starrating.h" +#include "moc_stareditor.cpp" #include "util/painterscope.h" /* diff --git a/src/library/tableitemdelegate.cpp b/src/library/tableitemdelegate.cpp index 191fc4fec9b5..48f8d70f2587 100644 --- a/src/library/tableitemdelegate.cpp +++ b/src/library/tableitemdelegate.cpp @@ -3,6 +3,7 @@ #include #include +#include "moc_tableitemdelegate.cpp" #include "util/painterscope.h" #include "widget/wtracktableview.h" diff --git a/src/library/trackcollection.cpp b/src/library/trackcollection.cpp index 18cf5c2d0d86..d1e7f1635410 100644 --- a/src/library/trackcollection.cpp +++ b/src/library/trackcollection.cpp @@ -1,8 +1,9 @@ -#include - #include "library/trackcollection.h" +#include + #include "library/basetrackcache.h" +#include "moc_trackcollection.cpp" #include "track/globaltrackcache.h" #include "util/assert.h" #include "util/db/sqltransaction.h" diff --git a/src/library/trackcollectionmanager.cpp b/src/library/trackcollectionmanager.cpp index ead9ab786aef..5b5d593a18f3 100644 --- a/src/library/trackcollectionmanager.cpp +++ b/src/library/trackcollectionmanager.cpp @@ -3,6 +3,7 @@ #include "library/externaltrackcollection.h" #include "library/scanner/libraryscanner.h" #include "library/trackcollection.h" +#include "moc_trackcollectionmanager.cpp" #include "sources/soundsourceproxy.h" #include "track/track.h" #include "util/assert.h" diff --git a/src/library/trackloader.cpp b/src/library/trackloader.cpp index 65f8c88afc07..c399f3fa1609 100644 --- a/src/library/trackloader.cpp +++ b/src/library/trackloader.cpp @@ -2,13 +2,12 @@ #include #include - #include #include "library/trackcollectionmanager.h" +#include "moc_trackloader.cpp" #include "util/logger.h" - namespace mixxx { namespace { diff --git a/src/library/trackprocessing.cpp b/src/library/trackprocessing.cpp index 6f5c0103aee6..f5d8abd4f710 100644 --- a/src/library/trackprocessing.cpp +++ b/src/library/trackprocessing.cpp @@ -4,6 +4,7 @@ #include "library/trackcollection.h" #include "library/trackcollectionmanager.h" +#include "moc_trackprocessing.cpp" #include "util/logger.h" namespace mixxx { diff --git a/src/library/traktor/traktorfeature.cpp b/src/library/traktor/traktorfeature.cpp index 29bad73e25cd..e6def70ac135 100644 --- a/src/library/traktor/traktorfeature.cpp +++ b/src/library/traktor/traktorfeature.cpp @@ -1,22 +1,23 @@ // traktorfeature.cpp // Created 9/26/2010 by Tobias Rafreider -#include -#include -#include +#include "library/traktor/traktorfeature.h" + #include +#include #include #include +#include +#include -#include "library/traktor/traktorfeature.h" - +#include "library/library.h" #include "library/librarytablemodel.h" #include "library/missingtablemodel.h" #include "library/queryutil.h" -#include "library/library.h" #include "library/trackcollection.h" #include "library/trackcollectionmanager.h" #include "library/treeitem.h" +#include "moc_traktorfeature.cpp" #include "util/sandbox.h" namespace { diff --git a/src/library/treeitemmodel.cpp b/src/library/treeitemmodel.cpp index b9c5905cdc7b..f8a869a01aec 100644 --- a/src/library/treeitemmodel.cpp +++ b/src/library/treeitemmodel.cpp @@ -1,6 +1,7 @@ #include "library/treeitemmodel.h" #include "library/treeitem.h" +#include "moc_treeitemmodel.cpp" /* * Just a word about how the TreeItem objects and TreeItemModels are used in general: diff --git a/src/mixer/auxiliary.cpp b/src/mixer/auxiliary.cpp index 2f4104431217..7f4e224bb3e1 100644 --- a/src/mixer/auxiliary.cpp +++ b/src/mixer/auxiliary.cpp @@ -1,8 +1,9 @@ #include "mixer/auxiliary.h" #include "control/controlproxy.h" -#include "engine/enginemaster.h" #include "engine/channels/engineaux.h" +#include "engine/enginemaster.h" +#include "moc_auxiliary.cpp" #include "soundio/soundmanager.h" #include "soundio/soundmanagerutil.h" diff --git a/src/mixer/baseplayer.cpp b/src/mixer/baseplayer.cpp index 0b8948b81bf6..e5dd965f0f9c 100644 --- a/src/mixer/baseplayer.cpp +++ b/src/mixer/baseplayer.cpp @@ -1,5 +1,7 @@ #include "mixer/baseplayer.h" +#include "moc_baseplayer.cpp" + BasePlayer::BasePlayer(QObject* pParent, const QString& group) : QObject(pParent), m_group(group) { diff --git a/src/mixer/basetrackplayer.cpp b/src/mixer/basetrackplayer.cpp index a8ee1e535cfd..f8e06869bf66 100644 --- a/src/mixer/basetrackplayer.cpp +++ b/src/mixer/basetrackplayer.cpp @@ -13,6 +13,7 @@ #include "engine/sync/enginesync.h" #include "mixer/playerinfo.h" #include "mixer/playermanager.h" +#include "moc_basetrackplayer.cpp" #include "sources/soundsourceproxy.h" #include "track/beatgrid.h" #include "track/track.h" diff --git a/src/mixer/deck.cpp b/src/mixer/deck.cpp index 121bef0f223e..8eafdda5bfdd 100644 --- a/src/mixer/deck.cpp +++ b/src/mixer/deck.cpp @@ -1,5 +1,7 @@ #include "mixer/deck.h" +#include "moc_deck.cpp" + Deck::Deck(QObject* pParent, UserSettingsPointer pConfig, EngineMaster* pMixingEngine, diff --git a/src/mixer/microphone.cpp b/src/mixer/microphone.cpp index aa3ddcaf6706..f08a556dbb7c 100644 --- a/src/mixer/microphone.cpp +++ b/src/mixer/microphone.cpp @@ -1,8 +1,9 @@ #include "mixer/microphone.h" #include "control/controlproxy.h" -#include "engine/enginemaster.h" #include "engine/channels/enginemicrophone.h" +#include "engine/enginemaster.h" +#include "moc_microphone.cpp" #include "soundio/soundmanager.h" #include "soundio/soundmanagerutil.h" diff --git a/src/mixer/playerinfo.cpp b/src/mixer/playerinfo.cpp index f0511d4dfe7d..ece8eca8501b 100644 --- a/src/mixer/playerinfo.cpp +++ b/src/mixer/playerinfo.cpp @@ -22,6 +22,7 @@ #include "engine/channels/enginechannel.h" #include "engine/enginexfader.h" #include "mixer/playermanager.h" +#include "moc_playerinfo.cpp" #include "track/track.h" namespace { diff --git a/src/mixer/playermanager.cpp b/src/mixer/playermanager.cpp index 382da561e9ea..cff07d9d90a4 100644 --- a/src/mixer/playermanager.cpp +++ b/src/mixer/playermanager.cpp @@ -16,6 +16,7 @@ #include "mixer/previewdeck.h" #include "mixer/sampler.h" #include "mixer/samplerbank.h" +#include "moc_playermanager.cpp" #include "preferences/dialog/dlgprefdeck.h" #include "soundio/soundmanager.h" #include "track/track.h" diff --git a/src/mixer/previewdeck.cpp b/src/mixer/previewdeck.cpp index e5c27bf6aa82..82398572c3a6 100644 --- a/src/mixer/previewdeck.cpp +++ b/src/mixer/previewdeck.cpp @@ -1,5 +1,7 @@ #include "mixer/previewdeck.h" +#include "moc_previewdeck.cpp" + PreviewDeck::PreviewDeck(QObject* pParent, UserSettingsPointer pConfig, EngineMaster* pMixingEngine, diff --git a/src/mixer/sampler.cpp b/src/mixer/sampler.cpp index 92371d0d1a59..2fad4ff811d7 100644 --- a/src/mixer/sampler.cpp +++ b/src/mixer/sampler.cpp @@ -1,6 +1,7 @@ #include "mixer/sampler.h" #include "control/controlobject.h" +#include "moc_sampler.cpp" Sampler::Sampler(QObject* pParent, UserSettingsPointer pConfig, diff --git a/src/mixer/samplerbank.cpp b/src/mixer/samplerbank.cpp index 84c679654431..435835e48b36 100644 --- a/src/mixer/samplerbank.cpp +++ b/src/mixer/samplerbank.cpp @@ -6,6 +6,7 @@ #include "control/controlpushbutton.h" #include "mixer/playermanager.h" #include "mixer/sampler.h" +#include "moc_samplerbank.cpp" #include "track/track.h" #include "util/assert.h" diff --git a/src/mixxx.cpp b/src/mixxx.cpp index 3f3a4bfa07a7..3f6c23143d1d 100644 --- a/src/mixxx.cpp +++ b/src/mixxx.cpp @@ -34,6 +34,7 @@ #include "effects/builtin/builtinbackend.h" #include "effects/effectsmanager.h" #include "engine/enginemaster.h" +#include "moc_mixxx.cpp" #include "preferences/constants.h" #include "preferences/dialog/dlgprefeq.h" #include "preferences/dialog/dlgpreferences.h" diff --git a/src/mixxxapplication.cpp b/src/mixxxapplication.cpp index c77fab387db2..c7462492ebaf 100644 --- a/src/mixxxapplication.cpp +++ b/src/mixxxapplication.cpp @@ -1,12 +1,13 @@ -#include -#include -#include - #include "mixxxapplication.h" +#include +#include +#include + #include "audio/types.h" #include "control/controlproxy.h" #include "library/crate/crateid.h" +#include "moc_mixxxapplication.cpp" #include "soundio/soundmanagerutil.h" #include "track/track.h" #include "track/trackref.h" diff --git a/src/musicbrainz/chromaprinter.cpp b/src/musicbrainz/chromaprinter.cpp index 88f758435bbf..e59f67b53a6b 100644 --- a/src/musicbrainz/chromaprinter.cpp +++ b/src/musicbrainz/chromaprinter.cpp @@ -5,6 +5,7 @@ #include #include +#include "moc_chromaprinter.cpp" #include "sources/audiosourcestereoproxy.h" #include "sources/soundsourceproxy.h" #include "track/track.h" diff --git a/src/musicbrainz/tagfetcher.cpp b/src/musicbrainz/tagfetcher.cpp index 6126f17241f9..37364e564fcc 100644 --- a/src/musicbrainz/tagfetcher.cpp +++ b/src/musicbrainz/tagfetcher.cpp @@ -3,6 +3,7 @@ #include #include +#include "moc_tagfetcher.cpp" #include "musicbrainz/chromaprinter.h" #include "track/track.h" #include "util/thread_affinity.h" diff --git a/src/musicbrainz/web/acoustidlookuptask.cpp b/src/musicbrainz/web/acoustidlookuptask.cpp index 297ce48a410e..c79578a0d4c9 100644 --- a/src/musicbrainz/web/acoustidlookuptask.cpp +++ b/src/musicbrainz/web/acoustidlookuptask.cpp @@ -4,6 +4,7 @@ #include #include +#include "moc_acoustidlookuptask.cpp" #include "musicbrainz/gzip.h" #include "util/assert.h" #include "util/logger.h" diff --git a/src/musicbrainz/web/musicbrainzrecordingstask.cpp b/src/musicbrainz/web/musicbrainzrecordingstask.cpp index d3d6b0efd1ba..fd191c996df5 100644 --- a/src/musicbrainz/web/musicbrainzrecordingstask.cpp +++ b/src/musicbrainz/web/musicbrainzrecordingstask.cpp @@ -4,6 +4,7 @@ #include #include "defs_urls.h" +#include "moc_musicbrainzrecordingstask.cpp" #include "musicbrainz/gzip.h" #include "musicbrainz/musicbrainzxml.h" #include "network/httpstatuscode.h" diff --git a/src/network/jsonwebtask.cpp b/src/network/jsonwebtask.cpp index c0634c3151fe..07d45b8eddfa 100644 --- a/src/network/jsonwebtask.cpp +++ b/src/network/jsonwebtask.cpp @@ -1,5 +1,7 @@ #include "network/jsonwebtask.h" +#include "moc_jsonwebtask.cpp" + #if QT_VERSION < QT_VERSION_CHECK(5, 8, 0) #include #endif diff --git a/src/network/webtask.cpp b/src/network/webtask.cpp index 49cc3fc8197d..534c582b2257 100644 --- a/src/network/webtask.cpp +++ b/src/network/webtask.cpp @@ -3,6 +3,7 @@ #include #include // std::once_flag +#include "moc_webtask.cpp" #include "util/assert.h" #include "util/counter.h" #include "util/logger.h" diff --git a/src/preferences/broadcastprofile.cpp b/src/preferences/broadcastprofile.cpp index 9502c8590dd2..474bbadeabaf 100644 --- a/src/preferences/broadcastprofile.cpp +++ b/src/preferences/broadcastprofile.cpp @@ -15,14 +15,14 @@ using namespace QKeychain; #endif // __QTKEYCHAIN__ #include "broadcast/defs_broadcast.h" -#include "recording/defs_recording.h" +#include "broadcastprofile.h" #include "defs_urls.h" +#include "moc_broadcastprofile.cpp" +#include "recording/defs_recording.h" #include "util/compatibility.h" -#include "util/xml.h" -#include "util/memory.h" #include "util/logger.h" - -#include "broadcastprofile.h" +#include "util/memory.h" +#include "util/xml.h" namespace { constexpr const char* kDoctype = "broadcastprofile"; diff --git a/src/preferences/broadcastsettings.cpp b/src/preferences/broadcastsettings.cpp index 53d08b6aa56f..4378257de7a4 100644 --- a/src/preferences/broadcastsettings.cpp +++ b/src/preferences/broadcastsettings.cpp @@ -1,11 +1,13 @@ +#include "preferences/broadcastsettings.h" + #include -#include -#include #include +#include +#include #include "broadcast/defs_broadcast.h" #include "defs_urls.h" -#include "preferences/broadcastsettings.h" +#include "moc_broadcastsettings.cpp" #include "util/logger.h" #include "util/memory.h" diff --git a/src/preferences/broadcastsettingsmodel.cpp b/src/preferences/broadcastsettingsmodel.cpp index 2ec2401fd2fa..e73b2150b83f 100644 --- a/src/preferences/broadcastsettingsmodel.cpp +++ b/src/preferences/broadcastsettingsmodel.cpp @@ -1,10 +1,12 @@ // broadcastsettingsmodel.cpp // Created on August 7th by Stéphane Lepin (Palakis) -#include +#include "preferences/broadcastsettingsmodel.h" #include +#include "moc_broadcastsettingsmodel.cpp" + namespace { const int kColumnEnabled = 0; const int kColumnName = 1; diff --git a/src/preferences/colorpaletteeditor.cpp b/src/preferences/colorpaletteeditor.cpp index 6d15a6c887c3..23d709f3ec0e 100644 --- a/src/preferences/colorpaletteeditor.cpp +++ b/src/preferences/colorpaletteeditor.cpp @@ -10,6 +10,7 @@ #include #include +#include "moc_colorpaletteeditor.cpp" #include "preferences/colorpalettesettings.h" #include "util/color/predefinedcolorpalettes.h" diff --git a/src/preferences/colorpaletteeditormodel.cpp b/src/preferences/colorpaletteeditormodel.cpp index 328ccf16b0b3..d0f2d1a42553 100644 --- a/src/preferences/colorpaletteeditormodel.cpp +++ b/src/preferences/colorpaletteeditormodel.cpp @@ -1,5 +1,7 @@ #include "preferences/colorpaletteeditormodel.h" +#include "moc_colorpaletteeditormodel.cpp" + namespace { QIcon toQIcon(const QColor& color) { diff --git a/src/preferences/dialog/dlgprefautodj.cpp b/src/preferences/dialog/dlgprefautodj.cpp index 8dbdcdddf7c4..47e95e209e3e 100644 --- a/src/preferences/dialog/dlgprefautodj.cpp +++ b/src/preferences/dialog/dlgprefautodj.cpp @@ -1,5 +1,7 @@ #include "preferences/dialog/dlgprefautodj.h" +#include "moc_dlgprefautodj.cpp" + DlgPrefAutoDJ::DlgPrefAutoDJ(QWidget* pParent, UserSettingsPointer pConfig) : DlgPreferencePage(pParent), diff --git a/src/preferences/dialog/dlgprefbeats.cpp b/src/preferences/dialog/dlgprefbeats.cpp index b5c1d5e6dab7..c02494e8743d 100644 --- a/src/preferences/dialog/dlgprefbeats.cpp +++ b/src/preferences/dialog/dlgprefbeats.cpp @@ -3,6 +3,7 @@ #include "analyzer/analyzerbeats.h" #include "control/controlobject.h" #include "defs_urls.h" +#include "moc_dlgprefbeats.cpp" DlgPrefBeats::DlgPrefBeats(QWidget* parent, UserSettingsPointer pConfig) : DlgPreferencePage(parent), diff --git a/src/preferences/dialog/dlgprefbroadcast.cpp b/src/preferences/dialog/dlgprefbroadcast.cpp index 525f2c6dd335..17bc3bf67171 100644 --- a/src/preferences/dialog/dlgprefbroadcast.cpp +++ b/src/preferences/dialog/dlgprefbroadcast.cpp @@ -17,11 +17,12 @@ #endif #include "broadcast/defs_broadcast.h" -#include "recording/defs_recording.h" #include "control/controlproxy.h" #include "defs_urls.h" -#include "preferences/dialog/dlgprefbroadcast.h" #include "encoder/encodersettings.h" +#include "moc_dlgprefbroadcast.cpp" +#include "preferences/dialog/dlgprefbroadcast.h" +#include "recording/defs_recording.h" #include "util/logger.h" namespace { diff --git a/src/preferences/dialog/dlgprefcolors.cpp b/src/preferences/dialog/dlgprefcolors.cpp index 1210c9b419d2..4e24fe04b25c 100644 --- a/src/preferences/dialog/dlgprefcolors.cpp +++ b/src/preferences/dialog/dlgprefcolors.cpp @@ -9,6 +9,7 @@ #include "dialog/dlgreplacecuecolor.h" #include "library/library.h" #include "library/trackcollection.h" +#include "moc_dlgprefcolors.cpp" #include "util/color/predefinedcolorpalettes.h" #include "util/compatibility.h" #include "util/math.h" diff --git a/src/preferences/dialog/dlgprefcrossfader.cpp b/src/preferences/dialog/dlgprefcrossfader.cpp index 2bc152fc7b00..dad7a374eacc 100644 --- a/src/preferences/dialog/dlgprefcrossfader.cpp +++ b/src/preferences/dialog/dlgprefcrossfader.cpp @@ -1,9 +1,11 @@ +#include "preferences/dialog/dlgprefcrossfader.h" + #include #include -#include "preferences/dialog/dlgprefcrossfader.h" #include "control/controlobject.h" #include "engine/enginexfader.h" +#include "moc_dlgprefcrossfader.cpp" #include "util/math.h" #include "util/rescaler.h" diff --git a/src/preferences/dialog/dlgprefdeck.cpp b/src/preferences/dialog/dlgprefdeck.cpp index 27b47470023b..0fe98114d1c1 100644 --- a/src/preferences/dialog/dlgprefdeck.cpp +++ b/src/preferences/dialog/dlgprefdeck.cpp @@ -1,9 +1,11 @@ -#include +#include "preferences/dialog/dlgprefdeck.h" + #include -#include #include -#include +#include #include +#include +#include #include "control/controlobject.h" #include "control/controlproxy.h" @@ -14,7 +16,7 @@ #include "mixer/playerinfo.h" #include "mixer/playermanager.h" #include "mixxx.h" -#include "preferences/dialog/dlgprefdeck.h" +#include "moc_dlgprefdeck.cpp" #include "preferences/usersettings.h" #include "util/compatibility.h" #include "util/duration.h" diff --git a/src/preferences/dialog/dlgprefeffects.cpp b/src/preferences/dialog/dlgprefeffects.cpp index d1122e6ade78..34e2b5c3e371 100644 --- a/src/preferences/dialog/dlgprefeffects.cpp +++ b/src/preferences/dialog/dlgprefeffects.cpp @@ -1,8 +1,9 @@ #include "preferences/dialog/dlgprefeffects.h" -#include "effects/effectsmanager.h" #include "effects/effectmanifest.h" #include "effects/effectsbackend.h" +#include "effects/effectsmanager.h" +#include "moc_dlgprefeffects.cpp" DlgPrefEffects::DlgPrefEffects(QWidget* pParent, UserSettingsPointer pConfig, diff --git a/src/preferences/dialog/dlgprefeq.cpp b/src/preferences/dialog/dlgprefeq.cpp index cd22f5c82c3b..e187ad469b0f 100644 --- a/src/preferences/dialog/dlgprefeq.cpp +++ b/src/preferences/dialog/dlgprefeq.cpp @@ -30,6 +30,7 @@ #include "effects/effectslot.h" #include "engine/filters/enginefilterbessel4.h" #include "mixer/playermanager.h" +#include "moc_dlgprefeq.cpp" #include "util/math.h" const QString kConfigKey = "[Mixer Profile]"; diff --git a/src/preferences/dialog/dlgpreferences.cpp b/src/preferences/dialog/dlgpreferences.cpp index f482a59514b8..b52f4b743707 100644 --- a/src/preferences/dialog/dlgpreferences.cpp +++ b/src/preferences/dialog/dlgpreferences.cpp @@ -15,20 +15,21 @@ * * ***************************************************************************/ +#include "preferences/dialog/dlgpreferences.h" + #include #include -#include -#include -#include #include #include #include +#include +#include +#include -#include "preferences/dialog/dlgpreferences.h" - -#include "preferences/dialog/dlgprefsound.h" -#include "preferences/dialog/dlgpreflibrary.h" #include "controllers/dlgprefcontrollers.h" +#include "moc_dlgpreferences.cpp" +#include "preferences/dialog/dlgpreflibrary.h" +#include "preferences/dialog/dlgprefsound.h" #ifdef __VINYLCONTROL__ #include "preferences/dialog/dlgprefvinyl.h" diff --git a/src/preferences/dialog/dlgprefinterface.cpp b/src/preferences/dialog/dlgprefinterface.cpp index 98d756dddd23..698c5e2f480b 100644 --- a/src/preferences/dialog/dlgprefinterface.cpp +++ b/src/preferences/dialog/dlgprefinterface.cpp @@ -12,6 +12,7 @@ #include "control/controlproxy.h" #include "defs_urls.h" #include "mixxx.h" +#include "moc_dlgprefinterface.cpp" #include "preferences/usersettings.h" #include "skin/legacyskinparser.h" #include "skin/skinloader.h" diff --git a/src/preferences/dialog/dlgprefkey.cpp b/src/preferences/dialog/dlgprefkey.cpp index 908c27e10dff..d6fe6322c23d 100644 --- a/src/preferences/dialog/dlgprefkey.cpp +++ b/src/preferences/dialog/dlgprefkey.cpp @@ -22,6 +22,7 @@ #include "analyzer/analyzerkey.h" #include "control/controlproxy.h" +#include "moc_dlgprefkey.cpp" #include "util/compatibility.h" #include "util/xml.h" diff --git a/src/preferences/dialog/dlgpreflibrary.cpp b/src/preferences/dialog/dlgpreflibrary.cpp index 4ea4222c1712..ab71b3d92cbc 100644 --- a/src/preferences/dialog/dlgpreflibrary.cpp +++ b/src/preferences/dialog/dlgpreflibrary.cpp @@ -1,16 +1,18 @@ +#include "preferences/dialog/dlgpreflibrary.h" + +#include #include -#include #include #include -#include -#include -#include #include #include #include +#include +#include +#include -#include "preferences/dialog/dlgpreflibrary.h" #include "library/dlgtrackmetadataexport.h" +#include "moc_dlgpreflibrary.cpp" #include "sources/soundsourceproxy.h" #include "widget/wsearchlineedit.h" diff --git a/src/preferences/dialog/dlgpreflv2.cpp b/src/preferences/dialog/dlgpreflv2.cpp index 3896bde93a1c..ba4fb42fc8d9 100644 --- a/src/preferences/dialog/dlgpreflv2.cpp +++ b/src/preferences/dialog/dlgpreflv2.cpp @@ -1,14 +1,16 @@ -#include -#include -#include -#include +#include "dlgpreflv2.h" + #include +#include +#include #include +#include +#include -#include "dlgpreflv2.h" #include "control/controlobject.h" -#include "util/math.h" #include "effects/effectsmanager.h" +#include "moc_dlgpreflv2.cpp" +#include "util/math.h" DlgPrefLV2::DlgPrefLV2(QWidget* pParent, LV2Backend* lv2Backend, UserSettingsPointer pConfig, diff --git a/src/preferences/dialog/dlgprefmodplug.cpp b/src/preferences/dialog/dlgprefmodplug.cpp index 8a5097a0ab1f..75a3e158e798 100644 --- a/src/preferences/dialog/dlgprefmodplug.cpp +++ b/src/preferences/dialog/dlgprefmodplug.cpp @@ -1,9 +1,10 @@ +#include "preferences/dialog/dlgprefmodplug.h" + #include -#include "preferences/dialog/dlgprefmodplug.h" +#include "moc_dlgprefmodplug.cpp" #include "preferences/dialog/ui_dlgprefmodplugdlg.h" - #include "preferences/usersettings.h" #include "sources/soundsourcemodplug.h" diff --git a/src/preferences/dialog/dlgprefnovinyl.cpp b/src/preferences/dialog/dlgprefnovinyl.cpp index 836b692af1b2..e6788bc4a5ff 100644 --- a/src/preferences/dialog/dlgprefnovinyl.cpp +++ b/src/preferences/dialog/dlgprefnovinyl.cpp @@ -15,9 +15,11 @@ * * ***************************************************************************/ +#include "preferences/dialog/dlgprefnovinyl.h" #include -#include "preferences/dialog/dlgprefnovinyl.h" + +#include "moc_dlgprefnovinyl.cpp" DlgPrefNoVinyl::DlgPrefNoVinyl(QWidget * parent, SoundManager * soundman, UserSettingsPointer _config) diff --git a/src/preferences/dialog/dlgprefrecord.cpp b/src/preferences/dialog/dlgprefrecord.cpp index 68c13f46ebfa..1df36538edcd 100644 --- a/src/preferences/dialog/dlgprefrecord.cpp +++ b/src/preferences/dialog/dlgprefrecord.cpp @@ -1,12 +1,14 @@ +#include "preferences/dialog/dlgprefrecord.h" + #include #include -#include "preferences/dialog/dlgprefrecord.h" -#include "recording/defs_recording.h" #include "control/controlobject.h" +#include "control/controlproxy.h" #include "encoder/encoder.h" #include "encoder/encodermp3settings.h" -#include "control/controlproxy.h" +#include "moc_dlgprefrecord.cpp" +#include "recording/defs_recording.h" #include "util/sandbox.h" namespace { diff --git a/src/preferences/dialog/dlgprefreplaygain.cpp b/src/preferences/dialog/dlgprefreplaygain.cpp index 3eff1a2f31fb..60204421920c 100644 --- a/src/preferences/dialog/dlgprefreplaygain.cpp +++ b/src/preferences/dialog/dlgprefreplaygain.cpp @@ -1,6 +1,7 @@ #include "preferences/dialog/dlgprefreplaygain.h" #include "control/controlobject.h" +#include "moc_dlgprefreplaygain.cpp" #include "util/math.h" namespace { diff --git a/src/preferences/dialog/dlgprefsound.cpp b/src/preferences/dialog/dlgprefsound.cpp index 3d7485fecd54..f97cdfa2569e 100644 --- a/src/preferences/dialog/dlgprefsound.cpp +++ b/src/preferences/dialog/dlgprefsound.cpp @@ -13,17 +13,20 @@ * * ***************************************************************************/ -#include -#include #include "preferences/dialog/dlgprefsound.h" -#include "preferences/dialog/dlgprefsounditem.h" + +#include +#include + +#include "control/controlproxy.h" #include "engine/enginebuffer.h" #include "engine/enginemaster.h" #include "mixer/playermanager.h" +#include "moc_dlgprefsound.cpp" +#include "preferences/dialog/dlgprefsounditem.h" #include "soundio/soundmanager.h" #include "util/rlimit.h" #include "util/scopedoverridecursor.h" -#include "control/controlproxy.h" /** * Construct a new sound preferences pane. Initializes and populates all the diff --git a/src/preferences/dialog/dlgprefsounditem.cpp b/src/preferences/dialog/dlgprefsounditem.cpp index 8877950fcd63..50946ede5bfb 100644 --- a/src/preferences/dialog/dlgprefsounditem.cpp +++ b/src/preferences/dialog/dlgprefsounditem.cpp @@ -13,9 +13,11 @@ * * ***************************************************************************/ +#include "preferences/dialog/dlgprefsounditem.h" + #include -#include "preferences/dialog/dlgprefsounditem.h" +#include "moc_dlgprefsounditem.cpp" #include "soundio/sounddevice.h" #include "soundio/soundmanagerconfig.h" #include "util/compatibility.h" diff --git a/src/preferences/dialog/dlgprefvinyl.cpp b/src/preferences/dialog/dlgprefvinyl.cpp index 118f7ab8b4ab..f44f0b67f8b9 100644 --- a/src/preferences/dialog/dlgprefvinyl.cpp +++ b/src/preferences/dialog/dlgprefvinyl.cpp @@ -17,17 +17,18 @@ * * ***************************************************************************/ -#include - #include "preferences/dialog/dlgprefvinyl.h" +#include + #include "control/controlobject.h" #include "control/controlproxy.h" +#include "defs_urls.h" #include "mixer/playermanager.h" +#include "moc_dlgprefvinyl.cpp" +#include "util/platform.h" #include "vinylcontrol/defs_vinylcontrol.h" #include "vinylcontrol/vinylcontrolmanager.h" -#include "defs_urls.h" -#include "util/platform.h" DlgPrefVinyl::DlgPrefVinyl(QWidget * parent, VinylControlManager *pVCMan, UserSettingsPointer _config) diff --git a/src/preferences/dialog/dlgprefwaveform.cpp b/src/preferences/dialog/dlgprefwaveform.cpp index 2c79c91f24c6..48ac7bae01e8 100644 --- a/src/preferences/dialog/dlgprefwaveform.cpp +++ b/src/preferences/dialog/dlgprefwaveform.cpp @@ -1,12 +1,13 @@ #include "preferences/dialog/dlgprefwaveform.h" -#include "mixxx.h" -#include "library/library.h" #include "library/dao/analysisdao.h" +#include "library/library.h" +#include "mixxx.h" +#include "moc_dlgprefwaveform.cpp" #include "preferences/waveformsettings.h" -#include "waveform/waveformwidgetfactory.h" -#include "waveform/renderers/waveformwidgetrenderer.h" #include "util/db/dbconnectionpooled.h" +#include "waveform/renderers/waveformwidgetrenderer.h" +#include "waveform/waveformwidgetfactory.h" DlgPrefWaveform::DlgPrefWaveform(QWidget* pParent, MixxxMainWindow* pMixxx, UserSettingsPointer pConfig, Library* pLibrary) diff --git a/src/preferences/dlgpreferencepage.cpp b/src/preferences/dlgpreferencepage.cpp index c1782ffc23b8..61b912b4419e 100644 --- a/src/preferences/dlgpreferencepage.cpp +++ b/src/preferences/dlgpreferencepage.cpp @@ -1,6 +1,7 @@ #include "preferences/dlgpreferencepage.h" #include "defs_urls.h" +#include "moc_dlgpreferencepage.cpp" DlgPreferencePage::DlgPreferencePage(QWidget* pParent) : QWidget(pParent) { diff --git a/src/preferences/effectsettingsmodel.cpp b/src/preferences/effectsettingsmodel.cpp index 8e380fcdc34d..780a1c450f5b 100644 --- a/src/preferences/effectsettingsmodel.cpp +++ b/src/preferences/effectsettingsmodel.cpp @@ -1,5 +1,6 @@ -#include +#include "preferences/effectsettingsmodel.h" +#include "moc_effectsettingsmodel.cpp" namespace { const int kColumnEnabled = 0; diff --git a/src/recording/recordingmanager.cpp b/src/recording/recordingmanager.cpp index 63dab0851a56..96907246f43e 100644 --- a/src/recording/recordingmanager.cpp +++ b/src/recording/recordingmanager.cpp @@ -1,12 +1,13 @@ // Created 03/26/2011 by Tobias Rafreider -#include -#include -#include +#include "recording/recordingmanager.h" + #include +#include #include +#include #include - +#include #include #include "control/controlproxy.h" @@ -15,8 +16,8 @@ #include "engine/sidechain/enginerecord.h" #include "engine/sidechain/enginesidechain.h" #include "errordialoghandler.h" +#include "moc_recordingmanager.cpp" #include "recording/defs_recording.h" -#include "recording/recordingmanager.h" // one gibibyte #define MIN_DISK_FREE 1024 * 1024 * 1024ll diff --git a/src/skin/launchimage.cpp b/src/skin/launchimage.cpp index 6e145e0f71cd..8751ed2495e8 100644 --- a/src/skin/launchimage.cpp +++ b/src/skin/launchimage.cpp @@ -7,6 +7,8 @@ #include #include +#include "moc_launchimage.cpp" + LaunchImage::LaunchImage(QWidget* pParent, const QString& styleSheet) : QWidget(pParent) { if (styleSheet.isEmpty()) { @@ -65,4 +67,3 @@ void LaunchImage::paintEvent(QPaintEvent *) QPainter p(this); style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this); } - diff --git a/src/skin/legacyskinparser.cpp b/src/skin/legacyskinparser.cpp index 011882bbd467..c7e8dc4b5289 100644 --- a/src/skin/legacyskinparser.cpp +++ b/src/skin/legacyskinparser.cpp @@ -22,6 +22,7 @@ #include "library/library.h" #include "mixer/basetrackplayer.h" #include "mixer/playermanager.h" +#include "moc_legacyskinparser.cpp" #include "recording/recordingmanager.h" #include "skin/colorschemeparser.h" #include "skin/launchimage.h" diff --git a/src/skin/tooltips.cpp b/src/skin/tooltips.cpp index 2a03503e216f..19bbca164dcb 100644 --- a/src/skin/tooltips.cpp +++ b/src/skin/tooltips.cpp @@ -1,5 +1,7 @@ #include "skin/tooltips.h" +#include "moc_tooltips.cpp" + Tooltips::Tooltips() { addStandardTooltips(); } diff --git a/src/soundio/sounddevicenetwork.cpp b/src/soundio/sounddevicenetwork.cpp index 57d147e269d9..bce818e71f0d 100644 --- a/src/soundio/sounddevicenetwork.cpp +++ b/src/soundio/sounddevicenetwork.cpp @@ -2,19 +2,20 @@ #include -#include "waveform/visualplayposition.h" -#include "util/timer.h" -#include "util/trace.h" -#include "control/controlproxy.h" #include "control/controlobject.h" -#include "util/denormalsarezero.h" +#include "control/controlproxy.h" #include "engine/sidechain/enginenetworkstream.h" #include "float.h" +#include "moc_sounddevicenetwork.cpp" #include "soundio/sounddevice.h" #include "soundio/soundmanager.h" #include "soundio/soundmanagerutil.h" +#include "util/denormalsarezero.h" #include "util/logger.h" #include "util/sample.h" +#include "util/timer.h" +#include "util/trace.h" +#include "waveform/visualplayposition.h" namespace { const int kNetworkLatencyFrames = 8192; // 185 ms @ 44100 Hz diff --git a/src/soundio/soundmanager.cpp b/src/soundio/soundmanager.cpp index e5c69268d9f6..3963287d118a 100644 --- a/src/soundio/soundmanager.cpp +++ b/src/soundio/soundmanager.cpp @@ -16,11 +16,11 @@ #include "soundio/soundmanager.h" -#include -#include // for memcpy and strcmp +#include #include -#include +#include +#include // for memcpy and strcmp #include "control/controlobject.h" #include "control/controlproxy.h" @@ -28,13 +28,14 @@ #include "engine/enginemaster.h" #include "engine/sidechain/enginenetworkstream.h" #include "engine/sidechain/enginesidechain.h" +#include "moc_soundmanager.cpp" #include "soundio/sounddevice.h" #include "soundio/sounddevicenetwork.h" #include "soundio/sounddevicenotfound.h" #include "soundio/sounddeviceportaudio.h" #include "soundio/soundmanagerutil.h" -#include "util/compatibility.h" #include "util/cmdlineargs.h" +#include "util/compatibility.h" #include "util/defs.h" #include "util/sample.h" #include "util/sleep.h" diff --git a/src/test/trackexport_test.cpp b/src/test/trackexport_test.cpp index 1227c0b1859f..d897eba5205c 100644 --- a/src/test/trackexport_test.cpp +++ b/src/test/trackexport_test.cpp @@ -6,6 +6,7 @@ #include #include +#include "moc_trackexport_test.cpp" #include "track/track.h" FakeOverwriteAnswerer::~FakeOverwriteAnswerer() { } diff --git a/src/track/beats.cpp b/src/track/beats.cpp index 307f0a6b9ab5..80db56bf41fd 100644 --- a/src/track/beats.cpp +++ b/src/track/beats.cpp @@ -1,6 +1,8 @@ #include "track/beats.h" +#include "moc_beats.cpp" + namespace mixxx { int Beats::numBeatsInRange(double dStartSample, double dEndSample) { diff --git a/src/track/cue.cpp b/src/track/cue.cpp index 3d1c0c1fe2de..07d5f6702e34 100644 --- a/src/track/cue.cpp +++ b/src/track/cue.cpp @@ -7,6 +7,7 @@ #include #include "engine/engine.h" +#include "moc_cue.cpp" #include "util/assert.h" #include "util/color/color.h" #include "util/color/predefinedcolorpalettes.h" diff --git a/src/track/globaltrackcache.cpp b/src/track/globaltrackcache.cpp index 6d16ff6783ca..32a73b561558 100644 --- a/src/track/globaltrackcache.cpp +++ b/src/track/globaltrackcache.cpp @@ -2,6 +2,7 @@ #include +#include "moc_globaltrackcache.cpp" #include "track/track.h" #include "util/assert.h" #include "util/logger.h" diff --git a/src/track/track.cpp b/src/track/track.cpp index 237a88e9a694..de08c4ff4fe5 100644 --- a/src/track/track.cpp +++ b/src/track/track.cpp @@ -5,6 +5,7 @@ #include #include "engine/engine.h" +#include "moc_track.cpp" #include "track/beatfactory.h" #include "track/beatmap.h" #include "track/trackref.h" diff --git a/src/util/battery/battery.cpp b/src/util/battery/battery.cpp index b637c45fe29f..7bb6effc876d 100644 --- a/src/util/battery/battery.cpp +++ b/src/util/battery/battery.cpp @@ -1,5 +1,7 @@ #include "util/battery/battery.h" +#include "moc_battery.cpp" + // Do not include platform-specific battery implementation unless we are built // with battery support (__BATTERY__). #ifdef __BATTERY__ diff --git a/src/util/sleepableqthread.cpp b/src/util/sleepableqthread.cpp index 1986bd7f47e7..6c0ae94d3711 100644 --- a/src/util/sleepableqthread.cpp +++ b/src/util/sleepableqthread.cpp @@ -6,3 +6,4 @@ #include "util/sleepableqthread.h" +#include "moc_sleepableqthread.cpp" diff --git a/src/util/sleepableqthread.h b/src/util/sleepableqthread.h index 7bd12f4d1612..1d0b6e3d593d 100644 --- a/src/util/sleepableqthread.h +++ b/src/util/sleepableqthread.h @@ -1,5 +1,6 @@ // sleepableqthread.h // Created May 21, 2012 by Bill Good +#pragma once #include diff --git a/src/util/statmodel.cpp b/src/util/statmodel.cpp index 0b9d7d8de621..598b7e8e4b45 100644 --- a/src/util/statmodel.cpp +++ b/src/util/statmodel.cpp @@ -1,6 +1,8 @@ +#include "util/statmodel.h" + #include -#include "util/statmodel.h" +#include "moc_statmodel.cpp" #include "util/math.h" StatModel::StatModel(QObject* pParent) diff --git a/src/util/statsmanager.cpp b/src/util/statsmanager.cpp index 66ce27420af7..b771a2ed8c26 100644 --- a/src/util/statsmanager.cpp +++ b/src/util/statsmanager.cpp @@ -1,10 +1,12 @@ -#include -#include -#include +#include "util/statsmanager.h" + #include #include +#include +#include +#include -#include "util/statsmanager.h" +#include "moc_statsmanager.cpp" #include "util/cmdlineargs.h" #include "util/compatibility.h" diff --git a/src/util/tapfilter.cpp b/src/util/tapfilter.cpp index cbc4de489a14..e5235d239ff6 100644 --- a/src/util/tapfilter.cpp +++ b/src/util/tapfilter.cpp @@ -1,5 +1,7 @@ #include "util/tapfilter.h" +#include "moc_tapfilter.cpp" + TapFilter::TapFilter(QObject* pParent, int filterLength, mixxx::Duration maxInterval) : QObject(pParent), m_mean(MovingInterquartileMean(filterLength)), diff --git a/src/util/task.cpp b/src/util/task.cpp index 9df528301207..92c5df7355ed 100644 --- a/src/util/task.cpp +++ b/src/util/task.cpp @@ -1,6 +1,8 @@ +#include "util/task.h" + #include -#include "util/task.h" +#include "moc_task.cpp" #include "util/compatibility.h" TaskWatcher::TaskWatcher(QObject* pParent) : QObject(pParent) { diff --git a/src/util/taskmonitor.cpp b/src/util/taskmonitor.cpp index 305e5a1c8494..633f580fa11a 100644 --- a/src/util/taskmonitor.cpp +++ b/src/util/taskmonitor.cpp @@ -3,6 +3,7 @@ #include #include +#include "moc_taskmonitor.cpp" #include "util/assert.h" #include "util/math.h" #include "util/thread_affinity.h" diff --git a/src/util/timer.cpp b/src/util/timer.cpp index e95f39dfa842..335c99967647 100644 --- a/src/util/timer.cpp +++ b/src/util/timer.cpp @@ -1,5 +1,6 @@ #include "util/timer.h" +#include "moc_timer.cpp" #include "util/experiment.h" #include "util/time.h" #include "waveform/guitick.h" diff --git a/src/util/widgetrendertimer.cpp b/src/util/widgetrendertimer.cpp index 7f8e81f78fb8..43b51a40f0a5 100644 --- a/src/util/widgetrendertimer.cpp +++ b/src/util/widgetrendertimer.cpp @@ -1,5 +1,6 @@ #include "util/widgetrendertimer.h" +#include "moc_widgetrendertimer.cpp" #include "util/time.h" WidgetRenderTimer::WidgetRenderTimer(mixxx::Duration renderFrequency, diff --git a/src/util/workerthread.cpp b/src/util/workerthread.cpp index 00808adf313a..bf376e40e516 100644 --- a/src/util/workerthread.cpp +++ b/src/util/workerthread.cpp @@ -1,5 +1,6 @@ #include "util/workerthread.h" +#include "moc_workerthread.cpp" namespace { diff --git a/src/vinylcontrol/vinylcontrolmanager.cpp b/src/vinylcontrol/vinylcontrolmanager.cpp index 7e3570391a9e..4a83dc2afd5e 100644 --- a/src/vinylcontrol/vinylcontrolmanager.cpp +++ b/src/vinylcontrol/vinylcontrolmanager.cpp @@ -9,6 +9,7 @@ #include "control/controlobject.h" #include "control/controlproxy.h" #include "mixer/playermanager.h" +#include "moc_vinylcontrolmanager.cpp" #include "soundio/soundmanager.h" #include "util/compatibility.h" #include "util/timer.h" diff --git a/src/vinylcontrol/vinylcontrolprocessor.cpp b/src/vinylcontrol/vinylcontrolprocessor.cpp index a7b5379d289c..037684b78665 100644 --- a/src/vinylcontrol/vinylcontrolprocessor.cpp +++ b/src/vinylcontrol/vinylcontrolprocessor.cpp @@ -1,8 +1,9 @@ -#include - #include "vinylcontrol/vinylcontrolprocessor.h" +#include + #include "control/controlpushbutton.h" +#include "moc_vinylcontrolprocessor.cpp" #include "util/defs.h" #include "util/event.h" #include "util/sample.h" diff --git a/src/vinylcontrol/vinylcontrolsignalwidget.cpp b/src/vinylcontrol/vinylcontrolsignalwidget.cpp index 9bf04d870f70..7b4289d5cfcd 100644 --- a/src/vinylcontrol/vinylcontrolsignalwidget.cpp +++ b/src/vinylcontrol/vinylcontrolsignalwidget.cpp @@ -17,6 +17,8 @@ #include "vinylcontrol/vinylcontrolsignalwidget.h" +#include "moc_vinylcontrolsignalwidget.cpp" + VinylControlSignalWidget::VinylControlSignalWidget() : QWidget(), m_iVinylInput(-1), diff --git a/src/waveform/renderers/glslwaveformrenderersignal.cpp b/src/waveform/renderers/glslwaveformrenderersignal.cpp index 8777ff0e5ad5..0afb83a54267 100644 --- a/src/waveform/renderers/glslwaveformrenderersignal.cpp +++ b/src/waveform/renderers/glslwaveformrenderersignal.cpp @@ -1,4 +1,6 @@ #include "waveform/renderers/glslwaveformrenderersignal.h" + +#include "moc_glslwaveformrenderersignal.cpp" #if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2) #include diff --git a/src/waveform/renderers/waveformrendermark.cpp b/src/waveform/renderers/waveformrendermark.cpp index ba974cd5e793..840e404df7c9 100644 --- a/src/waveform/renderers/waveformrendermark.cpp +++ b/src/waveform/renderers/waveformrendermark.cpp @@ -1,19 +1,20 @@ +#include "waveform/renderers/waveformrendermark.h" + #include #include #include -#include "waveform/renderers/waveformrendermark.h" - #include "control/controlproxy.h" #include "engine/controls/cuecontrol.h" +#include "moc_waveformrendermark.cpp" #include "track/track.h" #include "util/color/color.h" +#include "util/painterscope.h" #include "waveform/renderers/waveformwidgetrenderer.h" #include "waveform/waveform.h" +#include "widget/wimagestore.h" #include "widget/wskincolor.h" #include "widget/wwidget.h" -#include "widget/wimagestore.h" -#include "util/painterscope.h" namespace { const int kMaxCueLabelLength = 23; diff --git a/src/waveform/visualplayposition.cpp b/src/waveform/visualplayposition.cpp index 68a9641cf86e..acb7556518fd 100644 --- a/src/waveform/visualplayposition.cpp +++ b/src/waveform/visualplayposition.cpp @@ -2,8 +2,9 @@ #include -#include "control/controlproxy.h" #include "control/controlobject.h" +#include "control/controlproxy.h" +#include "moc_visualplayposition.cpp" #include "util/math.h" #include "waveform/vsyncthread.h" diff --git a/src/waveform/vsyncthread.cpp b/src/waveform/vsyncthread.cpp index e4be9359d81a..2105d9221a2f 100644 --- a/src/waveform/vsyncthread.cpp +++ b/src/waveform/vsyncthread.cpp @@ -1,12 +1,13 @@ -#include +#include "vsyncthread.h" + #include +#include #include #include -#include -#include "vsyncthread.h" -#include "util/performancetimer.h" +#include "moc_vsyncthread.cpp" #include "util/math.h" +#include "util/performancetimer.h" #include "waveform/guitick.h" VSyncThread::VSyncThread(QObject* pParent) diff --git a/src/waveform/waveformwidgetfactory.cpp b/src/waveform/waveformwidgetfactory.cpp index 17988e5856b8..355f08ad6099 100644 --- a/src/waveform/waveformwidgetfactory.cpp +++ b/src/waveform/waveformwidgetfactory.cpp @@ -11,6 +11,7 @@ #include #include "control/controlpotmeter.h" +#include "moc_waveformwidgetfactory.cpp" #include "util/cmdlineargs.h" #include "util/math.h" #include "util/performancetimer.h" diff --git a/src/waveform/widgets/emptywaveformwidget.cpp b/src/waveform/widgets/emptywaveformwidget.cpp index d6ac2f104375..601b822936b9 100644 --- a/src/waveform/widgets/emptywaveformwidget.cpp +++ b/src/waveform/widgets/emptywaveformwidget.cpp @@ -1,9 +1,10 @@ -#include - #include "waveform/widgets/emptywaveformwidget.h" -#include "waveform/renderers/waveformwidgetrenderer.h" +#include + +#include "moc_emptywaveformwidget.cpp" #include "waveform/renderers/waveformrenderbackground.h" +#include "waveform/renderers/waveformwidgetrenderer.h" EmptyWaveformWidget::EmptyWaveformWidget(const QString& group, QWidget* parent) : QWidget(parent), diff --git a/src/waveform/widgets/glrgbwaveformwidget.cpp b/src/waveform/widgets/glrgbwaveformwidget.cpp index 271b5cb6f1e1..40b54b490347 100644 --- a/src/waveform/widgets/glrgbwaveformwidget.cpp +++ b/src/waveform/widgets/glrgbwaveformwidget.cpp @@ -1,16 +1,16 @@ #include "glrgbwaveformwidget.h" -#include "waveform/sharedglcontext.h" -#include "waveform/renderers/waveformwidgetrenderer.h" -#include "waveform/renderers/waveformrenderbackground.h" +#include "moc_glrgbwaveformwidget.cpp" +#include "util/performancetimer.h" #include "waveform/renderers/glwaveformrendererrgb.h" +#include "waveform/renderers/waveformrenderbackground.h" +#include "waveform/renderers/waveformrenderbeat.h" +#include "waveform/renderers/waveformrendererendoftrack.h" #include "waveform/renderers/waveformrendererpreroll.h" #include "waveform/renderers/waveformrendermark.h" #include "waveform/renderers/waveformrendermarkrange.h" -#include "waveform/renderers/waveformrendererendoftrack.h" -#include "waveform/renderers/waveformrenderbeat.h" - -#include "util/performancetimer.h" +#include "waveform/renderers/waveformwidgetrenderer.h" +#include "waveform/sharedglcontext.h" GLRGBWaveformWidget::GLRGBWaveformWidget(const QString& group, QWidget* parent) : QGLWidget(parent, SharedGLContext::getWidget()), diff --git a/src/waveform/widgets/glsimplewaveformwidget.cpp b/src/waveform/widgets/glsimplewaveformwidget.cpp index b36dc23ed25f..c54482279ef2 100644 --- a/src/waveform/widgets/glsimplewaveformwidget.cpp +++ b/src/waveform/widgets/glsimplewaveformwidget.cpp @@ -3,17 +3,17 @@ #include #include -#include "waveform/sharedglcontext.h" -#include "waveform/renderers/waveformwidgetrenderer.h" -#include "waveform/renderers/waveformrenderbackground.h" +#include "moc_glsimplewaveformwidget.cpp" +#include "util/performancetimer.h" #include "waveform/renderers/glwaveformrenderersimplesignal.h" +#include "waveform/renderers/waveformrenderbackground.h" +#include "waveform/renderers/waveformrenderbeat.h" +#include "waveform/renderers/waveformrendererendoftrack.h" #include "waveform/renderers/waveformrendererpreroll.h" #include "waveform/renderers/waveformrendermark.h" #include "waveform/renderers/waveformrendermarkrange.h" -#include "waveform/renderers/waveformrendererendoftrack.h" -#include "waveform/renderers/waveformrenderbeat.h" - -#include "util/performancetimer.h" +#include "waveform/renderers/waveformwidgetrenderer.h" +#include "waveform/sharedglcontext.h" GLSimpleWaveformWidget::GLSimpleWaveformWidget(const QString& group, QWidget* parent) : QGLWidget(parent, SharedGLContext::getWidget()), diff --git a/src/waveform/widgets/glslwaveformwidget.cpp b/src/waveform/widgets/glslwaveformwidget.cpp index 6c8c22fc7b67..a45e0a715b7d 100644 --- a/src/waveform/widgets/glslwaveformwidget.cpp +++ b/src/waveform/widgets/glslwaveformwidget.cpp @@ -3,18 +3,18 @@ #include #include -#include "waveform/renderers/waveformwidgetrenderer.h" -#include "waveform/renderers/waveformrenderbackground.h" +#include "moc_glslwaveformwidget.cpp" +#include "util/performancetimer.h" #include "waveform/renderers/glslwaveformrenderersignal.h" +#include "waveform/renderers/waveformrenderbackground.h" +#include "waveform/renderers/waveformrenderbeat.h" +#include "waveform/renderers/waveformrendererendoftrack.h" #include "waveform/renderers/waveformrendererpreroll.h" #include "waveform/renderers/waveformrendermark.h" #include "waveform/renderers/waveformrendermarkrange.h" -#include "waveform/renderers/waveformrendererendoftrack.h" -#include "waveform/renderers/waveformrenderbeat.h" +#include "waveform/renderers/waveformwidgetrenderer.h" #include "waveform/sharedglcontext.h" -#include "util/performancetimer.h" - GLSLFilteredWaveformWidget::GLSLFilteredWaveformWidget( const QString& group, QWidget* parent) diff --git a/src/waveform/widgets/glvsynctestwidget.cpp b/src/waveform/widgets/glvsynctestwidget.cpp index 7de3fcf32004..d0c67991df1d 100644 --- a/src/waveform/widgets/glvsynctestwidget.cpp +++ b/src/waveform/widgets/glvsynctestwidget.cpp @@ -2,18 +2,18 @@ #include -#include "waveform/sharedglcontext.h" -#include "waveform/renderers/waveformwidgetrenderer.h" -#include "waveform/renderers/waveformrenderbackground.h" -#include "waveform/renderers/glwaveformrenderersimplesignal.h" +#include "moc_glvsynctestwidget.cpp" +#include "util/performancetimer.h" #include "waveform/renderers/glvsynctestrenderer.h" +#include "waveform/renderers/glwaveformrenderersimplesignal.h" +#include "waveform/renderers/waveformrenderbackground.h" +#include "waveform/renderers/waveformrenderbeat.h" +#include "waveform/renderers/waveformrendererendoftrack.h" #include "waveform/renderers/waveformrendererpreroll.h" #include "waveform/renderers/waveformrendermark.h" #include "waveform/renderers/waveformrendermarkrange.h" -#include "waveform/renderers/waveformrendererendoftrack.h" -#include "waveform/renderers/waveformrenderbeat.h" - -#include "util/performancetimer.h" +#include "waveform/renderers/waveformwidgetrenderer.h" +#include "waveform/sharedglcontext.h" GLVSyncTestWidget::GLVSyncTestWidget(const QString& group, QWidget* parent) : QGLWidget(parent, SharedGLContext::getWidget()), diff --git a/src/waveform/widgets/glwaveformwidget.cpp b/src/waveform/widgets/glwaveformwidget.cpp index 071f476dcdbf..4b43658fd1eb 100644 --- a/src/waveform/widgets/glwaveformwidget.cpp +++ b/src/waveform/widgets/glwaveformwidget.cpp @@ -1,19 +1,21 @@ -#include +#include "waveform/widgets/glwaveformwidget.h" + #include +#include #include -#include "waveform/widgets/glwaveformwidget.h" -#include "waveform/renderers/waveformwidgetrenderer.h" -#include "waveform/renderers/waveformrenderbackground.h" -#include "waveform/renderers/qtwaveformrendererfilteredsignal.h" +#include "moc_glwaveformwidget.cpp" +#include "util/performancetimer.h" #include "waveform/renderers/glwaveformrendererfilteredsignal.h" +#include "waveform/renderers/qtwaveformrendererfilteredsignal.h" +#include "waveform/renderers/waveformrenderbackground.h" +#include "waveform/renderers/waveformrenderbeat.h" +#include "waveform/renderers/waveformrendererendoftrack.h" #include "waveform/renderers/waveformrendererpreroll.h" #include "waveform/renderers/waveformrendermark.h" #include "waveform/renderers/waveformrendermarkrange.h" -#include "waveform/renderers/waveformrendererendoftrack.h" -#include "waveform/renderers/waveformrenderbeat.h" +#include "waveform/renderers/waveformwidgetrenderer.h" #include "waveform/sharedglcontext.h" -#include "util/performancetimer.h" GLWaveformWidget::GLWaveformWidget(const QString& group, QWidget* parent) : QGLWidget(parent, SharedGLContext::getWidget()), diff --git a/src/waveform/widgets/hsvwaveformwidget.cpp b/src/waveform/widgets/hsvwaveformwidget.cpp index b3f869a60220..d514a8fc74f0 100644 --- a/src/waveform/widgets/hsvwaveformwidget.cpp +++ b/src/waveform/widgets/hsvwaveformwidget.cpp @@ -2,14 +2,15 @@ #include -#include "waveform/renderers/waveformwidgetrenderer.h" +#include "moc_hsvwaveformwidget.cpp" #include "waveform/renderers/waveformrenderbackground.h" -#include "waveform/renderers/waveformrendermark.h" -#include "waveform/renderers/waveformrendermarkrange.h" +#include "waveform/renderers/waveformrenderbeat.h" +#include "waveform/renderers/waveformrendererendoftrack.h" #include "waveform/renderers/waveformrendererhsv.h" #include "waveform/renderers/waveformrendererpreroll.h" -#include "waveform/renderers/waveformrendererendoftrack.h" -#include "waveform/renderers/waveformrenderbeat.h" +#include "waveform/renderers/waveformrendermark.h" +#include "waveform/renderers/waveformrendermarkrange.h" +#include "waveform/renderers/waveformwidgetrenderer.h" HSVWaveformWidget::HSVWaveformWidget(const QString& group, QWidget* parent) : QWidget(parent), diff --git a/src/waveform/widgets/qthsvwaveformwidget.cpp b/src/waveform/widgets/qthsvwaveformwidget.cpp index 1523e08d2f7b..5ab657850b98 100644 --- a/src/waveform/widgets/qthsvwaveformwidget.cpp +++ b/src/waveform/widgets/qthsvwaveformwidget.cpp @@ -1,17 +1,18 @@ -#include +#include "waveform/widgets/qthsvwaveformwidget.h" + #include +#include #include -#include "waveform/widgets/qthsvwaveformwidget.h" - -#include "waveform/renderers/waveformwidgetrenderer.h" +#include "moc_qthsvwaveformwidget.cpp" #include "waveform/renderers/waveformrenderbackground.h" -#include "waveform/renderers/waveformrendermark.h" -#include "waveform/renderers/waveformrendermarkrange.h" +#include "waveform/renderers/waveformrenderbeat.h" +#include "waveform/renderers/waveformrendererendoftrack.h" #include "waveform/renderers/waveformrendererhsv.h" #include "waveform/renderers/waveformrendererpreroll.h" -#include "waveform/renderers/waveformrendererendoftrack.h" -#include "waveform/renderers/waveformrenderbeat.h" +#include "waveform/renderers/waveformrendermark.h" +#include "waveform/renderers/waveformrendermarkrange.h" +#include "waveform/renderers/waveformwidgetrenderer.h" QtHSVWaveformWidget::QtHSVWaveformWidget(const QString& group, QWidget* parent) : QGLWidget(parent), diff --git a/src/waveform/widgets/qtrgbwaveformwidget.cpp b/src/waveform/widgets/qtrgbwaveformwidget.cpp index 6cc72f74c977..7a388ad8136f 100644 --- a/src/waveform/widgets/qtrgbwaveformwidget.cpp +++ b/src/waveform/widgets/qtrgbwaveformwidget.cpp @@ -1,17 +1,18 @@ -#include +#include "waveform/widgets/qtrgbwaveformwidget.h" + #include +#include #include -#include "waveform/widgets/qtrgbwaveformwidget.h" - -#include "waveform/renderers/waveformwidgetrenderer.h" +#include "moc_qtrgbwaveformwidget.cpp" #include "waveform/renderers/waveformrenderbackground.h" +#include "waveform/renderers/waveformrenderbeat.h" +#include "waveform/renderers/waveformrendererendoftrack.h" +#include "waveform/renderers/waveformrendererpreroll.h" +#include "waveform/renderers/waveformrendererrgb.h" #include "waveform/renderers/waveformrendermark.h" #include "waveform/renderers/waveformrendermarkrange.h" -#include "waveform/renderers/waveformrendererrgb.h" -#include "waveform/renderers/waveformrendererpreroll.h" -#include "waveform/renderers/waveformrendererendoftrack.h" -#include "waveform/renderers/waveformrenderbeat.h" +#include "waveform/renderers/waveformwidgetrenderer.h" #include "waveform/sharedglcontext.h" QtRGBWaveformWidget::QtRGBWaveformWidget(const QString& group, QWidget* parent) diff --git a/src/waveform/widgets/qtsimplewaveformwidget.cpp b/src/waveform/widgets/qtsimplewaveformwidget.cpp index 1aae5b6a42f7..4978a6b848e6 100644 --- a/src/waveform/widgets/qtsimplewaveformwidget.cpp +++ b/src/waveform/widgets/qtsimplewaveformwidget.cpp @@ -3,17 +3,17 @@ #include #include -#include "waveform/sharedglcontext.h" -#include "waveform/renderers/waveformwidgetrenderer.h" -#include "waveform/renderers/waveformrenderbackground.h" +#include "moc_qtsimplewaveformwidget.cpp" +#include "util/performancetimer.h" #include "waveform/renderers/qtwaveformrenderersimplesignal.h" +#include "waveform/renderers/waveformrenderbackground.h" +#include "waveform/renderers/waveformrenderbeat.h" +#include "waveform/renderers/waveformrendererendoftrack.h" #include "waveform/renderers/waveformrendererpreroll.h" #include "waveform/renderers/waveformrendermark.h" #include "waveform/renderers/waveformrendermarkrange.h" -#include "waveform/renderers/waveformrendererendoftrack.h" -#include "waveform/renderers/waveformrenderbeat.h" - -#include "util/performancetimer.h" +#include "waveform/renderers/waveformwidgetrenderer.h" +#include "waveform/sharedglcontext.h" QtSimpleWaveformWidget::QtSimpleWaveformWidget( const QString& group, diff --git a/src/waveform/widgets/qtvsynctestwidget.cpp b/src/waveform/widgets/qtvsynctestwidget.cpp index d30c6f44cb38..c651d3655d78 100644 --- a/src/waveform/widgets/qtvsynctestwidget.cpp +++ b/src/waveform/widgets/qtvsynctestwidget.cpp @@ -1,20 +1,20 @@ -#include +#include "waveform/widgets/qtvsynctestwidget.h" + #include +#include #include -#include "waveform/widgets/qtvsynctestwidget.h" - -#include "waveform/sharedglcontext.h" -#include "waveform/renderers/waveformwidgetrenderer.h" -#include "waveform/renderers/waveformrenderbackground.h" +#include "moc_qtvsynctestwidget.cpp" +#include "util/performancetimer.h" #include "waveform/renderers/qtvsynctestrenderer.h" +#include "waveform/renderers/waveformrenderbackground.h" +#include "waveform/renderers/waveformrenderbeat.h" +#include "waveform/renderers/waveformrendererendoftrack.h" #include "waveform/renderers/waveformrendererpreroll.h" #include "waveform/renderers/waveformrendermark.h" #include "waveform/renderers/waveformrendermarkrange.h" -#include "waveform/renderers/waveformrendererendoftrack.h" -#include "waveform/renderers/waveformrenderbeat.h" - -#include "util/performancetimer.h" +#include "waveform/renderers/waveformwidgetrenderer.h" +#include "waveform/sharedglcontext.h" QtVSyncTestWidget::QtVSyncTestWidget(const QString& group, QWidget* parent) : QGLWidget(parent, SharedGLContext::getWidget()), diff --git a/src/waveform/widgets/qtwaveformwidget.cpp b/src/waveform/widgets/qtwaveformwidget.cpp index 9d5c353d588e..904e03cc09b2 100644 --- a/src/waveform/widgets/qtwaveformwidget.cpp +++ b/src/waveform/widgets/qtwaveformwidget.cpp @@ -1,21 +1,21 @@ -#include +#include "waveform/widgets/qtwaveformwidget.h" + #include +#include #include -#include "waveform/widgets/qtwaveformwidget.h" - -#include "waveform/renderers/waveformwidgetrenderer.h" -#include "waveform/renderers/waveformrenderbackground.h" +#include "moc_qtwaveformwidget.cpp" +#include "util/performancetimer.h" #include "waveform/renderers/qtwaveformrendererfilteredsignal.h" +#include "waveform/renderers/waveformrenderbackground.h" +#include "waveform/renderers/waveformrenderbeat.h" +#include "waveform/renderers/waveformrendererendoftrack.h" #include "waveform/renderers/waveformrendererpreroll.h" #include "waveform/renderers/waveformrendermark.h" #include "waveform/renderers/waveformrendermarkrange.h" -#include "waveform/renderers/waveformrendererendoftrack.h" -#include "waveform/renderers/waveformrenderbeat.h" +#include "waveform/renderers/waveformwidgetrenderer.h" #include "waveform/sharedglcontext.h" -#include "util/performancetimer.h" - QtWaveformWidget::QtWaveformWidget(const QString& group, QWidget* parent) : QGLWidget(parent, SharedGLContext::getWidget()), WaveformWidgetAbstract(group) { diff --git a/src/waveform/widgets/rgbwaveformwidget.cpp b/src/waveform/widgets/rgbwaveformwidget.cpp index d313a98d8058..befc317f28b3 100644 --- a/src/waveform/widgets/rgbwaveformwidget.cpp +++ b/src/waveform/widgets/rgbwaveformwidget.cpp @@ -2,14 +2,15 @@ #include -#include "waveform/renderers/waveformwidgetrenderer.h" +#include "moc_rgbwaveformwidget.cpp" #include "waveform/renderers/waveformrenderbackground.h" +#include "waveform/renderers/waveformrenderbeat.h" +#include "waveform/renderers/waveformrendererendoftrack.h" +#include "waveform/renderers/waveformrendererpreroll.h" +#include "waveform/renderers/waveformrendererrgb.h" #include "waveform/renderers/waveformrendermark.h" #include "waveform/renderers/waveformrendermarkrange.h" -#include "waveform/renderers/waveformrendererrgb.h" -#include "waveform/renderers/waveformrendererpreroll.h" -#include "waveform/renderers/waveformrendererendoftrack.h" -#include "waveform/renderers/waveformrenderbeat.h" +#include "waveform/renderers/waveformwidgetrenderer.h" RGBWaveformWidget::RGBWaveformWidget(const QString& group, QWidget* parent) : QWidget(parent), diff --git a/src/waveform/widgets/softwarewaveformwidget.cpp b/src/waveform/widgets/softwarewaveformwidget.cpp index 8c3fb3e9148f..ccc6a64b1226 100644 --- a/src/waveform/widgets/softwarewaveformwidget.cpp +++ b/src/waveform/widgets/softwarewaveformwidget.cpp @@ -2,14 +2,15 @@ #include -#include "waveform/renderers/waveformwidgetrenderer.h" +#include "moc_softwarewaveformwidget.cpp" #include "waveform/renderers/waveformrenderbackground.h" -#include "waveform/renderers/waveformrendermark.h" -#include "waveform/renderers/waveformrendermarkrange.h" +#include "waveform/renderers/waveformrenderbeat.h" +#include "waveform/renderers/waveformrendererendoftrack.h" #include "waveform/renderers/waveformrendererfilteredsignal.h" #include "waveform/renderers/waveformrendererpreroll.h" -#include "waveform/renderers/waveformrendererendoftrack.h" -#include "waveform/renderers/waveformrenderbeat.h" +#include "waveform/renderers/waveformrendermark.h" +#include "waveform/renderers/waveformrendermarkrange.h" +#include "waveform/renderers/waveformwidgetrenderer.h" SoftwareWaveformWidget::SoftwareWaveformWidget(const QString& group, QWidget* parent) : QWidget(parent), diff --git a/src/widget/controlwidgetconnection.cpp b/src/widget/controlwidgetconnection.cpp index c198c45e0b48..2822cb7f3d69 100644 --- a/src/widget/controlwidgetconnection.cpp +++ b/src/widget/controlwidgetconnection.cpp @@ -1,11 +1,13 @@ -#include #include "widget/controlwidgetconnection.h" -#include "widget/wbasewidget.h" +#include + #include "control/controlproxy.h" +#include "moc_controlwidgetconnection.cpp" +#include "util/assert.h" #include "util/debug.h" #include "util/valuetransformer.h" -#include "util/assert.h" +#include "widget/wbasewidget.h" ControlWidgetConnection::ControlWidgetConnection( WBaseWidget* pBaseWidget, diff --git a/src/widget/hexspinbox.cpp b/src/widget/hexspinbox.cpp index ab0c04d6978b..c58ef0fe8866 100644 --- a/src/widget/hexspinbox.cpp +++ b/src/widget/hexspinbox.cpp @@ -1,5 +1,7 @@ #include "widget/hexspinbox.h" +#include "moc_hexspinbox.cpp" + HexSpinBox::HexSpinBox(QWidget* pParent) : QSpinBox(pParent) { setRange(0, 255); diff --git a/src/widget/wbattery.cpp b/src/widget/wbattery.cpp index e5b2506dcf4d..d6d4fabdc402 100644 --- a/src/widget/wbattery.cpp +++ b/src/widget/wbattery.cpp @@ -1,7 +1,9 @@ +#include "widget/wbattery.h" + #include #include -#include "widget/wbattery.h" +#include "moc_wbattery.cpp" #include "util/battery/battery.h" #include "util/math.h" diff --git a/src/widget/wbeatspinbox.cpp b/src/widget/wbeatspinbox.cpp index e775182592d7..7876b2fd1dea 100644 --- a/src/widget/wbeatspinbox.cpp +++ b/src/widget/wbeatspinbox.cpp @@ -1,9 +1,10 @@ -#include - #include "widget/wbeatspinbox.h" +#include + #include "control/controlobject.h" #include "control/controlproxy.h" +#include "moc_wbeatspinbox.cpp" #include "util/math.h" QRegExp WBeatSpinBox::s_regexpBlacklist("[^0-9.,/ ]"); diff --git a/src/widget/wcolorpicker.cpp b/src/widget/wcolorpicker.cpp index d9a4d12ed7a2..3db8b60ffa10 100644 --- a/src/widget/wcolorpicker.cpp +++ b/src/widget/wcolorpicker.cpp @@ -5,6 +5,7 @@ #include #include +#include "moc_wcolorpicker.cpp" #include "util/color/color.h" #include "util/parented_ptr.h" diff --git a/src/widget/wcolorpickeraction.cpp b/src/widget/wcolorpickeraction.cpp index 085f1fe001c8..439b6c2bd3f7 100644 --- a/src/widget/wcolorpickeraction.cpp +++ b/src/widget/wcolorpickeraction.cpp @@ -1,5 +1,7 @@ #include "widget/wcolorpickeraction.h" +#include "moc_wcolorpickeraction.cpp" + WColorPickerAction::WColorPickerAction(WColorPicker::Options options, const ColorPalette& palette, QWidget* parent) : QWidgetAction(parent), m_pColorPicker(make_parented(options, palette)) { diff --git a/src/widget/wcombobox.cpp b/src/widget/wcombobox.cpp index 9e682c2be786..7fc52220463a 100644 --- a/src/widget/wcombobox.cpp +++ b/src/widget/wcombobox.cpp @@ -1,7 +1,9 @@ -#include +#include "widget/wcombobox.h" + #include +#include -#include "widget/wcombobox.h" +#include "moc_wcombobox.cpp" WComboBox::WComboBox(QWidget* pParent) : QComboBox(pParent), diff --git a/src/widget/wcoverart.cpp b/src/widget/wcoverart.cpp index 7e25b2866569..9d6cda09dafc 100644 --- a/src/widget/wcoverart.cpp +++ b/src/widget/wcoverart.cpp @@ -12,6 +12,7 @@ #include "library/coverartcache.h" #include "library/coverartutils.h" #include "library/dlgcoverartfullsize.h" +#include "moc_wcoverart.cpp" #include "track/track.h" #include "util/compatibility.h" #include "util/dnd.h" diff --git a/src/widget/wcoverartlabel.cpp b/src/widget/wcoverartlabel.cpp index 2d76d4be5015..88c10e9bc7f7 100644 --- a/src/widget/wcoverartlabel.cpp +++ b/src/widget/wcoverartlabel.cpp @@ -4,6 +4,7 @@ #include "library/coverartutils.h" #include "library/dlgcoverartfullsize.h" +#include "moc_wcoverartlabel.cpp" #include "track/track.h" #include "util/compatibility.h" #include "widget/wcoverartmenu.h" diff --git a/src/widget/wcoverartmenu.cpp b/src/widget/wcoverartmenu.cpp index d76ab639a1c8..080cb1018575 100644 --- a/src/widget/wcoverartmenu.cpp +++ b/src/widget/wcoverartmenu.cpp @@ -1,8 +1,10 @@ +#include "widget/wcoverartmenu.h" + #include #include -#include "widget/wcoverartmenu.h" #include "library/coverartutils.h" +#include "moc_wcoverartmenu.cpp" #include "util/sandbox.h" WCoverArtMenu::WCoverArtMenu(QWidget *parent) diff --git a/src/widget/wcuemenupopup.cpp b/src/widget/wcuemenupopup.cpp index ea92cb56c078..631808a67f85 100644 --- a/src/widget/wcuemenupopup.cpp +++ b/src/widget/wcuemenupopup.cpp @@ -5,6 +5,7 @@ #include #include "engine/engine.h" +#include "moc_wcuemenupopup.cpp" #include "track/track.h" #include "util/color/color.h" diff --git a/src/widget/wdisplay.cpp b/src/widget/wdisplay.cpp index f2110bfcdd8d..9e457b334afa 100644 --- a/src/widget/wdisplay.cpp +++ b/src/widget/wdisplay.cpp @@ -17,12 +17,13 @@ #include "widget/wdisplay.h" -#include -#include #include -#include #include +#include +#include +#include +#include "moc_wdisplay.cpp" #include "widget/wpixmapstore.h" WDisplay::WDisplay(QWidget * parent) diff --git a/src/widget/weffect.cpp b/src/widget/weffect.cpp index e62fd529d922..f9141d3a52a5 100644 --- a/src/widget/weffect.cpp +++ b/src/widget/weffect.cpp @@ -1,8 +1,9 @@ -#include - #include "widget/weffect.h" +#include + #include "effects/effectsmanager.h" +#include "moc_weffect.cpp" #include "widget/effectwidgetutils.h" WEffect::WEffect(QWidget* pParent, EffectsManager* pEffectsManager) diff --git a/src/widget/weffectbuttonparameter.cpp b/src/widget/weffectbuttonparameter.cpp index c78474476471..01ba1503cef7 100644 --- a/src/widget/weffectbuttonparameter.cpp +++ b/src/widget/weffectbuttonparameter.cpp @@ -1,7 +1,9 @@ +#include "widget/weffectbuttonparameter.h" + #include -#include "widget/weffectbuttonparameter.h" #include "effects/effectsmanager.h" +#include "moc_weffectbuttonparameter.cpp" #include "widget/effectwidgetutils.h" WEffectButtonParameter::WEffectButtonParameter(QWidget* pParent, EffectsManager* pEffectsManager) diff --git a/src/widget/weffectchain.cpp b/src/widget/weffectchain.cpp index 9d2121ff24e8..66211e1368f6 100644 --- a/src/widget/weffectchain.cpp +++ b/src/widget/weffectchain.cpp @@ -1,7 +1,9 @@ +#include "widget/weffectchain.h" + #include -#include "widget/weffectchain.h" #include "effects/effectsmanager.h" +#include "moc_weffectchain.cpp" #include "widget/effectwidgetutils.h" WEffectChain::WEffectChain(QWidget* pParent, EffectsManager* pEffectsManager) diff --git a/src/widget/weffectparameter.cpp b/src/widget/weffectparameter.cpp index 4d4a22faf3f5..202a68f2f7aa 100644 --- a/src/widget/weffectparameter.cpp +++ b/src/widget/weffectparameter.cpp @@ -1,7 +1,9 @@ +#include "widget/weffectparameter.h" + #include -#include "widget/weffectparameter.h" #include "effects/effectsmanager.h" +#include "moc_weffectparameter.cpp" #include "widget/effectwidgetutils.h" WEffectParameter::WEffectParameter(QWidget* pParent, EffectsManager* pEffectsManager) diff --git a/src/widget/weffectparameterbase.cpp b/src/widget/weffectparameterbase.cpp index 8fa10e93adc3..22191ee58b6f 100644 --- a/src/widget/weffectparameterbase.cpp +++ b/src/widget/weffectparameterbase.cpp @@ -1,7 +1,9 @@ +#include "widget/weffectparameterbase.h" + #include -#include "widget/weffectparameterbase.h" #include "effects/effectsmanager.h" +#include "moc_weffectparameterbase.cpp" WEffectParameterBase::WEffectParameterBase(QWidget* pParent, EffectsManager* pEffectsManager) : WLabel(pParent), diff --git a/src/widget/weffectparameterknob.cpp b/src/widget/weffectparameterknob.cpp index 6b07483b611b..4d68641b6460 100644 --- a/src/widget/weffectparameterknob.cpp +++ b/src/widget/weffectparameterknob.cpp @@ -1,6 +1,8 @@ -#include "widget/effectwidgetutils.h" #include "widget/weffectparameterknob.h" +#include "moc_weffectparameterknob.cpp" +#include "widget/effectwidgetutils.h" + void WEffectParameterKnob::setupEffectParameterSlot(const ConfigKey& configKey) { EffectParameterSlotPointer pParameterSlot = m_pEffectsManager->getEffectParameterSlot(configKey); diff --git a/src/widget/weffectparameterknobcomposed.cpp b/src/widget/weffectparameterknobcomposed.cpp index df10fc7544e4..6627cd578448 100644 --- a/src/widget/weffectparameterknobcomposed.cpp +++ b/src/widget/weffectparameterknobcomposed.cpp @@ -1,6 +1,9 @@ -#include "widget/effectwidgetutils.h" #include "widget/weffectparameterknobcomposed.h" +#include "moc_effectwidgetutils.cpp" +#include "moc_weffectparameterknobcomposed.cpp" +#include "widget/effectwidgetutils.h" + namespace { const QString effectGroupSeparator = "_"; const QString groupClose = "]"; diff --git a/src/widget/weffectpushbutton.cpp b/src/widget/weffectpushbutton.cpp index 1e21fd34ce77..3dfc096e2c6c 100644 --- a/src/widget/weffectpushbutton.cpp +++ b/src/widget/weffectpushbutton.cpp @@ -2,6 +2,7 @@ #include +#include "moc_weffectpushbutton.cpp" #include "widget/effectwidgetutils.h" WEffectPushButton::WEffectPushButton(QWidget* pParent, EffectsManager* pEffectsManager) diff --git a/src/widget/weffectselector.cpp b/src/widget/weffectselector.cpp index 467f77531bb8..02c9c3f23060 100644 --- a/src/widget/weffectselector.cpp +++ b/src/widget/weffectselector.cpp @@ -1,8 +1,9 @@ -#include - #include "widget/weffectselector.h" +#include + #include "effects/effectsmanager.h" +#include "moc_weffectselector.cpp" #include "widget/effectwidgetutils.h" WEffectSelector::WEffectSelector(QWidget* pParent, EffectsManager* pEffectsManager) diff --git a/src/widget/whotcuebutton.cpp b/src/widget/whotcuebutton.cpp index c78b131c6c76..550b797b0549 100644 --- a/src/widget/whotcuebutton.cpp +++ b/src/widget/whotcuebutton.cpp @@ -5,6 +5,7 @@ #include #include "mixer/playerinfo.h" +#include "moc_whotcuebutton.cpp" #include "track/track.h" namespace { diff --git a/src/widget/wkey.cpp b/src/widget/wkey.cpp index 59a6fcbdaf8d..9955f99e872b 100644 --- a/src/widget/wkey.cpp +++ b/src/widget/wkey.cpp @@ -1,4 +1,6 @@ #include "widget/wkey.h" + +#include "moc_wkey.cpp" #include "track/keys.h" #include "track/keyutils.h" diff --git a/src/widget/wknob.cpp b/src/widget/wknob.cpp index 974c7224964d..3b7fae157e9f 100644 --- a/src/widget/wknob.cpp +++ b/src/widget/wknob.cpp @@ -15,12 +15,14 @@ * * ***************************************************************************/ -#include +#include "widget/wknob.h" + #include #include +#include +#include "moc_wknob.cpp" #include "util/duration.h" -#include "widget/wknob.h" WKnob::WKnob(QWidget* pParent) : WDisplay(pParent), diff --git a/src/widget/wknobcomposed.cpp b/src/widget/wknobcomposed.cpp index e2fbb98c1f32..e9cba3290c28 100644 --- a/src/widget/wknobcomposed.cpp +++ b/src/widget/wknobcomposed.cpp @@ -1,9 +1,11 @@ -#include +#include "widget/wknobcomposed.h" + #include +#include #include +#include "moc_wknobcomposed.cpp" #include "util/duration.h" -#include "widget/wknobcomposed.h" #include "widget/wskincolor.h" WKnobComposed::WKnobComposed(QWidget* pParent) diff --git a/src/widget/wlabel.cpp b/src/widget/wlabel.cpp index 5a07154bc5ba..b9d5acb4c11f 100644 --- a/src/widget/wlabel.cpp +++ b/src/widget/wlabel.cpp @@ -19,6 +19,7 @@ #include +#include "moc_wlabel.cpp" #include "widget/wskincolor.h" WLabel::WLabel(QWidget* pParent) diff --git a/src/widget/wlibrary.cpp b/src/widget/wlibrary.cpp index b293fe615100..3edd9915405e 100644 --- a/src/widget/wlibrary.cpp +++ b/src/widget/wlibrary.cpp @@ -1,14 +1,16 @@ // wlibrary.cpp // Created 8/28/2009 by RJ Ryan (rryan@mit.edu) -#include +#include "widget/wlibrary.h" + #include +#include -#include "widget/wlibrary.h" -#include "library/libraryview.h" #include "controllers/keyboard/keyboardeventfilter.h" -#include "widget/wtracktableview.h" +#include "library/libraryview.h" +#include "moc_wlibrary.cpp" #include "util/math.h" +#include "widget/wtracktableview.h" WLibrary::WLibrary(QWidget* parent) : QStackedWidget(parent), diff --git a/src/widget/wlibrarysidebar.cpp b/src/widget/wlibrarysidebar.cpp index 93fe776e23f1..81547d00d1cc 100644 --- a/src/widget/wlibrarysidebar.cpp +++ b/src/widget/wlibrarysidebar.cpp @@ -2,11 +2,12 @@ #include #include +#include #include #include -#include #include "library/sidebarmodel.h" +#include "moc_wlibrarysidebar.cpp" #include "util/dnd.h" const int expand_time = 250; diff --git a/src/widget/wlibrarytableview.cpp b/src/widget/wlibrarytableview.cpp index ff650d0afe0a..6c63faf99303 100644 --- a/src/widget/wlibrarytableview.cpp +++ b/src/widget/wlibrarytableview.cpp @@ -7,6 +7,7 @@ #include #include "library/trackmodel.h" +#include "moc_wlibrarytableview.cpp" #include "util/math.h" #include "widget/wskincolor.h" #include "widget/wwidget.h" diff --git a/src/widget/wlibrarytextbrowser.cpp b/src/widget/wlibrarytextbrowser.cpp index 52b295103891..ce986d330f23 100644 --- a/src/widget/wlibrarytextbrowser.cpp +++ b/src/widget/wlibrarytextbrowser.cpp @@ -3,6 +3,8 @@ #include "widget/wlibrarytextbrowser.h" +#include "moc_wlibrarytextbrowser.cpp" + WLibraryTextBrowser::WLibraryTextBrowser(QWidget* parent) : QTextBrowser(parent) { } diff --git a/src/widget/wmainmenubar.cpp b/src/widget/wmainmenubar.cpp index 4b70daa011e9..7e409d0a5502 100644 --- a/src/widget/wmainmenubar.cpp +++ b/src/widget/wmainmenubar.cpp @@ -6,6 +6,7 @@ #include "control/controlproxy.h" #include "defs_urls.h" #include "mixer/playermanager.h" +#include "moc_wmainmenubar.cpp" #include "util/cmdlineargs.h" #include "util/experiment.h" #include "vinylcontrol/defs_vinylcontrol.h" diff --git a/src/widget/wnumber.cpp b/src/widget/wnumber.cpp index 43d902e1d9da..0e53647ecc6c 100644 --- a/src/widget/wnumber.cpp +++ b/src/widget/wnumber.cpp @@ -17,6 +17,8 @@ #include "widget/wnumber.h" +#include "moc_wnumber.cpp" + WNumber::WNumber(QWidget* pParent) : WLabel(pParent), m_iNoDigits(2) { diff --git a/src/widget/wnumberdb.cpp b/src/widget/wnumberdb.cpp index a517a808a16a..336ebb623678 100644 --- a/src/widget/wnumberdb.cpp +++ b/src/widget/wnumberdb.cpp @@ -1,9 +1,10 @@ #include "widget/wnumberdb.h" -#include "util/math.h" #include +#include "moc_wnumberdb.cpp" +#include "util/math.h" #include "widget/wskincolor.h" WNumberDb::WNumberDb(QWidget* pParent) diff --git a/src/widget/wnumberpos.cpp b/src/widget/wnumberpos.cpp index 96df878886b1..3e0ac92a257b 100644 --- a/src/widget/wnumberpos.cpp +++ b/src/widget/wnumberpos.cpp @@ -1,10 +1,12 @@ // Tue Haste Andersen , (C) 2003 #include "widget/wnumberpos.h" + #include "control/controlobject.h" #include "control/controlproxy.h" -#include "util/math.h" +#include "moc_wnumberpos.cpp" #include "util/duration.h" +#include "util/math.h" WNumberPos::WNumberPos(const QString& group, QWidget* parent) : WNumber(parent), diff --git a/src/widget/wnumberrate.cpp b/src/widget/wnumberrate.cpp index 04ce8c18bd0f..075ad3ba96cb 100644 --- a/src/widget/wnumberrate.cpp +++ b/src/widget/wnumberrate.cpp @@ -14,6 +14,7 @@ #include "control/controlobject.h" #include "control/controlproxy.h" +#include "moc_wnumberrate.cpp" #include "util/math.h" namespace { diff --git a/src/widget/woverview.cpp b/src/widget/woverview.cpp index 9046ab127cac..5d51c47c4f9a 100644 --- a/src/widget/woverview.cpp +++ b/src/widget/woverview.cpp @@ -25,6 +25,7 @@ #include "control/controlproxy.h" #include "engine/engine.h" #include "mixer/playermanager.h" +#include "moc_woverview.cpp" #include "preferences/colorpalettesettings.h" #include "track/track.h" #include "util/color/color.h" diff --git a/src/widget/wpushbutton.cpp b/src/widget/wpushbutton.cpp index 339c61f7d2f7..768a1ed0312b 100644 --- a/src/widget/wpushbutton.cpp +++ b/src/widget/wpushbutton.cpp @@ -17,18 +17,19 @@ #include "widget/wpushbutton.h" -#include -#include -#include -#include +#include #include -#include #include -#include +#include +#include +#include +#include +#include #include "control/controlbehavior.h" #include "control/controlobject.h" #include "control/controlpushbutton.h" +#include "moc_wpushbutton.cpp" #include "util/debug.h" #include "util/math.h" #include "widget/wpixmapstore.h" diff --git a/src/widget/wrecordingduration.cpp b/src/widget/wrecordingduration.cpp index ee9770bf64ac..1fc66601b587 100644 --- a/src/widget/wrecordingduration.cpp +++ b/src/widget/wrecordingduration.cpp @@ -1,5 +1,7 @@ #include "widget/wrecordingduration.h" +#include "moc_wrecordingduration.cpp" + WRecordingDuration::WRecordingDuration(QWidget *parent, RecordingManager* pRecordingManager) : WLabel(parent), diff --git a/src/widget/wsearchlineedit.cpp b/src/widget/wsearchlineedit.cpp index 5eaeb0213ffe..e77352f88f87 100644 --- a/src/widget/wsearchlineedit.cpp +++ b/src/widget/wsearchlineedit.cpp @@ -1,15 +1,15 @@ +#include "wsearchlineedit.h" + #include #include #include -#include "wsearchlineedit.h" -#include "wskincolor.h" -#include "wwidget.h" - +#include "moc_wsearchlineedit.cpp" #include "skin/skincontext.h" - #include "util/assert.h" #include "util/logger.h" +#include "wskincolor.h" +#include "wwidget.h" #define ENABLE_TRACE_LOG false diff --git a/src/widget/wsingletoncontainer.cpp b/src/widget/wsingletoncontainer.cpp index 6deebe709d2b..7e390c852f70 100644 --- a/src/widget/wsingletoncontainer.cpp +++ b/src/widget/wsingletoncontainer.cpp @@ -2,11 +2,11 @@ #include -#include "util/assert.h" +#include "moc_wsingletoncontainer.cpp" #include "skin/skincontext.h" +#include "util/assert.h" #include "widget/wlibrary.h" - WSingletonContainer::WSingletonContainer(QWidget* pParent) : WWidgetGroup(pParent), m_pWidget(nullptr), m_pLayout(nullptr) { } diff --git a/src/widget/wsizeawarestack.cpp b/src/widget/wsizeawarestack.cpp index 566a71c49f83..3032110624e1 100644 --- a/src/widget/wsizeawarestack.cpp +++ b/src/widget/wsizeawarestack.cpp @@ -1,8 +1,10 @@ -#include -#include +#include "widget/wsizeawarestack.h" + #include +#include +#include -#include "widget/wsizeawarestack.h" +#include "moc_wsizeawarestack.cpp" class SizeAwareLayout : public QStackedLayout { diff --git a/src/widget/wslidercomposed.cpp b/src/widget/wslidercomposed.cpp index 0c28df5b6183..d643119e9692 100644 --- a/src/widget/wslidercomposed.cpp +++ b/src/widget/wslidercomposed.cpp @@ -17,16 +17,17 @@ #include "widget/wslidercomposed.h" -#include -#include #include +#include +#include -#include "widget/controlwidgetconnection.h" -#include "widget/wpixmapstore.h" -#include "widget/wskincolor.h" +#include "moc_wslidercomposed.cpp" #include "util/debug.h" #include "util/duration.h" #include "util/math.h" +#include "widget/controlwidgetconnection.h" +#include "widget/wpixmapstore.h" +#include "widget/wskincolor.h" WSliderComposed::WSliderComposed(QWidget * parent) : WWidget(parent), diff --git a/src/widget/wspinny.cpp b/src/widget/wspinny.cpp index 87842a69f2f9..137b7e6f50df 100644 --- a/src/widget/wspinny.cpp +++ b/src/widget/wspinny.cpp @@ -11,6 +11,7 @@ #include "control/controlproxy.h" #include "library/coverartcache.h" #include "library/coverartutils.h" +#include "moc_wspinny.cpp" #include "track/track.h" #include "util/compatibility.h" #include "util/dnd.h" diff --git a/src/widget/wsplitter.cpp b/src/widget/wsplitter.cpp index 1afbf4e11961..61dcb8344a88 100644 --- a/src/widget/wsplitter.cpp +++ b/src/widget/wsplitter.cpp @@ -1,6 +1,8 @@ +#include "widget/wsplitter.h" + #include -#include "widget/wsplitter.h" +#include "moc_wsplitter.cpp" WSplitter::WSplitter(QWidget* pParent, UserSettingsPointer pConfig) : QSplitter(pParent), diff --git a/src/widget/wstarrating.cpp b/src/widget/wstarrating.cpp index a9a010bf5b23..58850204f71b 100644 --- a/src/widget/wstarrating.cpp +++ b/src/widget/wstarrating.cpp @@ -5,6 +5,7 @@ #include #include +#include "moc_wstarrating.cpp" #include "track/track.h" WStarRating::WStarRating(const QString& group, QWidget* pParent) diff --git a/src/widget/wstatuslight.cpp b/src/widget/wstatuslight.cpp index e3ab09736ab6..8a14624bd191 100644 --- a/src/widget/wstatuslight.cpp +++ b/src/widget/wstatuslight.cpp @@ -19,10 +19,12 @@ #include "widget/wstatuslight.h" #include -#include +#include #include +#include #include -#include + +#include "moc_wstatuslight.cpp" WStatusLight::WStatusLight(QWidget * parent) : WWidget(parent), diff --git a/src/widget/wtime.cpp b/src/widget/wtime.cpp index 54f3f853b265..91e406185b9e 100644 --- a/src/widget/wtime.cpp +++ b/src/widget/wtime.cpp @@ -1,8 +1,10 @@ -#include -#include +#include "widget/wtime.h" + #include +#include +#include -#include "widget/wtime.h" +#include "moc_wtime.cpp" #include "util/cmdlineargs.h" WTime::WTime(QWidget *parent) diff --git a/src/widget/wtrackmenu.cpp b/src/widget/wtrackmenu.cpp index 4d59925d2fe7..93bab7e4bc27 100644 --- a/src/widget/wtrackmenu.cpp +++ b/src/widget/wtrackmenu.cpp @@ -22,6 +22,7 @@ #include "library/trackmodeliterator.h" #include "library/trackprocessing.h" #include "mixer/playermanager.h" +#include "moc_wtrackmenu.cpp" #include "preferences/colorpalettesettings.h" #include "sources/soundsourceproxy.h" #include "track/track.h" diff --git a/src/widget/wtrackproperty.cpp b/src/widget/wtrackproperty.cpp index d540e7b8ef25..0066cbe7ebb8 100644 --- a/src/widget/wtrackproperty.cpp +++ b/src/widget/wtrackproperty.cpp @@ -4,6 +4,7 @@ #include #include "control/controlobject.h" +#include "moc_wtrackproperty.cpp" #include "track/track.h" #include "util/dnd.h" #include "widget/wtrackmenu.h" diff --git a/src/widget/wtracktableview.cpp b/src/widget/wtracktableview.cpp index 8cf341051823..b5d73a23618e 100644 --- a/src/widget/wtracktableview.cpp +++ b/src/widget/wtracktableview.cpp @@ -12,6 +12,7 @@ #include "library/trackcollection.h" #include "library/trackcollectionmanager.h" #include "mixer/playermanager.h" +#include "moc_wtracktableview.cpp" #include "preferences/colorpalettesettings.h" #include "preferences/dialog/dlgpreflibrary.h" #include "sources/soundsourceproxy.h" diff --git a/src/widget/wtracktableviewheader.cpp b/src/widget/wtracktableviewheader.cpp index ecde638ce24b..30f4168592f5 100644 --- a/src/widget/wtracktableviewheader.cpp +++ b/src/widget/wtracktableviewheader.cpp @@ -1,10 +1,12 @@ // wtracktableviewheader.cpp // Created 1/2/2010 by RJ Ryan (rryan@mit.edu) +#include "widget/wtracktableviewheader.h" + #include -#include "widget/wtracktableviewheader.h" #include "library/trackmodel.h" +#include "moc_wtracktableviewheader.cpp" #include "util/math.h" #define WTTVH_MINIMUM_SECTION_SIZE 20 diff --git a/src/widget/wtracktext.cpp b/src/widget/wtracktext.cpp index 251b7256d2fb..bc4486c78c1f 100644 --- a/src/widget/wtracktext.cpp +++ b/src/widget/wtracktext.cpp @@ -5,6 +5,7 @@ #include #include "control/controlobject.h" +#include "moc_wtracktext.cpp" #include "track/track.h" #include "util/dnd.h" #include "widget/wtrackmenu.h" diff --git a/src/widget/wtrackwidgetgroup.cpp b/src/widget/wtrackwidgetgroup.cpp index 035c8679ce76..646cea9a1a62 100644 --- a/src/widget/wtrackwidgetgroup.cpp +++ b/src/widget/wtrackwidgetgroup.cpp @@ -6,6 +6,7 @@ #include #include "control/controlobject.h" +#include "moc_wtrackwidgetgroup.cpp" #include "track/track.h" #include "util/dnd.h" #include "widget/wtrackmenu.h" diff --git a/src/widget/wvumeter.cpp b/src/widget/wvumeter.cpp index 4e984ae5629c..1fc0dc8fb498 100644 --- a/src/widget/wvumeter.cpp +++ b/src/widget/wvumeter.cpp @@ -17,15 +17,16 @@ #include "widget/wvumeter.h" -#include -#include #include -#include #include +#include +#include +#include +#include "moc_wvumeter.cpp" +#include "util/math.h" #include "util/timer.h" #include "widget/wpixmapstore.h" -#include "util/math.h" #define DEFAULT_FALLTIME 20 #define DEFAULT_FALLSTEP 1 diff --git a/src/widget/wwaveformviewer.cpp b/src/widget/wwaveformviewer.cpp index 872959d3d753..04184dfa4979 100644 --- a/src/widget/wwaveformviewer.cpp +++ b/src/widget/wwaveformviewer.cpp @@ -10,6 +10,7 @@ #include "control/controlobject.h" #include "control/controlproxy.h" +#include "moc_wwaveformviewer.cpp" #include "track/track.h" #include "util/dnd.h" #include "util/math.h" diff --git a/src/widget/wwidget.cpp b/src/widget/wwidget.cpp index 4983b0c2a1c3..4aed358128c3 100644 --- a/src/widget/wwidget.cpp +++ b/src/widget/wwidget.cpp @@ -15,11 +15,13 @@ * * ***************************************************************************/ -#include +#include "widget/wwidget.h" + #include +#include -#include "widget/wwidget.h" #include "control/controlproxy.h" +#include "moc_wwidget.cpp" #include "util/assert.h" WWidget::WWidget(QWidget* parent, Qt::WindowFlags flags) diff --git a/src/widget/wwidgetgroup.cpp b/src/widget/wwidgetgroup.cpp index 12f9e149f73d..782463c742c1 100644 --- a/src/widget/wwidgetgroup.cpp +++ b/src/widget/wwidgetgroup.cpp @@ -2,13 +2,14 @@ #include #include -#include #include +#include +#include "moc_wwidgetgroup.cpp" #include "skin/skincontext.h" -#include "widget/wwidget.h" #include "util/debug.h" #include "widget/wpixmapstore.h" +#include "widget/wwidget.h" WWidgetGroup::WWidgetGroup(QWidget* pParent) : QFrame(pParent), diff --git a/src/widget/wwidgetstack.cpp b/src/widget/wwidgetstack.cpp index c509b7963c57..225ca51ce8ae 100644 --- a/src/widget/wwidgetstack.cpp +++ b/src/widget/wwidgetstack.cpp @@ -1,7 +1,9 @@ -#include +#include "widget/wwidgetstack.h" + #include +#include -#include "widget/wwidgetstack.h" +#include "moc_wwidgetstack.cpp" WidgetStackControlListener::WidgetStackControlListener( QObject* pParent, ControlObject* pControl, int index) From 655ee132358dfeee832da97e2c5b7287cc282e88 Mon Sep 17 00:00:00 2001 From: Daniel Poelzleithner Date: Mon, 7 Dec 2020 13:04:32 +0100 Subject: [PATCH 78/86] remove unused privates --- src/widget/wslidercomposed.cpp | 1 - src/widget/wslidercomposed.h | 2 -- src/widget/wspinny.cpp | 1 - src/widget/wspinny.h | 1 - 4 files changed, 5 deletions(-) diff --git a/src/widget/wslidercomposed.cpp b/src/widget/wslidercomposed.cpp index d643119e9692..186d8a3dd028 100644 --- a/src/widget/wslidercomposed.cpp +++ b/src/widget/wslidercomposed.cpp @@ -31,7 +31,6 @@ WSliderComposed::WSliderComposed(QWidget * parent) : WWidget(parent), - m_bRightButtonPressed(false), m_dHandleLength(0.0), m_dSliderLength(0.0), m_bHorizontal(false), diff --git a/src/widget/wslidercomposed.h b/src/widget/wslidercomposed.h index df1782326324..5324de6da121 100644 --- a/src/widget/wslidercomposed.h +++ b/src/widget/wslidercomposed.h @@ -74,8 +74,6 @@ class WSliderComposed : public WWidget { double calculateHandleLength(); void unsetPixmaps(); - // True if right mouse button is pressed. - bool m_bRightButtonPressed; // Length of handle in pixels double m_dHandleLength; // Length of the slider in pixels. diff --git a/src/widget/wspinny.cpp b/src/widget/wspinny.cpp index 137b7e6f50df..eb5fe93fcd86 100644 --- a/src/widget/wspinny.cpp +++ b/src/widget/wspinny.cpp @@ -60,7 +60,6 @@ WSpinny::WSpinny( m_iStartMouseY(-1), m_iFullRotations(0), m_dPrevTheta(0.), - m_dTheta(0.), m_dRotationsPerSecond(MIXXX_VINYL_SPEED_33_NUM / 60), m_bClampFailedWarning(false), m_bGhostPlayback(false), diff --git a/src/widget/wspinny.h b/src/widget/wspinny.h index 5f82d330026b..3579e2a31642 100644 --- a/src/widget/wspinny.h +++ b/src/widget/wspinny.h @@ -127,7 +127,6 @@ class WSpinny : public QGLWidget, public WBaseWidget, public VinylSignalQualityL int m_iStartMouseY; int m_iFullRotations; double m_dPrevTheta; - double m_dTheta; // Speed of the vinyl rotation. double m_dRotationsPerSecond; bool m_bClampFailedWarning; From 97e123f427672a05abafd394b040d20b3d18a2cd Mon Sep 17 00:00:00 2001 From: Daniel Poelzleithner Date: Mon, 7 Dec 2020 13:25:53 +0100 Subject: [PATCH 79/86] add missing pragma --- src/test/trackexport_test.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/test/trackexport_test.h b/src/test/trackexport_test.h index 359d4db727d9..00a543bf6aeb 100644 --- a/src/test/trackexport_test.h +++ b/src/test/trackexport_test.h @@ -1,3 +1,5 @@ +#pragma once + #include "library/export/trackexportworker.h" #include From a121c8b095fd5b5ed1a4c9602cf50c349e4dca66 Mon Sep 17 00:00:00 2001 From: Daniel Poelzleithner Date: Mon, 7 Dec 2020 13:58:46 +0100 Subject: [PATCH 80/86] remove more unused arguments --- src/preferences/dialog/dlgprefdeck.cpp | 4 ---- src/preferences/dialog/dlgprefdeck.h | 8 ++------ src/preferences/dialog/dlgprefeffects.h | 1 - src/preferences/dialog/dlgpreferences.cpp | 7 +++++-- src/preferences/dialog/dlgprefsound.cpp | 6 +++--- src/preferences/dialog/dlgprefsound.h | 2 -- 6 files changed, 10 insertions(+), 18 deletions(-) diff --git a/src/preferences/dialog/dlgprefdeck.cpp b/src/preferences/dialog/dlgprefdeck.cpp index 0fe98114d1c1..412954e9f49c 100644 --- a/src/preferences/dialog/dlgprefdeck.cpp +++ b/src/preferences/dialog/dlgprefdeck.cpp @@ -36,12 +36,8 @@ constexpr int kDefaultRateRampSensitivity = 250; } DlgPrefDeck::DlgPrefDeck(QWidget* parent, - MixxxMainWindow* mixxx, - PlayerManager* pPlayerManager, UserSettingsPointer pConfig) : DlgPreferencePage(parent), - m_mixxx(mixxx), - m_pPlayerManager(pPlayerManager), m_pConfig(pConfig), m_pControlTrackTimeDisplay(std::make_unique( ConfigKey("[Controls]", "ShowDurationRemaining"))), diff --git a/src/preferences/dialog/dlgprefdeck.h b/src/preferences/dialog/dlgprefdeck.h index dde7bff85a70..41644d765691 100644 --- a/src/preferences/dialog/dlgprefdeck.h +++ b/src/preferences/dialog/dlgprefdeck.h @@ -56,9 +56,8 @@ enum class KeyunlockMode { class DlgPrefDeck : public DlgPreferencePage, public Ui::DlgPrefDeckDlg { Q_OBJECT public: - DlgPrefDeck(QWidget *parent, MixxxMainWindow *mixxx, - PlayerManager* pPlayerManager, - UserSettingsPointer pConfig); + DlgPrefDeck(QWidget* parent, + UserSettingsPointer pConfig); ~DlgPrefDeck() override; public slots: @@ -102,8 +101,6 @@ class DlgPrefDeck : public DlgPreferencePage, public Ui::DlgPrefDeckDlg { void setRateRangeForAllDecks(int rangePercent); void setRateDirectionForAllDecks(bool inverted); - MixxxMainWindow* const m_mixxx; - PlayerManager* const m_pPlayerManager; const UserSettingsPointer m_pConfig; const std::unique_ptr m_pControlTrackTimeDisplay; @@ -129,7 +126,6 @@ class DlgPrefDeck : public DlgPreferencePage, public Ui::DlgPrefDeckDlg { bool m_bSetIntroStartAtMainCue; bool m_bDisallowTrackLoadToPlayingDeck; bool m_bCloneDeckOnLoadDoubleTap; - bool m_bAssignHotcueColors; int m_iRateRangePercent; bool m_bRateDownIncreasesSpeed; diff --git a/src/preferences/dialog/dlgprefeffects.h b/src/preferences/dialog/dlgprefeffects.h index 1694c4e146c6..f8a5e6a688dd 100644 --- a/src/preferences/dialog/dlgprefeffects.h +++ b/src/preferences/dialog/dlgprefeffects.h @@ -31,7 +31,6 @@ class DlgPrefEffects : public DlgPreferencePage, public Ui::DlgPrefEffectsDlg { EffectSettingsModel m_availableEffectsModel; UserSettingsPointer m_pConfig; EffectsManager* m_pEffectsManager; - EffectSettingsModel* m_pAvailableEffectsModel; }; #endif /* DLGPREFEFFECTS_H */ diff --git a/src/preferences/dialog/dlgpreferences.cpp b/src/preferences/dialog/dlgpreferences.cpp index b52f4b743707..916531225057 100644 --- a/src/preferences/dialog/dlgpreferences.cpp +++ b/src/preferences/dialog/dlgpreferences.cpp @@ -81,6 +81,7 @@ DlgPreferences::DlgPreferences(MixxxMainWindow * mixxx, SkinLoader* pSkinLoader, #ifndef __LILV__ Q_UNUSED(pLV2Backend); #endif /* __LILV__ */ + Q_UNUSED(pPlayerManager); setupUi(this); contentsTreeWidget->setHeaderHidden(true); @@ -96,7 +97,7 @@ DlgPreferences::DlgPreferences(MixxxMainWindow * mixxx, SkinLoader* pSkinLoader, } // Construct widgets for use in tabs. - m_soundPage = new DlgPrefSound(this, soundman, pPlayerManager, m_pConfig); + m_soundPage = new DlgPrefSound(this, soundman, m_pConfig); addPageWidget(m_soundPage); m_libraryPage = new DlgPrefLibrary(this, m_pConfig, pLibrary); addPageWidget(m_libraryPage); @@ -113,16 +114,18 @@ DlgPreferences::DlgPreferences(MixxxMainWindow * mixxx, SkinLoader* pSkinLoader, // TODO(rryan) determine why/if this is still true m_vinylControlPage = new DlgPrefVinyl(this, pVCManager, m_pConfig); addPageWidget(m_vinylControlPage); + Q_UNUSED(m_noVinylControlPage); #else m_noVinylControlPage = new DlgPrefNoVinyl(this, soundman, m_pConfig); addPageWidget(m_noVinylControlPage); + Q_UNUSED(m_vinylControlPage); #endif m_interfacePage = new DlgPrefInterface(this, mixxx, pSkinLoader, m_pConfig); addPageWidget(m_interfacePage); m_waveformPage = new DlgPrefWaveform(this, mixxx, m_pConfig, pLibrary); addPageWidget(m_waveformPage); - m_deckPage = new DlgPrefDeck(this, mixxx, pPlayerManager, m_pConfig); + m_deckPage = new DlgPrefDeck(this, m_pConfig); addPageWidget(m_deckPage); m_colorsPage = new DlgPrefColors(this, m_pConfig, pLibrary); addPageWidget(m_colorsPage); diff --git a/src/preferences/dialog/dlgprefsound.cpp b/src/preferences/dialog/dlgprefsound.cpp index f97cdfa2569e..8bfc7bf9ea3b 100644 --- a/src/preferences/dialog/dlgprefsound.cpp +++ b/src/preferences/dialog/dlgprefsound.cpp @@ -32,11 +32,11 @@ * Construct a new sound preferences pane. Initializes and populates all the * all the controls to the values obtained from SoundManager. */ -DlgPrefSound::DlgPrefSound(QWidget* pParent, SoundManager* pSoundManager, - PlayerManager* pPlayerManager, UserSettingsPointer pSettings) +DlgPrefSound::DlgPrefSound(QWidget* pParent, + SoundManager* pSoundManager, + UserSettingsPointer pSettings) : DlgPreferencePage(pParent), m_pSoundManager(pSoundManager), - m_pPlayerManager(pPlayerManager), m_pSettings(pSettings), m_config(pSoundManager), m_settingsModified(false), diff --git a/src/preferences/dialog/dlgprefsound.h b/src/preferences/dialog/dlgprefsound.h index 6682555925d3..2ef52be53459 100644 --- a/src/preferences/dialog/dlgprefsound.h +++ b/src/preferences/dialog/dlgprefsound.h @@ -44,7 +44,6 @@ class DlgPrefSound : public DlgPreferencePage, public Ui::DlgPrefSoundDlg { Q_OBJECT; public: DlgPrefSound(QWidget *parent, SoundManager *soundManager, - PlayerManager* pPlayerManager, UserSettingsPointer pSettings); virtual ~DlgPrefSound(); @@ -99,7 +98,6 @@ class DlgPrefSound : public DlgPreferencePage, public Ui::DlgPrefSoundDlg { bool eventFilter(QObject* object, QEvent* event) override; SoundManager *m_pSoundManager; - PlayerManager *m_pPlayerManager; UserSettingsPointer m_pSettings; SoundManagerConfig m_config; ControlProxy* m_pMasterAudioLatencyOverloadCount; From c60ec145af33e51a750a7301285027f5d40d8af0 Mon Sep 17 00:00:00 2001 From: Uwe Klotz Date: Mon, 7 Dec 2020 15:06:42 +0100 Subject: [PATCH 81/86] Reuse StreamInfo for TrackMetadata Replace individual properties in TrackMetadata with a single StreamInfo property. --- src/sources/soundsourcemodplug.cpp | 13 ++- src/sources/soundsourceopus.cpp | 17 ++-- src/sources/soundsourceproxy.cpp | 2 +- src/test/trackmetadata_test.cpp | 31 +++--- src/track/taglib/trackmetadata_file.cpp | 26 ++--- src/track/track.cpp | 127 +++++++++++------------- src/track/track.h | 18 +++- src/track/trackmetadata.cpp | 71 ++++++++----- src/track/trackmetadata.h | 23 ++--- 9 files changed, 177 insertions(+), 151 deletions(-) diff --git a/src/sources/soundsourcemodplug.cpp b/src/sources/soundsourcemodplug.cpp index 4d1520e5b04c..9fd98a767a1d 100644 --- a/src/sources/soundsourcemodplug.cpp +++ b/src/sources/soundsourcemodplug.cpp @@ -108,11 +108,14 @@ SoundSourceModPlug::importTrackMetadataAndCoverImage( pTrackMetadata->refTrackInfo().setComment(QString(ModPlug::ModPlug_GetMessage(pModFile))); pTrackMetadata->refTrackInfo().setTitle(QString(ModPlug::ModPlug_GetName(pModFile))); - pTrackMetadata->setChannelCount(audio::ChannelCount(kChannelCount)); - pTrackMetadata->setSampleRate(audio::SampleRate(kSampleRate)); - pTrackMetadata->setBitrate(audio::Bitrate(8)); - pTrackMetadata->setDuration(Duration::fromMillis(ModPlug::ModPlug_GetLength(pModFile))); - ModPlug::ModPlug_Unload(pModFile); + pTrackMetadata->setStreamInfo(audio::StreamInfo{ + audio::SignalInfo{ + audio::ChannelCount(kChannelCount), + audio::SampleRate(kSampleRate), + }, + audio::Bitrate(8), + Duration::fromMillis(ModPlug::ModPlug_GetLength(pModFile)), + }); return std::make_pair(ImportResult::Succeeded, QFileInfo(modFile).lastModified()); } diff --git a/src/sources/soundsourceopus.cpp b/src/sources/soundsourceopus.cpp index c5ade898601a..9cf9eaad10d1 100644 --- a/src/sources/soundsourceopus.cpp +++ b/src/sources/soundsourceopus.cpp @@ -138,17 +138,18 @@ SoundSourceOpus::importTrackMetadataAndCoverImage( return imported; } - pTrackMetadata->setChannelCount( - audio::ChannelCount(op_channel_count(pOggOpusFile, -1))); - pTrackMetadata->setSampleRate( - kSampleRate); - pTrackMetadata->setBitrate( - audio::Bitrate(op_bitrate(pOggOpusFile, -1) / 1000)); // Cast to double is required for duration with sub-second precision const double dTotalFrames = op_pcm_total(pOggOpusFile, -1); const auto duration = Duration::fromMicros( - static_cast(1000000 * dTotalFrames / pTrackMetadata->getSampleRate())); - pTrackMetadata->setDuration(duration); + static_cast(1000000 * dTotalFrames / kSampleRate)); + pTrackMetadata->setStreamInfo(audio::StreamInfo{ + audio::SignalInfo{ + audio::ChannelCount(op_channel_count(pOggOpusFile, -1)), + kSampleRate, + }, + audio::Bitrate(op_bitrate(pOggOpusFile, -1) / 1000), + duration, + }); #ifndef TAGLIB_HAS_OPUSFILE const OpusTags* l_ptrOpusTags = op_tags(pOggOpusFile, -1); diff --git a/src/sources/soundsourceproxy.cpp b/src/sources/soundsourceproxy.cpp index 1347579439aa..5fb2f6b1ed96 100644 --- a/src/sources/soundsourceproxy.cpp +++ b/src/sources/soundsourceproxy.cpp @@ -682,7 +682,7 @@ mixxx::AudioSourcePointer SoundSourceProxy::openAudioSource( DEBUG_ASSERT(m_pAudioSource); // Overwrite metadata with actual audio properties if (m_pTrack) { - m_pTrack->updateAudioPropertiesFromStream( + m_pTrack->updateStreamInfoFromSource( m_pAudioSource->getStreamInfo()); } return m_pAudioSource; diff --git a/src/test/trackmetadata_test.cpp b/src/test/trackmetadata_test.cpp index aec136ab0c28..af16af07fe6c 100644 --- a/src/test/trackmetadata_test.cpp +++ b/src/test/trackmetadata_test.cpp @@ -66,10 +66,15 @@ TEST_F(TrackMetadataTest, mergeImportedMetadata) { // Existing track metadata (stored in the database) without extra properties mixxx::TrackRecord oldTrackRecord; mixxx::TrackMetadata* pOldTrackMetadata = oldTrackRecord.ptrMetadata(); - pOldTrackMetadata->setBitrate(mixxx::audio::Bitrate(100)); - pOldTrackMetadata->setChannelCount(mixxx::audio::ChannelCount(1)); - pOldTrackMetadata->setDuration(mixxx::Duration::fromSeconds(60)); - pOldTrackMetadata->setSampleRate(mixxx::audio::SampleRate(10000)); + pOldTrackMetadata->setStreamInfo( + mixxx::audio::StreamInfo{ + mixxx::audio::SignalInfo{ + mixxx::audio::ChannelCount(1), + mixxx::audio::SampleRate(10000), + }, + mixxx::audio::Bitrate(100), + mixxx::Duration::fromSeconds(60), + }); mixxx::TrackInfo* pOldTrackInfo = pOldTrackMetadata->ptrTrackInfo(); pOldTrackInfo->setArtist("old artist"); pOldTrackInfo->setBpm(mixxx::Bpm(100)); @@ -89,10 +94,15 @@ TEST_F(TrackMetadataTest, mergeImportedMetadata) { // Imported track metadata (from file tags) with extra properties mixxx::TrackMetadata newTrackMetadata; - newTrackMetadata.setBitrate(mixxx::audio::Bitrate(200)); - newTrackMetadata.setChannelCount(mixxx::audio::ChannelCount(2)); - newTrackMetadata.setDuration(mixxx::Duration::fromSeconds(120)); - newTrackMetadata.setSampleRate(mixxx::audio::SampleRate(20000)); + newTrackMetadata.setStreamInfo( + mixxx::audio::StreamInfo{ + mixxx::audio::SignalInfo{ + mixxx::audio::ChannelCount(2), + mixxx::audio::SampleRate(20000), + }, + mixxx::audio::Bitrate(200), + mixxx::Duration::fromSeconds(120), + }); mixxx::TrackInfo* pNewTrackInfo = newTrackMetadata.ptrTrackInfo(); pNewTrackInfo->setArtist("new artist"); pNewTrackInfo->setBpm(mixxx::Bpm(200)); @@ -149,10 +159,7 @@ TEST_F(TrackMetadataTest, mergeImportedMetadata) { mergedTrackRecord.mergeImportedMetadata(newTrackMetadata); mixxx::TrackMetadata* pMergedTrackMetadata = mergedTrackRecord.ptrMetadata(); - EXPECT_EQ(pOldTrackMetadata->getBitrate(), pMergedTrackMetadata->getBitrate()); - EXPECT_EQ(pOldTrackMetadata->getChannelCount(), pMergedTrackMetadata->getChannelCount()); - EXPECT_EQ(pOldTrackMetadata->getDuration(), pMergedTrackMetadata->getDuration()); - EXPECT_EQ(pOldTrackMetadata->getSampleRate(), pMergedTrackMetadata->getSampleRate()); + EXPECT_EQ(pOldTrackMetadata->getStreamInfo(), pMergedTrackMetadata->getStreamInfo()); mixxx::TrackInfo* pMergedTrackInfo = pMergedTrackMetadata->ptrTrackInfo(); EXPECT_EQ(pOldTrackInfo->getArtist(), pMergedTrackInfo->getArtist()); EXPECT_EQ(pOldTrackInfo->getBpm(), pMergedTrackInfo->getBpm()); diff --git a/src/track/taglib/trackmetadata_file.cpp b/src/track/taglib/trackmetadata_file.cpp index d9e95a6b6673..f3b1ee7ff00e 100644 --- a/src/track/taglib/trackmetadata_file.cpp +++ b/src/track/taglib/trackmetadata_file.cpp @@ -25,22 +25,22 @@ void readAudioProperties( DEBUG_ASSERT(pTrackMetadata); // NOTE(uklotzde): All audio properties will be updated - // with the actual (and more precise) values when reading - // the audio data for this track. Often those properties - // stored in tags don't match with the corresponding - // audio data in the file. - pTrackMetadata->setChannelCount( - audio::ChannelCount(audioProperties.channels())); - pTrackMetadata->setSampleRate( - audio::SampleRate(audioProperties.sampleRate())); - pTrackMetadata->setBitrate( - audio::Bitrate(audioProperties.bitrate())); + // with the actual (and more precise) values when opening + // the audio source for this track. Often those properties + // stored in tags are imprecise and don't match the actual + // audio data of the stream. + pTrackMetadata->setStreamInfo(audio::StreamInfo { + audio::SignalInfo{ + audio::ChannelCount(audioProperties.channels()), + audio::SampleRate(audioProperties.sampleRate()), + }, + audio::Bitrate(audioProperties.bitrate()), #if (TAGLIB_HAS_LENGTH_IN_MILLISECONDS) - const auto duration = Duration::fromMillis(audioProperties.lengthInMilliseconds()); + Duration::fromMillis(audioProperties.lengthInMilliseconds()), #else - const auto duration = Duration::fromSeconds(audioProperties.length()); + Duration::fromSeconds(audioProperties.length()), #endif - pTrackMetadata->setDuration(duration); + }); } } // anonymous namespace diff --git a/src/track/track.cpp b/src/track/track.cpp index 237a88e9a694..2763661b2cff 100644 --- a/src/track/track.cpp +++ b/src/track/track.cpp @@ -1,7 +1,6 @@ #include "track/track.h" #include -#include #include #include "engine/engine.h" @@ -419,18 +418,18 @@ void Track::setDateAdded(const QDateTime& dateAdded) { void Track::setDuration(mixxx::Duration duration) { QMutexLocker lock(&m_qMutex); - VERIFY_OR_DEBUG_ASSERT(!m_streamInfo || - m_streamInfo->getDuration() <= mixxx::Duration::empty() || - m_streamInfo->getDuration() == duration) { + VERIFY_OR_DEBUG_ASSERT(!m_streamInfoFromSource || + m_streamInfoFromSource->getDuration() <= mixxx::Duration::empty() || + m_streamInfoFromSource->getDuration() == duration) { kLogger.warning() << "Cannot override stream duration:" - << m_streamInfo->getDuration() + << m_streamInfoFromSource->getDuration() << "->" << duration; return; } if (compareAndSet( - m_record.refMetadata().ptrDuration(), + m_record.refMetadata().refStreamInfo().ptrDuration(), duration)) { markDirtyAndUnlock(&lock); } @@ -442,25 +441,19 @@ void Track::setDuration(double duration) { double Track::getDuration(DurationRounding rounding) const { QMutexLocker lock(&m_qMutex); + const auto durationSeconds = + m_record.getMetadata().getStreamInfo().getDuration().toDoubleSeconds(); switch (rounding) { case DurationRounding::SECONDS: - return std::round(m_record.getMetadata().getDuration().toDoubleSeconds()); + return std::round(durationSeconds); default: - return m_record.getMetadata().getDuration().toDoubleSeconds(); + return durationSeconds; } } QString Track::getDurationText(mixxx::Duration::Precision precision) const { - double duration; - if (precision == mixxx::Duration::Precision::SECONDS) { - // Round to full seconds before formatting for consistency: - // getDurationText() should always display the same number - // as getDuration(DurationRounding::SECONDS) = getDurationInt() - duration = getDuration(DurationRounding::SECONDS); - } else { - duration = getDuration(DurationRounding::NONE); - } - return mixxx::Duration::formatTime(duration, precision); + QMutexLocker lock(&m_qMutex); + return m_record.getMetadata().getDurationText(precision); } QString Track::getTitle() const { @@ -653,38 +646,39 @@ void Track::setType(const QString& sType) { int Track::getSampleRate() const { QMutexLocker lock(&m_qMutex); - return m_record.getMetadata().getSampleRate(); + return m_record.getMetadata().getStreamInfo().getSignalInfo().getSampleRate(); } int Track::getChannels() const { QMutexLocker lock(&m_qMutex); - return m_record.getMetadata().getChannelCount(); + return m_record.getMetadata().getStreamInfo().getSignalInfo().getChannelCount(); } int Track::getBitrate() const { QMutexLocker lock(&m_qMutex); - return m_record.getMetadata().getBitrate(); + return m_record.getMetadata().getStreamInfo().getBitrate(); } QString Track::getBitrateText() const { - return QString("%1").arg(getBitrate()); + QMutexLocker lock(&m_qMutex); + return m_record.getMetadata().getBitrateText(); } void Track::setBitrate(int iBitrate) { QMutexLocker lock(&m_qMutex); const mixxx::audio::Bitrate bitrate(iBitrate); - VERIFY_OR_DEBUG_ASSERT(!m_streamInfo || - !m_streamInfo->getBitrate().isValid() || - m_streamInfo->getBitrate() == bitrate) { + VERIFY_OR_DEBUG_ASSERT(!m_streamInfoFromSource || + !m_streamInfoFromSource->getBitrate().isValid() || + m_streamInfoFromSource->getBitrate() == bitrate) { kLogger.warning() << "Cannot override stream bitrate:" - << m_streamInfo->getBitrate() + << m_streamInfoFromSource->getBitrate() << "->" << bitrate; return; } if (compareAndSet( - m_record.refMetadata().ptrBitrate(), + m_record.refMetadata().refStreamInfo().ptrBitrate(), bitrate)) { markDirtyAndUnlock(&lock); } @@ -795,10 +789,10 @@ void Track::setCuePoint(CuePosition cue) { void Track::shiftCuePositionsMillis(double milliseconds) { QMutexLocker lock(&m_qMutex); - VERIFY_OR_DEBUG_ASSERT(m_streamInfo) { + VERIFY_OR_DEBUG_ASSERT(m_streamInfoFromSource) { return; } - double frames = m_streamInfo->getSignalInfo().millis2frames(milliseconds); + double frames = m_streamInfoFromSource->getSignalInfo().millis2frames(milliseconds); for (const CuePointer& pCue : qAsConst(m_cuePoints)) { pCue->shiftPositionFrames(frames); } @@ -929,7 +923,7 @@ Track::ImportStatus Track::importBeats( // existing cue points. m_pBeatsImporterPending.reset(); return ImportStatus::Complete; - } else if (m_streamInfo) { + } else if (m_streamInfoFromSource) { // Replace existing cue points with imported cue // points immediately importPendingBeatsMarkDirtyAndUnlock(&lock); @@ -963,14 +957,14 @@ bool Track::importPendingBeatsWhileLocked() { } // The sample rate can only be trusted after the audio // stream has been opened. - DEBUG_ASSERT(m_streamInfo); + DEBUG_ASSERT(m_streamInfoFromSource); // The sample rate is supposed to be consistent - DEBUG_ASSERT(m_streamInfo->getSignalInfo().getSampleRate() == - m_record.getMetadata().getSampleRate()); + DEBUG_ASSERT(m_streamInfoFromSource->getSignalInfo().getSampleRate() == + m_record.getMetadata().getStreamInfo().getSignalInfo().getSampleRate()); mixxx::BeatsPointer pBeats(new mixxx::BeatMap(*this, - static_cast(m_streamInfo->getSignalInfo().getSampleRate()), + static_cast(m_streamInfoFromSource->getSignalInfo().getSampleRate()), m_pBeatsImporterPending->importBeatsAndApplyTimingOffset( - getLocation(), *m_streamInfo))); + getLocation(), *m_streamInfoFromSource))); DEBUG_ASSERT(m_pBeatsImporterPending->isEmpty()); m_pBeatsImporterPending.reset(); return setBeatsWhileLocked(pBeats); @@ -1004,7 +998,7 @@ Track::ImportStatus Track::importCueInfos( // existing cue points. m_pCueInfoImporterPending.reset(); return ImportStatus::Complete; - } else if (m_streamInfo) { + } else if (m_streamInfoFromSource) { // Replace existing cue points with imported cue // points immediately importPendingCueInfosMarkDirtyAndUnlock(&lock); @@ -1091,18 +1085,18 @@ bool Track::importPendingCueInfosWhileLocked() { } // The sample rate can only be trusted after the audio // stream has been opened. - DEBUG_ASSERT(m_streamInfo); + DEBUG_ASSERT(m_streamInfoFromSource); const auto sampleRate = - m_streamInfo->getSignalInfo().getSampleRate(); + m_streamInfoFromSource->getSignalInfo().getSampleRate(); // The sample rate is supposed to be consistent DEBUG_ASSERT(sampleRate == - m_record.getMetadata().getSampleRate()); + m_record.getMetadata().getStreamInfo().getSignalInfo().getSampleRate()); const auto trackId = m_record.getId(); QList cuePoints; cuePoints.reserve(m_pCueInfoImporterPending->size()); const auto cueInfos = m_pCueInfoImporterPending->importCueInfosAndApplyTimingOffset( - getLocation(), m_streamInfo->getSignalInfo()); + getLocation(), m_streamInfoFromSource->getSignalInfo()); for (const auto& cueInfo : cueInfos) { CuePointer pCue(new Cue(cueInfo, sampleRate, true)); // While this method could be called from any thread, @@ -1452,48 +1446,45 @@ void Track::setAudioProperties( mixxx::audio::SampleRate sampleRate, mixxx::audio::Bitrate bitrate, mixxx::Duration duration) { + setAudioProperties(mixxx::audio::StreamInfo{ + mixxx::audio::SignalInfo{ + channelCount, + sampleRate, + }, + bitrate, + duration, + }); +} + +void Track::setAudioProperties( + const mixxx::audio::StreamInfo& streamInfo) { QMutexLocker lock(&m_qMutex); - DEBUG_ASSERT(!m_streamInfo); - bool dirty = false; - if (compareAndSet( - m_record.refMetadata().ptrChannelCount(), - channelCount)) { - dirty = true; - } + // These properties are stored separately in the database + // and are also imported from file tags. They will be + // overriden by the actual properties from the audio + // source later. + DEBUG_ASSERT(!m_streamInfoFromSource); if (compareAndSet( - m_record.refMetadata().ptrSampleRate(), - sampleRate)) { - dirty = true; - } - if (compareAndSet( - m_record.refMetadata().ptrBitrate(), - bitrate)) { - dirty = true; - } - if (compareAndSet( - m_record.refMetadata().ptrDuration(), - duration)) { - dirty = true; - } - if (dirty) { + m_record.refMetadata().ptrStreamInfo(), + streamInfo)) { markDirtyAndUnlock(&lock); } } -void Track::updateAudioPropertiesFromStream( +void Track::updateStreamInfoFromSource( mixxx::audio::StreamInfo&& streamInfo) { QMutexLocker lock(&m_qMutex); - VERIFY_OR_DEBUG_ASSERT(!m_streamInfo || - *m_streamInfo == streamInfo) { + VERIFY_OR_DEBUG_ASSERT(!m_streamInfoFromSource || + *m_streamInfoFromSource == streamInfo) { kLogger.warning() << "Varying stream properties:" - << *m_streamInfo + << *m_streamInfoFromSource << "->" << streamInfo; } - bool updated = m_record.refMetadata().updateAudioPropertiesFromStream( + bool updated = m_record.refMetadata().updateStreamInfoFromSource( streamInfo); - m_streamInfo = std::make_optional(std::move(streamInfo)); + m_streamInfoFromSource = std::make_optional(std::move(streamInfo)); bool importBeats = m_pBeatsImporterPending && !m_pBeatsImporterPending->isEmpty(); bool importCueInfos = m_pCueInfoImporterPending && !m_pCueInfoImporterPending->isEmpty(); diff --git a/src/track/track.h b/src/track/track.h index 84da9037eee7..a229852c5c49 100644 --- a/src/track/track.h +++ b/src/track/track.h @@ -2,6 +2,7 @@ #include #include +#include #include #include @@ -348,6 +349,8 @@ class Track : public QObject { mixxx::audio::SampleRate sampleRate, mixxx::audio::Bitrate bitrate, mixxx::Duration duration); + void setAudioProperties( + const mixxx::audio::StreamInfo& streamInfo); signals: void waveformUpdated(); @@ -430,10 +433,15 @@ class Track : public QObject { mixxx::MetadataSourcePointer pMetadataSource); // Information about the actual properties of the - // audio stream is only available after opening it. - // On this occasion the audio properties of the track - // need to be updated to reflect these values. - void updateAudioPropertiesFromStream( + // audio stream is only available after opening the + // source at least once. On this occasion the metadata + // stream info of the track need to be updated to reflect + // these values. + bool hasStreamInfoFromSource() const { + QMutexLocker lock(&m_qMutex); + return static_cast(m_streamInfoFromSource); + } + void updateStreamInfoFromSource( mixxx::audio::StreamInfo&& streamInfo); // Mutex protecting access to object @@ -457,7 +465,7 @@ class Track : public QObject { // Reliable information about the PCM audio stream // that only becomes available when opening the // corresponding file. - std::optional m_streamInfo; + std::optional m_streamInfoFromSource; // The list of cue points for the track QList m_cuePoints; diff --git a/src/track/trackmetadata.cpp b/src/track/trackmetadata.cpp index 692326ea0ba4..b36c00fb3834 100644 --- a/src/track/trackmetadata.cpp +++ b/src/track/trackmetadata.cpp @@ -13,68 +13,91 @@ const Logger kLogger("TrackMetadata"); /*static*/ constexpr int TrackMetadata::kCalendarYearInvalid; -bool TrackMetadata::updateAudioPropertiesFromStream( +bool TrackMetadata::updateStreamInfoFromSource( const audio::StreamInfo& streamInfo) { bool changed = false; const auto streamChannelCount = streamInfo.getSignalInfo().getChannelCount(); if (streamChannelCount.isValid() && - streamChannelCount != getChannelCount()) { - if (getChannelCount().isValid()) { + streamChannelCount != getStreamInfo().getSignalInfo().getChannelCount()) { + if (getStreamInfo().getSignalInfo().getChannelCount().isValid()) { kLogger.debug() << "Modifying channel count:" - << getChannelCount() + << getStreamInfo().getSignalInfo().getChannelCount() << "->" << streamChannelCount; } - setChannelCount(streamChannelCount); + refStreamInfo().refSignalInfo().setChannelCount(streamChannelCount); changed = true; } const auto streamSampleRate = streamInfo.getSignalInfo().getSampleRate(); if (streamSampleRate.isValid() && - streamSampleRate != getSampleRate()) { - if (getSampleRate().isValid()) { + streamSampleRate != getStreamInfo().getSignalInfo().getSampleRate()) { + if (getStreamInfo().getSignalInfo().getSampleRate().isValid()) { kLogger.debug() << "Modifying sample rate:" - << getSampleRate() + << getStreamInfo().getSignalInfo().getSampleRate() << "->" << streamSampleRate; } - setSampleRate(streamSampleRate); + refStreamInfo().refSignalInfo().setSampleRate(streamSampleRate); changed = true; } const auto streamBitrate = streamInfo.getBitrate(); if (streamBitrate.isValid() && - streamBitrate != getBitrate()) { - if (getBitrate().isValid()) { + streamBitrate != getStreamInfo().getBitrate()) { + if (getStreamInfo().getSignalInfo().isValid()) { kLogger.debug() << "Modifying bitrate:" - << getBitrate() + << getStreamInfo().getSignalInfo() << "->" << streamBitrate; } - setBitrate(streamBitrate); + refStreamInfo().setBitrate(streamBitrate); changed = true; } const auto streamDuration = streamInfo.getDuration(); if (streamDuration > Duration::empty() && - streamDuration != getDuration()) { - if (getDuration() > Duration::empty()) { + streamDuration != getStreamInfo().getDuration()) { + if (getStreamInfo().getDuration() > Duration::empty()) { kLogger.debug() << "Modifying duration:" - << getDuration() + << getStreamInfo().getDuration() << "->" << streamDuration; } - setDuration(streamDuration); + refStreamInfo().setDuration(streamDuration); changed = true; } return changed; } +QString TrackMetadata::getBitrateText() const { + if (!getStreamInfo().getBitrate().isValid()) { + return QString(); + } + return QString::number(getStreamInfo().getBitrate()) + + QChar(' ') + + audio::Bitrate::unit(); +} + +QString TrackMetadata::getDurationText( + Duration::Precision precision) const { + double durationSeconds; + if (precision == Duration::Precision::SECONDS) { + // Round to full seconds before formatting for consistency + // getDurationText() should always display the same number + // as getDurationSecondsRounded() + durationSeconds = getDurationSecondsRounded(); + } else { + durationSeconds = getStreamInfo().getDuration().toDoubleSeconds(); + } + return Duration::formatTime(durationSeconds, precision); +} + int TrackMetadata::parseCalendarYear(const QString& year, bool* pValid) { const QDateTime dateTime(parseDateTime(year)); if (0 < dateTime.date().year()) { @@ -154,22 +177,16 @@ bool TrackMetadata::anyFileTagsModified( } bool operator==(const TrackMetadata& lhs, const TrackMetadata& rhs) { - return lhs.getAlbumInfo() == rhs.getAlbumInfo() && - lhs.getTrackInfo() == rhs.getTrackInfo() && - lhs.getChannelCount() == rhs.getChannelCount() && - lhs.getSampleRate() == rhs.getSampleRate() && - lhs.getBitrate() == rhs.getBitrate() && - lhs.getDuration() == rhs.getDuration(); + return lhs.getStreamInfo() == rhs.getStreamInfo() && + lhs.getAlbumInfo() == rhs.getAlbumInfo() && + lhs.getTrackInfo() == rhs.getTrackInfo(); } QDebug operator<<(QDebug dbg, const TrackMetadata& arg) { dbg << "TrackMetadata{"; + arg.dbgStreamInfo(dbg); arg.dbgTrackInfo(dbg); arg.dbgAlbumInfo(dbg); - arg.dbgBitrate(dbg); - arg.dbgChannelCount(dbg); - arg.dbgDuration(dbg); - arg.dbgSampleRate(dbg); dbg << '}'; return dbg; } diff --git a/src/track/trackmetadata.h b/src/track/trackmetadata.h index bae8ee188e29..e01dc1b9cdc4 100644 --- a/src/track/trackmetadata.h +++ b/src/track/trackmetadata.h @@ -2,27 +2,18 @@ #include -#include "audio/types.h" +#include "audio/streaminfo.h" #include "track/albuminfo.h" #include "track/trackinfo.h" namespace mixxx { -namespace audio { - -class StreamInfo; - -} // namespace audio - class TrackMetadata final { // Audio properties // - read-only // - stored in file tags // - adjusted when opening the audio stream (if available) - MIXXX_DECL_PROPERTY(audio::ChannelCount, channels, ChannelCount) - MIXXX_DECL_PROPERTY(audio::SampleRate, sampleRate, SampleRate) - MIXXX_DECL_PROPERTY(audio::Bitrate, bitrate, Bitrate) - MIXXX_DECL_PROPERTY(Duration, duration, Duration) + MIXXX_DECL_PROPERTY(audio::StreamInfo, streamInfo, StreamInfo) // Track properties // - read-write @@ -39,7 +30,7 @@ class TrackMetadata final { TrackMetadata& operator=(TrackMetadata&&) = default; TrackMetadata& operator=(const TrackMetadata&) = default; - bool updateAudioPropertiesFromStream( + bool updateStreamInfoFromSource( const audio::StreamInfo& streamInfo); // Adjusts floating-point values to match their string representation @@ -57,6 +48,14 @@ class TrackMetadata final { const TrackMetadata& importedFromFile, Bpm::Comparison cmpBpm = Bpm::Comparison::Default) const; + QString getBitrateText() const; + + double getDurationSecondsRounded() const { + return std::round(getStreamInfo().getDuration().toDoubleSeconds()); + } + QString getDurationText( + Duration::Precision precision) const; + // Parse an format date/time values according to ISO 8601 static QDate parseDate(const QString& str) { return QDate::fromString(str.trimmed().replace(" ", ""), Qt::ISODate); From 8a0d754655c374a69353bda7a138ecda28524ed6 Mon Sep 17 00:00:00 2001 From: Uwe Klotz Date: Mon, 7 Dec 2020 13:50:40 +0100 Subject: [PATCH 82/86] Export track metadata with accurate stream info Open the audio file once if needed to obtain this data from the decoder. --- src/sources/soundsourceproxy.cpp | 40 +++++++++++++++++++++++++------- 1 file changed, 31 insertions(+), 9 deletions(-) diff --git a/src/sources/soundsourceproxy.cpp b/src/sources/soundsourceproxy.cpp index 5fb2f6b1ed96..6bbc9d3981eb 100644 --- a/src/sources/soundsourceproxy.cpp +++ b/src/sources/soundsourceproxy.cpp @@ -347,15 +347,34 @@ QImage SoundSourceProxy::importTemporaryCoverImage( ExportTrackMetadataResult SoundSourceProxy::exportTrackMetadataBeforeSaving(Track* pTrack) { DEBUG_ASSERT(pTrack); - const auto trackFile = pTrack->getFileInfo(); - mixxx::MetadataSourcePointer pMetadataSource = - SoundSourceProxy(trackFile.toUrl()).m_pSoundSource; + const auto fileInfo = pTrack->getFileInfo(); + mixxx::MetadataSourcePointer pMetadataSource; + { + auto proxy = SoundSourceProxy(fileInfo.toUrl()); + // Ensure that the actual audio properties of the + // stream are available before exporting metadata. + // This might be needed for converting sample positions + // to time positions and vice versa. + if (!pTrack->hasStreamInfoFromSource()) { + auto pAudioSource = proxy.openAudioSource(); + if (pAudioSource) { + pTrack->updateStreamInfoFromSource( + pAudioSource->getStreamInfo()); + DEBUG_ASSERT(pTrack->hasStreamInfoFromSource()); + } else { + kLogger.warning() + << "Failed to update stream info from audio " + "source before exporting metadata"; + } + } + pMetadataSource = proxy.m_pSoundSource; + } if (pMetadataSource) { return pTrack->exportMetadata(pMetadataSource); } else { kLogger.warning() << "Unable to export track metadata into file" - << trackFile.location(); + << fileInfo.location(); return ExportTrackMetadataResult::Skipped; } } @@ -669,7 +688,6 @@ QImage SoundSourceProxy::importCoverImage() const { mixxx::AudioSourcePointer SoundSourceProxy::openAudioSource( const mixxx::AudioSource::OpenParams& params) { - DEBUG_ASSERT(m_pTrack); auto openMode = mixxx::SoundSource::OpenMode::Strict; int attemptCount = 0; while (m_pProvider && m_pSoundSource && !m_pAudioSource) { @@ -678,13 +696,17 @@ mixxx::AudioSourcePointer SoundSourceProxy::openAudioSource( m_pSoundSource->open(openMode, params); if (openResult == mixxx::SoundSource::OpenResult::Succeeded) { if (m_pSoundSource->verifyReadable()) { + // The internal m_pTrack might be null when opening the AudioSource + // before exporting metadata. In this case the caller (this class) + // is responsible for updating the stream info if needed. + if (!m_pTrack) { + return m_pSoundSource; + } m_pAudioSource = mixxx::AudioSourceTrackProxy::create(m_pTrack, m_pSoundSource); DEBUG_ASSERT(m_pAudioSource); // Overwrite metadata with actual audio properties - if (m_pTrack) { - m_pTrack->updateStreamInfoFromSource( - m_pAudioSource->getStreamInfo()); - } + m_pTrack->updateStreamInfoFromSource( + m_pAudioSource->getStreamInfo()); return m_pAudioSource; } kLogger.warning() From 85463a3d52622d8727ef30cc65681816e2bd30a4 Mon Sep 17 00:00:00 2001 From: Jan Holthuis Date: Mon, 7 Dec 2020 22:34:31 +0100 Subject: [PATCH 83/86] DlgPrefLibraryDlg: Clarify automatic metadata export checkbox label --- src/preferences/dialog/dlgpreflibrarydlg.ui | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/preferences/dialog/dlgpreflibrarydlg.ui b/src/preferences/dialog/dlgpreflibrarydlg.ui index 2bf8adfc40ea..25d0a4c701dd 100644 --- a/src/preferences/dialog/dlgpreflibrarydlg.ui +++ b/src/preferences/dialog/dlgpreflibrarydlg.ui @@ -7,7 +7,7 @@ 0 0 593 - 867 + 1049 @@ -131,7 +131,7 @@ - Export: Write modified track metadata from the library into file tags + Automatically write modified track metadata from the library into file tags From a285e17bd9f170f03728c84f3499ce647aa9fd80 Mon Sep 17 00:00:00 2001 From: Uwe Klotz Date: Tue, 8 Dec 2020 00:40:28 +0100 Subject: [PATCH 84/86] Fix clazy build errors --- src/preferences/dialog/dlgpreferences.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/preferences/dialog/dlgpreferences.h b/src/preferences/dialog/dlgpreferences.h index 0091bda062bf..218174503f54 100644 --- a/src/preferences/dialog/dlgpreferences.h +++ b/src/preferences/dialog/dlgpreferences.h @@ -130,8 +130,6 @@ DlgPreferences(MixxxMainWindow* mixxx, UserSettingsPointer m_pConfig; PreferencesPage m_soundPage; DlgPrefControllers* m_pControllersDlg; - DlgPrefColors* m_colorsPage; - QTreeWidgetItem* m_pColorsButton; QSize m_pageSizeHint; }; From 7d82224170a6e9b9a9242b65c2ccb82ba749949a Mon Sep 17 00:00:00 2001 From: Uwe Klotz Date: Tue, 8 Dec 2020 00:57:39 +0100 Subject: [PATCH 85/86] Fix next clazy build error --- src/engine/controls/loopingcontrol.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/engine/controls/loopingcontrol.h b/src/engine/controls/loopingcontrol.h index 3227a3727693..a41a4ed9b84d 100644 --- a/src/engine/controls/loopingcontrol.h +++ b/src/engine/controls/loopingcontrol.h @@ -142,7 +142,6 @@ class LoopingControl : public EngineControl { ControlPushButton* m_pLoopOutButton; ControlPushButton* m_pLoopOutGotoButton; ControlPushButton* m_pLoopExitButton; - ControlPushButton* m_pLoopToggleButton; ControlPushButton* m_pReloopToggleButton; ControlPushButton* m_pReloopAndStopButton; ControlObject* m_pCOLoopScale; From 3085bbe95107fd789a8a966dfeb341cfe74cfad8 Mon Sep 17 00:00:00 2001 From: Be Date: Mon, 7 Dec 2020 21:08:48 -0600 Subject: [PATCH 86/86] merge 2.3 --- src/analyzer/analyzerbeats.h | 5 +-- src/analyzer/analyzerebur128.h | 5 +-- src/analyzer/analyzergain.h | 5 +-- src/analyzer/analyzerkey.h | 5 +-- src/analyzer/analyzerwaveform.h | 5 +-- src/analyzer/plugins/analyzerplugin.h | 5 +-- src/analyzer/plugins/analyzerqueenmarybeats.h | 5 +-- src/analyzer/plugins/analyzerqueenmarykey.h | 5 +-- .../plugins/analyzersoundtouchbeats.h | 5 +-- src/broadcast/broadcastmanager.h | 5 +-- src/broadcast/defs_broadcast.h | 5 +-- src/build.h.template | 5 +-- src/control/controlaudiotaperpot.cpp | 1 - src/control/controlaudiotaperpot.h | 6 +-- src/control/controlbehavior.h | 5 +-- src/control/controleffectknob.h | 5 +-- src/control/controlencoder.h | 5 +-- src/control/controlindicator.h | 5 +-- src/control/controllinpotmeter.h | 5 +-- src/control/controllogpotmeter.cpp | 17 -------- src/control/controllogpotmeter.h | 26 +----------- src/control/controlmodel.h | 5 +-- src/control/controlobject.cpp | 17 -------- src/control/controlobject.h | 17 -------- src/control/controlobjectscript.h | 5 +-- src/control/controlpotmeter.cpp | 17 -------- src/control/controlpotmeter.h | 26 +----------- src/control/controlproxy.h | 5 +-- src/control/controlpushbutton.cpp | 17 -------- src/control/controlttrotary.cpp | 16 ------- src/control/controlttrotary.h | 21 +--------- src/controllers/bulk/bulkcontroller.cpp | 7 ---- src/controllers/bulk/bulkcontroller.h | 13 +----- src/controllers/bulk/bulkenumerator.cpp | 7 ---- src/controllers/bulk/bulkenumerator.h | 13 +----- src/controllers/bulk/bulksupported.h | 12 +----- src/controllers/controller.cpp | 7 ---- src/controllers/controller.h | 25 ++++------- src/controllers/controllerdebug.h | 18 ++++---- src/controllers/controllerenumerator.cpp | 10 ----- src/controllers/controllerenumerator.h | 19 +++------ .../controllerlearningeventfilter.h | 6 +-- src/controllers/controllermanager.cpp | 7 ---- src/controllers/controllermanager.h | 32 +++++--------- src/controllers/controllermappingtablemodel.h | 5 +-- src/controllers/controllerpreset.h | 4 -- .../controllerpresetfilehandler.cpp | 5 --- src/controllers/controllerpresetfilehandler.h | 4 -- src/controllers/controllerpresetinfo.cpp | 11 ----- src/controllers/controllerpresetinfo.h | 21 +++------- .../controllerpresetinfoenumerator.cpp | 6 --- .../controllerpresetinfoenumerator.h | 12 +----- src/controllers/controllerpresetvisitor.h | 5 +-- src/controllers/controllervisitor.h | 5 +-- src/controllers/controlpickermenu.h | 5 +-- src/controllers/defs_controllers.h | 12 +----- src/controllers/delegates/controldelegate.h | 5 +-- src/controllers/delegates/midibytedelegate.h | 5 +-- .../delegates/midichanneldelegate.h | 5 +-- .../delegates/midiopcodedelegate.h | 5 +-- .../delegates/midioptionsdelegate.h | 5 +-- src/controllers/dlgcontrollerlearning.cpp | 8 ---- src/controllers/dlgcontrollerlearning.h | 13 +----- src/controllers/dlgprefcontroller.cpp | 7 ---- src/controllers/dlgprefcontroller.h | 11 +---- src/controllers/hid/hidcontroller.cpp | 2 + src/controllers/hid/hidcontroller.h | 1 + src/controllers/hid/hidcontrollerpreset.cpp | 5 +-- src/controllers/hid/hidcontrollerpreset.h | 2 - .../hid/hidcontrollerpresetfilehandler.h | 5 +-- src/controllers/hid/hidenumerator.h | 14 ++----- .../keyboard/keyboardeventfilter.h | 5 +-- src/controllers/learningutils.h | 5 +-- src/controllers/midi/hss1394controller.cpp | 7 ---- src/controllers/midi/hss1394controller.h | 23 +++------- src/controllers/midi/hss1394enumerator.cpp | 6 --- src/controllers/midi/hss1394enumerator.h | 14 ++----- src/controllers/midi/midicontroller.cpp | 8 ---- src/controllers/midi/midicontroller.h | 38 +++++++---------- src/controllers/midi/midicontrollerpreset.cpp | 8 ---- src/controllers/midi/midicontrollerpreset.h | 8 +--- .../midi/midicontrollerpresetfilehandler.cpp | 8 ---- .../midi/midicontrollerpresetfilehandler.h | 13 +----- src/controllers/midi/midimessage.h | 5 +-- src/controllers/midi/midioutputhandler.cpp | 8 ---- src/controllers/midi/midioutputhandler.h | 19 +++------ src/controllers/midi/midiutils.h | 6 +-- src/controllers/midi/portmidicontroller.cpp | 9 ---- src/controllers/midi/portmidicontroller.h | 30 ++++--------- src/controllers/midi/portmididevice.h | 5 +-- src/controllers/midi/portmidienumerator.cpp | 7 ---- src/controllers/midi/portmidienumerator.h | 13 +----- src/controllers/softtakeover.cpp | 8 ---- src/controllers/softtakeover.h | 13 +----- src/database/mixxxdb.h | 7 +--- src/defs_urls.h | 21 +--------- src/defs_version.h | 16 ------- src/dialog/dlgabout.h | 5 +-- src/dialog/dlgdevelopertools.h | 5 +-- src/effects/builtin/autopaneffect.h | 5 +-- src/effects/builtin/balanceeffect.h | 5 +-- src/effects/builtin/bessel4lvmixeqeffect.h | 5 +-- src/effects/builtin/bessel8lvmixeqeffect.h | 5 +-- src/effects/builtin/biquadfullkilleqeffect.h | 5 +-- src/effects/builtin/bitcrushereffect.h | 5 +-- src/effects/builtin/builtinbackend.cpp | 1 - src/effects/builtin/builtinbackend.h | 5 +-- src/effects/builtin/echoeffect.h | 5 +-- src/effects/builtin/equalizer_util.h | 6 +-- src/effects/builtin/filtereffect.h | 5 +-- src/effects/builtin/flangereffect.h | 5 +-- src/effects/builtin/graphiceqeffect.h | 5 +-- src/effects/builtin/linkwitzriley8eqeffect.h | 5 +-- src/effects/builtin/loudnesscontoureffect.h | 5 +-- src/effects/builtin/metronomeeffect.h | 5 +-- src/effects/builtin/moogladder4filtereffect.h | 5 +-- src/effects/builtin/parametriceqeffect.h | 5 +-- src/effects/builtin/phasereffect.h | 5 +-- src/effects/builtin/reverbeffect.h | 5 +-- src/effects/builtin/threebandbiquadeqeffect.h | 5 +-- src/effects/builtin/tremoloeffect.h | 5 +-- src/effects/effect.h | 5 +-- src/effects/effectbuttonparameterslot.h | 5 +-- src/effects/effectchain.h | 5 +-- src/effects/effectchainmanager.h | 5 +-- src/effects/effectchainslot.h | 6 +-- src/effects/effectinstantiator.h | 5 +-- src/effects/effectmanifest.h | 5 +-- src/effects/effectmanifestparameter.h | 5 +-- src/effects/effectparameter.h | 6 +-- src/effects/effectparameterslot.h | 5 +-- src/effects/effectparameterslotbase.h | 5 +-- src/effects/effectprocessor.h | 6 +-- src/effects/effectrack.h | 5 +-- src/effects/effectsbackend.h | 5 +-- src/effects/effectslot.h | 5 +-- src/effects/effectsmanager.h | 6 +-- src/effects/lv2/lv2backend.h | 5 +-- src/effects/lv2/lv2effectprocessor.h | 6 +-- src/effects/lv2/lv2manifest.h | 5 +-- src/encoder/encoder.cpp | 9 +--- src/encoder/encoder.h | 14 +------ src/encoder/encoderbroadcastsettings.cpp | 8 ---- src/encoder/encoderbroadcastsettings.h | 14 +------ src/encoder/encodercallback.h | 5 +-- src/encoder/encoderffmpegcore.cpp | 6 --- src/encoder/encoderffmpegcore.h | 19 +++------ src/encoder/encoderffmpegmp3.cpp | 18 -------- src/encoder/encoderffmpegmp3.h | 24 +---------- src/encoder/encoderffmpegresample.h | 5 +-- src/encoder/encoderffmpegvorbis.cpp | 18 -------- src/encoder/encoderffmpegvorbis.h | 24 +---------- src/encoder/encoderflacsettings.cpp | 8 ---- src/encoder/encoderflacsettings.h | 13 +----- src/encoder/encodermp3.h | 5 +-- src/encoder/encodermp3settings.cpp | 7 +--- src/encoder/encodermp3settings.h | 13 +----- src/encoder/encoderopus.cpp | 3 -- src/encoder/encoderopus.h | 8 +--- src/encoder/encoderopussettings.cpp | 3 -- src/encoder/encoderopussettings.h | 8 +--- src/encoder/encodersettings.h | 13 +----- src/encoder/encodersndfileflac.cpp | 7 ---- src/encoder/encodersndfileflac.h | 15 +------ src/encoder/encodervorbis.cpp | 21 ---------- src/encoder/encodervorbis.h | 15 +------ src/encoder/encodervorbissettings.cpp | 7 ---- src/encoder/encodervorbissettings.h | 14 +------ src/encoder/encoderwave.cpp | 7 ---- src/encoder/encoderwave.h | 18 ++------ src/encoder/encoderwavesettings.cpp | 10 +---- src/encoder/encoderwavesettings.h | 32 ++++---------- src/engine/bufferscalers/enginebufferscale.h | 9 +--- .../bufferscalers/enginebufferscalelinear.h | 5 +-- .../enginebufferscalerubberband.h | 6 +-- src/engine/cachingreader/cachingreader.h | 3 -- src/engine/cachingreader/cachingreaderchunk.h | 6 +-- .../cachingreader/cachingreaderworker.h | 6 +-- src/engine/channelmixer.h | 5 +-- src/engine/channels/engineaux.cpp | 4 -- src/engine/channels/engineaux.h | 33 ++++++--------- src/engine/channels/enginechannel.cpp | 17 -------- src/engine/channels/enginechannel.h | 22 +--------- src/engine/channels/enginemicrophone.cpp | 3 -- src/engine/channels/enginemicrophone.h | 8 +--- src/engine/controls/bpmcontrol.h | 5 +-- src/engine/controls/clockcontrol.h | 5 +-- src/engine/controls/cuecontrol.cpp | 3 -- src/engine/controls/cuecontrol.h | 9 +--- src/engine/controls/enginecontrol.cpp | 3 -- src/engine/controls/enginecontrol.h | 8 +--- src/engine/controls/keycontrol.h | 5 +-- src/engine/controls/loopingcontrol.cpp | 4 -- src/engine/controls/loopingcontrol.h | 9 +--- src/engine/controls/quantizecontrol.cpp | 5 --- src/engine/controls/quantizecontrol.h | 5 +-- src/engine/controls/ratecontrol.cpp | 3 -- src/engine/controls/ratecontrol.h | 8 +--- src/engine/controls/vinylcontrolcontrol.h | 5 +-- src/engine/effects/engineeffect.h | 5 +-- src/engine/effects/engineeffectparameter.h | 5 +-- src/engine/effects/engineeffectrack.h | 5 +-- src/engine/effects/engineeffectsmanager.h | 6 +-- src/engine/effects/groupfeaturestate.h | 5 +-- src/engine/effects/message.h | 5 +-- src/engine/enginebuffer.h | 26 +----------- src/engine/enginedelay.cpp | 16 ------- src/engine/enginedelay.h | 21 +--------- src/engine/enginemaster.h | 22 +--------- src/engine/engineobject.cpp | 17 -------- src/engine/engineobject.h | 26 +----------- src/engine/enginesidechaincompressor.h | 5 +-- src/engine/engineworker.cpp | 3 -- src/engine/engineworker.h | 8 +--- src/engine/engineworkerscheduler.cpp | 3 -- src/engine/engineworkerscheduler.h | 5 +-- src/engine/filters/enginefilter.cpp | 17 +------- src/engine/filters/enginefilter.h | 26 ++---------- src/engine/filters/enginefilterbessel4.h | 5 +-- src/engine/filters/enginefilterbessel8.h | 5 +-- src/engine/filters/enginefilterbiquad1.h | 5 +-- src/engine/filters/enginefilterbutterworth4.h | 5 +-- src/engine/filters/enginefilterbutterworth8.h | 5 +-- src/engine/filters/enginefilterdelay.h | 5 +-- src/engine/filters/enginefilteriir.h | 6 +-- .../filters/enginefilterlinkwitzriley2.h | 5 +-- .../filters/enginefilterlinkwitzriley4.h | 5 +-- .../filters/enginefilterlinkwitzriley8.h | 5 +-- src/engine/filters/enginefiltermoogladder4.h | 5 +-- src/engine/filters/enginefilterpan.h | 5 +-- src/engine/positionscratchcontroller.h | 5 +-- src/engine/readaheadmanager.cpp | 3 -- src/engine/readaheadmanager.h | 3 -- src/engine/sidechain/enginenetworkstream.h | 5 +-- src/engine/sidechain/enginerecord.cpp | 8 ---- src/engine/sidechain/enginerecord.h | 12 +----- src/engine/sidechain/enginesidechain.cpp | 16 ------- src/engine/sidechain/enginesidechain.h | 21 +--------- .../sidechain/networkinputstreamworker.cpp | 3 -- .../sidechain/networkinputstreamworker.h | 8 +--- .../sidechain/networkoutputstreamworker.h | 5 +-- src/engine/sidechain/shoutconnection.cpp | 3 -- src/engine/sidechain/shoutconnection.h | 8 +--- src/engine/sidechain/sidechainworker.h | 5 +-- src/engine/sync/basesyncablelistener.h | 5 +-- src/engine/sync/clock.h | 5 +-- src/engine/sync/enginesync.cpp | 19 --------- src/engine/sync/enginesync.h | 23 +--------- src/engine/sync/internalclock.h | 5 +-- src/engine/sync/syncable.h | 5 +-- src/engine/sync/synccontrol.h | 6 +-- src/errordialoghandler.cpp | 17 -------- src/errordialoghandler.h | 31 ++------------ src/library/analysisfeature.cpp | 4 -- src/library/analysisfeature.h | 10 +---- src/library/autodj/autodjfeature.cpp | 4 -- src/library/autodj/autodjprocessor.h | 5 +-- src/library/autodj/dlgautodj.h | 5 +-- src/library/banshee/bansheedbconnection.h | 5 +-- src/library/banshee/bansheefeature.h | 6 +-- src/library/banshee/bansheeplaylistmodel.h | 5 +-- src/library/baseexternalplaylistmodel.h | 5 +-- src/library/baseexternaltrackmodel.h | 5 +-- src/library/basesqltablemodel.cpp | 2 - src/library/basetrackcache.cpp | 3 -- src/library/bpmdelegate.h | 5 +-- src/library/browse/browsefeature.cpp | 3 -- src/library/browse/browsefeature.h | 8 +--- src/library/browse/browsetablemodel.h | 5 +-- src/library/browse/browsethread.h | 5 +-- src/library/browse/foldertreemodel.h | 5 +-- src/library/columncache.h | 5 +-- src/library/dao/analysisdao.h | 5 +-- src/library/dao/cuedao.cpp | 3 -- src/library/dao/libraryhashdao.cpp | 1 - src/library/dao/libraryhashdao.h | 5 +-- src/library/dao/playlistdao.h | 5 +-- src/library/dao/trackdao.h | 5 +-- src/library/dlganalysis.h | 5 +-- src/library/export/trackexportdlg.h | 5 +-- src/library/export/trackexportwizard.h | 5 +-- src/library/export/trackexportworker.h | 5 +-- src/library/hiddentablemodel.h | 5 +-- src/library/itunes/itunesfeature.h | 8 +--- src/library/library_preferences.h | 5 +-- src/library/librarycontrol.h | 5 +-- src/library/libraryfeature.cpp | 3 -- src/library/libraryfeature.h | 8 +--- src/library/librarytablemodel.h | 5 +-- src/library/libraryview.h | 5 +-- src/library/mixxxlibraryfeature.cpp | 3 -- src/library/mixxxlibraryfeature.h | 8 +--- src/library/parser.cpp | 5 --- src/library/parser.h | 5 +-- src/library/parsercsv.h | 5 +-- src/library/parserm3u.cpp | 4 -- src/library/parserm3u.h | 5 +-- src/library/parserpls.cpp | 4 -- src/library/parserpls.h | 5 +-- src/library/proxytrackmodel.cpp | 3 +- src/library/queryutil.h | 5 +-- src/library/recording/recordingfeature.cpp | 3 -- src/library/recording/recordingfeature.h | 8 +--- src/library/rekordbox/rekordbox_anlz.h | 5 +-- src/library/rekordbox/rekordbox_pdb.h | 5 +-- src/library/rekordbox/rekordboxfeature.cpp | 3 -- src/library/rekordbox/rekordboxfeature.h | 8 +--- src/library/rhythmbox/rhythmboxfeature.h | 8 +--- src/library/scanner/libraryscanner.h | 5 +-- src/library/scanner/libraryscannerdlg.cpp | 18 -------- src/library/scanner/libraryscannerdlg.h | 23 +--------- src/library/scanner/scannerglobal.h | 5 +-- src/library/scanner/scannertask.h | 5 +-- src/library/scanner/scannerutil.h | 5 +-- src/library/searchqueryparser.h | 5 +-- src/library/serato/seratofeature.cpp | 3 -- src/library/sidebarmodel.h | 8 +--- src/library/songdownloader.h | 5 +-- src/library/stardelegate.cpp | 17 -------- src/library/stardelegate.h | 23 +--------- src/library/stareditor.cpp | 42 +++++-------------- src/library/stareditor.h | 31 +------------- src/library/traktor/traktorfeature.cpp | 3 -- src/library/traktor/traktorfeature.h | 8 +--- src/library/treeitemmodel.h | 5 +-- src/main.cpp | 17 -------- src/mixer/auxiliary.h | 5 +-- src/mixer/baseplayer.h | 5 +-- src/mixer/basetrackplayer.h | 5 +-- src/mixer/microphone.h | 5 +-- src/mixer/playerinfo.cpp | 17 +------- src/mixer/playerinfo.h | 22 +--------- src/mixer/previewdeck.h | 5 +-- src/mixer/samplerbank.h | 5 +-- src/mixxxapplication.h | 5 +-- src/musicbrainz/chromaprinter.h | 5 +-- src/musicbrainz/crc.h | 5 +-- src/musicbrainz/gzip.cpp | 4 -- src/musicbrainz/gzip.h | 9 +--- src/preferences/beatdetectionsettings.h | 5 +-- src/preferences/broadcastprofile.cpp | 3 -- src/preferences/broadcastprofile.h | 8 +--- src/preferences/broadcastsettings.h | 5 +-- src/preferences/broadcastsettingsmodel.cpp | 3 -- src/preferences/broadcastsettingsmodel.h | 8 +--- src/preferences/configobject.h | 5 +-- src/preferences/constants.h | 5 +-- src/preferences/dialog/dlgprefautodj.h | 5 +-- src/preferences/dialog/dlgprefbeats.h | 9 +--- src/preferences/dialog/dlgprefbroadcast.h | 5 +-- src/preferences/dialog/dlgprefcrossfader.h | 5 +-- src/preferences/dialog/dlgprefdeck.h | 4 -- src/preferences/dialog/dlgprefeffects.h | 5 +-- src/preferences/dialog/dlgprefeq.cpp | 17 -------- src/preferences/dialog/dlgprefeq.h | 25 +---------- src/preferences/dialog/dlgpreferences.cpp | 17 -------- src/preferences/dialog/dlgpreferences.h | 22 +--------- src/preferences/dialog/dlgprefinterface.h | 26 +----------- src/preferences/dialog/dlgprefkey.cpp | 17 -------- src/preferences/dialog/dlgprefkey.h | 5 +-- src/preferences/dialog/dlgpreflibrary.h | 9 +--- src/preferences/dialog/dlgpreflv2.h | 5 +-- src/preferences/dialog/dlgprefmodplug.cpp | 1 - src/preferences/dialog/dlgprefmodplug.h | 8 +--- src/preferences/dialog/dlgprefnovinyl.cpp | 17 -------- src/preferences/dialog/dlgprefnovinyl.h | 27 +----------- src/preferences/dialog/dlgprefrecord.h | 5 +-- src/preferences/dialog/dlgprefreplaygain.h | 5 +-- src/preferences/dialog/dlgprefsound.cpp | 15 ------- src/preferences/dialog/dlgprefsound.h | 20 +-------- src/preferences/dialog/dlgprefsounditem.cpp | 15 ------- src/preferences/dialog/dlgprefsounditem.h | 20 +-------- src/preferences/dialog/dlgprefvinyl.cpp | 23 +--------- src/preferences/dialog/dlgprefvinyl.h | 22 +--------- src/preferences/dialog/dlgprefwaveform.h | 6 +-- src/preferences/effectsettingsmodel.h | 5 +-- src/preferences/keydetectionsettings.h | 5 +-- src/preferences/replaygainsettings.h | 5 +-- src/preferences/upgrade.cpp | 17 -------- src/preferences/upgrade.h | 22 +--------- src/preferences/usersettings.h | 5 +-- src/preferences/waveformsettings.h | 5 +-- src/recording/defs_recording.h | 5 +-- src/skin/colorschemeparser.cpp | 1 - src/skin/colorschemeparser.h | 5 +-- src/skin/imgcolor.h | 22 +--------- src/skin/imginvert.cpp | 1 - src/skin/imginvert.h | 23 +--------- src/skin/imgloader.cpp | 1 - src/skin/imgloader.h | 23 +--------- src/skin/imgsource.h | 22 +--------- src/skin/legacyskinparser.cpp | 3 -- src/skin/pixmapsource.h | 5 +-- src/skin/skinloader.cpp | 3 -- src/skin/skinparser.h | 5 +-- src/skin/tooltips.h | 6 +-- src/soundio/sounddevice.cpp | 17 -------- src/soundio/sounddevice.h | 22 +--------- src/soundio/sounddeviceerror.h | 5 +-- src/soundio/sounddevicenetwork.h | 5 +-- src/soundio/sounddevicenotfound.h | 5 +-- src/soundio/soundmanager.cpp | 16 ------- src/soundio/soundmanagerconfig.cpp | 15 ------- src/soundio/soundmanagerconfig.h | 19 +-------- src/soundio/soundmanagerutil.cpp | 15 ------- src/sources/mp3decoding.h | 5 +-- src/sources/urlresource.h | 5 +-- src/sources/v1/legacyaudiosource.h | 5 +-- src/sources/v1/legacyaudiosourceadapter.h | 5 +-- src/test/baseeffecttest.h | 6 +-- src/test/mockedenginebackendtest.h | 5 +-- src/track/beatfactory.h | 5 +-- src/track/beatgrid.h | 5 +-- src/track/beatmap.h | 4 +- src/track/beats.cpp | 1 - src/track/beats.h | 4 +- src/track/beatutils.h | 8 +--- src/track/bpm.h | 5 +-- src/track/cue.cpp | 3 -- src/track/keyfactory.h | 5 +-- src/track/keys.h | 5 +-- src/track/keyutils.h | 5 +-- src/track/replaygain.h | 5 +-- src/track/tracknumbers.h | 5 +-- src/util/alphabetafilter.h | 19 ++------- src/util/battery/battery.h | 5 +-- src/util/battery/batterylinux.h | 5 +-- src/util/battery/batterymac.h | 5 +-- src/util/battery/batterywindows.h | 5 +-- src/util/circularbuffer.h | 5 +-- src/util/class.h | 5 +-- src/util/console.cpp | 1 - src/util/console.h | 6 +-- src/util/counter.h | 5 +-- src/util/db/dbconnection.h | 7 +--- src/util/db/dbconnectionpool.h | 7 +--- src/util/db/dbconnectionpooled.h | 7 +--- src/util/db/dbentity.h | 7 +--- src/util/db/dbfieldindex.h | 7 +--- src/util/db/fwdsqlqueryselectresult.h | 7 +--- src/util/db/sqllikewildcardescaper.h | 7 +--- src/util/db/sqllikewildcards.h | 7 +--- src/util/db/sqlqueryfinisher.h | 7 +--- src/util/db/sqlstorage.h | 7 +--- src/util/db/sqlstringformatter.h | 7 +--- src/util/db/sqlsubselectmode.h | 7 +--- src/util/db/sqltransaction.h | 7 +--- src/util/debug.h | 5 +-- src/util/defs.h | 5 +-- src/util/denormalsarezero.h | 1 - src/util/desktophelper.cpp | 2 - src/util/event.h | 5 +-- src/util/experiment.h | 5 +-- src/util/fifo.h | 5 +-- src/util/file.h | 5 +-- src/util/font.h | 5 +-- src/util/fpclassify.h | 5 +-- src/util/logger.h | 7 +--- src/util/mac.h | 5 +-- src/util/mutex.h | 5 +-- src/util/path.h | 5 +-- src/util/performancetimer.h | 5 +-- src/util/platform.h | 5 +-- src/util/rampingvalue.h | 6 +-- src/util/reference.h | 6 +-- src/util/regex.h | 6 +-- src/util/rescaler.h | 9 +--- src/util/rlimit.h | 4 +- src/util/rotary.h | 5 +-- src/util/sample.h | 5 +-- src/util/sample_autogen.h | 4 +- src/util/sandbox.h | 6 +-- src/util/scopedoverridecursor.h | 5 +-- src/util/screensaver.cpp | 1 - src/util/screensaver.h | 5 +-- src/util/singleton.h | 5 +-- src/util/sleep.h | 5 +-- src/util/sleepableqthread.cpp | 3 -- src/util/sleepableqthread.h | 2 - src/util/statmodel.h | 5 +-- src/util/tapfilter.h | 5 +-- src/util/task.h | 5 +-- src/util/thread_annotations.h | 5 +-- src/util/threadcputimer.cpp | 1 - src/util/threadcputimer.h | 5 +-- src/util/time.h | 5 +-- src/util/timer.h | 5 +-- src/util/trace.h | 5 +-- src/util/translations.h | 6 +-- src/util/types.h | 5 +-- src/util/valuetransformer.h | 5 +-- src/util/version.h | 5 +-- src/util/xml.h | 5 +-- src/vinylcontrol/defs_vinylcontrol.h | 5 +-- src/vinylcontrol/steadypitch.cpp | 17 -------- src/vinylcontrol/steadypitch.h | 5 +-- src/vinylcontrol/vinylcontrol.h | 5 +-- src/vinylcontrol/vinylcontrolmanager.cpp | 6 --- src/vinylcontrol/vinylcontrolmanager.h | 11 +---- src/vinylcontrol/vinylcontrolprocessor.h | 6 +-- src/vinylcontrol/vinylcontrolsignalwidget.cpp | 17 -------- src/vinylcontrol/vinylcontrolsignalwidget.h | 5 +-- src/vinylcontrol/vinylcontrolxwax.cpp | 22 ---------- src/vinylcontrol/vinylcontrolxwax.h | 5 +-- src/vinylcontrol/vinylsignalquality.h | 5 +-- src/waveform/guitick.h | 5 +-- src/waveform/renderers/qtvsynctestrenderer.h | 5 +-- .../qtwaveformrendererfilteredsignal.h | 5 +-- .../qtwaveformrenderersimplesignal.h | 5 +-- src/waveform/renderers/waveformmark.h | 5 +-- src/waveform/renderers/waveformmarkset.h | 5 +-- .../renderers/waveformrenderbackground.h | 5 +-- src/waveform/renderers/waveformrenderbeat.h | 5 +-- .../renderers/waveformrendererabstract.h | 5 +-- .../renderers/waveformrendererendoftrack.h | 5 +-- .../waveformrendererfilteredsignal.h | 5 +-- src/waveform/renderers/waveformrendererhsv.h | 5 +-- .../renderers/waveformrendererpreroll.h | 5 +-- src/waveform/renderers/waveformrendererrgb.h | 5 +-- .../renderers/waveformrenderersignalbase.h | 5 +-- src/waveform/renderers/waveformrendermark.h | 5 +-- .../renderers/waveformrendermarkrange.h | 5 +-- src/waveform/renderers/waveformsignalcolors.h | 5 +-- .../renderers/waveformwidgetrenderer.h | 5 +-- src/waveform/visualplayposition.h | 5 +-- src/waveform/vsyncthread.h | 6 +-- src/waveform/waveform.h | 5 +-- src/waveform/waveformfactory.h | 5 +-- src/waveform/widgets/emptywaveformwidget.h | 5 +-- src/waveform/widgets/glrgbwaveformwidget.h | 5 +-- src/waveform/widgets/glsimplewaveformwidget.h | 4 +- src/waveform/widgets/glvsynctestwidget.h | 4 +- src/waveform/widgets/glwaveformwidget.h | 5 +-- src/waveform/widgets/hsvwaveformwidget.h | 5 +-- src/waveform/widgets/qthsvwaveformwidget.h | 5 +-- src/waveform/widgets/qtrgbwaveformwidget.h | 5 +-- src/waveform/widgets/qtsimplewaveformwidget.h | 5 +-- src/waveform/widgets/qtvsynctestwidget.h | 5 +-- src/waveform/widgets/qtwaveformwidget.h | 5 +-- src/waveform/widgets/rgbwaveformwidget.h | 5 +-- src/waveform/widgets/softwarewaveformwidget.h | 5 +-- src/waveform/widgets/waveformwidgetabstract.h | 5 +-- src/waveform/widgets/waveformwidgettype.h | 5 +-- src/widget/controlwidgetconnection.h | 5 +-- src/widget/effectwidgetutils.h | 5 +-- src/widget/hexspinbox.h | 5 +-- src/widget/knobeventhandler.h | 5 +-- src/widget/paintable.cpp | 1 - src/widget/paintable.h | 6 +-- src/widget/slidereventhandler.h | 5 +-- src/widget/trackdroptarget.h | 6 +-- src/widget/wanalysislibrarytableview.h | 5 +-- src/widget/wbasewidget.h | 5 +-- src/widget/wbattery.h | 5 +-- src/widget/wbeatspinbox.h | 7 +--- src/widget/wcombobox.h | 5 +-- src/widget/wcoverart.h | 5 +-- src/widget/wcoverartmenu.h | 5 +-- src/widget/wdisplay.cpp | 17 -------- src/widget/wdisplay.h | 22 +--------- src/widget/weffect.h | 6 +-- src/widget/weffectbuttonparameter.h | 6 +-- src/widget/weffectchain.h | 5 +-- src/widget/weffectparameter.h | 6 +-- src/widget/weffectparameterbase.h | 5 +-- src/widget/weffectparameterknob.h | 5 +-- src/widget/weffectparameterknobcomposed.h | 5 +-- src/widget/weffectpushbutton.h | 5 +-- src/widget/weffectselector.h | 6 +-- src/widget/wimagestore.h | 1 - src/widget/wkey.h | 5 +-- src/widget/wknob.cpp | 17 -------- src/widget/wknob.h | 5 +-- src/widget/wknobcomposed.h | 5 +-- src/widget/wlabel.cpp | 17 -------- src/widget/wlabel.h | 22 +--------- src/widget/wlibrary.cpp | 3 -- src/widget/wlibrarysidebar.h | 5 +-- src/widget/wlibrarytableview.h | 16 ++----- src/widget/wlibrarytextbrowser.cpp | 3 -- src/widget/wlibrarytextbrowser.h | 8 +--- src/widget/wmainmenubar.h | 5 +-- src/widget/wnumber.cpp | 17 -------- src/widget/wnumber.h | 22 +--------- src/widget/wnumberdb.cpp | 1 - src/widget/wnumberdb.h | 6 +-- src/widget/wnumberpos.cpp | 2 - src/widget/wnumberpos.h | 7 +--- src/widget/wnumberrate.h | 5 +-- src/widget/woverview.h | 5 +-- src/widget/woverviewhsv.h | 5 +-- src/widget/woverviewlmh.h | 5 +-- src/widget/woverviewrgb.h | 5 +-- src/widget/wpixmapstore.h | 22 +--------- src/widget/wpushbutton.cpp | 17 -------- src/widget/wpushbutton.h | 22 +--------- src/widget/wrecordingduration.h | 8 +--- src/widget/wsingletoncontainer.h | 6 +-- src/widget/wsizeawarestack.h | 5 +-- src/widget/wskincolor.cpp | 1 - src/widget/wskincolor.h | 23 +--------- src/widget/wslidercomposed.cpp | 17 -------- src/widget/wslidercomposed.h | 29 +------------ src/widget/wspinny.h | 6 +-- src/widget/wsplitter.h | 5 +-- src/widget/wstarrating.h | 5 +-- src/widget/wstatuslight.cpp | 18 -------- src/widget/wstatuslight.h | 25 +---------- src/widget/wtime.h | 8 +--- src/widget/wtracktableviewheader.cpp | 3 -- src/widget/wtracktableviewheader.h | 8 +--- src/widget/wtracktext.cpp | 1 - src/widget/wtrackwidgetgroup.cpp | 1 - src/widget/wvumeter.cpp | 17 -------- src/widget/wvumeter.h | 22 +--------- src/widget/wwaveformviewer.h | 5 +-- src/widget/wwidget.cpp | 17 -------- src/widget/wwidget.h | 31 ++------------ src/widget/wwidgetgroup.h | 5 +-- src/widget/wwidgetstack.h | 5 +-- 620 files changed, 627 insertions(+), 4405 deletions(-) diff --git a/src/analyzer/analyzerbeats.h b/src/analyzer/analyzerbeats.h index e0667149e618..1169fd0436aa 100644 --- a/src/analyzer/analyzerbeats.h +++ b/src/analyzer/analyzerbeats.h @@ -5,8 +5,7 @@ * Author: Vittorio Colao */ -#ifndef ANALYZER_ANALYZERBEATS_H -#define ANALYZER_ANALYZERBEATS_H +#pragma once #include #include @@ -53,5 +52,3 @@ class AnalyzerBeats : public Analyzer { int m_iCurrentSample; int m_iMinBpm, m_iMaxBpm; }; - -#endif /* ANALYZER_ANALYZERBEATS_H */ diff --git a/src/analyzer/analyzerebur128.h b/src/analyzer/analyzerebur128.h index d725f31eb66b..5cc794425d17 100644 --- a/src/analyzer/analyzerebur128.h +++ b/src/analyzer/analyzerebur128.h @@ -1,5 +1,4 @@ -#ifndef ANALYZER_ANALYZEREBUR128_H_ -#define ANALYZER_ANALYZEREBUR128_H_ +#pragma once #include @@ -24,5 +23,3 @@ class AnalyzerEbur128 : public Analyzer { ReplayGainSettings m_rgSettings; ebur128_state* m_pState; }; - -#endif /* ANALYZER_ANALYZEREBUR128_H_ */ diff --git a/src/analyzer/analyzergain.h b/src/analyzer/analyzergain.h index dbe426b919dc..ddc2d6df5786 100644 --- a/src/analyzer/analyzergain.h +++ b/src/analyzer/analyzergain.h @@ -5,8 +5,7 @@ * Author: Vittorio Colao * */ -#ifndef ANALYZER_ANALYZERGAIN_H -#define ANALYZER_ANALYZERGAIN_H +#pragma once #include "analyzer/analyzer.h" #include "preferences/replaygainsettings.h" @@ -34,5 +33,3 @@ class AnalyzerGain : public Analyzer { ReplayGain* m_pReplayGain; int m_iBufferSize; }; - -#endif /* ANALYZER_ANALYZERGAIN_H */ diff --git a/src/analyzer/analyzerkey.h b/src/analyzer/analyzerkey.h index b25fec8b0728..504df21705a4 100644 --- a/src/analyzer/analyzerkey.h +++ b/src/analyzer/analyzerkey.h @@ -1,5 +1,4 @@ -#ifndef ANALYZER_ANALYZERKEY_H -#define ANALYZER_ANALYZERKEY_H +#pragma once #include #include @@ -43,5 +42,3 @@ class AnalyzerKey : public Analyzer { bool m_bPreferencesFastAnalysisEnabled; bool m_bPreferencesReanalyzeEnabled; }; - -#endif /* ANALYZER_ANALYZERKEY_H */ diff --git a/src/analyzer/analyzerwaveform.h b/src/analyzer/analyzerwaveform.h index 86b13f2c2629..03089261b2b9 100644 --- a/src/analyzer/analyzerwaveform.h +++ b/src/analyzer/analyzerwaveform.h @@ -1,5 +1,4 @@ -#ifndef ANALYZER_ANALYZERWAVEFORM_H -#define ANALYZER_ANALYZERWAVEFORM_H +#pragma once #include #include @@ -178,5 +177,3 @@ class AnalyzerWaveform : public Analyzer { QImage* test_heatMap; #endif }; - -#endif /* ANALYZER_ANALYZERWAVEFORM_H */ diff --git a/src/analyzer/plugins/analyzerplugin.h b/src/analyzer/plugins/analyzerplugin.h index 872e8bda928a..03bb7ac2d6f1 100644 --- a/src/analyzer/plugins/analyzerplugin.h +++ b/src/analyzer/plugins/analyzerplugin.h @@ -1,5 +1,4 @@ -#ifndef ANALYZER_PLUGINS_ANALYZERPLUGIN_H -#define ANALYZER_PLUGINS_ANALYZERPLUGIN_H +#pragma once #include @@ -66,5 +65,3 @@ class AnalyzerKeyPlugin : public AnalyzerPlugin { }; } // namespace mixxx - -#endif /* ANALYZER_PLUGINS_ANALYZERPLUGIN_H */ diff --git a/src/analyzer/plugins/analyzerqueenmarybeats.h b/src/analyzer/plugins/analyzerqueenmarybeats.h index bdc525bd732b..5dc70ae85c9e 100644 --- a/src/analyzer/plugins/analyzerqueenmarybeats.h +++ b/src/analyzer/plugins/analyzerqueenmarybeats.h @@ -1,5 +1,4 @@ -#ifndef ANALYZER_PLUGINS_ANALYZERQUEENMARYBEATS_H -#define ANALYZER_PLUGINS_ANALYZERQUEENMARYBEATS_H +#pragma once #include @@ -56,5 +55,3 @@ class AnalyzerQueenMaryBeats : public AnalyzerBeatsPlugin { }; } // namespace mixxx - -#endif /* ANALYZER_PLUGINS_ANALYZERQUEENMARYBEATS_H */ diff --git a/src/analyzer/plugins/analyzerqueenmarykey.h b/src/analyzer/plugins/analyzerqueenmarykey.h index 253688b1cfe8..ea9d014f6fc5 100644 --- a/src/analyzer/plugins/analyzerqueenmarykey.h +++ b/src/analyzer/plugins/analyzerqueenmarykey.h @@ -1,5 +1,4 @@ -#ifndef ANALYZER_PLUGINS_ANALYZERQUEENMARYKEY_H -#define ANALYZER_PLUGINS_ANALYZERQUEENMARYKEY_H +#pragma once #include @@ -50,5 +49,3 @@ class AnalyzerQueenMaryKey : public AnalyzerKeyPlugin { }; } // namespace mixxx - -#endif /* ANALYZER_PLUGINS_ANALYZERQUEENMARYKEY_H */ diff --git a/src/analyzer/plugins/analyzersoundtouchbeats.h b/src/analyzer/plugins/analyzersoundtouchbeats.h index ec495e58a5f2..1c8e26a359b5 100644 --- a/src/analyzer/plugins/analyzersoundtouchbeats.h +++ b/src/analyzer/plugins/analyzersoundtouchbeats.h @@ -1,5 +1,4 @@ -#ifndef ANALYZER_PLUGINS_ANALYZERSOUNDTOUCHBEATS -#define ANALYZER_PLUGINS_ANALYZERSOUNDTOUCHBEATS +#pragma once #include @@ -49,5 +48,3 @@ class AnalyzerSoundTouchBeats : public AnalyzerBeatsPlugin { }; } // namespace mixxx - -#endif /* ANALYZER_PLUGINS_ANALYZERSOUNDTOUCHBEATS */ diff --git a/src/broadcast/broadcastmanager.h b/src/broadcast/broadcastmanager.h index fc037a407c75..75479e3bf69a 100644 --- a/src/broadcast/broadcastmanager.h +++ b/src/broadcast/broadcastmanager.h @@ -1,5 +1,4 @@ -#ifndef BROADCAST_BROADCASTMANAGER_H -#define BROADCAST_BROADCASTMANAGER_H +#pragma once #include @@ -56,5 +55,3 @@ class BroadcastManager : public QObject { ControlPushButton* m_pBroadcastEnabled; ControlObject* m_pStatusCO; }; - -#endif /* BROADCAST_BROADCASTMANAGER_H */ diff --git a/src/broadcast/defs_broadcast.h b/src/broadcast/defs_broadcast.h index ad966b58a42f..db0bf87f3557 100644 --- a/src/broadcast/defs_broadcast.h +++ b/src/broadcast/defs_broadcast.h @@ -1,5 +1,4 @@ -#ifndef DEFS_BROADCAST_H -#define DEFS_BROADCAST_H +#pragma once // NOTE(rryan): Do not change this from [Shoutcast] unless you also put upgrade // logic in src/preferences/upgrade.h. @@ -34,5 +33,3 @@ // the workers are then performed on thread-safe QSharedPointers and not // onto the thread-unsafe QVector #define BROADCAST_MAX_CONNECTIONS 16 - -#endif /* DEFS_BROADCAST_H */ diff --git a/src/build.h.template b/src/build.h.template index 96634ff1b65c..c1be0911707a 100644 --- a/src/build.h.template +++ b/src/build.h.template @@ -1,7 +1,4 @@ -#ifndef BUILD_H -#define BUILD_H +#pragma once #define BUILD_BRANCH "@GIT_BRANCH@" #define BUILD_REV "@GIT_COMMIT_COUNT@" - -#endif // BUILD_H diff --git a/src/control/controlaudiotaperpot.cpp b/src/control/controlaudiotaperpot.cpp index d5f8000a1021..f98a37539ef9 100644 --- a/src/control/controlaudiotaperpot.cpp +++ b/src/control/controlaudiotaperpot.cpp @@ -1,4 +1,3 @@ - #include "control/controlaudiotaperpot.h" #include "moc_controlaudiotaperpot.cpp" diff --git a/src/control/controlaudiotaperpot.h b/src/control/controlaudiotaperpot.h index 8c16262d6fc5..afbc59ad57f7 100644 --- a/src/control/controlaudiotaperpot.h +++ b/src/control/controlaudiotaperpot.h @@ -1,6 +1,4 @@ - -#ifndef CONTROLAUDIOTAPERPOT_H -#define CONTROLAUDIOTAPERPOT_H +#pragma once #include "control/controlpotmeter.h" #include "preferences/usersettings.h" @@ -14,5 +12,3 @@ class ControlAudioTaperPot : public ControlPotmeter { // neutralParameter is a knob position between 0 and 1 where the gain is 1 (0dB) ControlAudioTaperPot(const ConfigKey& key, double minDB, double maxDB, double neutralParameter); }; - -#endif // CONTROLAUDIOTAPERPOT_H diff --git a/src/control/controlbehavior.h b/src/control/controlbehavior.h index 08f48b724b1c..1075cf0bea30 100644 --- a/src/control/controlbehavior.h +++ b/src/control/controlbehavior.h @@ -1,5 +1,4 @@ -#ifndef CONTROLBEHAVIOR_H -#define CONTROLBEHAVIOR_H +#pragma once #include #include @@ -159,5 +158,3 @@ class ControlPushButtonBehavior : public ControlNumericBehavior { int m_iNumStates; QScopedPointer m_pushTimer; }; - -#endif /* CONTROLBEHAVIOR_H */ diff --git a/src/control/controleffectknob.h b/src/control/controleffectknob.h index b0a10e2ae809..43e7cc3720f1 100644 --- a/src/control/controleffectknob.h +++ b/src/control/controleffectknob.h @@ -1,5 +1,4 @@ -#ifndef CONTROLEFFECTKNOB_H -#define CONTROLEFFECTKNOB_H +#pragma once #include "control/controlpotmeter.h" #include "effects/effectmanifestparameter.h" @@ -12,5 +11,3 @@ class ControlEffectKnob : public ControlPotmeter { void setBehaviour(EffectManifestParameter::ControlHint type, double dMinValue, double dMaxValue); }; - -#endif // CONTROLLEFFECTKNOB_H diff --git a/src/control/controlencoder.h b/src/control/controlencoder.h index a323ac313350..75b2cb2015a5 100644 --- a/src/control/controlencoder.h +++ b/src/control/controlencoder.h @@ -1,5 +1,4 @@ -#ifndef CONTROLENCODER_H -#define CONTROLENCODER_H +#pragma once #include "preferences/usersettings.h" #include "control/controlobject.h" @@ -9,5 +8,3 @@ class ControlEncoder : public ControlObject { public: ControlEncoder(const ConfigKey& key, bool bIgnoreNops = true); }; - -#endif diff --git a/src/control/controlindicator.h b/src/control/controlindicator.h index 62ec95b45239..3cfbead98739 100644 --- a/src/control/controlindicator.h +++ b/src/control/controlindicator.h @@ -1,5 +1,4 @@ -#ifndef CONTROLINDICATOR_H -#define CONTROLINDICATOR_H +#pragma once #include "control/controlobject.h" @@ -39,5 +38,3 @@ class ControlIndicator : public ControlObject { ControlProxy* m_pCOTGuiTickTime; ControlProxy* m_pCOTGuiTick50ms; }; - -#endif // CONTROLINDICATOR_H diff --git a/src/control/controllinpotmeter.h b/src/control/controllinpotmeter.h index 98c8e9553742..bf6d8d49973a 100644 --- a/src/control/controllinpotmeter.h +++ b/src/control/controllinpotmeter.h @@ -1,5 +1,4 @@ -#ifndef CONTROLLINPOTMETER_H -#define CONTROLLINPOTMETER_H +#pragma once #include "control/controlpotmeter.h" @@ -14,5 +13,3 @@ class ControlLinPotmeter : public ControlPotmeter { double dSmallStep = 0, bool allowOutOfBounds = false); }; - -#endif // CONTROLLINPOTMETER_H diff --git a/src/control/controllogpotmeter.cpp b/src/control/controllogpotmeter.cpp index ad84a38380f0..4ff8924ed308 100644 --- a/src/control/controllogpotmeter.cpp +++ b/src/control/controllogpotmeter.cpp @@ -1,20 +1,3 @@ -/*************************************************************************** - controlpotmeter.cpp - description - ------------------- - begin : Wed Feb 20 2002 - copyright : (C) 2002 by Tue and Ken Haste Andersen - email : -***************************************************************************/ - -/*************************************************************************** -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) any later version. * -* * -***************************************************************************/ - #include "control/controllogpotmeter.h" #include "moc_controllogpotmeter.cpp" diff --git a/src/control/controllogpotmeter.h b/src/control/controllogpotmeter.h index 05e7d6bd9335..5d5a04cc2f1b 100644 --- a/src/control/controllogpotmeter.h +++ b/src/control/controllogpotmeter.h @@ -1,34 +1,10 @@ -/*************************************************************************** - controlpotmeter.h - description - ------------------- - begin : Wed Feb 20 2002 - copyright : (C) 2002 by Tue and Ken Haste Andersen - email : - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -#ifndef CONTROLLOGPOTMETER_H -#define CONTROLLOGPOTMETER_H +#pragma once #include "control/controlpotmeter.h" #include "preferences/usersettings.h" -/** - *@author Tue and Ken Haste Andersen - */ - class ControlLogpotmeter : public ControlPotmeter { Q_OBJECT public: ControlLogpotmeter(const ConfigKey& key, double dMaxValue, double minDB); }; - -#endif diff --git a/src/control/controlmodel.h b/src/control/controlmodel.h index 336d50504659..93df7b330a9a 100644 --- a/src/control/controlmodel.h +++ b/src/control/controlmodel.h @@ -1,5 +1,4 @@ -#ifndef CONTROLMODEL_H -#define CONTROLMODEL_H +#pragma once #include #include @@ -58,5 +57,3 @@ class ControlModel final : public QAbstractTableModel { QVector > m_headerInfo; QList m_controls; }; - -#endif /* CONTROLMODEL_H */ diff --git a/src/control/controlobject.cpp b/src/control/controlobject.cpp index 98736f6138ef..df8983a4e904 100644 --- a/src/control/controlobject.cpp +++ b/src/control/controlobject.cpp @@ -1,20 +1,3 @@ -/*************************************************************************** - controlobject.cpp - description - ------------------- - begin : Wed Feb 20 2002 - copyright : (C) 2002 by Tue and Ken Haste Andersen - email : -***************************************************************************/ - -/*************************************************************************** -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) any later version. * -* * -***************************************************************************/ - #include "control/controlobject.h" #include diff --git a/src/control/controlobject.h b/src/control/controlobject.h index b6f3ae5f53ab..cfd2dd39d543 100644 --- a/src/control/controlobject.h +++ b/src/control/controlobject.h @@ -1,20 +1,3 @@ -/*************************************************************************** - controlobject.h - description - ------------------- - begin : Wed Feb 20 2002 - copyright : (C) 2002 by Tue and Ken Haste Andersen - email : - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - #pragma once #include diff --git a/src/control/controlobjectscript.h b/src/control/controlobjectscript.h index 9dbd446ab5f2..90dce136552f 100644 --- a/src/control/controlobjectscript.h +++ b/src/control/controlobjectscript.h @@ -1,5 +1,4 @@ -#ifndef CONTROLOBJECTSCRIPT_H -#define CONTROLOBJECTSCRIPT_H +#pragma once #include @@ -40,5 +39,3 @@ class ControlObjectScript : public ControlProxy { private: QVector m_scriptConnections; }; - -#endif // CONTROLOBJECTSCRIPT_H diff --git a/src/control/controlpotmeter.cpp b/src/control/controlpotmeter.cpp index 667358f7aaf1..2c03d4d30851 100644 --- a/src/control/controlpotmeter.cpp +++ b/src/control/controlpotmeter.cpp @@ -1,20 +1,3 @@ -/*************************************************************************** - controlpotmeter.cpp - description - ------------------- - begin : Wed Feb 20 2002 - copyright : (C) 2002 by Tue and Ken Haste Andersen - email : -***************************************************************************/ - -/*************************************************************************** -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) any later version. * -* * -***************************************************************************/ - #include "control/controlpotmeter.h" #include "control/controlproxy.h" diff --git a/src/control/controlpotmeter.h b/src/control/controlpotmeter.h index a3dee755c737..1913513b914a 100644 --- a/src/control/controlpotmeter.h +++ b/src/control/controlpotmeter.h @@ -1,30 +1,8 @@ -/*************************************************************************** - controlpotmeter.h - description - ------------------- - begin : Wed Feb 20 2002 - copyright : (C) 2002 by Tue and Ken Haste Andersen - email : - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -#ifndef CONTROLPOTMETER_H -#define CONTROLPOTMETER_H +#pragma once #include "preferences/usersettings.h" #include "control/controlobject.h" -/** - *@author Tue and Ken Haste Andersen - */ - class ControlPushButton; class ControlProxy; @@ -97,5 +75,3 @@ class ControlPotmeter : public ControlObject { bool m_bAllowOutOfBounds; PotmeterControls m_controls; }; - -#endif diff --git a/src/control/controlproxy.h b/src/control/controlproxy.h index e86fc086703b..4eab2fa38d12 100644 --- a/src/control/controlproxy.h +++ b/src/control/controlproxy.h @@ -1,5 +1,4 @@ -#ifndef CONTROLPROXY_H -#define CONTROLPROXY_H +#pragma once #include #include @@ -207,5 +206,3 @@ class ControlProxy : public QObject { // Pointer to connected control. QSharedPointer m_pControl; }; - -#endif // CONTROLPROXY_H diff --git a/src/control/controlpushbutton.cpp b/src/control/controlpushbutton.cpp index e4a9200b4121..1a3b2a1f3b6f 100644 --- a/src/control/controlpushbutton.cpp +++ b/src/control/controlpushbutton.cpp @@ -1,20 +1,3 @@ -/*************************************************************************** - controlpushbutton.cpp - description - ------------------- - begin : Wed Feb 20 2002 - copyright : (C) 2002 by Tue and Ken Haste Andersen - email : -***************************************************************************/ - -/*************************************************************************** -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) any later version. * -* * -***************************************************************************/ - #include "control/controlpushbutton.h" #include "moc_controlpushbutton.cpp" diff --git a/src/control/controlttrotary.cpp b/src/control/controlttrotary.cpp index cb0961ac9f68..4247d78d8f8e 100644 --- a/src/control/controlttrotary.cpp +++ b/src/control/controlttrotary.cpp @@ -1,19 +1,3 @@ -/*************************************************************************** - controlttrotary.cpp - description - ------------------- - copyright : (C) 2002 by Tue and Ken Haste Andersen - email : -***************************************************************************/ - -/*************************************************************************** -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) any later version. * -* * -***************************************************************************/ - #include "control/controlttrotary.h" #include "moc_controlttrotary.cpp" diff --git a/src/control/controlttrotary.h b/src/control/controlttrotary.h index 59ba41eeb2fb..ee132fed302e 100644 --- a/src/control/controlttrotary.h +++ b/src/control/controlttrotary.h @@ -1,21 +1,4 @@ -/*************************************************************************** - controlttrotary.h - description - ------------------- - copyright : (C) 2002 by Tue and Ken Haste Andersen - email : - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -#ifndef CONTROLTTROTARY_H -#define CONTROLTTROTARY_H +#pragma once #include "preferences/usersettings.h" #include "control/controlobject.h" @@ -25,5 +8,3 @@ class ControlTTRotary : public ControlObject { public: ControlTTRotary(const ConfigKey& key); }; - -#endif diff --git a/src/controllers/bulk/bulkcontroller.cpp b/src/controllers/bulk/bulkcontroller.cpp index 5b8a89bcda1d..6ac4eaaacdf2 100644 --- a/src/controllers/bulk/bulkcontroller.cpp +++ b/src/controllers/bulk/bulkcontroller.cpp @@ -1,10 +1,3 @@ -/** - * @file bulkcontroller.cpp - * @author Neale Pickett neale@woozle.org - * @date Thu Jun 28 2012 - * @brief USB Bulk controller backend - * - */ #include "controllers/bulk/bulkcontroller.h" #include diff --git a/src/controllers/bulk/bulkcontroller.h b/src/controllers/bulk/bulkcontroller.h index 6430a6f11e8d..2afb9b32203f 100644 --- a/src/controllers/bulk/bulkcontroller.h +++ b/src/controllers/bulk/bulkcontroller.h @@ -1,12 +1,4 @@ -/** - * @file bulkcontroller.h - * @author Neale Picket neale@woozle.org - * @date Thu Jun 28 2012 - * @brief USB Bulk controller backend - */ - -#ifndef BULKCONTROLLER_H -#define BULKCONTROLLER_H +#pragma once #include @@ -19,6 +11,7 @@ struct libusb_device_handle; struct libusb_context; struct libusb_device_descriptor; +/// USB Bulk controller backend class BulkReader : public QThread { Q_OBJECT public: @@ -107,5 +100,3 @@ class BulkController : public Controller { BulkReader* m_pReader; HidControllerPreset m_preset; }; - -#endif diff --git a/src/controllers/bulk/bulkenumerator.cpp b/src/controllers/bulk/bulkenumerator.cpp index ce154e4883ad..2e6abdde1624 100644 --- a/src/controllers/bulk/bulkenumerator.cpp +++ b/src/controllers/bulk/bulkenumerator.cpp @@ -1,10 +1,3 @@ -/** - * @file bulkenumerator.cpp - * @author Neale Picket neale@woozle.org - * @date Thu Jun 28 2012 - * @brief USB Bulk controller backend - */ - #include #include "controllers/bulk/bulkcontroller.h" diff --git a/src/controllers/bulk/bulkenumerator.h b/src/controllers/bulk/bulkenumerator.h index b281f49c0136..b1c2569f33cc 100644 --- a/src/controllers/bulk/bulkenumerator.h +++ b/src/controllers/bulk/bulkenumerator.h @@ -1,17 +1,10 @@ -/** -* @file bulkenumerator.h -* @author Neale Pickett neale@woozle.org -* @date Thu Jun 28 2012 -* @brief Locate supported USB bulk controllers -*/ - -#ifndef BULKENUMERATOR_H -#define BULKENUMERATOR_H +#pragma once #include "controllers/controllerenumerator.h" struct libusb_context; +/// Locate supported USB bulk controllers class BulkEnumerator : public ControllerEnumerator { public: explicit BulkEnumerator(UserSettingsPointer pConfig); @@ -24,5 +17,3 @@ class BulkEnumerator : public ControllerEnumerator { libusb_context* m_context; UserSettingsPointer m_pConfig; }; - -#endif diff --git a/src/controllers/bulk/bulksupported.h b/src/controllers/bulk/bulksupported.h index d79ad88f7b4c..1ffbc3509abb 100644 --- a/src/controllers/bulk/bulksupported.h +++ b/src/controllers/bulk/bulksupported.h @@ -1,12 +1,6 @@ -/** -* @file bulksupported.h -* @author Neale Picket neale@woozle.org -* @date Thu Jun 28 2012 -* @brief A list of supported USB bulk devices -*/ +// A list of supported USB bulk devices -#ifndef BULKSUPPORTED_H -#define BULKSUPPORTED_H +#pragma once typedef struct bulk_supported { unsigned short vendor_id; @@ -22,5 +16,3 @@ static bulk_supported_t bulk_supported[] = { {0x06f8, 0xb120, 0x82, 0x03}, // Hercules MP3 LE / Glow {0, 0, 0, 0} }; - -#endif diff --git a/src/controllers/controller.cpp b/src/controllers/controller.cpp index 1c42a2ee219f..23bec155042d 100644 --- a/src/controllers/controller.cpp +++ b/src/controllers/controller.cpp @@ -1,10 +1,3 @@ -/** -* @file controller.h -* @author Sean Pappalardo spappalardo@mixxx.org -* @date Sat Apr 30 2011 -* @brief Base class representing a physical (or software) controller. -*/ - #include "controllers/controller.h" #include diff --git a/src/controllers/controller.h b/src/controllers/controller.h index ca8919812b33..825c7ca152c7 100644 --- a/src/controllers/controller.h +++ b/src/controllers/controller.h @@ -1,16 +1,4 @@ -/** -* @file controller.h -* @author Sean Pappalardo spappalardo@mixxx.org -* @date Sat Apr 30 2011 -* @brief Base class representing a physical (or software) controller. -* -* This is a base class representing a physical (or software) controller. It -* must be inherited by a class that implements it on some API. Note that the -* subclass' destructor should call close() at a minimum. -*/ - -#ifndef CONTROLLER_H -#define CONTROLLER_H +#pragma once #include "controllers/controllerpreset.h" #include "controllers/controllerpresetfilehandler.h" @@ -22,10 +10,15 @@ class ControllerJSProxy; +/// Base class representing a physical (or software) controller. +/// +/// This is a base class representing a physical (or software) controller. It +/// must be inherited by a class that implements it on some API. Note that the +/// subclass' destructor should call close() at a minimum. class Controller : public QObject, ConstControllerPresetVisitor { Q_OBJECT public: - Controller(); + explicit Controller(); ~Controller() override; // Subclass should call close() at minimum. /// The object that is exposed to the JS scripts as the "controller" object. @@ -91,7 +84,7 @@ class Controller : public QObject, ConstControllerPresetVisitor { virtual void receive(const QByteArray& data, mixxx::Duration timestamp); /// Apply the preset to the controller. - /// @brief Initializes both controller engine and static output mappings. + /// Initializes both controller engine and static output mappings. /// /// @param initializeScripts Can be set to false to skip script /// initialization for unit tests. @@ -203,5 +196,3 @@ class ControllerJSProxy : public QObject { private: Controller* const m_pController; }; - -#endif diff --git a/src/controllers/controllerdebug.h b/src/controllers/controllerdebug.h index dd162d1da851..d99eaf146dc1 100644 --- a/src/controllers/controllerdebug.h +++ b/src/controllers/controllerdebug.h @@ -1,9 +1,7 @@ -#ifndef CONTROLLERDEBUG_H -#define CONTROLLERDEBUG_H +#pragma once #include - // Specifies whether or not we should dump incoming data to the console at // runtime. This is useful for end-user debugging and script-writing. class ControllerDebug { @@ -39,11 +37,9 @@ class ControllerDebug { // // In order of Bug #1797746, since transition to qt5 it is needed unquote the // output for mixxx.log with .noquote(), because in qt5 QDebug() is quoted by default. -#define controllerDebug(stream) \ -{ \ - if (ControllerDebug::enabled()) { \ - QDebug(QtDebugMsg).noquote() << ControllerDebug::kLogMessagePrefix << stream; \ - } \ -} \ - -#endif // CONTROLLERDEBUG_H +#define controllerDebug(stream) \ + { \ + if (ControllerDebug::enabled()) { \ + QDebug(QtDebugMsg).noquote() << ControllerDebug::kLogMessagePrefix << stream; \ + } \ + } diff --git a/src/controllers/controllerenumerator.cpp b/src/controllers/controllerenumerator.cpp index c3ddd88f0fe5..36bc56f3f6e1 100644 --- a/src/controllers/controllerenumerator.cpp +++ b/src/controllers/controllerenumerator.cpp @@ -1,13 +1,3 @@ -/*************************************************************************** - ControllerEnumerator.cpp - Controller Enumerator Class - ---------------------------- - begin : Sat Apr 30 2011 - copyright : (C) 2011 Sean M. Pappalardo - email : spappalardo@mixxx.org - -***************************************************************************/ - #include "controllers/controllerenumerator.h" #include "moc_controllerenumerator.cpp" diff --git a/src/controllers/controllerenumerator.h b/src/controllers/controllerenumerator.h index b94c53838939..dc08154de92b 100644 --- a/src/controllers/controllerenumerator.h +++ b/src/controllers/controllerenumerator.h @@ -1,18 +1,11 @@ -/** -* @file controllerenumerator.h -* @author Sean Pappalardo spappalardo@mixxx.org -* @date Sat Apr 30 2011 -* @brief Base class handling discovery and enumeration of DJ controllers. -* -* This class handles discovery and enumeration of DJ controllers and -* must be inherited by a class that implements it on some API. -*/ - -#ifndef CONTROLLERENUMERATOR_H -#define CONTROLLERENUMERATOR_H +#pragma once #include "controllers/controller.h" +/// Base class handling discovery and enumeration of DJ controllers. +/// +/// This class handles discovery and enumeration of DJ controllers and +/// must be inherited by a class that implements it on some API. class ControllerEnumerator : public QObject { Q_OBJECT public: @@ -29,5 +22,3 @@ class ControllerEnumerator : public QObject { return false; } }; - -#endif diff --git a/src/controllers/controllerlearningeventfilter.h b/src/controllers/controllerlearningeventfilter.h index 087e37b4bb4d..dc22e36a53ac 100644 --- a/src/controllers/controllerlearningeventfilter.h +++ b/src/controllers/controllerlearningeventfilter.h @@ -1,5 +1,4 @@ -#ifndef CONTROLLERLEARNINGEVENTFILTER_H -#define CONTROLLERLEARNINGEVENTFILTER_H +#pragma once #include #include @@ -48,6 +47,3 @@ class ControllerLearningEventFilter : public QObject { QHash m_widgetControlInfo; bool m_bListening; }; - - -#endif /* CONTROLLERLEARNINGEVENTFILTER_H */ diff --git a/src/controllers/controllermanager.cpp b/src/controllers/controllermanager.cpp index c89310de1e29..04dffa554e51 100644 --- a/src/controllers/controllermanager.cpp +++ b/src/controllers/controllermanager.cpp @@ -1,10 +1,3 @@ -/** - * @file controllermanager.cpp - * @author Sean Pappalardo spappalardo@mixxx.org - * @date Sat Apr 30 2011 - * @brief Manages creation/enumeration/deletion of hardware controllers. - */ - #include "controllers/controllermanager.h" #include diff --git a/src/controllers/controllermanager.h b/src/controllers/controllermanager.h index 6a1a4b57d62d..1c6c571a2aba 100644 --- a/src/controllers/controllermanager.h +++ b/src/controllers/controllermanager.h @@ -1,12 +1,4 @@ -/** - * @file controllermanager.h - * @author Sean Pappalardo spappalardo@mixxx.org - * @date Sat Apr 30 2011 - * @brief Manages creation/enumeration/deletion of hardware controllers. - */ - -#ifndef CONTROLLERMANAGER_H -#define CONTROLLERMANAGER_H +#pragma once #include @@ -16,14 +8,14 @@ #include "controllers/controllerpresetinfoenumerator.h" #include "preferences/usersettings.h" -//Forward declaration(s) +// Forward declaration(s) class Controller; class ControllerLearningEventFilter; -// Function to sort controllers by name +/// Function to sort controllers by name bool controllerCompare(Controller *a, Controller *b); -/** Manages enumeration/operation/deletion of hardware controllers. */ +/// Manages enumeration/operation/deletion of hardware controllers. class ControllerManager : public QObject { Q_OBJECT public: @@ -43,7 +35,7 @@ class ControllerManager : public QObject { } QString getConfiguredPresetFileForDevice(const QString& name); - // Prevent other parts of Mixxx from having to manually connect to our slots + /// Prevent other parts of Mixxx from having to manually connect to our slots void setUpDevices() { emit requestSetUpDevices(); }; static QList getPresetPaths(UserSettingsPointer pConfig); @@ -62,15 +54,15 @@ class ControllerManager : public QObject { void closeController(Controller* pController); private slots: - // Perform initialization that should be delayed until the ControllerManager - // thread is started. + /// Perform initialization that should be delayed until the ControllerManager + /// thread is started. void slotInitialize(); - // Open whatever controllers are selected in the preferences. This currently - // only runs on start-up but maybe should instead be signaled by the - // preferences dialog on apply, and only open/close changed devices + /// Open whatever controllers are selected in the preferences. This currently + /// only runs on start-up but maybe should instead be signaled by the + /// preferences dialog on apply, and only open/close changed devices void slotSetUpDevices(); void slotShutdown(); - // Calls poll() on all devices that have isPolling() true. + /// Calls poll() on all devices that have isPolling() true. void pollDevices(); void startPolling(); void stopPolling(); @@ -88,5 +80,3 @@ class ControllerManager : public QObject { QSharedPointer m_pMainThreadSystemPresetEnumerator; bool m_skipPoll; }; - -#endif // CONTROLLERMANAGER_H diff --git a/src/controllers/controllermappingtablemodel.h b/src/controllers/controllermappingtablemodel.h index 008665f0d4d3..d6de46532c7f 100644 --- a/src/controllers/controllermappingtablemodel.h +++ b/src/controllers/controllermappingtablemodel.h @@ -1,5 +1,4 @@ -#ifndef CONTROLLERMAPPINGTABLEMODEL_H -#define CONTROLLERMAPPINGTABLEMODEL_H +#pragma once #include #include @@ -47,5 +46,3 @@ class ControllerMappingTableModel : public QAbstractTableModel, MidiControllerPreset* m_pMidiPreset; HidControllerPreset* m_pHidPreset; }; - -#endif /* CONTROLLERMAPPINGTABLEMODEL_H */ diff --git a/src/controllers/controllerpreset.h b/src/controllers/controllerpreset.h index d34fa3ba61dd..2eaa98b4f9a5 100644 --- a/src/controllers/controllerpreset.h +++ b/src/controllers/controllerpreset.h @@ -1,8 +1,4 @@ #pragma once -/// @file controllerpreset.h -/// @author Sean Pappalardo spappalardo@mixxx.org -/// @date Mon 9 Apr 2012 -/// @brief Controller Preset #include #include diff --git a/src/controllers/controllerpresetfilehandler.cpp b/src/controllers/controllerpresetfilehandler.cpp index 39d429d4eb9f..a64cb42531be 100644 --- a/src/controllers/controllerpresetfilehandler.cpp +++ b/src/controllers/controllerpresetfilehandler.cpp @@ -1,8 +1,3 @@ -/// @file controllerpresetfilehandler.cpp -/// @author Sean Pappalardo spappalardo@mixxx.org -/// @date Mon 9 Apr 2012 -/// @brief Handles loading and saving of Controller presets. - #include "controllers/controllerpresetfilehandler.h" #include "controllers/controllermanager.h" #include "controllers/defs_controllers.h" diff --git a/src/controllers/controllerpresetfilehandler.h b/src/controllers/controllerpresetfilehandler.h index 5dba31bcc455..7454d171ca6b 100644 --- a/src/controllers/controllerpresetfilehandler.h +++ b/src/controllers/controllerpresetfilehandler.h @@ -1,8 +1,4 @@ #pragma once -/// @file controllerpresetfilehandler.h -/// @author Sean Pappalardo spappalardo@mixxx.org -/// @date Mon 9 Apr 2012 -/// @brief Handles loading and saving of Controller presets. #include "util/xml.h" #include "controllers/controllerpreset.h" diff --git a/src/controllers/controllerpresetinfo.cpp b/src/controllers/controllerpresetinfo.cpp index bf0051209af9..34f075de5bb6 100644 --- a/src/controllers/controllerpresetinfo.cpp +++ b/src/controllers/controllerpresetinfo.cpp @@ -1,14 +1,3 @@ -/** -* @file controllerpresetinfo.cpp -* @author Ilkka Tuohela hile@iki.fi -* @date Wed May 15 2012 -* @brief Implement handling enumeration and parsing of preset info headers -* -* This class handles parsing of controller XML description file -* header tags. It can be used to match controllers automatically or to -* show details for a mapping. -*/ - #include "controllers/controllerpresetinfo.h" #include "controllers/defs_controllers.h" diff --git a/src/controllers/controllerpresetinfo.h b/src/controllers/controllerpresetinfo.h index 3eb5c4ef152a..9b38e119007b 100644 --- a/src/controllers/controllerpresetinfo.h +++ b/src/controllers/controllerpresetinfo.h @@ -1,16 +1,4 @@ -/** -* @file controllerpresetinfo.h -* @author Ilkka Tuohela hile@iki.fi -* @date Wed May 15 2012 -* @brief Base class handling enumeration and parsing of preset info headers -* -* This class handles enumeration and parsing of controller XML description file -* header tags. It can be used to match controllers automatically or to -* show details for a mapping. -*/ - -#ifndef CONTROLLERPRESETINFO_H -#define CONTROLLERPRESETINFO_H +#pragma once #include #include @@ -37,6 +25,11 @@ struct ProductInfo { QString interface_number; }; +/// Base class handling enumeration and parsing of preset info headers +/// +/// This class handles enumeration and parsing of controller XML description file +/// header tags. It can be used to match controllers automatically or to +/// show details for a mapping. class PresetInfo { public: PresetInfo(); @@ -71,5 +64,3 @@ class PresetInfo { QString m_wikilink; QList m_products; }; - -#endif diff --git a/src/controllers/controllerpresetinfoenumerator.cpp b/src/controllers/controllerpresetinfoenumerator.cpp index 517451fd33f5..10201ac6457a 100644 --- a/src/controllers/controllerpresetinfoenumerator.cpp +++ b/src/controllers/controllerpresetinfoenumerator.cpp @@ -1,9 +1,3 @@ -/** -* @file controllerpresetinfoenumerator.cpp -* @author Be be.0@gmx.com -* @date Sat Jul 18 2015 -* @brief Enumerate list of available controller mapping presets -*/ #include "controllers/controllerpresetinfoenumerator.h" #include diff --git a/src/controllers/controllerpresetinfoenumerator.h b/src/controllers/controllerpresetinfoenumerator.h index 07a71dfd10d4..03f2fd859f5d 100644 --- a/src/controllers/controllerpresetinfoenumerator.h +++ b/src/controllers/controllerpresetinfoenumerator.h @@ -1,11 +1,4 @@ -/** -* @file controllerpresetinfoenumerator.h -* @author Be be.0@gmx.com -* @date Sat Jul 18 2015 -* @brief Enumerate list of available controller mapping presets -*/ -#ifndef CONTROLLERPRESETINFOENUMERATOR_H -#define CONTROLLERPRESETINFOENUMERATOR_H +#pragma once #include #include @@ -13,6 +6,7 @@ #include "controllers/controllerpresetinfo.h" +/// Enumerate list of available controller mapping presets class PresetInfoEnumerator { public: PresetInfoEnumerator(const QString& searchPath); @@ -30,5 +24,3 @@ class PresetInfoEnumerator { QList m_midiPresets; QList m_bulkPresets; }; - -#endif diff --git a/src/controllers/controllerpresetvisitor.h b/src/controllers/controllerpresetvisitor.h index 9fc30fc46a2a..09ae573cb459 100644 --- a/src/controllers/controllerpresetvisitor.h +++ b/src/controllers/controllerpresetvisitor.h @@ -1,5 +1,4 @@ -#ifndef CONTROLLERPRESETVISITOR_H -#define CONTROLLERPRESETVISITOR_H +#pragma once class MidiControllerPreset; class HidControllerPreset; @@ -17,5 +16,3 @@ class ConstControllerPresetVisitor { virtual void visit(const MidiControllerPreset* preset) = 0; virtual void visit(const HidControllerPreset* preset) = 0; }; - -#endif /* CONTROLLERPRESETVISITOR_H */ diff --git a/src/controllers/controllervisitor.h b/src/controllers/controllervisitor.h index 3c3b2dfbb88c..9a236fcc8af8 100644 --- a/src/controllers/controllervisitor.h +++ b/src/controllers/controllervisitor.h @@ -1,5 +1,4 @@ -#ifndef CONTROLLERVISITOR_H -#define CONTROLLERVISITOR_H +#pragma once class MidiController; class HidController; @@ -11,5 +10,3 @@ class ControllerVisitor { virtual void visit(HidController* controller) = 0; virtual void visit(BulkController* controller) = 0; }; - -#endif /* CONTROLLERVISITOR_H */ diff --git a/src/controllers/controlpickermenu.h b/src/controllers/controlpickermenu.h index 9ca64a4dded5..62b9430388b1 100644 --- a/src/controllers/controlpickermenu.h +++ b/src/controllers/controlpickermenu.h @@ -1,5 +1,4 @@ -#ifndef CONTROLPICKERMENU_H -#define CONTROLPICKERMENU_H +#pragma once #include #include @@ -110,5 +109,3 @@ class ControlPickerMenu : public QMenu { QHash m_descriptionsByKey; QHash m_titlesByKey; }; - -#endif /* CONTROLPICKERMENU_H */ diff --git a/src/controllers/defs_controllers.h b/src/controllers/defs_controllers.h index fe44cc61091c..49e36a88238f 100644 --- a/src/controllers/defs_controllers.h +++ b/src/controllers/defs_controllers.h @@ -1,12 +1,4 @@ -/*************************************************************************** - defs_controllers.h - ------------------ - copyright : (C) 2011 by Sean Pappalardo - email : spappalardo@mixxx.org - ***************************************************************************/ - -#ifndef DEFS_CONTROLLERS_H -#define DEFS_CONTROLLERS_H +#pragma once #include #include "preferences/usersettings.h" @@ -35,5 +27,3 @@ inline QString userPresetsPath(UserSettingsPointer pConfig) { #define BULK_PRESET_EXTENSION ".bulk.xml" #define REQUIRED_SCRIPT_FILE "common-controller-scripts.js" #define XML_SCHEMA_VERSION "1" - -#endif /* DEFS_CONTROLLERS_H */ diff --git a/src/controllers/delegates/controldelegate.h b/src/controllers/delegates/controldelegate.h index 633e454c5324..3ca6954b1c07 100644 --- a/src/controllers/delegates/controldelegate.h +++ b/src/controllers/delegates/controldelegate.h @@ -1,5 +1,4 @@ -#ifndef CONTROLDELEGATE_H -#define CONTROLDELEGATE_H +#pragma once #include @@ -36,5 +35,3 @@ class ControlDelegate : public QStyledItemDelegate { // can't check there. mutable bool m_bIsIndexScript; }; - -#endif /* CONTROLDELEGATE_H */ diff --git a/src/controllers/delegates/midibytedelegate.h b/src/controllers/delegates/midibytedelegate.h index 140cd2e33b62..83700de56b34 100644 --- a/src/controllers/delegates/midibytedelegate.h +++ b/src/controllers/delegates/midibytedelegate.h @@ -1,5 +1,4 @@ -#ifndef MIDIBYTEDELEGATE_H -#define MIDIBYTEDELEGATE_H +#pragma once #include @@ -18,5 +17,3 @@ class MidiByteDelegate : public QStyledItemDelegate { void setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const; }; - -#endif /* MIDIBYTEDELEGATE_H */ diff --git a/src/controllers/delegates/midichanneldelegate.h b/src/controllers/delegates/midichanneldelegate.h index 7e739834a7e4..b6dd7c7e5636 100644 --- a/src/controllers/delegates/midichanneldelegate.h +++ b/src/controllers/delegates/midichanneldelegate.h @@ -1,5 +1,4 @@ -#ifndef MIDICHANNELDELEGATE_H -#define MIDICHANNELDELEGATE_H +#pragma once #include @@ -18,5 +17,3 @@ class MidiChannelDelegate : public QStyledItemDelegate { void setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const; }; - -#endif /* MIDICHANNELDELEGATE_H */ diff --git a/src/controllers/delegates/midiopcodedelegate.h b/src/controllers/delegates/midiopcodedelegate.h index f2dcd5a4acb1..0b9963bd5a08 100644 --- a/src/controllers/delegates/midiopcodedelegate.h +++ b/src/controllers/delegates/midiopcodedelegate.h @@ -1,5 +1,4 @@ -#ifndef MIDIOPCODEDELEGATE_H -#define MIDIOPCODEDELEGATE_H +#pragma once #include @@ -18,5 +17,3 @@ class MidiOpCodeDelegate : public QStyledItemDelegate { void setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const; }; - -#endif /* MIDIOPCODEDELEGATE_H */ diff --git a/src/controllers/delegates/midioptionsdelegate.h b/src/controllers/delegates/midioptionsdelegate.h index d67957d41d0a..636de75003be 100644 --- a/src/controllers/delegates/midioptionsdelegate.h +++ b/src/controllers/delegates/midioptionsdelegate.h @@ -1,5 +1,4 @@ -#ifndef MIDIOPTIONSDELEGATE_H -#define MIDIOPTIONSDELEGATE_H +#pragma once #include #include @@ -22,5 +21,3 @@ class MidiOptionsDelegate : public QStyledItemDelegate { void setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const; }; - -#endif /* MIDIOPTIONSDELEGATE_H */ diff --git a/src/controllers/dlgcontrollerlearning.cpp b/src/controllers/dlgcontrollerlearning.cpp index fed032650d4b..d11b6597e9f0 100644 --- a/src/controllers/dlgcontrollerlearning.cpp +++ b/src/controllers/dlgcontrollerlearning.cpp @@ -1,11 +1,3 @@ -/** -* @file dlgcontrollerlearning.cpp -* @author Sean M. Pappalardo spappalardo@mixxx.org -* @date Thu 12 Apr 2012 -* @brief The controller mapping learning wizard -* -*/ - #include "controllers/dlgcontrollerlearning.h" #include diff --git a/src/controllers/dlgcontrollerlearning.h b/src/controllers/dlgcontrollerlearning.h index c5f19e990805..1323de677bc8 100644 --- a/src/controllers/dlgcontrollerlearning.h +++ b/src/controllers/dlgcontrollerlearning.h @@ -1,12 +1,4 @@ -/** -* @file dlgcontrollerlearning.h -* @author Sean M. Pappalardo spappalardo@mixxx.org -* @date Thu 12 Apr 2012 -* @brief The controller mapping learning wizard -* -*/ -#ifndef DLGCONTROLLERLEARNING_H -#define DLGCONTROLLERLEARNING_H +#pragma once #include #include @@ -29,6 +21,7 @@ class ControllerPreset; //#define CONTROLLERLESSTESTING +/// The controller mapping learning wizard class DlgControllerLearning : public QDialog, public ControllerVisitor, public Ui::DlgControllerLearning { @@ -99,5 +92,3 @@ class DlgControllerLearning : public QDialog, QList > m_messages; MidiInputMappings m_mappings; }; - -#endif diff --git a/src/controllers/dlgprefcontroller.cpp b/src/controllers/dlgprefcontroller.cpp index e5962baa2c06..34964ae2c87d 100644 --- a/src/controllers/dlgprefcontroller.cpp +++ b/src/controllers/dlgprefcontroller.cpp @@ -1,10 +1,3 @@ -/** -* @file dlgprefcontroller.cpp -* @author Sean M. Pappalardo spappalardo@mixxx.org -* @date Mon May 2 2011 -* @brief Configuration dialog for a DJ controller -*/ - #include "controllers/dlgprefcontroller.h" #include diff --git a/src/controllers/dlgprefcontroller.h b/src/controllers/dlgprefcontroller.h index 844e61f26201..8b114d9719ad 100644 --- a/src/controllers/dlgprefcontroller.h +++ b/src/controllers/dlgprefcontroller.h @@ -1,10 +1,4 @@ -/// @file dlgprefcontroller.h -/// @author Sean M. Pappalardo spappalardo@mixxx.org -/// @date Mon May 2 2011 -/// @brief Configuration dialog for a single DJ controller - -#ifndef DLGPREFCONTROLLER_H -#define DLGPREFCONTROLLER_H +#pragma once #include #include @@ -23,6 +17,7 @@ class Controller; class ControllerManager; class PresetInfoEnumerator; +/// Configuration dialog for a single DJ controller class DlgPrefController : public DlgPreferencePage { Q_OBJECT public: @@ -122,5 +117,3 @@ class DlgPrefController : public DlgPreferencePage { QSortFilterProxyModel* m_pOutputProxyModel; bool m_bDirty; }; - -#endif /*DLGPREFCONTROLLER_H*/ diff --git a/src/controllers/hid/hidcontroller.cpp b/src/controllers/hid/hidcontroller.cpp index bdda52441a9d..fbddbab6580b 100644 --- a/src/controllers/hid/hidcontroller.cpp +++ b/src/controllers/hid/hidcontroller.cpp @@ -1,5 +1,7 @@ #include "controllers/hid/hidcontroller.h" +#include + #include "controllers/controllerdebug.h" #include "controllers/defs_controllers.h" #include "controllers/hid/hidcontrollerpresetfilehandler.h" diff --git a/src/controllers/hid/hidcontroller.h b/src/controllers/hid/hidcontroller.h index 9300e495af45..5d51cb0d8063 100644 --- a/src/controllers/hid/hidcontroller.h +++ b/src/controllers/hid/hidcontroller.h @@ -5,6 +5,7 @@ #include "controllers/hid/hiddevice.h" #include "util/duration.h" +/// HID controller backend class HidController final : public Controller { Q_OBJECT public: diff --git a/src/controllers/hid/hidcontrollerpreset.cpp b/src/controllers/hid/hidcontrollerpreset.cpp index 5bcbd327255a..562847e75cb3 100644 --- a/src/controllers/hid/hidcontrollerpreset.cpp +++ b/src/controllers/hid/hidcontrollerpreset.cpp @@ -1,7 +1,4 @@ -/// @file hidcontrollerpreset.cpp -/// @author Jan Holthuis holzhaus@mixxx.org -/// @date Mon 8 Apr 2020 -/// @brief HID/Bulk Controller Preset +/// HID/Bulk Controller Preset /// /// This class represents a HID or Bulk controller preset, containing the data /// elements that make it up. diff --git a/src/controllers/hid/hidcontrollerpreset.h b/src/controllers/hid/hidcontrollerpreset.h index 08aed7972297..3291b8caee5a 100644 --- a/src/controllers/hid/hidcontrollerpreset.h +++ b/src/controllers/hid/hidcontrollerpreset.h @@ -1,6 +1,4 @@ #pragma once -/// @file hidcontrollerpreset.h -/// @brief HID/Bulk Controller Preset #include "controllers/controllerpreset.h" #include "controllers/controllerpresetvisitor.h" diff --git a/src/controllers/hid/hidcontrollerpresetfilehandler.h b/src/controllers/hid/hidcontrollerpresetfilehandler.h index 7f99f56481d4..5baffd229d36 100644 --- a/src/controllers/hid/hidcontrollerpresetfilehandler.h +++ b/src/controllers/hid/hidcontrollerpresetfilehandler.h @@ -1,5 +1,4 @@ -#ifndef HIDCONTROLLERPRESETFILEHANDLER_H -#define HIDCONTROLLERPRESETFILEHANDLER_H +#pragma once #include "controllers/hid/hidcontrollerpreset.h" #include "controllers/controllerpresetfilehandler.h" @@ -16,5 +15,3 @@ class HidControllerPresetFileHandler : public ControllerPresetFileHandler { const QString& filePath, const QDir& systemPresetsPath); }; - -#endif /* HIDCONTROLLERPRESETFILEHANDLER_H */ diff --git a/src/controllers/hid/hidenumerator.h b/src/controllers/hid/hidenumerator.h index c2e7bd8202b2..6d35a22a2c52 100644 --- a/src/controllers/hid/hidenumerator.h +++ b/src/controllers/hid/hidenumerator.h @@ -1,15 +1,9 @@ -/** -* @file hidenumerator.h -* @author Sean Pappalardo spappalardo@mixxx.org -* @date Sat Apr 30 2011 -* @brief This class handles discovery and enumeration of DJ controllers that use the USB-HID protocol -*/ - -#ifndef HIDENUMERATOR_H -#define HIDENUMERATOR_H +#pragma once #include "controllers/controllerenumerator.h" +/// This class handles discovery and enumeration of DJ controllers that use the +/// USB-HID protocol. class HidEnumerator : public ControllerEnumerator { public: HidEnumerator() = default; @@ -20,5 +14,3 @@ class HidEnumerator : public ControllerEnumerator { private: QList m_devices; }; - -#endif diff --git a/src/controllers/keyboard/keyboardeventfilter.h b/src/controllers/keyboard/keyboardeventfilter.h index 224250c542f0..b557a4a8c540 100644 --- a/src/controllers/keyboard/keyboardeventfilter.h +++ b/src/controllers/keyboard/keyboardeventfilter.h @@ -1,5 +1,4 @@ -#ifndef CONTROLLERS_KEYBOARD_KEYBOARDEVENTFILTER_H -#define CONTROLLERS_KEYBOARD_KEYBOARDEVENTFILTER_H +#pragma once #include #include @@ -47,5 +46,3 @@ class KeyboardEventFilter : public QObject { // Multi-hash of key sequence to QMultiHash m_keySequenceToControlHash; }; - -#endif // CONTROLLERS_KEYBOARD_KEYBOARDEVENTFILTER_H diff --git a/src/controllers/learningutils.h b/src/controllers/learningutils.h index a82c102aaa39..575b395c6e7c 100644 --- a/src/controllers/learningutils.h +++ b/src/controllers/learningutils.h @@ -1,5 +1,4 @@ -#ifndef LEARNINGUTILS_H -#define LEARNINGUTILS_H +#pragma once #include #include @@ -12,5 +11,3 @@ class LearningUtils { const ConfigKey& control, const QList >& messages); }; - -#endif /* LEARNINGUTILS_H */ diff --git a/src/controllers/midi/hss1394controller.cpp b/src/controllers/midi/hss1394controller.cpp index 7acf885eaa32..d35554bd29ba 100644 --- a/src/controllers/midi/hss1394controller.cpp +++ b/src/controllers/midi/hss1394controller.cpp @@ -1,10 +1,3 @@ -/** - * @file hss1394controller.cpp - * @author Sean M. Pappalardo spappalardo@mixxx.org - * @date Thu 15 Mar 2012 - * @brief HSS1394-based MIDI backend - */ - #include "controllers/midi/hss1394controller.h" #include "controllers/controllerdebug.h" diff --git a/src/controllers/midi/hss1394controller.h b/src/controllers/midi/hss1394controller.h index df67cdb64753..622316eadfce 100644 --- a/src/controllers/midi/hss1394controller.h +++ b/src/controllers/midi/hss1394controller.h @@ -1,18 +1,4 @@ -/** - * @file hss1394controller.h - * @author Sean M. Pappalardo spappalardo@mixxx.org - * @date Thu 15 Mar 2012 - * @brief HSS1394-based MIDI backend - * - * This class represents a physical HSS1394 device. - * (HSS1394 is simply a way to send MIDI messages at high speed over - * IEEE1394 (FireWire)) - * It uses the HSS1394 API to send and receive MIDI messages to/from - * the device. - */ - -#ifndef HSS1394CONTROLLER_H -#define HSS1394CONTROLLER_H +#pragma once #include @@ -22,6 +8,11 @@ #define MIXXX_HSS1394_BUFFER_LEN 64 /**Number of MIDI messages to buffer*/ #define MIXXX_HSS1394_NO_DEVICE_STRING "None" /**String to display for no HSS1394 devices present */ +/// HSS1394-based MIDI backend +/// +/// This class represents a physical HSS1394 device. (HSS1394 is simply a way +/// to send MIDI messages at high speed over IEEE1394 (FireWire)) It uses the +/// HSS1394 API to send and receive MIDI messages to/from the device. class DeviceChannelListener : public QObject, public hss1394::ChannelListener { Q_OBJECT public: @@ -69,5 +60,3 @@ class Hss1394Controller : public MidiController { hss1394::Channel* m_pChannel; DeviceChannelListener *m_pChannelListener; }; - -#endif diff --git a/src/controllers/midi/hss1394enumerator.cpp b/src/controllers/midi/hss1394enumerator.cpp index a5201e964f12..76a120c9701c 100644 --- a/src/controllers/midi/hss1394enumerator.cpp +++ b/src/controllers/midi/hss1394enumerator.cpp @@ -1,9 +1,3 @@ -/** -* @file hss1394enumerator.cpp -* @author Sean Pappalardo spappalardo@mixxx.org -* @date Thu 15 Mar 2012 -*/ - #include "controllers/midi/hss1394enumerator.h" #include diff --git a/src/controllers/midi/hss1394enumerator.h b/src/controllers/midi/hss1394enumerator.h index 5b52a9c0a690..725aaba5f1f8 100644 --- a/src/controllers/midi/hss1394enumerator.h +++ b/src/controllers/midi/hss1394enumerator.h @@ -1,15 +1,9 @@ -/** -* @file hss1394enumerator.h -* @author Sean Pappalardo spappalardo@mixxx.org -* @date Thu 15 Mar 2012 -* @brief This class handles discovery and enumeration of DJ controllers that appear under the HSS1394 cross-platform API. -*/ - -#ifndef HSS1394ENUMERATOR_H -#define HSS1394ENUMERATOR_H +#pragma once #include "controllers/midi/midienumerator.h" +// Handles discovery and enumeration of DJ controllers that appear under the +// HSS1394 cross-platform API. class Hss1394Enumerator : public MidiEnumerator { Q_OBJECT public: @@ -22,5 +16,3 @@ class Hss1394Enumerator : public MidiEnumerator { UserSettingsPointer m_pConfig; QList m_devices; }; - -#endif diff --git a/src/controllers/midi/midicontroller.cpp b/src/controllers/midi/midicontroller.cpp index 69f0184534aa..6a6f7021ee2d 100644 --- a/src/controllers/midi/midicontroller.cpp +++ b/src/controllers/midi/midicontroller.cpp @@ -1,11 +1,3 @@ -/** - * @file midicontroller.cpp - * @author Sean Pappalardo spappalardo@mixxx.org - * @date Tue 7 Feb 2012 - * @brief MIDI Controller base class - * - */ - #include "controllers/midi/midicontroller.h" #include "control/controlobject.h" diff --git a/src/controllers/midi/midicontroller.h b/src/controllers/midi/midicontroller.h index 0cc39139a3a0..f3e5a1f971a6 100644 --- a/src/controllers/midi/midicontroller.h +++ b/src/controllers/midi/midicontroller.h @@ -1,17 +1,4 @@ -/** -* @file midicontroller.h -* @author Sean Pappalardo spappalardo@mixxx.org -* @date Tue 7 Feb 2012 -* @brief MIDI Controller base class -* -* This is a base class representing a MIDI controller. -* It must be inherited by a class that implements it on some API. -* -* Note that the subclass' destructor should call close() at a minimum. -*/ - -#ifndef MIDICONTROLLER_H -#define MIDICONTROLLER_H +#pragma once #include "controllers/controller.h" #include "controllers/midi/midicontrollerpreset.h" @@ -20,6 +7,14 @@ #include "controllers/midi/midioutputhandler.h" #include "controllers/softtakeover.h" +class DlgControllerLearning; + +/// MIDI Controller base class +/// +/// This is a base class representing a MIDI controller. +/// It must be inherited by a class that implements it on some API. +/// +/// Note that the subclass' destructor should call close() at a minimum. class MidiController : public Controller { Q_OBJECT public: @@ -49,11 +44,10 @@ class MidiController : public Controller { return m_preset.isMappable(); } - bool matchPreset(const PresetInfo& preset) override; + bool matchPreset(const PresetInfo& preset) override; signals: - void messageReceived(unsigned char status, unsigned char control, - unsigned char value); + void messageReceived(unsigned char status, unsigned char control, unsigned char value); protected: virtual void sendShortMsg(unsigned char status, @@ -69,15 +63,17 @@ class MidiController : public Controller { } protected slots: - virtual void receive(unsigned char status, unsigned char control, - unsigned char value, mixxx::Duration timestamp); + virtual void receive(unsigned char status, + unsigned char control, + unsigned char value, + mixxx::Duration timestamp); // For receiving System Exclusive messages void receive(const QByteArray& data, mixxx::Duration timestamp) override; int close() override; private slots: /// Apply the preset to the controller. - /// @brief Initializes both controller engine and static output mappings. + /// Initializes both controller engine and static output mappings. /// /// @param initializeScripts Can be set to false to skip script /// initialization for unit tests. @@ -145,5 +141,3 @@ class MidiControllerJSProxy : public ControllerJSProxy { private: MidiController* m_pMidiController; }; - -#endif diff --git a/src/controllers/midi/midicontrollerpreset.cpp b/src/controllers/midi/midicontrollerpreset.cpp index 844746f50dba..bbeadc97c6bd 100644 --- a/src/controllers/midi/midicontrollerpreset.cpp +++ b/src/controllers/midi/midicontrollerpreset.cpp @@ -1,11 +1,3 @@ -/// @file midicontrollerpreset.cpp -/// @author Jan Holthuis holzhaus@mixxx.org -/// @date Wed 8 Apr 2020 -/// @brief MIDI Controller Preset -/// -/// This class represents a MIDI controller preset, containing the data elements -/// that make it up. - #include "controllers/midi/midicontrollerpreset.h" #include "controllers/defs_controllers.h" diff --git a/src/controllers/midi/midicontrollerpreset.h b/src/controllers/midi/midicontrollerpreset.h index f077f0f8f33c..a001996fd78a 100644 --- a/src/controllers/midi/midicontrollerpreset.h +++ b/src/controllers/midi/midicontrollerpreset.h @@ -1,8 +1,4 @@ #pragma once -/// @file midicontrollerpreset.h -/// @author Sean Pappalardo spappalardo@mixxx.org -/// @date Mon 9 Apr 2012 -/// @brief MIDI Controller preset #include @@ -10,8 +6,8 @@ #include "controllers/controllerpresetvisitor.h" #include "controllers/midi/midimessage.h" -/// This class represents a MIDI controller preset, containing the data elements -/// that make it up. +/// Represents a MIDI controller preset, containing the data elements that make +/// it up. class MidiControllerPreset : public ControllerPreset { public: MidiControllerPreset(){}; diff --git a/src/controllers/midi/midicontrollerpresetfilehandler.cpp b/src/controllers/midi/midicontrollerpresetfilehandler.cpp index fddafd929a74..838b915482f7 100644 --- a/src/controllers/midi/midicontrollerpresetfilehandler.cpp +++ b/src/controllers/midi/midicontrollerpresetfilehandler.cpp @@ -1,11 +1,3 @@ -/** -* @file midicontrollerpresetfilehandler.cpp -* @author Sean Pappalardo spappalardo@mixxx.org -* @date Mon 9 Apr 2012 -* @brief Handles loading and saving of MIDI controller presets. -* -*/ - #include "controllers/midi/midicontrollerpresetfilehandler.h" #include "controllers/midi/midiutils.h" diff --git a/src/controllers/midi/midicontrollerpresetfilehandler.h b/src/controllers/midi/midicontrollerpresetfilehandler.h index ad7c43419e0b..44d82dd373d8 100644 --- a/src/controllers/midi/midicontrollerpresetfilehandler.h +++ b/src/controllers/midi/midicontrollerpresetfilehandler.h @@ -1,16 +1,9 @@ -/** - * @file midicontrollerpresetfilehandler.h - * @author Sean Pappalardo spappalardo@mixxx.org - * @date Mon 9 Apr 2012 - * @brief Handles loading and saving of MIDI controller presets. - */ - -#ifndef MIDICONTROLLERPRESETFILEHANDLER_H -#define MIDICONTROLLERPRESETFILEHANDLER_H +#pragma once #include "controllers/controllerpresetfilehandler.h" #include "controllers/midi/midicontrollerpreset.h" +/// Handles loading and saving of MIDI controller presets. class MidiControllerPresetFileHandler : public ControllerPresetFileHandler { public: MidiControllerPresetFileHandler() {}; @@ -36,5 +29,3 @@ class MidiControllerPresetFileHandler : public ControllerPresetFileHandler { QDomElement outputMappingToXML(QDomDocument* doc, const MidiOutputMapping& mapping) const; }; - -#endif diff --git a/src/controllers/midi/midimessage.h b/src/controllers/midi/midimessage.h index 2587603cb55f..80ad2d5fac3c 100644 --- a/src/controllers/midi/midimessage.h +++ b/src/controllers/midi/midimessage.h @@ -1,5 +1,4 @@ -#ifndef MIDIMESSAGE_H -#define MIDIMESSAGE_H +#pragma once #include #include @@ -193,5 +192,3 @@ struct MidiOutputMapping { QString description; }; typedef QList MidiOutputMappings; - -#endif diff --git a/src/controllers/midi/midioutputhandler.cpp b/src/controllers/midi/midioutputhandler.cpp index 1d38401c783e..bf3bb4dc0126 100644 --- a/src/controllers/midi/midioutputhandler.cpp +++ b/src/controllers/midi/midioutputhandler.cpp @@ -1,11 +1,3 @@ -/** - * @file midioutputhandler.cpp - * @author Sean Pappalardo spappalardo@mixxx.org - * @date Tue 11 Feb 2012 - * @brief MIDI output mapping handler - * - */ - #include "controllers/midi/midioutputhandler.h" #include diff --git a/src/controllers/midi/midioutputhandler.h b/src/controllers/midi/midioutputhandler.h index 9b1230b8e543..dc64911d029c 100644 --- a/src/controllers/midi/midioutputhandler.h +++ b/src/controllers/midi/midioutputhandler.h @@ -1,21 +1,14 @@ -/** - * @file midioutputhandler.h - * @author Sean Pappalardo spappalardo@mixxx.org - * @date Tue 11 Feb 2012 - * @brief Static MIDI output mapping handler - * - * This class listens to a control object and sends a midi message based on the - * value. - */ - -#ifndef MIDIOUTPUTHANDLER_H -#define MIDIOUTPUTHANDLER_H +#pragma once #include "control/controlproxy.h" #include "controllers/midi/midimessage.h" class MidiController; +/// Static MIDI output mapping handler +/// +/// This class listens to a control object and sends a midi message based on +/// the value. class MidiOutputHandler : public QObject { Q_OBJECT public: @@ -35,5 +28,3 @@ class MidiOutputHandler : public QObject { ControlProxy m_cos; int m_lastVal; }; - -#endif diff --git a/src/controllers/midi/midiutils.h b/src/controllers/midi/midiutils.h index 56e912929c3a..f2ab12ec40a6 100644 --- a/src/controllers/midi/midiutils.h +++ b/src/controllers/midi/midiutils.h @@ -1,5 +1,4 @@ -#ifndef MIDIUTILS_H -#define MIDIUTILS_H +#pragma once #include "controllers/midi/midimessage.h" #include "util/duration.h" @@ -48,6 +47,3 @@ class MidiUtils { const QByteArray& data, mixxx::Duration timestamp = mixxx::Duration::fromMillis(0)); }; - - -#endif /* MIDIUTILS_H */ diff --git a/src/controllers/midi/portmidicontroller.cpp b/src/controllers/midi/portmidicontroller.cpp index 12ec9bf53f4e..65ddd8dbff59 100644 --- a/src/controllers/midi/portmidicontroller.cpp +++ b/src/controllers/midi/portmidicontroller.cpp @@ -1,12 +1,3 @@ -/** - * @file portmidicontroller.h - * @author Albert Santoni alberts@mixxx.org - * @author Sean M. Pappalardo spappalardo@mixxx.org - * @date Thu 15 Mar 2012 - * @brief PortMidi-based MIDI backend - * - */ - #include "controllers/midi/portmidicontroller.h" #include "controllers/controllerdebug.h" diff --git a/src/controllers/midi/portmidicontroller.h b/src/controllers/midi/portmidicontroller.h index 45770edebdf8..25012eb1ac99 100644 --- a/src/controllers/midi/portmidicontroller.h +++ b/src/controllers/midi/portmidicontroller.h @@ -1,21 +1,4 @@ -/** - * @file portmidicontroller.h - * @author Albert Santoni alberts@mixxx.org - * @author Sean M. Pappalardo spappalardo@mixxx.org - * @date Thu 15 Mar 2012 - * @brief PortMidi-based MIDI backend - * - * This class is represents a MIDI device, either physical or software. - * It uses the PortMidi API to send and receive MIDI messages to/from the device. - * It's important to note that PortMidi treats input and output on a single - * physical device as two separate half-duplex devices. In this class, we wrap - * those together into a single device, which is why the constructor takes - * both arguments pertaining to both input and output "devices". - * - */ - -#ifndef PORTMIDICONTROLLER_H -#define PORTMIDICONTROLLER_H +#pragma once #include @@ -55,7 +38,14 @@ // String to display for no MIDI devices present #define MIXXX_PORTMIDI_NO_DEVICE_STRING "None" -// A PortMidi-based implementation of MidiController +/// PortMidi-based implementation of MidiController +/// +/// This class is represents a MIDI device, either physical or software. +/// It uses the PortMidi API to send and receive MIDI messages to/from the device. +/// It's important to note that PortMidi treats input and output on a single +/// physical device as two separate half-duplex devices. In this class, we wrap +/// those together into a single device, which is why the constructor takes +/// both arguments pertaining to both input and output "devices". class PortMidiController : public MidiController { Q_OBJECT public: @@ -104,5 +94,3 @@ class PortMidiController : public MidiController { friend class PortMidiControllerTest; }; - -#endif diff --git a/src/controllers/midi/portmididevice.h b/src/controllers/midi/portmididevice.h index 071ddee38a4c..bda613ab3e7f 100644 --- a/src/controllers/midi/portmididevice.h +++ b/src/controllers/midi/portmididevice.h @@ -1,5 +1,4 @@ -#ifndef CONTROLLERS_MIDI_PORTMIDIDEVICE -#define CONTROLLERS_MIDI_PORTMIDIDEVICE +#pragma once #include @@ -72,5 +71,3 @@ class PortMidiDevice { int m_deviceIndex; PortMidiStream* m_pStream; }; - -#endif /* CONTROLLERS_MIDI_PORTMIDIDEVICE */ diff --git a/src/controllers/midi/portmidienumerator.cpp b/src/controllers/midi/portmidienumerator.cpp index 047cda64fd07..4958ca826813 100644 --- a/src/controllers/midi/portmidienumerator.cpp +++ b/src/controllers/midi/portmidienumerator.cpp @@ -1,10 +1,3 @@ -/** -* @file portmidienumerator.cpp -* @author Sean Pappalardo spappalardo@mixxx.org -* @date Thu 15 Mar 2012 -* @brief This class handles discovery and enumeration of DJ controller devices that appear under the PortMIDI cross-platform API. -*/ - #include "controllers/midi/portmidienumerator.h" #include diff --git a/src/controllers/midi/portmidienumerator.h b/src/controllers/midi/portmidienumerator.h index 6be217dfe4e3..21548c90dd3a 100644 --- a/src/controllers/midi/portmidienumerator.h +++ b/src/controllers/midi/portmidienumerator.h @@ -1,15 +1,8 @@ -/** - * @file portmidienumerator.h - * @author Sean Pappalardo spappalardo@mixxx.org - * @date Thu 15 Mar 2012 - * @brief This class handles discovery and enumeration of DJ controllers that appear under the PortMIDI cross-platform API. - */ - -#ifndef PORTMIDIENUMERATOR_H -#define PORTMIDIENUMERATOR_H +#pragma once #include "controllers/midi/midienumerator.h" +/// This class handles discovery and enumeration of DJ controllers that appear under the PortMIDI cross-platform API. class PortMidiEnumerator : public MidiEnumerator { Q_OBJECT public: @@ -25,5 +18,3 @@ class PortMidiEnumerator : public MidiEnumerator { // For testing. bool shouldLinkInputToOutput(const QString& input_name, const QString& output_name); - -#endif diff --git a/src/controllers/softtakeover.cpp b/src/controllers/softtakeover.cpp index eea05b569109..e0211fde4460 100644 --- a/src/controllers/softtakeover.cpp +++ b/src/controllers/softtakeover.cpp @@ -1,11 +1,3 @@ -/*************************************************************************** - softtakeover.cpp - description - ---------------- - begin : Sat Mar 26 2011 - copyright : (C) 2011 by Sean M. Pappalardo - email : spappalardo@mixxx.org - ***************************************************************************/ - #include "controllers/softtakeover.h" #include "control/controlpotmeter.h" #include "util/math.h" diff --git a/src/controllers/softtakeover.h b/src/controllers/softtakeover.h index 6a5183df7065..ba439b82ad31 100644 --- a/src/controllers/softtakeover.h +++ b/src/controllers/softtakeover.h @@ -1,13 +1,4 @@ -/*************************************************************************** - softtakeover.h - description - -------------- - begin : Thu Mar 17 2011 - copyright : (C) 2011 by Sean M. Pappalardo - email : spappalardo@mixxx.org - ***************************************************************************/ - -#ifndef SOFTTAKEOVER_H -#define SOFTTAKEOVER_H +#pragma once #include @@ -63,5 +54,3 @@ class SoftTakeoverCtrl { private: QHash m_softTakeoverHash; }; - -#endif diff --git a/src/database/mixxxdb.h b/src/database/mixxxdb.h index 9899e05b8988..d02a7c22803b 100644 --- a/src/database/mixxxdb.h +++ b/src/database/mixxxdb.h @@ -1,6 +1,4 @@ -#ifndef MIXXXDB_H -#define MIXXXDB_H - +#pragma once #include @@ -33,6 +31,3 @@ class MixxxDb : public QObject { private: mixxx::DbConnectionPoolPtr m_pDbConnectionPool; }; - - -#endif // MIXXXDB_H diff --git a/src/defs_urls.h b/src/defs_urls.h index 876d9a08a58c..4e96c42afe36 100644 --- a/src/defs_urls.h +++ b/src/defs_urls.h @@ -1,21 +1,4 @@ -/*************************************************************************** - defs_urls.h - description - ------------------- - copyright : (C) 2008 by Albert santoni - email : - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -#ifndef DEFS_URLS_H -#define DEFS_URLS_H +#pragma once #define MIXXX_WEBSITE_URL "https://www.mixxx.org" #define MIXXX_SUPPORT_URL "https://www.mixxx.org/support/" @@ -46,5 +29,3 @@ #define MIXXX_MANUAL_VINYL_URL \ MIXXX_MANUAL_URL "/chapters/vinyl_control.html#configuring-vinyl-control" #define MIXXX_MANUAL_FILENAME "Mixxx-Manual.pdf" - -#endif diff --git a/src/defs_version.h b/src/defs_version.h index 4eff317cbf93..73162f722f2b 100644 --- a/src/defs_version.h +++ b/src/defs_version.h @@ -1,19 +1,3 @@ -/*************************************************************************** - defs_version.h - description - -------------- - copyright : (C) 2010 by Sean Pappalardo - email : - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - // Doing this in its own file avoids needlessly rebuilding everything when just // the version number changes // diff --git a/src/dialog/dlgabout.h b/src/dialog/dlgabout.h index e0ecbe980c30..a704fc2c372c 100644 --- a/src/dialog/dlgabout.h +++ b/src/dialog/dlgabout.h @@ -1,5 +1,4 @@ -#ifndef DIALOG_DLGABOUT_H -#define DIALOG_DLGABOUT_H +#pragma once #include @@ -11,5 +10,3 @@ class DlgAbout : public QDialog, public Ui::DlgAboutDlg { public: DlgAbout(QWidget* parent); }; - -#endif // DIALOG_DLGABOUT_H diff --git a/src/dialog/dlgdevelopertools.h b/src/dialog/dlgdevelopertools.h index d36c65f769f1..f3e607eac4c4 100644 --- a/src/dialog/dlgdevelopertools.h +++ b/src/dialog/dlgdevelopertools.h @@ -1,5 +1,4 @@ -#ifndef DIALOG_DLGDEVELOPERTOOLS_H -#define DIALOG_DLGDEVELOPERTOOLS_H +#pragma once #include #include @@ -36,5 +35,3 @@ class DlgDeveloperTools : public QDialog, public Ui::DlgDeveloperTools { QFile m_logFile; QTextCursor m_logCursor; }; - -#endif // DIALOG_DLGDEVELOPERTOOLS_H diff --git a/src/effects/builtin/autopaneffect.h b/src/effects/builtin/autopaneffect.h index dc4141a8bee5..3538698e9f3a 100644 --- a/src/effects/builtin/autopaneffect.h +++ b/src/effects/builtin/autopaneffect.h @@ -1,5 +1,4 @@ -#ifndef AUTOPANEFFECT_H -#define AUTOPANEFFECT_H +#pragma once #include @@ -106,5 +105,3 @@ class AutoPanEffect : public EffectProcessorImpl { DISALLOW_COPY_AND_ASSIGN(AutoPanEffect); }; - -#endif /* AUTOPANEFFECT_H */ diff --git a/src/effects/builtin/balanceeffect.h b/src/effects/builtin/balanceeffect.h index 668409d16c1b..4562c93a0ea6 100644 --- a/src/effects/builtin/balanceeffect.h +++ b/src/effects/builtin/balanceeffect.h @@ -1,5 +1,4 @@ -#ifndef BALANCEEFFECT_H -#define BALANCEEFFECT_H +#pragma once #include "effects/effectprocessor.h" #include "engine/effects/engineeffect.h" @@ -54,5 +53,3 @@ class BalanceEffect : public EffectProcessorImpl { DISALLOW_COPY_AND_ASSIGN(BalanceEffect); }; - -#endif /* BALANCEEFFECT_H */ diff --git a/src/effects/builtin/bessel4lvmixeqeffect.h b/src/effects/builtin/bessel4lvmixeqeffect.h index 877cbd51fb1f..80cdef73b5cd 100644 --- a/src/effects/builtin/bessel4lvmixeqeffect.h +++ b/src/effects/builtin/bessel4lvmixeqeffect.h @@ -1,5 +1,4 @@ -#ifndef BESSEL4LVMIXEQEFFECT_H -#define BESSEL4LVMIXEQEFFECT_H +#pragma once #include @@ -57,5 +56,3 @@ class Bessel4LVMixEQEffect : public EffectProcessorImpl m_pLoFreqCorner; std::unique_ptr m_pHiFreqCorner; }; - -#endif // BIQUADFULLKILLEQEFFECT_H diff --git a/src/effects/builtin/bitcrushereffect.h b/src/effects/builtin/bitcrushereffect.h index 88d102719cc8..b7888032a655 100644 --- a/src/effects/builtin/bitcrushereffect.h +++ b/src/effects/builtin/bitcrushereffect.h @@ -1,5 +1,4 @@ -#ifndef BITCRUSHEREFFECT_H -#define BITCRUSHEREFFECT_H +#pragma once #include @@ -49,5 +48,3 @@ class BitCrusherEffect : public EffectProcessorImpl { DISALLOW_COPY_AND_ASSIGN(BitCrusherEffect); }; - -#endif /* BITCRUSHEREFFECT_H */ diff --git a/src/effects/builtin/builtinbackend.cpp b/src/effects/builtin/builtinbackend.cpp index 36e208f58dac..a974388b6617 100644 --- a/src/effects/builtin/builtinbackend.cpp +++ b/src/effects/builtin/builtinbackend.cpp @@ -1,4 +1,3 @@ - #include "effects/builtin/builtinbackend.h" #include diff --git a/src/effects/builtin/builtinbackend.h b/src/effects/builtin/builtinbackend.h index b797f293040e..1d34083ba8d9 100644 --- a/src/effects/builtin/builtinbackend.h +++ b/src/effects/builtin/builtinbackend.h @@ -1,5 +1,4 @@ -#ifndef BUILTINBACKEND_H -#define BUILTINBACKEND_H +#pragma once #include "effects/defs.h" #include "effects/effectsbackend.h" @@ -15,5 +14,3 @@ class BuiltInBackend : public EffectsBackend { return "BuiltInBackend"; } }; - -#endif /* BUILTINBACKEND_H */ diff --git a/src/effects/builtin/echoeffect.h b/src/effects/builtin/echoeffect.h index 876f623c23a3..a3a04fb617c5 100644 --- a/src/effects/builtin/echoeffect.h +++ b/src/effects/builtin/echoeffect.h @@ -1,5 +1,4 @@ -#ifndef ECHOEFFECT_H -#define ECHOEFFECT_H +#pragma once #include @@ -74,5 +73,3 @@ class EchoEffect : public EffectProcessorImpl { DISALLOW_COPY_AND_ASSIGN(EchoEffect); }; - -#endif /* ECHOEFFECT_H */ diff --git a/src/effects/builtin/equalizer_util.h b/src/effects/builtin/equalizer_util.h index 1ab188a826fe..96700ce59657 100644 --- a/src/effects/builtin/equalizer_util.h +++ b/src/effects/builtin/equalizer_util.h @@ -1,5 +1,4 @@ -#ifndef EFFECTS_BUILTIN_EQUALIZER_UTIL_H -#define EFFECTS_BUILTIN_EQUALIZER_UTIL_H +#pragma once #include @@ -92,6 +91,3 @@ class EqualizerUtil { "To adjust frequency shelves, go to Preferences -> Equalizers."); } }; - - -#endif /* EFFECTS_BUILTIN_EQUALIZER_UTIL_H */ diff --git a/src/effects/builtin/filtereffect.h b/src/effects/builtin/filtereffect.h index b37eaa5cb7b9..a7ba64c5570c 100644 --- a/src/effects/builtin/filtereffect.h +++ b/src/effects/builtin/filtereffect.h @@ -1,5 +1,4 @@ -#ifndef FILTEREFFECT_H -#define FILTEREFFECT_H +#pragma once #include "effects/effect.h" #include "effects/effectprocessor.h" @@ -54,5 +53,3 @@ class FilterEffect : public EffectProcessorImpl { DISALLOW_COPY_AND_ASSIGN(FilterEffect); }; - -#endif /* FILTEREFFECT_H */ diff --git a/src/effects/builtin/flangereffect.h b/src/effects/builtin/flangereffect.h index 08275c42d492..a942f90bc68f 100644 --- a/src/effects/builtin/flangereffect.h +++ b/src/effects/builtin/flangereffect.h @@ -1,5 +1,4 @@ -#ifndef FLANGEREFFECT_H -#define FLANGEREFFECT_H +#pragma once #include @@ -77,5 +76,3 @@ class FlangerEffect : public EffectProcessorImpl { DISALLOW_COPY_AND_ASSIGN(FlangerEffect); }; - -#endif /* FLANGEREFFECT_H */ diff --git a/src/effects/builtin/graphiceqeffect.h b/src/effects/builtin/graphiceqeffect.h index b4a721fbed2f..b4a3c40a745f 100644 --- a/src/effects/builtin/graphiceqeffect.h +++ b/src/effects/builtin/graphiceqeffect.h @@ -1,5 +1,4 @@ -#ifndef GRAPHICEQEFFECT_H -#define GRAPHICEQEFFECT_H +#pragma once #include @@ -58,5 +57,3 @@ class GraphicEQEffect : public EffectProcessorImpl { DISALLOW_COPY_AND_ASSIGN(GraphicEQEffect); }; - -#endif // GRAPHICEQEFFECT_H diff --git a/src/effects/builtin/linkwitzriley8eqeffect.h b/src/effects/builtin/linkwitzriley8eqeffect.h index 656119542f49..0bf85b3354ad 100644 --- a/src/effects/builtin/linkwitzriley8eqeffect.h +++ b/src/effects/builtin/linkwitzriley8eqeffect.h @@ -1,5 +1,4 @@ -#ifndef LINKWITZRILEYEQEFFECT_H -#define LINKWITZRILEYEQEFFECT_H +#pragma once #include @@ -73,5 +72,3 @@ class LinkwitzRiley8EQEffect : public EffectProcessorImpl @@ -46,5 +45,3 @@ class MetronomeEffect : public EffectProcessorImpl { DISALLOW_COPY_AND_ASSIGN(MetronomeEffect); }; - -#endif /* METRONOMEEFFECT_H */ diff --git a/src/effects/builtin/moogladder4filtereffect.h b/src/effects/builtin/moogladder4filtereffect.h index e6acf8d49877..8f269b4905a9 100644 --- a/src/effects/builtin/moogladder4filtereffect.h +++ b/src/effects/builtin/moogladder4filtereffect.h @@ -1,5 +1,4 @@ -#ifndef MOOGLADDER4FILTEREFFECT_H -#define MOOGLADDER4FILTEREFFECT_H +#pragma once #include "effects/effect.h" #include "effects/effectprocessor.h" @@ -54,5 +53,3 @@ class MoogLadder4FilterEffect : public EffectProcessorImpl #include @@ -65,5 +64,3 @@ class ParametricEQEffect : public EffectProcessorImpl { DISALLOW_COPY_AND_ASSIGN(PhaserEffect); }; - -#endif diff --git a/src/effects/builtin/reverbeffect.h b/src/effects/builtin/reverbeffect.h index 1883b536804d..5708c37dcae6 100644 --- a/src/effects/builtin/reverbeffect.h +++ b/src/effects/builtin/reverbeffect.h @@ -1,8 +1,7 @@ // Ported from CAPS Reverb. // This effect is GPL code. -#ifndef REVERBEFFECT_H -#define REVERBEFFECT_H +#pragma once #include @@ -61,5 +60,3 @@ class ReverbEffect : public EffectProcessorImpl { DISALLOW_COPY_AND_ASSIGN(ReverbEffect); }; - -#endif /* REVERBEFFECT_H */ diff --git a/src/effects/builtin/threebandbiquadeqeffect.h b/src/effects/builtin/threebandbiquadeqeffect.h index bf180f2cb221..308a3131d2cd 100644 --- a/src/effects/builtin/threebandbiquadeqeffect.h +++ b/src/effects/builtin/threebandbiquadeqeffect.h @@ -1,5 +1,4 @@ -#ifndef THREEBANDBIQUADEQEFFECT_H -#define THREEBANDBIQUADEQEFFECT_H +#pragma once #include "control/controlproxy.h" #include "effects/effect.h" @@ -79,5 +78,3 @@ class ThreeBandBiquadEQEffect : public EffectProcessorImpl m_pLoFreqCorner; std::unique_ptr m_pHiFreqCorner; }; - -#endif // THREEBANDBIQUADEQEFFECT_H diff --git a/src/effects/builtin/tremoloeffect.h b/src/effects/builtin/tremoloeffect.h index 571a02398f97..91ad1dee4180 100644 --- a/src/effects/builtin/tremoloeffect.h +++ b/src/effects/builtin/tremoloeffect.h @@ -1,5 +1,4 @@ -#ifndef TREMOLOEFFECT_H -#define TREMOLOEFFECT_H +#pragma once #include "effects/effectprocessor.h" #include "engine/effects/engineeffect.h" @@ -50,5 +49,3 @@ class TremoloEffect : public EffectProcessorImpl { DISALLOW_COPY_AND_ASSIGN(TremoloEffect); }; - -#endif /* TREMOLOEFFECT_H */ diff --git a/src/effects/effect.h b/src/effects/effect.h index 272cbfc3d109..be8fd0cd3072 100644 --- a/src/effects/effect.h +++ b/src/effects/effect.h @@ -1,5 +1,4 @@ -#ifndef EFFECT_H -#define EFFECT_H +#pragma once #include #include @@ -85,5 +84,3 @@ class Effect : public QObject { DISALLOW_COPY_AND_ASSIGN(Effect); }; - -#endif /* EFFECT_H */ diff --git a/src/effects/effectbuttonparameterslot.h b/src/effects/effectbuttonparameterslot.h index 20a2a1000855..7c5eb92fbbfa 100644 --- a/src/effects/effectbuttonparameterslot.h +++ b/src/effects/effectbuttonparameterslot.h @@ -1,5 +1,4 @@ -#ifndef EFFECTBUTTONPARAMETERSLOT_H -#define EFFECTBUTTONPARAMETERSLOT_H +#pragma once #include #include @@ -47,5 +46,3 @@ class EffectButtonParameterSlot : public EffectParameterSlotBase { DISALLOW_COPY_AND_ASSIGN(EffectButtonParameterSlot); }; - -#endif // EFFECTBUTTONPARAMETERSLOT_H diff --git a/src/effects/effectchain.h b/src/effects/effectchain.h index 16b0370db92a..c9f646f1fa3a 100644 --- a/src/effects/effectchain.h +++ b/src/effects/effectchain.h @@ -1,5 +1,4 @@ -#ifndef EFFECTCHAIN_H -#define EFFECTCHAIN_H +#pragma once #include #include @@ -128,5 +127,3 @@ class EffectChain : public QObject { DISALLOW_COPY_AND_ASSIGN(EffectChain); }; - -#endif /* EFFECTCHAIN_H */ diff --git a/src/effects/effectchainmanager.h b/src/effects/effectchainmanager.h index 2b7d6fc94a12..702b6c358b91 100644 --- a/src/effects/effectchainmanager.h +++ b/src/effects/effectchainmanager.h @@ -1,5 +1,4 @@ -#ifndef EFFECTCHAINMANAGER_H -#define EFFECTCHAINMANAGER_H +#pragma once #include #include @@ -85,5 +84,3 @@ class EffectChainManager : public QObject { QSet m_registeredOutputChannels; DISALLOW_COPY_AND_ASSIGN(EffectChainManager); }; - -#endif /* EFFECTCHAINMANAGER_H */ diff --git a/src/effects/effectchainslot.h b/src/effects/effectchainslot.h index 281f73f33d78..141c7eab4323 100644 --- a/src/effects/effectchainslot.h +++ b/src/effects/effectchainslot.h @@ -1,5 +1,4 @@ -#ifndef EFFECTCHAINSLOT_H -#define EFFECTCHAINSLOT_H +#pragma once #include #include @@ -169,6 +168,3 @@ class EffectChainSlot : public QObject { DISALLOW_COPY_AND_ASSIGN(EffectChainSlot); }; - - -#endif /* EFFECTCHAINSLOT_H */ diff --git a/src/effects/effectinstantiator.h b/src/effects/effectinstantiator.h index 38167a6d5931..50a029b3c037 100644 --- a/src/effects/effectinstantiator.h +++ b/src/effects/effectinstantiator.h @@ -1,5 +1,4 @@ -#ifndef EFFECTINSTANTIATOR_H -#define EFFECTINSTANTIATOR_H +#pragma once #include #include "effects/effectmanifest.h" @@ -50,5 +49,3 @@ class LV2EffectProcessorInstantiator : public EffectInstantiator { }; #endif /* __LILV__ */ - -#endif /* EFFECTINSTANTIATOR_H */ diff --git a/src/effects/effectmanifest.h b/src/effects/effectmanifest.h index 63337697972f..a09a57351b33 100644 --- a/src/effects/effectmanifest.h +++ b/src/effects/effectmanifest.h @@ -1,5 +1,4 @@ -#ifndef EFFECTMANIFEST_H -#define EFFECTMANIFEST_H +#pragma once #include #include @@ -195,5 +194,3 @@ class EffectManifest final { bool m_bAddDryToWet; double m_metaknobDefault; }; - -#endif /* EFFECTMANIFEST_H */ diff --git a/src/effects/effectmanifestparameter.h b/src/effects/effectmanifestparameter.h index c12caa626a72..52c5341ae69b 100644 --- a/src/effects/effectmanifestparameter.h +++ b/src/effects/effectmanifestparameter.h @@ -1,5 +1,4 @@ -#ifndef EFFECTMANIFESTPARAMETER_H -#define EFFECTMANIFESTPARAMETER_H +#pragma once #include #include @@ -259,5 +258,3 @@ class EffectManifestParameter { }; QDebug operator<<(QDebug dbg, const EffectManifestParameter& parameter); - -#endif /* EFFECTMANIFESTPARAMETER_H */ diff --git a/src/effects/effectparameter.h b/src/effects/effectparameter.h index f6565258fa10..60049f861435 100644 --- a/src/effects/effectparameter.h +++ b/src/effects/effectparameter.h @@ -1,5 +1,4 @@ -#ifndef EFFECTPARAMETER_H -#define EFFECTPARAMETER_H +#pragma once #include #include @@ -86,6 +85,3 @@ class EffectParameter : public QObject { DISALLOW_COPY_AND_ASSIGN(EffectParameter); }; - - -#endif /* EFFECTPARAMETER_H */ diff --git a/src/effects/effectparameterslot.h b/src/effects/effectparameterslot.h index fdb5ec9c9a53..77b29bf63606 100644 --- a/src/effects/effectparameterslot.h +++ b/src/effects/effectparameterslot.h @@ -1,5 +1,4 @@ -#ifndef EFFECTPARAMETERSLOT_H -#define EFFECTPARAMETERSLOT_H +#pragma once #include #include @@ -64,5 +63,3 @@ class EffectParameterSlot : public EffectParameterSlotBase { DISALLOW_COPY_AND_ASSIGN(EffectParameterSlot); }; - -#endif // EFFECTPARAMETERSLOT_H diff --git a/src/effects/effectparameterslotbase.h b/src/effects/effectparameterslotbase.h index e0ba8d954999..576d84d21115 100644 --- a/src/effects/effectparameterslotbase.h +++ b/src/effects/effectparameterslotbase.h @@ -1,5 +1,4 @@ -#ifndef EFFECTPARAMETERSLOTBASE_H -#define EFFECTPARAMETERSLOTBASE_H +#pragma once #include #include @@ -43,5 +42,3 @@ class EffectParameterSlotBase : public QObject { DISALLOW_COPY_AND_ASSIGN(EffectParameterSlotBase); }; - -#endif /* EFFECTPARAMETERSLOTBASE_H */ diff --git a/src/effects/effectprocessor.h b/src/effects/effectprocessor.h index b493511aa28b..3ece55553a67 100644 --- a/src/effects/effectprocessor.h +++ b/src/effects/effectprocessor.h @@ -1,6 +1,4 @@ - -#ifndef EFFECTPROCESSOR_H -#define EFFECTPROCESSOR_H +#pragma once #include #include @@ -275,5 +273,3 @@ class EffectProcessorImpl : public EffectProcessor { EffectsManager* m_pEffectsManager; ChannelHandleMap> m_channelStateMatrix; }; - -#endif /* EFFECTPROCESSOR_H */ diff --git a/src/effects/effectrack.h b/src/effects/effectrack.h index 09c6d064cde9..3e58625a2d9e 100644 --- a/src/effects/effectrack.h +++ b/src/effects/effectrack.h @@ -1,5 +1,4 @@ -#ifndef EFFECTRACK_H -#define EFFECTRACK_H +#pragma once #include #include @@ -251,5 +250,3 @@ class EqualizerRack : public PerGroupRack { return formatEffectChainSlotGroupString(iRackNumber, group); } }; - -#endif /* EFFECTRACK_H */ diff --git a/src/effects/effectsbackend.h b/src/effects/effectsbackend.h index e1d2c327b6c6..a3b16ea4ecdb 100644 --- a/src/effects/effectsbackend.h +++ b/src/effects/effectsbackend.h @@ -1,5 +1,4 @@ -#ifndef EFFECTSBACKEND_H -#define EFFECTSBACKEND_H +#pragma once #include #include @@ -72,5 +71,3 @@ class EffectsBackend : public QObject { QMap m_registeredEffects; QList m_effectIds; }; - -#endif /* EFFECTSBACKEND_H */ diff --git a/src/effects/effectslot.h b/src/effects/effectslot.h index 5db3a0aafe65..7225fcfea8c6 100644 --- a/src/effects/effectslot.h +++ b/src/effects/effectslot.h @@ -1,5 +1,4 @@ -#ifndef EFFECTSLOT_H -#define EFFECTSLOT_H +#pragma once #include #include @@ -135,5 +134,3 @@ class EffectSlot : public QObject { DISALLOW_COPY_AND_ASSIGN(EffectSlot); }; - -#endif /* EFFECTSLOT_H */ diff --git a/src/effects/effectsmanager.h b/src/effects/effectsmanager.h index c7d80fc76bd6..74af13feb15a 100644 --- a/src/effects/effectsmanager.h +++ b/src/effects/effectsmanager.h @@ -1,5 +1,4 @@ -#ifndef EFFECTSMANAGER_H -#define EFFECTSMANAGER_H +#pragma once #include #include @@ -143,6 +142,3 @@ class EffectsManager : public QObject { DISALLOW_COPY_AND_ASSIGN(EffectsManager); }; - - -#endif /* EFFECTSMANAGER_H */ diff --git a/src/effects/lv2/lv2backend.h b/src/effects/lv2/lv2backend.h index 1a8c3e747915..1d59d871295f 100644 --- a/src/effects/lv2/lv2backend.h +++ b/src/effects/lv2/lv2backend.h @@ -1,5 +1,4 @@ -#ifndef LV2BACKEND_H -#define LV2BACKEND_H +#pragma once #include "effects/defs.h" #include "effects/effectsbackend.h" @@ -32,5 +31,3 @@ class LV2Backend : public EffectsBackend { return "LV2Backend"; } }; - -#endif // LV2BACKEND_H diff --git a/src/effects/lv2/lv2effectprocessor.h b/src/effects/lv2/lv2effectprocessor.h index d59444696528..36dc5c5fb999 100644 --- a/src/effects/lv2/lv2effectprocessor.h +++ b/src/effects/lv2/lv2effectprocessor.h @@ -1,5 +1,4 @@ -#ifndef LV2EFFECTPROCESSOR_H -#define LV2EFFECTPROCESSOR_H +#pragma once #include "effects/effectprocessor.h" #include "effects/effectmanifest.h" @@ -68,6 +67,3 @@ class LV2EffectProcessor : public EffectProcessor { EffectsManager* m_pEffectsManager; ChannelHandleMap> m_channelStateMatrix; }; - - -#endif // LV2EFFECTPROCESSOR_H diff --git a/src/effects/lv2/lv2manifest.h b/src/effects/lv2/lv2manifest.h index dbb0fa1324e9..b550ab4b7c83 100644 --- a/src/effects/lv2/lv2manifest.h +++ b/src/effects/lv2/lv2manifest.h @@ -1,5 +1,4 @@ -#ifndef LV2MANIFEST_H -#define LV2MANIFEST_H +#pragma once #include "effects/effectmanifest.h" #include "effects/defs.h" @@ -43,5 +42,3 @@ class LV2Manifest { float* m_default; Status m_status; }; - -#endif // LV2MANIFEST_H diff --git a/src/encoder/encoder.cpp b/src/encoder/encoder.cpp index 3a1dc159a56c..81716bea3766 100644 --- a/src/encoder/encoder.cpp +++ b/src/encoder/encoder.cpp @@ -1,12 +1,5 @@ -/**************************************************************************** - encoder.cpp - encoder API for mixxx - ------------------- - copyright : (C) 2009 by Phillip Whelan - copyright : (C) 2010 by Tobias Rafreider - copyright : (C) 2017 by Josep Maria Antolín - ***************************************************************************/ - #include "encoder/encoder.h" + #include "preferences/usersettings.h" #include "recording/defs_recording.h" // TODO(XXX): __FFMPEGFILE_ENCODERS__ is currently undefined because diff --git a/src/encoder/encoder.h b/src/encoder/encoder.h index 5f918085a0a1..bc47f0cc812c 100644 --- a/src/encoder/encoder.h +++ b/src/encoder/encoder.h @@ -1,14 +1,4 @@ -/**************************************************************************** - encoder.h - encoder API for mixxx - ------------------- - copyright : (C) 2009 by Phillip Whelan - copyright : (C) 2010 by Tobias Rafreider - copyright : (C) 2017 by Josep Maria Antolín - ***************************************************************************/ - - -#ifndef ENCODER_H -#define ENCODER_H +#pragma once #include "util/memory.h" #include "util/types.h" @@ -69,5 +59,3 @@ class EncoderFactory { static EncoderFactory factory; QList m_formats; }; - -#endif // ENCODER_H diff --git a/src/encoder/encoderbroadcastsettings.cpp b/src/encoder/encoderbroadcastsettings.cpp index 56a45569cb51..652878c4323c 100644 --- a/src/encoder/encoderbroadcastsettings.cpp +++ b/src/encoder/encoderbroadcastsettings.cpp @@ -1,10 +1,3 @@ -/** -* @file encoderbroadcastsettings.cpp -* @author Josep Maria Antolín -* @date Feb 27 2017 -* @brief storage of broadcast settings for the encoders. -*/ - #include "encoder/encoderbroadcastsettings.h" #include "broadcast/defs_broadcast.h" @@ -59,4 +52,3 @@ EncoderSettings::ChannelMode EncoderBroadcastSettings::getChannelMode() const { QString EncoderBroadcastSettings::getFormat() const { return m_pProfile->getFormat(); } - diff --git a/src/encoder/encoderbroadcastsettings.h b/src/encoder/encoderbroadcastsettings.h index 875639eb99dc..a6c259ab6ad7 100644 --- a/src/encoder/encoderbroadcastsettings.h +++ b/src/encoder/encoderbroadcastsettings.h @@ -1,18 +1,10 @@ -/** -* @file encoderbroadcastsettings.h -* @author Josep Maria Antolín -* @date Feb 27 2017 -* @brief storage of broadcast settings for the encoders. -*/ - - -#ifndef ENCODERBROADCASTSETTINGS_H -#define ENCODERBROADCASTSETTINGS_H +#pragma once #include "encoder/encodersettings.h" #include "encoder/encoder.h" #include "preferences/broadcastsettings.h" +/// Storage of broadcast settings for the encoders. class EncoderBroadcastSettings : public EncoderSettings { public: explicit EncoderBroadcastSettings(BroadcastProfilePtr profile); @@ -30,5 +22,3 @@ class EncoderBroadcastSettings : public EncoderSettings { QList m_qualList; BroadcastProfilePtr m_pProfile; }; - -#endif // ENCODERBROADCASTSETTINGS_H diff --git a/src/encoder/encodercallback.h b/src/encoder/encodercallback.h index b9912ae13ae1..4c7d3c77e8f5 100644 --- a/src/encoder/encodercallback.h +++ b/src/encoder/encodercallback.h @@ -1,5 +1,4 @@ -#ifndef ENCODERCALLBACK_H -#define ENCODERCALLBACK_H +#pragma once class EncoderCallback { public: @@ -13,5 +12,3 @@ class EncoderCallback { // gets stream length virtual int filelen() = 0; }; - -#endif /* ENCODERCALLBACK_H */ diff --git a/src/encoder/encoderffmpegcore.cpp b/src/encoder/encoderffmpegcore.cpp index 11bdc6e49d6b..3da49e9688d0 100644 --- a/src/encoder/encoderffmpegcore.cpp +++ b/src/encoder/encoderffmpegcore.cpp @@ -1,9 +1,3 @@ -// -// FFMPEG encoder class.. -// - Supports what FFMPEG is compiled to supported -// - Same interface for all codecs -// - #include "encoder/encoderffmpegcore.h" #include diff --git a/src/encoder/encoderffmpegcore.h b/src/encoder/encoderffmpegcore.h index 7ea058418d2c..cb3a3082f879 100644 --- a/src/encoder/encoderffmpegcore.h +++ b/src/encoder/encoderffmpegcore.h @@ -1,15 +1,4 @@ -/*************************************************************************** - encoderffmpegcore.h - core code for ffmpeg encoders - ------------------- - copyright : (C) 2012-2013 by Tuukka Pasanen - (C) 2007 by Wesley Stessens - (C) 1994 by Xiph.org (encoder example) - (C) ???? Tobias Rafreider (broadcast and recording fixes) - ***************************************************************************/ - - -#ifndef ENCODERFFMPEGCORE_H -#define ENCODERFFMPEGCORE_H +#pragma once #include @@ -40,6 +29,10 @@ extern "C" { class EncoderCallback; +/// FFmpeg encoder class +/// +/// Supports what FFmpeg is compiled to support and provides the same +/// interface for all codecs. class EncoderFfmpegCore : public Encoder { public: #if LIBAVCODEC_VERSION_INT > 3544932 @@ -113,5 +106,3 @@ class EncoderFfmpegCore : public Encoder { EncoderFfmpegResample *m_pResample; AVStream *m_pStream; }; - -#endif diff --git a/src/encoder/encoderffmpegmp3.cpp b/src/encoder/encoderffmpegmp3.cpp index 51cf1d761ec3..f972345eb3ee 100644 --- a/src/encoder/encoderffmpegmp3.cpp +++ b/src/encoder/encoderffmpegmp3.cpp @@ -1,21 +1,3 @@ -/**************************************************************************** - encoderffmpegmp3.cpp - FFMPEG MP3 encoder for mixxx - ------------------- - copyright : (C) 2012-2013 by Tuukka Pasanen - (C) 2007 by Wesley Stessens - (C) 1994 by Xiph.org (encoder example) - (C) 1994 Tobias Rafreider (broadcast and recording fixes) - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - #include "encoder/encoderffmpegmp3.h" // Constructor diff --git a/src/encoder/encoderffmpegmp3.h b/src/encoder/encoderffmpegmp3.h index 53e6c2d3ee68..b5ffa4ee0df8 100644 --- a/src/encoder/encoderffmpegmp3.h +++ b/src/encoder/encoderffmpegmp3.h @@ -1,31 +1,11 @@ -/**************************************************************************** - encoderffmpegmp3.cpp - FFMPEG MP3 encoder for mixxx - ------------------- - copyright : (C) 2012-2013 by Tuukka Pasanen - (C) 2007 by Wesley Stessens - (C) 1994 by Xiph.org (encoder example) - (C) 1994 Tobias Rafreider (broadcast and recording fixes) - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -#ifndef ENCODERFFMPEGMP3_H -#define ENCODERFFMPEGMP3_H +#pragma once #include "encoderffmpegcore.h" class EncoderFfmpegCore; +// FFmpeg MP3 encoder class EncoderFfmpegMp3 : public EncoderFfmpegCore { public: EncoderFfmpegMp3(EncoderCallback* pCallback=NULL); }; - -#endif diff --git a/src/encoder/encoderffmpegresample.h b/src/encoder/encoderffmpegresample.h index ec9805322df3..490709d51494 100644 --- a/src/encoder/encoderffmpegresample.h +++ b/src/encoder/encoderffmpegresample.h @@ -1,5 +1,4 @@ -#ifndef ENCODERFFMPEGRESAMPLE_H -#define ENCODERFFMPEGRESAMPLE_H +#pragma once #include @@ -28,5 +27,3 @@ class EncoderFfmpegResample { enum AVSampleFormat m_pInSampleFmt; }; - -#endif diff --git a/src/encoder/encoderffmpegvorbis.cpp b/src/encoder/encoderffmpegvorbis.cpp index 7c37c79610be..7c2bf1ae554e 100644 --- a/src/encoder/encoderffmpegvorbis.cpp +++ b/src/encoder/encoderffmpegvorbis.cpp @@ -1,21 +1,3 @@ -/**************************************************************************** - encoderffmpegvorbis.cpp - FFMPEG OGG/Vorbis encoder for mixxx - ------------------- - copyright : (C) 2012-2013 by Tuukka Pasanen - (C) 2007 by Wesley Stessens - (C) 1994 by Xiph.org (encoder example) - (C) 1994 Tobias Rafreider (broadcast and recording fixes) - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - #include "encoder/encoderffmpegvorbis.h" // Constructor diff --git a/src/encoder/encoderffmpegvorbis.h b/src/encoder/encoderffmpegvorbis.h index a516c490a30e..be40af5e5ad3 100644 --- a/src/encoder/encoderffmpegvorbis.h +++ b/src/encoder/encoderffmpegvorbis.h @@ -1,31 +1,11 @@ -/**************************************************************************** - encoderffmpegvorbis.cpp - FFMPEG OGG/Vorbis encoder for mixxx - ------------------- - copyright : (C) 2012-2013 by Tuukka Pasanen - (C) 2007 by Wesley Stessens - (C) 1994 by Xiph.org (encoder example) - (C) 1994 Tobias Rafreider (broadcast and recording fixes) - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -#ifndef ENCODERFFMPEGVORBIS_H -#define ENCODERFFMPEGVORBIS_H +#pragma once #include "encoderffmpegcore.h" class EncoderFfmpegCore; +/// FFmpeg OGG/Vorbis encoder class EncoderFfmpegVorbis : public EncoderFfmpegCore { public: EncoderFfmpegVorbis(EncoderCallback* pCallback=NULL); }; - -#endif diff --git a/src/encoder/encoderflacsettings.cpp b/src/encoder/encoderflacsettings.cpp index 3900d6cd136d..e21f562cf32e 100644 --- a/src/encoder/encoderflacsettings.cpp +++ b/src/encoder/encoderflacsettings.cpp @@ -1,11 +1,3 @@ -/** -* @file encoderflacsettings.cpp -* @author Josep Maria Antolín -* @date Feb 27 2017 -* @brief storage of setting for flac encoder -*/ - - #include "encoder/encoderflacsettings.h" #include "recording/defs_recording.h" #include diff --git a/src/encoder/encoderflacsettings.h b/src/encoder/encoderflacsettings.h index da2918e97db3..de5da145aff7 100644 --- a/src/encoder/encoderflacsettings.h +++ b/src/encoder/encoderflacsettings.h @@ -1,17 +1,10 @@ -/** -* @file encoderflacsettings.cpp -* @author Josep Maria Antolín -* @date Feb 27 2017 -* @brief storage of setting for flac encoder -*/ - -#ifndef ENCODERFLACSETTINGS_H -#define ENCODERFLACSETTINGS_H +#pragma once #include "encoder/encoderrecordingsettings.h" #include "encoder/encoder.h" #include "recording/defs_recording.h" +/// Storage of settings for FLAC encoder class EncoderFlacSettings : public EncoderRecordingSettings { public: EncoderFlacSettings(UserSettingsPointer pConfig); @@ -47,5 +40,3 @@ class EncoderFlacSettings : public EncoderRecordingSettings { QList m_qualList; UserSettingsPointer m_pConfig; }; - -#endif // ENCODERFLACSETTINGS_H diff --git a/src/encoder/encodermp3.h b/src/encoder/encodermp3.h index 901eadb5b1cc..9d3b4371d162 100644 --- a/src/encoder/encodermp3.h +++ b/src/encoder/encodermp3.h @@ -1,5 +1,4 @@ -#ifndef ENCODERMP3_H -#define ENCODERMP3_H +#pragma once #include @@ -42,5 +41,3 @@ class EncoderMp3 final : public Encoder { EncoderCallback* m_pCallback; }; - -#endif diff --git a/src/encoder/encodermp3settings.cpp b/src/encoder/encodermp3settings.cpp index b5fef2c15b3d..3fca377eca4a 100644 --- a/src/encoder/encodermp3settings.cpp +++ b/src/encoder/encodermp3settings.cpp @@ -1,9 +1,4 @@ -/** -* @file encodermp3settings.cpp -* @author Josep Maria Antolín -* @date Feb 27 2017 -* @brief storage of setting for mp3 encoder -*/ +// storage of setting for mp3 encoder #include "encoder/encodermp3settings.h" #include "recording/defs_recording.h" diff --git a/src/encoder/encodermp3settings.h b/src/encoder/encodermp3settings.h index d32245fd14af..bc057c69c8a7 100644 --- a/src/encoder/encodermp3settings.h +++ b/src/encoder/encodermp3settings.h @@ -1,17 +1,10 @@ -/** -* @file encodermp3settings.cpp -* @author Josep Maria Antolín -* @date Feb 27 2017 -* @brief storage of setting for mp3 encoder -*/ - -#ifndef ENCODERMP3SETTINGS_H -#define ENCODERMP3SETTINGS_H +#pragma once #include "encoder/encoderrecordingsettings.h" #include "encoder/encoder.h" #include "recording/defs_recording.h" +// Storage of settings for MP3 encoder class EncoderMp3Settings : public EncoderRecordingSettings { public: EncoderMp3Settings(UserSettingsPointer m_pConfig); @@ -51,5 +44,3 @@ class EncoderMp3Settings : public EncoderRecordingSettings { QList m_qualVBRList; UserSettingsPointer m_pConfig; }; - -#endif // ENCODERMP3SETTINGS_H diff --git a/src/encoder/encoderopus.cpp b/src/encoder/encoderopus.cpp index b2551dd63546..a36b844c5f2d 100644 --- a/src/encoder/encoderopus.cpp +++ b/src/encoder/encoderopus.cpp @@ -1,6 +1,3 @@ -// encoderopus.cpp -// Create on August 15th 2017 by Palakis - #include "encoder/encoderopus.h" #include diff --git a/src/encoder/encoderopus.h b/src/encoder/encoderopus.h index 66bd42e7880f..0df83cc3af1a 100644 --- a/src/encoder/encoderopus.h +++ b/src/encoder/encoderopus.h @@ -1,8 +1,4 @@ -// encoderopus.h -// Create on August 15th 2017 by Palakis - -#ifndef ENCODER_ENCODEROPUS_H -#define ENCODER_ENCODEROPUS_H +#pragma once #include #include @@ -56,5 +52,3 @@ class EncoderOpus: public Encoder { ogg_int64_t m_granulePos; QMap m_opusComments; }; - -#endif // ENCODER_ENCODEROPUS_H diff --git a/src/encoder/encoderopussettings.cpp b/src/encoder/encoderopussettings.cpp index 29fe02c60c26..f37dd7b781fd 100644 --- a/src/encoder/encoderopussettings.cpp +++ b/src/encoder/encoderopussettings.cpp @@ -1,6 +1,3 @@ -// encoderopussettings.cpp -// Create on August 15th 2017 by Palakis - #include #include "encoder/encoderopussettings.h" diff --git a/src/encoder/encoderopussettings.h b/src/encoder/encoderopussettings.h index 0b03d909633a..197b60a6c7b3 100644 --- a/src/encoder/encoderopussettings.h +++ b/src/encoder/encoderopussettings.h @@ -1,8 +1,4 @@ -// encoderopussettings.h -// Create on August 15th 2017 by Palakis - -#ifndef ENCODER_ENCODEROPUSSETTINGS_H -#define ENCODER_ENCODEROPUSSETTINGS_H +#pragma once #include "encoder/encoderrecordingsettings.h" #include "encoder/encoder.h" @@ -51,5 +47,3 @@ class EncoderOpusSettings: public EncoderRecordingSettings { QList m_qualList; QList m_radioList; }; - -#endif // ENCODER_ENCODEROPUSSETTINGS_H diff --git a/src/encoder/encodersettings.h b/src/encoder/encodersettings.h index 1559743dbe53..436dabfb1e18 100644 --- a/src/encoder/encodersettings.h +++ b/src/encoder/encodersettings.h @@ -1,17 +1,10 @@ -/** -* @file encodersettings.cpp -* @author Josep Maria Antolín -* @date Feb 27 2017 -* @brief Encoder settings interface for encoders. -*/ - -#ifndef ENCODERSETTINGS_H -#define ENCODERSETTINGS_H +#pragma once #include #include #include "util/memory.h" +/// Encoder settings interface for encoders class EncoderSettings { public: class OptionsGroup { @@ -62,5 +55,3 @@ class EncoderSettings { }; typedef std::shared_ptr EncoderSettingsPointer; - -#endif // ENCODERSETTINGS_H diff --git a/src/encoder/encodersndfileflac.cpp b/src/encoder/encodersndfileflac.cpp index 435b92a51297..f7c43af4a3b6 100644 --- a/src/encoder/encodersndfileflac.cpp +++ b/src/encoder/encodersndfileflac.cpp @@ -1,10 +1,3 @@ -/** -* @file encodersndfileflac.cpp -* @author Josep Maria Antolín -* @date Feb 27 2017 -* @brief encoder for flac using libsndfile -*/ - #include #include "encoder/encodersndfileflac.h" diff --git a/src/encoder/encodersndfileflac.h b/src/encoder/encodersndfileflac.h index 9ecc3b850ce5..c3ea02abf331 100644 --- a/src/encoder/encodersndfileflac.h +++ b/src/encoder/encodersndfileflac.h @@ -1,14 +1,4 @@ -/** -* @file encodersndfileflac.h -* @author Josep Maria Antolín -* @date Feb 27 2017 -* @brief encoder for flac using libsndfile -*/ - - -#ifndef ENCODERSNDFILEFLAC_H -#define ENCODERSNDFILEFLAC_H - +#pragma once #include "encoder/encoderflacsettings.h" #ifdef Q_OS_WIN @@ -24,6 +14,7 @@ class EncoderCallback; +/// Encoder for FLAC using libsndfile class EncoderSndfileFlac : public EncoderWave { public: EncoderSndfileFlac(EncoderCallback* pCallback = nullptr); @@ -36,5 +27,3 @@ class EncoderSndfileFlac : public EncoderWave { private: double m_compression; }; - -#endif //ENCODERWAVE_H diff --git a/src/encoder/encodervorbis.cpp b/src/encoder/encodervorbis.cpp index 595897e1b470..26f1dbc8992c 100644 --- a/src/encoder/encodervorbis.cpp +++ b/src/encoder/encodervorbis.cpp @@ -1,30 +1,9 @@ -/**************************************************************************** - encodervorbis.cpp - vorbis encoder for mixxx - ------------------- - copyright : (C) 2007 by Wesley Stessens - (C) 1994 by Xiph.org (encoder example) - (C) 1994 Tobias Rafreider (broadcast and recording fixes) - ***************************************************************************/ - -/* -Okay, so this is the vorbis encoder class... -It's a real mess right now. - -When I get around to cleaning things up, -I'll probably make an Encoder base class, -so we can easily add in an EncoderLame (or something) too. - -A lot of stuff has been stolen from: -http://svn.xiph.org/trunk/vorbis/examples/encoder_example.c -*/ - #include // needed for random num gen #include // needed for random num gen #include #include "encoder/encodervorbis.h" #include "encoder/encodercallback.h" -#include "errordialoghandler.h" // Automatic thresholds for switching the encoder to mono // They have been chosen by testing and to keep the same number diff --git a/src/encoder/encodervorbis.h b/src/encoder/encodervorbis.h index 6b30068e27e9..dfb75aab8fe6 100644 --- a/src/encoder/encodervorbis.h +++ b/src/encoder/encodervorbis.h @@ -1,14 +1,4 @@ -/*************************************************************************** - encodervorbis.h - vorbis encoder for mixxx - ------------------- - copyright : (C) 2007 by Wesley Stessens - (C) 1994 by Xiph.org (encoder example) - (C) 1994 Tobias Rafreider (broadcast and recording fixes) - ***************************************************************************/ - - -#ifndef ENCODERVORBIS_H -#define ENCODERVORBIS_H +#pragma once // this also includes vorbis/codec.h #include @@ -21,6 +11,7 @@ class EncoderCallback; +/// Vorbis encoder class EncoderVorbis : public Encoder { public: static const int MONO_BITRATE_THRESHOLD; @@ -61,5 +52,3 @@ class EncoderVorbis : public Encoder { int m_channels; QFile m_file; }; - -#endif diff --git a/src/encoder/encodervorbissettings.cpp b/src/encoder/encodervorbissettings.cpp index 4ecdd8cb2b84..551019ec764e 100644 --- a/src/encoder/encodervorbissettings.cpp +++ b/src/encoder/encodervorbissettings.cpp @@ -1,10 +1,3 @@ -/** -* @file encoderwavesettings.cpp -* @author Josep Maria Antolín -* @date Feb 27 2017 -* @brief storage of setting for vorbis encoder -*/ - #include "encoder/encodervorbissettings.h" #include "recording/defs_recording.h" diff --git a/src/encoder/encodervorbissettings.h b/src/encoder/encodervorbissettings.h index a422e5cdcdc9..a05597d3f530 100644 --- a/src/encoder/encodervorbissettings.h +++ b/src/encoder/encodervorbissettings.h @@ -1,17 +1,10 @@ -/** -* @file encoderwavesettings.h -* @author Josep Maria Antolín -* @date Feb 27 2017 -* @brief storage of setting for vorbis encoder -*/ - -#ifndef ENCODERVORBISSETTINGS_H -#define ENCODERVORBISSETTINGS_H +#pragma once #include "encoder/encoderrecordingsettings.h" #include "encoder/encoder.h" #include "recording/defs_recording.h" +/// Storage of settings for Vorbis encoder class EncoderVorbisSettings : public EncoderRecordingSettings { public: EncoderVorbisSettings(UserSettingsPointer pConfig); @@ -39,6 +32,3 @@ class EncoderVorbisSettings : public EncoderRecordingSettings { QList m_qualList; UserSettingsPointer m_pConfig; }; - - -#endif // ENCODERVORBISSETTINGS_H diff --git a/src/encoder/encoderwave.cpp b/src/encoder/encoderwave.cpp index 96682a467d81..28edcee84183 100644 --- a/src/encoder/encoderwave.cpp +++ b/src/encoder/encoderwave.cpp @@ -1,10 +1,3 @@ -/** -* @file encoderwave.cpp -* @author Josep Maria Antolín -* @date Feb 27 2017 -* @brief wave/aiff "encoder" for mixxx -*/ - #include #include "encoder/encoderwave.h" diff --git a/src/encoder/encoderwave.h b/src/encoder/encoderwave.h index 6661662a969b..87cdca7d3ede 100644 --- a/src/encoder/encoderwave.h +++ b/src/encoder/encoderwave.h @@ -1,18 +1,9 @@ -/** -* @file encoderwave.h -* @author Josep Maria Antolín -* @date Feb 27 2017 -* @brief wave/aiff "encoder" for mixxx -*/ - -#ifndef ENCODERWAVE_H -#define ENCODERWAVE_H - +#pragma once #include "encoder/encoderwavesettings.h" #ifdef Q_OS_WIN -//Enable unicode in libsndfile on Windows -//(sf_open uses UTF-8 otherwise) +// Enable unicode in libsndfile on Windows +// (sf_open uses UTF-8 otherwise) #include #define ENABLE_SNDFILE_WINDOWS_PROTOTYPES 1 #endif @@ -24,6 +15,7 @@ class EncoderCallback; +// WAVE/AIFF "encoder" class EncoderWave : public Encoder { public: EncoderWave(EncoderCallback* pCallback = nullptr); @@ -48,5 +40,3 @@ class EncoderWave : public Encoder { SF_VIRTUAL_IO m_virtualIo; }; - -#endif //ENCODERWAVE_H diff --git a/src/encoder/encoderwavesettings.cpp b/src/encoder/encoderwavesettings.cpp index fa0a96cd1a7a..531f83142fde 100644 --- a/src/encoder/encoderwavesettings.cpp +++ b/src/encoder/encoderwavesettings.cpp @@ -1,12 +1,6 @@ -/** -* @file encoderwavesettings.cpp -* @author Josep Maria Antolín -* @date Feb 27 2017 -* @brief storage of setting for wave/aiff encoder -*/ +#include "encoder/encoderwavesettings.h" - #include "encoder/encoderwavesettings.h" - #include "recording/defs_recording.h" +#include "recording/defs_recording.h" const QString EncoderWaveSettings::BITS_GROUP = "BITS"; diff --git a/src/encoder/encoderwavesettings.h b/src/encoder/encoderwavesettings.h index 8a1cb56cbf82..6818591949e7 100644 --- a/src/encoder/encoderwavesettings.h +++ b/src/encoder/encoderwavesettings.h @@ -1,32 +1,25 @@ -/** -* @file encoderwavesettings.h -* @author Josep Maria Antolín -* @date Feb 27 2017 -* @brief storage of setting for wave/aiff encoder -*/ - -#ifndef ENCODERWAVESETTINGS_H -#define ENCODERWAVESETTINGS_H +#pragma once #include "encoder/encoderrecordingsettings.h" #include "encoder/encoder.h" #include +/// Storage of settings for WAVE/AIFF encoder class EncoderWaveSettings : public EncoderRecordingSettings { public: EncoderWaveSettings(UserSettingsPointer pConfig, QString format); ~EncoderWaveSettings() override = default; - // Returns the list of radio options to show to the user + /// Returns the list of radio options to show to the user QList getOptionGroups() const override; - // Selects the option by its index. If it is a single-element option, - // index 0 means disabled and 1 enabled. + /// Selects the option by its index. If it is a single-element option, + /// index 0 means disabled and 1 enabled. void setGroupOption(const QString& groupCode, int optionIndex) override; - // Return the selected option of the group. If it is a single-element option, - // 0 means disabled and 1 enabled. + /// Return the selected option of the group. If it is a single-element option, + /// 0 means disabled and 1 enabled. int getSelectedOption(const QString& groupCode) const override; - // Returns the format subtype of this encoder settings. + /// Returns the format subtype of this encoder settings. QString getFormat() const override{ return m_format; } @@ -37,12 +30,3 @@ class EncoderWaveSettings : public EncoderRecordingSettings { UserSettingsPointer m_pConfig; QString m_format; }; - - - - - - - - -#endif // ENCODERWAVESETTINGS_H diff --git a/src/engine/bufferscalers/enginebufferscale.h b/src/engine/bufferscalers/enginebufferscale.h index ced4530fab9e..4f50a97e6c7a 100644 --- a/src/engine/bufferscalers/enginebufferscale.h +++ b/src/engine/bufferscalers/enginebufferscale.h @@ -1,5 +1,4 @@ -#ifndef ENGINEBUFFERSCALE_H -#define ENGINEBUFFERSCALE_H +#pragma once #include @@ -16,10 +15,6 @@ // This took me ages to figure out. // -- Albert July 17, 2010. -/** - *@author Tue & Ken Haste Andersen - */ - class EngineBufferScale : public QObject { Q_OBJECT public: @@ -79,5 +74,3 @@ class EngineBufferScale : public QObject { double m_dTempoRatio; double m_dPitchRatio; }; - -#endif diff --git a/src/engine/bufferscalers/enginebufferscalelinear.h b/src/engine/bufferscalers/enginebufferscalelinear.h index d46f342ba697..a27c11f7be05 100644 --- a/src/engine/bufferscalers/enginebufferscalelinear.h +++ b/src/engine/bufferscalers/enginebufferscalelinear.h @@ -1,5 +1,4 @@ -#ifndef ENGINEBUFFERSCALELINEAR_H -#define ENGINEBUFFERSCALELINEAR_H +#pragma once #include "engine/bufferscalers/enginebufferscale.h" #include "engine/readaheadmanager.h" @@ -45,5 +44,3 @@ class EngineBufferScaleLinear : public EngineBufferScale { double m_dCurrentFrame; double m_dNextFrame; }; - -#endif diff --git a/src/engine/bufferscalers/enginebufferscalerubberband.h b/src/engine/bufferscalers/enginebufferscalerubberband.h index 7ee14e084c2c..dbbd3064e93b 100644 --- a/src/engine/bufferscalers/enginebufferscalerubberband.h +++ b/src/engine/bufferscalers/enginebufferscalerubberband.h @@ -1,5 +1,4 @@ -#ifndef ENGINEBUFFERSCALERUBBERBAND_H -#define ENGINEBUFFERSCALERUBBERBAND_H +#pragma once #include "engine/bufferscalers/enginebufferscale.h" #include "util/memory.h" @@ -47,6 +46,3 @@ class EngineBufferScaleRubberBand : public EngineBufferScale { // Holds the playback direction bool m_bBackwards; }; - - -#endif /* ENGINEBUFFERSCALERUBBERBAND_H */ diff --git a/src/engine/cachingreader/cachingreader.h b/src/engine/cachingreader/cachingreader.h index 01529342ea11..c5f5a6ee32c5 100644 --- a/src/engine/cachingreader/cachingreader.h +++ b/src/engine/cachingreader/cachingreader.h @@ -1,6 +1,3 @@ -// cachingreader.h -// Created 7/9/2009 by RJ Ryan (rryan@mit.edu) - #pragma once #include diff --git a/src/engine/cachingreader/cachingreaderchunk.h b/src/engine/cachingreader/cachingreaderchunk.h index 7e9409a9b237..b968a61dd5b8 100644 --- a/src/engine/cachingreader/cachingreaderchunk.h +++ b/src/engine/cachingreader/cachingreaderchunk.h @@ -1,5 +1,4 @@ -#ifndef ENGINE_CACHINGREADERCHUNK_H -#define ENGINE_CACHINGREADERCHUNK_H +#pragma once #include "sources/audiosource.h" @@ -142,6 +141,3 @@ class CachingReaderChunkForOwner: public CachingReaderChunk { CachingReaderChunkForOwner* m_pPrev; // previous item in double-linked list CachingReaderChunkForOwner* m_pNext; // next item in double-linked list }; - - -#endif // ENGINE_CACHINGREADERCHUNK_H diff --git a/src/engine/cachingreader/cachingreaderworker.h b/src/engine/cachingreader/cachingreaderworker.h index 6118c58c94aa..09801eebb884 100644 --- a/src/engine/cachingreader/cachingreaderworker.h +++ b/src/engine/cachingreader/cachingreaderworker.h @@ -1,5 +1,4 @@ -#ifndef ENGINE_CACHINGREADERWORKER_H -#define ENGINE_CACHINGREADERWORKER_H +#pragma once #include #include @@ -147,6 +146,3 @@ class CachingReaderWorker : public EngineWorker { QAtomicInt m_stop; }; - - -#endif /* ENGINE_CACHINGREADERWORKER_H */ diff --git a/src/engine/channelmixer.h b/src/engine/channelmixer.h index d58daf228d95..eb300696a318 100644 --- a/src/engine/channelmixer.h +++ b/src/engine/channelmixer.h @@ -1,5 +1,4 @@ -#ifndef CHANNELMIXER_H -#define CHANNELMIXER_H +#pragma once #include @@ -30,5 +29,3 @@ class ChannelMixer { unsigned int iSampleRate, EngineEffectsManager* pEngineEffectsManager); }; - -#endif /* CHANNELMIXER_H */ diff --git a/src/engine/channels/engineaux.cpp b/src/engine/channels/engineaux.cpp index b9d1ee2a64d8..69c668616aa7 100644 --- a/src/engine/channels/engineaux.cpp +++ b/src/engine/channels/engineaux.cpp @@ -1,7 +1,3 @@ -// engineaux.cpp -// created 4/8/2011 by Bill Good (bkgood@gmail.com) -// shameless stolen from enginemicrophone.cpp (from RJ) - #include "engine/channels/engineaux.h" #include diff --git a/src/engine/channels/engineaux.h b/src/engine/channels/engineaux.h index 270668c04eec..aa6c8fe72e76 100644 --- a/src/engine/channels/engineaux.h +++ b/src/engine/channels/engineaux.h @@ -1,9 +1,4 @@ -// engineaux.h -// created 4/8/2011 by Bill Good (bkgood@gmail.com) -// unapologetically copied from enginemicrophone.h from RJ - -#ifndef ENGINEAUX_H -#define ENGINEAUX_H +#pragma once #include @@ -15,8 +10,8 @@ class ControlAudioTaperPot; -// EngineAux is an EngineChannel that implements a mixing source whose -// samples are fed directly from the SoundManager +/// EngineAux is an EngineChannel that implements a mixing source whose +/// samples are fed directly from the SoundManager class EngineAux : public EngineChannel, public AudioDestination { Q_OBJECT public: @@ -25,26 +20,26 @@ class EngineAux : public EngineChannel, public AudioDestination { bool isActive(); - // Called by EngineMaster whenever is requesting a new buffer of audio. + /// Called by EngineMaster whenever is requesting a new buffer of audio. virtual void process(CSAMPLE* pOutput, const int iBufferSize); virtual void collectFeatures(GroupFeatureState* pGroupFeatures) const; virtual void postProcess(const int iBufferSize) { Q_UNUSED(iBufferSize) } - // This is called by SoundManager whenever there are new samples from the - // configured input to be processed. This is run in the callback thread of - // the soundcard this AudioDestination was registered for! Beware, in the - // case of multiple soundcards, this method is not re-entrant but it may be - // concurrent with EngineMaster processing. + /// This is called by SoundManager whenever there are new samples from the + /// configured input to be processed. This is run in the callback thread of + /// the soundcard this AudioDestination was registered for! Beware, in the + /// case of multiple soundcards, this method is not re-entrant but it may be + /// concurrent with EngineMaster processing. virtual void receiveBuffer(const AudioInput& input, const CSAMPLE* pBuffer, unsigned int nFrames); - // Called by SoundManager whenever the aux input is connected to a - // soundcard input. + /// Called by SoundManager whenever the aux input is connected to a + /// soundcard input. virtual void onInputConfigured(const AudioInput& input); - // Called by SoundManager whenever the aux input is disconnected from - // a soundcard input. + /// Called by SoundManager whenever the aux input is disconnected from + /// a soundcard input. virtual void onInputUnconfigured(const AudioInput& input); private: @@ -52,5 +47,3 @@ class EngineAux : public EngineChannel, public AudioDestination { ControlAudioTaperPot* m_pPregain; bool m_wasActive; }; - -#endif // ENGINEAUX_H diff --git a/src/engine/channels/enginechannel.cpp b/src/engine/channels/enginechannel.cpp index 8e2e698be614..e440f4899443 100644 --- a/src/engine/channels/enginechannel.cpp +++ b/src/engine/channels/enginechannel.cpp @@ -1,20 +1,3 @@ -/*************************************************************************** - enginechannel.cpp - description - ------------------- - begin : Sun Apr 28 2002 - copyright : (C) 2002 by - email : -***************************************************************************/ - -/*************************************************************************** -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) any later version. * -* * -***************************************************************************/ - #include "engine/channels/enginechannel.h" #include "control/controlobject.h" diff --git a/src/engine/channels/enginechannel.h b/src/engine/channels/enginechannel.h index 2d71ddd9e403..0a70e4ead77c 100644 --- a/src/engine/channels/enginechannel.h +++ b/src/engine/channels/enginechannel.h @@ -1,22 +1,4 @@ -/*************************************************************************** - enginechannel.h - description - ------------------- - begin : Sun Apr 28 2002 - copyright : (C) 2002 by - email : - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -#ifndef ENGINECHANNEL_H -#define ENGINECHANNEL_H +#pragma once #include "control/controlproxy.h" #include "effects/effectsmanager.h" @@ -104,5 +86,3 @@ class EngineChannel : public EngineObject { ControlPushButton* m_pTalkover; bool m_bIsTalkoverChannel; }; - -#endif diff --git a/src/engine/channels/enginemicrophone.cpp b/src/engine/channels/enginemicrophone.cpp index d15c29f5387d..37ecce202d1c 100644 --- a/src/engine/channels/enginemicrophone.cpp +++ b/src/engine/channels/enginemicrophone.cpp @@ -1,6 +1,3 @@ -// enginemicrophone.cpp -// created 3/16/2011 by RJ Ryan (rryan@mit.edu) - #include "engine/channels/enginemicrophone.h" #include diff --git a/src/engine/channels/enginemicrophone.h b/src/engine/channels/enginemicrophone.h index 50753b63bf5c..282407d35752 100644 --- a/src/engine/channels/enginemicrophone.h +++ b/src/engine/channels/enginemicrophone.h @@ -1,8 +1,4 @@ -// enginemicrophone.h -// created 3/16/2011 by RJ Ryan (rryan@mit.edu) - -#ifndef ENGINEMICROPHONE_H -#define ENGINEMICROPHONE_H +#pragma once #include @@ -59,5 +55,3 @@ class EngineMicrophone : public EngineChannel, public AudioDestination { bool m_wasActive; }; - -#endif /* ENGINEMICROPHONE_H */ diff --git a/src/engine/controls/bpmcontrol.h b/src/engine/controls/bpmcontrol.h index fc753a2e80d6..156fdca7003c 100644 --- a/src/engine/controls/bpmcontrol.h +++ b/src/engine/controls/bpmcontrol.h @@ -1,5 +1,4 @@ -#ifndef BPMCONTROL_H -#define BPMCONTROL_H +#pragma once #include @@ -170,5 +169,3 @@ class BpmControl : public EngineControl { FRIEND_TEST(EngineSyncTest, UserTweakBeatDistance); FRIEND_TEST(EngineSyncTest, UserTweakPreservedInSeek); }; - -#endif // BPMCONTROL_H diff --git a/src/engine/controls/clockcontrol.h b/src/engine/controls/clockcontrol.h index 5076a5cd9bcf..87667db443ad 100644 --- a/src/engine/controls/clockcontrol.h +++ b/src/engine/controls/clockcontrol.h @@ -1,5 +1,4 @@ -#ifndef CLOCKCONTROL_H -#define CLOCKCONTROL_H +#pragma once #include "engine/controls/enginecontrol.h" #include "preferences/usersettings.h" @@ -30,5 +29,3 @@ class ClockControl: public EngineControl { // m_pBeats is written from an engine worker thread mixxx::BeatsPointer m_pBeats; }; - -#endif /* CLOCKCONTROL_H */ diff --git a/src/engine/controls/cuecontrol.cpp b/src/engine/controls/cuecontrol.cpp index 59b2e07b6bfb..c9c1fdffe4b8 100644 --- a/src/engine/controls/cuecontrol.cpp +++ b/src/engine/controls/cuecontrol.cpp @@ -1,6 +1,3 @@ -// cuecontrol.cpp -// Created 11/5/2009 by RJ Ryan (rryan@mit.edu) - #include "engine/controls/cuecontrol.h" #include diff --git a/src/engine/controls/cuecontrol.h b/src/engine/controls/cuecontrol.h index e21629ab8e4c..9dd4f232d98f 100644 --- a/src/engine/controls/cuecontrol.h +++ b/src/engine/controls/cuecontrol.h @@ -1,8 +1,4 @@ -// cuecontrol.h -// Created 11/5/2009 by RJ Ryan (rryan@mit.edu) - -#ifndef CUECONTROL_H -#define CUECONTROL_H +#pragma once #include #include @@ -356,6 +352,3 @@ class CueControl : public EngineControl { friend class HotcueControlTest; }; - - -#endif /* CUECONTROL_H */ diff --git a/src/engine/controls/enginecontrol.cpp b/src/engine/controls/enginecontrol.cpp index 283ab009482e..e08dd1e90546 100644 --- a/src/engine/controls/enginecontrol.cpp +++ b/src/engine/controls/enginecontrol.cpp @@ -1,6 +1,3 @@ -// enginecontrol.cpp -// Created 7/5/2009 by RJ Ryan (rryan@mit.edu) - #include "engine/controls/enginecontrol.h" #include "engine/enginebuffer.h" diff --git a/src/engine/controls/enginecontrol.h b/src/engine/controls/enginecontrol.h index d9e9904ce7a2..094ab1c1d7c4 100644 --- a/src/engine/controls/enginecontrol.h +++ b/src/engine/controls/enginecontrol.h @@ -1,8 +1,4 @@ -// enginecontrol.h -// Created 7/5/2009 by RJ Ryan (rryan@mit.edu) - -#ifndef ENGINECONTROL_H -#define ENGINECONTROL_H +#pragma once #include @@ -112,5 +108,3 @@ class EngineControl : public QObject { FRIEND_TEST(LoopingControlTest, LoopResizeSeek); FRIEND_TEST(LoopingControlTest, Beatjump_JumpsByBeats); }; - -#endif /* ENGINECONTROL_H */ diff --git a/src/engine/controls/keycontrol.h b/src/engine/controls/keycontrol.h index 7835ce3033f1..ab5d66f92503 100644 --- a/src/engine/controls/keycontrol.h +++ b/src/engine/controls/keycontrol.h @@ -1,5 +1,4 @@ -#ifndef KEYCONTROL_H -#define KEYCONTROL_H +#pragma once #include "engine/controls/enginecontrol.h" #include "control/controlvalue.h" @@ -78,5 +77,3 @@ class KeyControl : public EngineControl { QAtomicInt m_updatePitchAdjustRequest; QAtomicInt m_updateRateRequest; }; - -#endif // KEYCONTROL_H diff --git a/src/engine/controls/loopingcontrol.cpp b/src/engine/controls/loopingcontrol.cpp index 6ca81808d985..0a1eba5e8688 100644 --- a/src/engine/controls/loopingcontrol.cpp +++ b/src/engine/controls/loopingcontrol.cpp @@ -1,7 +1,3 @@ -// loopingcontrol.cpp -// Created on Sep 23, 2008 -// Author: asantoni, rryan - #include "engine/controls/loopingcontrol.h" #include diff --git a/src/engine/controls/loopingcontrol.h b/src/engine/controls/loopingcontrol.h index a41a4ed9b84d..3d492f306fa9 100644 --- a/src/engine/controls/loopingcontrol.h +++ b/src/engine/controls/loopingcontrol.h @@ -1,9 +1,4 @@ -// loopingcontrol.h -// Created on Sep 23, 2008 -// Author: asantoni, rryan - -#ifndef LOOPINGCONTROL_H -#define LOOPINGCONTROL_H +#pragma once #include #include @@ -267,5 +262,3 @@ class BeatLoopingControl : public QObject { ControlPushButton* m_pToggle; ControlObject* m_pEnabled; }; - -#endif /* LOOPINGCONTROL_H */ diff --git a/src/engine/controls/quantizecontrol.cpp b/src/engine/controls/quantizecontrol.cpp index e4e954700662..c059bca51c1e 100644 --- a/src/engine/controls/quantizecontrol.cpp +++ b/src/engine/controls/quantizecontrol.cpp @@ -1,7 +1,3 @@ -// QuantizeControl.cpp -// Created on Sat 5, 2011 -// Author: pwhelan - #include "engine/controls/quantizecontrol.h" #include @@ -12,7 +8,6 @@ #include "moc_quantizecontrol.cpp" #include "preferences/usersettings.h" #include "track/track.h" -#include "util/assert.h" QuantizeControl::QuantizeControl(const QString& group, UserSettingsPointer pConfig) diff --git a/src/engine/controls/quantizecontrol.h b/src/engine/controls/quantizecontrol.h index 03aae3fed579..8d13c06ccd36 100644 --- a/src/engine/controls/quantizecontrol.h +++ b/src/engine/controls/quantizecontrol.h @@ -1,5 +1,4 @@ -#ifndef QUANTIZECONTROL_H -#define QUANTIZECONTROL_H +#pragma once #include @@ -39,5 +38,3 @@ class QuantizeControl : public EngineControl { // m_pBeats is written from an engine worker thread mixxx::BeatsPointer m_pBeats; }; - -#endif // QUANTIZECONTROL_H diff --git a/src/engine/controls/ratecontrol.cpp b/src/engine/controls/ratecontrol.cpp index 5f01865643e4..f2c4465dfe4e 100644 --- a/src/engine/controls/ratecontrol.cpp +++ b/src/engine/controls/ratecontrol.cpp @@ -1,6 +1,3 @@ -// ratecontrol.cpp -// Created 7/4/2009 by RJ Ryan (rryan@mit.edu) - #include "engine/controls/ratecontrol.h" #include diff --git a/src/engine/controls/ratecontrol.h b/src/engine/controls/ratecontrol.h index 6daa7296ce49..54accae3e036 100644 --- a/src/engine/controls/ratecontrol.h +++ b/src/engine/controls/ratecontrol.h @@ -1,8 +1,4 @@ -// ratecontrol.h -// Created 7/4/2009 by RJ Ryan (rryan@mit.edu) - -#ifndef RATECONTROL_H -#define RATECONTROL_H +#pragma once #include @@ -168,5 +164,3 @@ public slots: // Speed for temporary rate change double m_dRateTempRampChange; }; - -#endif /* RATECONTROL_H */ diff --git a/src/engine/controls/vinylcontrolcontrol.h b/src/engine/controls/vinylcontrolcontrol.h index 6e684fa57c95..4b9065b924e3 100644 --- a/src/engine/controls/vinylcontrolcontrol.h +++ b/src/engine/controls/vinylcontrolcontrol.h @@ -1,5 +1,4 @@ -#ifndef VINYLCONTROLCONTROL_H -#define VINYLCONTROLCONTROL_H +#pragma once #include "control/controlobject.h" #include "control/controlproxy.h" @@ -40,5 +39,3 @@ class VinylControlControl : public EngineControl { bool m_bSeekRequested; }; - -#endif /* VINYLCONTROLCONTROL_H */ diff --git a/src/engine/effects/engineeffect.h b/src/engine/effects/engineeffect.h index d42c1a6759c9..4e98f64cf6bc 100644 --- a/src/engine/effects/engineeffect.h +++ b/src/engine/effects/engineeffect.h @@ -1,5 +1,4 @@ -#ifndef ENGINEEFFECT_H -#define ENGINEEFFECT_H +#pragma once #include #include @@ -71,5 +70,3 @@ class EngineEffect : public EffectsRequestHandler { DISALLOW_COPY_AND_ASSIGN(EngineEffect); }; - -#endif /* ENGINEEFFECT_H */ diff --git a/src/engine/effects/engineeffectparameter.h b/src/engine/effects/engineeffectparameter.h index 888773f9f99f..a60ed06a1a3f 100644 --- a/src/engine/effects/engineeffectparameter.h +++ b/src/engine/effects/engineeffectparameter.h @@ -1,5 +1,4 @@ -#ifndef ENGINEEFFECTPARAMETER_H -#define ENGINEEFFECTPARAMETER_H +#pragma once #include #include @@ -85,5 +84,3 @@ class EngineEffectParameter { DISALLOW_COPY_AND_ASSIGN(EngineEffectParameter); }; - -#endif /* ENGINEEFFECTPARAMETER_H */ diff --git a/src/engine/effects/engineeffectrack.h b/src/engine/effects/engineeffectrack.h index 1ff4d542522b..8e16d3ba3388 100644 --- a/src/engine/effects/engineeffectrack.h +++ b/src/engine/effects/engineeffectrack.h @@ -1,5 +1,4 @@ -#ifndef ENGINEEFFECTRACK_H -#define ENGINEEFFECTRACK_H +#pragma once #include @@ -47,5 +46,3 @@ class EngineEffectRack : public EffectsRequestHandler { DISALLOW_COPY_AND_ASSIGN(EngineEffectRack); }; - -#endif /* ENGINEEFFECTRACK_H */ diff --git a/src/engine/effects/engineeffectsmanager.h b/src/engine/effects/engineeffectsmanager.h index d40406c281da..7bea240c2dd9 100644 --- a/src/engine/effects/engineeffectsmanager.h +++ b/src/engine/effects/engineeffectsmanager.h @@ -1,5 +1,4 @@ -#ifndef ENGINEEFFECTSMANAGER_H -#define ENGINEEFFECTSMANAGER_H +#pragma once #include @@ -91,6 +90,3 @@ class EngineEffectsManager : public EffectsRequestHandler { mixxx::SampleBuffer m_buffer1; mixxx::SampleBuffer m_buffer2; }; - - -#endif /* ENGINEEFFECTSMANAGER_H */ diff --git a/src/engine/effects/groupfeaturestate.h b/src/engine/effects/groupfeaturestate.h index 9096caf83a05..2a34e8ad2b06 100644 --- a/src/engine/effects/groupfeaturestate.h +++ b/src/engine/effects/groupfeaturestate.h @@ -1,5 +1,4 @@ -#ifndef GROUPFEATURESTATE_H -#define GROUPFEATURESTATE_H +#pragma once #include "proto/keys.pb.h" @@ -25,5 +24,3 @@ struct GroupFeatureState { bool has_gain; double gain; }; - -#endif /* GROUPFEATURESTATE_H */ diff --git a/src/engine/effects/message.h b/src/engine/effects/message.h index 3aaa39e8cd62..17ebcc152158 100644 --- a/src/engine/effects/message.h +++ b/src/engine/effects/message.h @@ -1,5 +1,4 @@ -#ifndef MESSAGE_H -#define MESSAGE_H +#pragma once #include #include @@ -197,5 +196,3 @@ class EffectsRequestHandler { EffectsRequest& message, EffectsResponsePipe* pResponsePipe) = 0; }; - -#endif /* MESSAGE_H */ diff --git a/src/engine/enginebuffer.h b/src/engine/enginebuffer.h index 49fd9cf67dcb..eb7b21957e75 100644 --- a/src/engine/enginebuffer.h +++ b/src/engine/enginebuffer.h @@ -1,22 +1,4 @@ -/*************************************************************************** - enginebuffer.h - description - ------------------- - begin : Wed Feb 20 2002 - copyright : (C) 2002 by Tue and Ken Haste Andersen - email : - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -#ifndef ENGINEBUFFER_H -#define ENGINEBUFFER_H +#pragma once #include @@ -65,10 +47,6 @@ class EngineWorkerScheduler; class VisualPlayPosition; class EngineMaster; -/** - *@author Tue and Ken Haste Andersen -*/ - // Length of audio beat marks in samples const int audioBeatMarkLen = 40; @@ -426,5 +404,3 @@ class EngineBuffer : public EngineObject { }; Q_DECLARE_OPERATORS_FOR_FLAGS(EngineBuffer::SeekRequests) - -#endif diff --git a/src/engine/enginedelay.cpp b/src/engine/enginedelay.cpp index 43425eeec1db..aaaafbd43136 100644 --- a/src/engine/enginedelay.cpp +++ b/src/engine/enginedelay.cpp @@ -1,19 +1,3 @@ -/*************************************************************************** - enginedelay.cpp - description - ------------------- - copyright : (C) 2002 by Tue and Ken Haste Andersen - email : -***************************************************************************/ - -/*************************************************************************** -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) any later version. * -* * -***************************************************************************/ - #include "enginedelay.h" #include "control/controlpotmeter.h" diff --git a/src/engine/enginedelay.h b/src/engine/enginedelay.h index 60654cb4caf6..bace1255d484 100644 --- a/src/engine/enginedelay.h +++ b/src/engine/enginedelay.h @@ -1,21 +1,4 @@ -/*************************************************************************** - enginedelay.h - description - ------------------- - copyright : (C) 2002 by Tue and Ken Haste Andersen - email : - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -#ifndef ENGINEDELAY_H -#define ENGINEDELAY_H +#pragma once #include "engine/engineobject.h" #include "preferences/usersettings.h" @@ -43,5 +26,3 @@ class EngineDelay : public EngineObject { int m_iDelayPos; int m_iDelay; }; - -#endif diff --git a/src/engine/enginemaster.h b/src/engine/enginemaster.h index 20beb816853c..72f45fd17da3 100644 --- a/src/engine/enginemaster.h +++ b/src/engine/enginemaster.h @@ -1,22 +1,4 @@ -/*************************************************************************** - enginemaster.h - description - ------------------- - begin : Sun Apr 28 2002 - copyright : (C) 2002 by - email : - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -#ifndef ENGINEMASTER_H -#define ENGINEMASTER_H +#pragma once #include #include @@ -365,5 +347,3 @@ class EngineMaster : public QObject, public AudioSource { volatile bool m_bBusOutputConnected[3]; bool m_bExternalRecordBroadcastInputConnected; }; - -#endif diff --git a/src/engine/engineobject.cpp b/src/engine/engineobject.cpp index d729308b9981..43cd0987aa5b 100644 --- a/src/engine/engineobject.cpp +++ b/src/engine/engineobject.cpp @@ -1,20 +1,3 @@ -/*************************************************************************** - engineobject.cpp - description - ------------------- - begin : Wed Feb 20 2002 - copyright : (C) 2002 by Tue and Ken Haste Andersen - email : -***************************************************************************/ - -/*************************************************************************** -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) any later version. * -* * -***************************************************************************/ - #include "engineobject.h" #include "moc_engineobject.cpp" diff --git a/src/engine/engineobject.h b/src/engine/engineobject.h index 44bcf1addf89..88de2c7e492f 100644 --- a/src/engine/engineobject.h +++ b/src/engine/engineobject.h @@ -1,32 +1,10 @@ -/*************************************************************************** - engineobject.h - description - ------------------- - begin : Wed Feb 20 2002 - copyright : (C) 2002 by Tue and Ken Haste Andersen - email : - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -#ifndef ENGINEOBJECT_H -#define ENGINEOBJECT_H +#pragma once #include #include "util/types.h" #include "engine/effects/groupfeaturestate.h" -/** - *@author Tue and Ken Haste Andersen - */ - class EngineObject : public QObject { Q_OBJECT public: @@ -51,5 +29,3 @@ class EngineObjectConstIn : public QObject { virtual void process(const CSAMPLE* pIn, CSAMPLE* pOut, const int iBufferSize) = 0; }; - -#endif diff --git a/src/engine/enginesidechaincompressor.h b/src/engine/enginesidechaincompressor.h index ca124d39b478..bc7d030c652d 100644 --- a/src/engine/enginesidechaincompressor.h +++ b/src/engine/enginesidechaincompressor.h @@ -1,5 +1,4 @@ -#ifndef ENGINECOMPRESSOR_H -#define ENGINECOMPRESSOR_H +#pragma once #include "util/types.h" @@ -81,5 +80,3 @@ class EngineSideChainCompressor { CSAMPLE m_attackPerFrame; CSAMPLE m_decayPerFrame; }; - -#endif diff --git a/src/engine/engineworker.cpp b/src/engine/engineworker.cpp index c00ac202f421..228a574ebb1c 100644 --- a/src/engine/engineworker.cpp +++ b/src/engine/engineworker.cpp @@ -1,6 +1,3 @@ -// engineworker.cpp -// Created 6/2/2010 by RJ Ryan (rryan@mit.edu) - #include "engine/engineworker.h" #include "engine/engineworkerscheduler.h" diff --git a/src/engine/engineworker.h b/src/engine/engineworker.h index 31244a34e601..b7cf735b3843 100644 --- a/src/engine/engineworker.h +++ b/src/engine/engineworker.h @@ -1,8 +1,4 @@ -// engineworker.h -// Created 6/2/2010 by RJ Ryan (rryan@mit.edu) - -#ifndef ENGINEWORKER_H -#define ENGINEWORKER_H +#pragma once #include #include @@ -35,5 +31,3 @@ class EngineWorker : public QThread { EngineWorkerScheduler* m_pScheduler; std::atomic_flag m_notReady; }; - -#endif /* ENGINEWORKER_H */ diff --git a/src/engine/engineworkerscheduler.cpp b/src/engine/engineworkerscheduler.cpp index 1fe5c6023309..9f3a3ad7f664 100644 --- a/src/engine/engineworkerscheduler.cpp +++ b/src/engine/engineworkerscheduler.cpp @@ -1,6 +1,3 @@ -// engineworkerscheduler.cpp -// Created 6/2/2010 by RJ Ryan (rryan@mit.edu) - #include "engine/engineworkerscheduler.h" #include diff --git a/src/engine/engineworkerscheduler.h b/src/engine/engineworkerscheduler.h index 07230673ae64..a7ecb90094ea 100644 --- a/src/engine/engineworkerscheduler.h +++ b/src/engine/engineworkerscheduler.h @@ -1,5 +1,4 @@ -#ifndef ENGINEWORKERSCHEDULER_H -#define ENGINEWORKERSCHEDULER_H +#pragma once #include #include @@ -37,5 +36,3 @@ class EngineWorkerScheduler : public QThread { QMutex m_mutex; volatile bool m_bQuit; }; - -#endif /* ENGINEWORKERSCHEDULER_H */ diff --git a/src/engine/filters/enginefilter.cpp b/src/engine/filters/enginefilter.cpp index 630ebf86179f..b299f04772b1 100644 --- a/src/engine/filters/enginefilter.cpp +++ b/src/engine/filters/enginefilter.cpp @@ -1,19 +1,4 @@ -/*************************************************************************** - * enginefilter.cpp - Wrapper for FidLib Filter Library * - * ---------------------- * - * copyright : (C) 2007 by John Sully * - * email : jsully@scs.ryerson.ca * - * * - **************************************************************************/ - -/*************************************************************************** -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) any later version. * -* * -***************************************************************************/ +// Wrapper for FidLib Filter Library #include "engine/filters/enginefilter.h" diff --git a/src/engine/filters/enginefilter.h b/src/engine/filters/enginefilter.h index 2fabcfeed5b5..0397d0ff4fe7 100644 --- a/src/engine/filters/enginefilter.h +++ b/src/engine/filters/enginefilter.h @@ -1,24 +1,6 @@ -/*************************************************************************** - * enginefilter.h - Wrapper for FidLib Filter Library * - * ---------------------- * - * copyright : (C) 2007 by John Sully * - * email : jsully@scs.ryerson.ca * - * * - **************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -#ifndef ENGINEFILTER_H -#define ENGINEFILTER_H - -#define MIXXX +// Wrapper for FidLib Filter Library +#pragma once + #include #include @@ -59,5 +41,3 @@ double processSampleDynamic(void *buf, const double sample); double processSampleHp(void *buf, const double sample); double processSampleBp(void *buf, const double sample); double processSampleLp(void *buf, const double sample); - -#endif diff --git a/src/engine/filters/enginefilterbessel4.h b/src/engine/filters/enginefilterbessel4.h index 02fa3dd25ea3..7e6d1b726489 100644 --- a/src/engine/filters/enginefilterbessel4.h +++ b/src/engine/filters/enginefilterbessel4.h @@ -1,5 +1,4 @@ -#ifndef ENGINEFILTERBESSEL4_H -#define ENGINEFILTERBESSEL4_H +#pragma once #include "engine/filters/enginefilteriir.h" @@ -30,5 +29,3 @@ class EngineFilterBessel4High : public EngineFilterIIR<4, IIR_HP> { EngineFilterBessel4High(int sampleRate, double freqCorner1); void setFrequencyCorners(int sampleRate, double freqCorner1); }; - -#endif // ENGINEFILTERBESSEL4_H diff --git a/src/engine/filters/enginefilterbessel8.h b/src/engine/filters/enginefilterbessel8.h index 40bcb5d314de..ff66d9eeb7e2 100644 --- a/src/engine/filters/enginefilterbessel8.h +++ b/src/engine/filters/enginefilterbessel8.h @@ -1,5 +1,4 @@ -#ifndef ENGINEFILTERBESSEL8_H -#define ENGINEFILTERBESSEL8_H +#pragma once #include "engine/filters/enginefilteriir.h" @@ -30,5 +29,3 @@ class EngineFilterBessel8High : public EngineFilterIIR<8, IIR_HP> { EngineFilterBessel8High(int sampleRate, double freqCorner1); void setFrequencyCorners(int sampleRate, double freqCorner1); }; - -#endif // ENGINEFILTERBESSEL8_H diff --git a/src/engine/filters/enginefilterbiquad1.h b/src/engine/filters/enginefilterbiquad1.h index 7ad767c1bef4..1a88d9de9317 100644 --- a/src/engine/filters/enginefilterbiquad1.h +++ b/src/engine/filters/enginefilterbiquad1.h @@ -1,5 +1,4 @@ -#ifndef ENGINEFILTERBIQUAD1_H -#define ENGINEFILTERBIQUAD1_H +#pragma once #include "engine/filters/enginefilteriir.h" @@ -74,5 +73,3 @@ class EngineFilterBiquad1High : public EngineFilterIIR<2, IIR_HP> { private: char m_spec[FIDSPEC_LENGTH]; }; - -#endif // ENGINEFILTERBIQUAD1_H diff --git a/src/engine/filters/enginefilterbutterworth4.h b/src/engine/filters/enginefilterbutterworth4.h index 7133c60ca42b..8867abac5006 100644 --- a/src/engine/filters/enginefilterbutterworth4.h +++ b/src/engine/filters/enginefilterbutterworth4.h @@ -1,5 +1,4 @@ -#ifndef ENGINEFILTERBUTTERWORTH4_H -#define ENGINEFILTERBUTTERWORTH4_H +#pragma once #include "engine/filters/enginefilteriir.h" @@ -25,5 +24,3 @@ class EngineFilterButterworth4High : public EngineFilterIIR<4, IIR_HP> { EngineFilterButterworth4High(int sampleRate, double freqCorner1); void setFrequencyCorners(int sampleRate, double freqCorner1); }; - -#endif // ENGINEFILTERBUTTERWORTH4_H diff --git a/src/engine/filters/enginefilterbutterworth8.h b/src/engine/filters/enginefilterbutterworth8.h index 49f412c45ff7..fd86173e6be8 100644 --- a/src/engine/filters/enginefilterbutterworth8.h +++ b/src/engine/filters/enginefilterbutterworth8.h @@ -1,5 +1,4 @@ -#ifndef ENGINEFILTERBUTTERWORTH8_H -#define ENGINEFILTERBUTTERWORTH8_H +#pragma once #include "engine/filters/enginefilteriir.h" @@ -25,5 +24,3 @@ class EngineFilterButterworth8High : public EngineFilterIIR<8, IIR_HP> { EngineFilterButterworth8High(int sampleRate, double freqCorner1); void setFrequencyCorners(int sampleRate, double freqCorner1); }; - -#endif // ENGINEFILTERBUTTERWORTH8_H diff --git a/src/engine/filters/enginefilterdelay.h b/src/engine/filters/enginefilterdelay.h index e57d1ada3441..0ffb26cb3773 100644 --- a/src/engine/filters/enginefilterdelay.h +++ b/src/engine/filters/enginefilterdelay.h @@ -1,5 +1,4 @@ -#ifndef ENGINEFILTERDELAY_H -#define ENGINEFILTERDELAY_H +#pragma once #include "engine/engineobject.h" #include "util/assert.h" @@ -122,5 +121,3 @@ class EngineFilterDelay : public EngineObjectConstIn { CSAMPLE m_buf[SIZE]; bool m_doStart; }; - -#endif // ENGINEFILTERDELAY_H diff --git a/src/engine/filters/enginefilteriir.h b/src/engine/filters/enginefilteriir.h index d30689f0a02c..b00996b9ba84 100644 --- a/src/engine/filters/enginefilteriir.h +++ b/src/engine/filters/enginefilteriir.h @@ -1,5 +1,4 @@ -#ifndef ENGINEFILTERIIR_H -#define ENGINEFILTERIIR_H +#pragma once #include #include @@ -644,6 +643,3 @@ inline double EngineFilterIIR<2, IIR_HP2>::processSample(double* coef, return val; } - - -#endif // ENGINEFILTERIIR_H diff --git a/src/engine/filters/enginefilterlinkwitzriley2.h b/src/engine/filters/enginefilterlinkwitzriley2.h index 229b4c5ef8b9..bd9925c0eae5 100644 --- a/src/engine/filters/enginefilterlinkwitzriley2.h +++ b/src/engine/filters/enginefilterlinkwitzriley2.h @@ -1,5 +1,4 @@ -#ifndef ENGINEFILTELINKWITZRILEY2_H -#define ENGINEFILTELINKWITZRILEY2_H +#pragma once #include "engine/filters/enginefilteriir.h" @@ -17,5 +16,3 @@ class EngineFilterLinkwitzRiley2High : public EngineFilterIIR<2, IIR_HP2> { EngineFilterLinkwitzRiley2High(int sampleRate, double freqCorner1); void setFrequencyCorners(int sampleRate, double freqCorner1); }; - -#endif // ENGINEFILTERLINKWITZRILEY2_H diff --git a/src/engine/filters/enginefilterlinkwitzriley4.h b/src/engine/filters/enginefilterlinkwitzriley4.h index ed179f47df50..fc9761e5aca5 100644 --- a/src/engine/filters/enginefilterlinkwitzriley4.h +++ b/src/engine/filters/enginefilterlinkwitzriley4.h @@ -1,5 +1,4 @@ -#ifndef ENGINEFILTELINKWITZRILEY4_H -#define ENGINEFILTELINKWITZRILEY4_H +#pragma once #include "engine/filters/enginefilteriir.h" @@ -17,5 +16,3 @@ class EngineFilterLinkwitzRiley4High : public EngineFilterIIR<4, IIR_HP> { EngineFilterLinkwitzRiley4High(int sampleRate, double freqCorner1); void setFrequencyCorners(int sampleRate, double freqCorner1); }; - -#endif // ENGINEFILTERLINKWITZRILEY4_H diff --git a/src/engine/filters/enginefilterlinkwitzriley8.h b/src/engine/filters/enginefilterlinkwitzriley8.h index 63906af37a6c..3ae5614b8339 100644 --- a/src/engine/filters/enginefilterlinkwitzriley8.h +++ b/src/engine/filters/enginefilterlinkwitzriley8.h @@ -1,5 +1,4 @@ -#ifndef ENGINEFILTELINKWITZRILEY8_H -#define ENGINEFILTELINKWITZRILEY8_H +#pragma once #include "engine/filters/enginefilteriir.h" @@ -17,5 +16,3 @@ class EngineFilterLinkwitzRiley8High : public EngineFilterIIR<8, IIR_HP> { EngineFilterLinkwitzRiley8High(int sampleRate, double freqCorner1); void setFrequencyCorners(int sampleRate, double freqCorner1); }; - -#endif // ENGINEFILTERLINKWITZRILEY8_H diff --git a/src/engine/filters/enginefiltermoogladder4.h b/src/engine/filters/enginefiltermoogladder4.h index 8d4f1c44cb3f..b1f33c7c70f2 100644 --- a/src/engine/filters/enginefiltermoogladder4.h +++ b/src/engine/filters/enginefiltermoogladder4.h @@ -1,5 +1,4 @@ -#ifndef ENGINEFILTERMOOGLADDER4_H -#define ENGINEFILTERMOOGLADDER4_H +#pragma once // Filter based on the text "Non linear digital implementation of the moog ladder filter" // by Antti Houvilainen @@ -270,5 +269,3 @@ class EngineFilterMoogLadder4High : public EngineFilterMoogLadderBase @@ -128,5 +127,3 @@ class EngineFilterPan : public EngineObjectConstIn { bool m_doRamping; bool m_doStart; }; - -#endif // ENGINEFILTERPAN_H diff --git a/src/engine/positionscratchcontroller.h b/src/engine/positionscratchcontroller.h index ace908d1e7c0..9c463d9b3cc5 100644 --- a/src/engine/positionscratchcontroller.h +++ b/src/engine/positionscratchcontroller.h @@ -1,5 +1,4 @@ -#ifndef POSITIONSCRATCHCONTROLLER_H -#define POSITIONSCRATCHCONTROLLER_H +#pragma once #include #include @@ -37,5 +36,3 @@ class PositionScratchController : public QObject { double m_dMoveDelay; double m_dMouseSampeTime; }; - -#endif /* POSITIONSCRATCHCONTROLLER_H */ diff --git a/src/engine/readaheadmanager.cpp b/src/engine/readaheadmanager.cpp index d2b7257cdcca..acaca2f49954 100644 --- a/src/engine/readaheadmanager.cpp +++ b/src/engine/readaheadmanager.cpp @@ -1,6 +1,3 @@ -// readaheadmanager.cpp -// Created 8/2/2009 by RJ Ryan (rryan@mit.edu) - #include "engine/readaheadmanager.h" #include "engine/cachingreader/cachingreader.h" diff --git a/src/engine/readaheadmanager.h b/src/engine/readaheadmanager.h index c9c4f06fc524..49f5b98c64ff 100644 --- a/src/engine/readaheadmanager.h +++ b/src/engine/readaheadmanager.h @@ -1,6 +1,3 @@ -// readaheadmanager.h -// Created 8/2/2009 by RJ Ryan (rryan@mit.edu) - #pragma once #include diff --git a/src/engine/sidechain/enginenetworkstream.h b/src/engine/sidechain/enginenetworkstream.h index 0aac81da18d4..f09e53e9bc64 100644 --- a/src/engine/sidechain/enginenetworkstream.h +++ b/src/engine/sidechain/enginenetworkstream.h @@ -1,5 +1,4 @@ -#ifndef ENGINENETWORKSTREAM_H_ -#define ENGINENETWORKSTREAM_H_ +#pragma once #include #include @@ -62,5 +61,3 @@ class EngineNetworkStream { // onto the thread-unsafe QVector QVector m_outputWorkers; }; - -#endif /* ENGINENETWORKSTREAM_H_ */ diff --git a/src/engine/sidechain/enginerecord.cpp b/src/engine/sidechain/enginerecord.cpp index 122efe7edf4f..8ae573261a42 100644 --- a/src/engine/sidechain/enginerecord.cpp +++ b/src/engine/sidechain/enginerecord.cpp @@ -1,11 +1,3 @@ -/*************************************************************************** - enginerecord.cpp - class to record the mix - ------------------- - copyright : (C) 2007 by John Sully - copyright : (C) 2010 by Tobias Rafreider - email : -***************************************************************************/ - #include "engine/sidechain/enginerecord.h" #include "control/controlobject.h" diff --git a/src/engine/sidechain/enginerecord.h b/src/engine/sidechain/enginerecord.h index 8559d24e0594..4ef3c7393342 100644 --- a/src/engine/sidechain/enginerecord.h +++ b/src/engine/sidechain/enginerecord.h @@ -1,12 +1,4 @@ -/*************************************************************************** - enginerecord.h - description - ------------------- - copyright : (C) 2007 by John Sully - email : - ***************************************************************************/ - -#ifndef ENGINERECORD_H -#define ENGINERECORD_H +#pragma once #include #include @@ -94,5 +86,3 @@ class EngineRecord : public QObject, public EncoderCallback, public SideChainWor quint64 m_cueTrack; bool m_bCueIsEnabled; }; - -#endif diff --git a/src/engine/sidechain/enginesidechain.cpp b/src/engine/sidechain/enginesidechain.cpp index 1677c3233c84..447908b9914f 100644 --- a/src/engine/sidechain/enginesidechain.cpp +++ b/src/engine/sidechain/enginesidechain.cpp @@ -1,19 +1,3 @@ -/*************************************************************************** - enginesidechain.cpp - ------------------- - copyright : (C) 2008 Albert Santoni - email : gamegod \a\t users.sf.net -***************************************************************************/ - -/*************************************************************************** -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) any later version. * -* * -***************************************************************************/ - // This class provides a way to do audio processing that does not need // to be executed in real-time. For example, broadcast encoding // and recording encoding can be done here. This class uses double-buffering diff --git a/src/engine/sidechain/enginesidechain.h b/src/engine/sidechain/enginesidechain.h index 2278bbf8822a..15209e2fdcbf 100644 --- a/src/engine/sidechain/enginesidechain.h +++ b/src/engine/sidechain/enginesidechain.h @@ -1,21 +1,4 @@ -/*************************************************************************** - enginesidechain.h - ------------------- - copyright : (C) 2008 Albert Santoni - email : gamegod \a\t users.sf.net -***************************************************************************/ - -/*************************************************************************** -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) any later version. * -* * -***************************************************************************/ - -#ifndef ENGINESIDECHAIN_H -#define ENGINESIDECHAIN_H +#pragma once #include #include @@ -71,5 +54,3 @@ class EngineSideChain : public QThread, public AudioDestination { MMutex m_workerLock; QList m_workers GUARDED_BY(m_workerLock); }; - -#endif diff --git a/src/engine/sidechain/networkinputstreamworker.cpp b/src/engine/sidechain/networkinputstreamworker.cpp index cda90395e3da..628029792669 100644 --- a/src/engine/sidechain/networkinputstreamworker.cpp +++ b/src/engine/sidechain/networkinputstreamworker.cpp @@ -1,6 +1,3 @@ -// networkinputstreamworker.cpp -// Create on August 11, 2017 by Palakis - #include NetworkInputStreamWorker::NetworkInputStreamWorker() { diff --git a/src/engine/sidechain/networkinputstreamworker.h b/src/engine/sidechain/networkinputstreamworker.h index 1e2336ea2448..115154fea269 100644 --- a/src/engine/sidechain/networkinputstreamworker.h +++ b/src/engine/sidechain/networkinputstreamworker.h @@ -1,8 +1,4 @@ -// networkinputstreamworker.h -// Create on August 11, 2017 by Palakis - -#ifndef ENGINE_SIDECHAIN_NETWORKINPUTSTREAMWORKER_H -#define ENGINE_SIDECHAIN_NETWORKINPUTSTREAMWORKER_H +#pragma once #include "util/fifo.h" #include "util/sample.h" @@ -14,5 +10,3 @@ class NetworkInputStreamWorker { void setSourceFifo(FIFO* pFifo); }; - -#endif // ENGINE_SIDECHAIN_NETWORKINPUTSTREAMWORKER_H diff --git a/src/engine/sidechain/networkoutputstreamworker.h b/src/engine/sidechain/networkoutputstreamworker.h index ce520a4f4a4c..813853050bb3 100644 --- a/src/engine/sidechain/networkoutputstreamworker.h +++ b/src/engine/sidechain/networkoutputstreamworker.h @@ -1,5 +1,4 @@ -#ifndef NETWORKOUTPUTSTREAMWORKER_H -#define NETWORKOUTPUTSTREAMWORKER_H +#pragma once #include @@ -98,5 +97,3 @@ class NetworkOutputStreamWorker { }; typedef QSharedPointer NetworkOutputStreamWorkerPtr; - -#endif /* NETWORKSTREAMWORKER_H */ diff --git a/src/engine/sidechain/shoutconnection.cpp b/src/engine/sidechain/shoutconnection.cpp index c7e2d150955a..1b4171f8f766 100644 --- a/src/engine/sidechain/shoutconnection.cpp +++ b/src/engine/sidechain/shoutconnection.cpp @@ -1,6 +1,3 @@ -// shoutconnection.cpp -// Created July 4th 2017 by Stéphane Lepin - #include // These includes are only required by ignoreSigpipe, which is unix-only diff --git a/src/engine/sidechain/shoutconnection.h b/src/engine/sidechain/shoutconnection.h index 2e5dc67eab85..032774d85e64 100644 --- a/src/engine/sidechain/shoutconnection.h +++ b/src/engine/sidechain/shoutconnection.h @@ -1,8 +1,4 @@ -// shoutconnection.h -// Created July 4th 2017 by Stéphane Lepin - -#ifndef ENGINE_SIDECHAIN_SHOUTCONNECTION_H -#define ENGINE_SIDECHAIN_SHOUTCONNECTION_H +#pragma once #include @@ -166,5 +162,3 @@ class ShoutConnection }; typedef QSharedPointer ShoutConnectionPtr; - -#endif // ENGINE_SIDECHAIN_SHOUTCONNECTION_H diff --git a/src/engine/sidechain/sidechainworker.h b/src/engine/sidechain/sidechainworker.h index 514929339ab0..ecc4f94c0840 100644 --- a/src/engine/sidechain/sidechainworker.h +++ b/src/engine/sidechain/sidechainworker.h @@ -1,5 +1,4 @@ -#ifndef SIDECHAINWORKER_H -#define SIDECHAINWORKER_H +#pragma once #include "util/types.h" @@ -10,5 +9,3 @@ class SideChainWorker { virtual void process(const CSAMPLE* pBuffer, const int iBufferSize) = 0; virtual void shutdown() = 0; }; - -#endif /* SIDECHAINWORKER_H */ diff --git a/src/engine/sync/basesyncablelistener.h b/src/engine/sync/basesyncablelistener.h index 672645934d3d..ca3376ca83f8 100644 --- a/src/engine/sync/basesyncablelistener.h +++ b/src/engine/sync/basesyncablelistener.h @@ -1,5 +1,4 @@ -#ifndef BASESYNCABLELISTENER_H -#define BASESYNCABLELISTENER_H +#pragma once #include "engine/sync/syncable.h" #include "preferences/usersettings.h" @@ -71,5 +70,3 @@ class BaseSyncableListener : public SyncableListener { // addSyncableDeck. QList m_syncables; }; - -#endif /* BASESYNCABLELISTENER_H */ diff --git a/src/engine/sync/clock.h b/src/engine/sync/clock.h index da7de81de477..75d987fc2aeb 100644 --- a/src/engine/sync/clock.h +++ b/src/engine/sync/clock.h @@ -1,5 +1,4 @@ -#ifndef CLOCK_H -#define CLOCK_H +#pragma once class Clock { public: @@ -11,5 +10,3 @@ class Clock { virtual double getBpm() const = 0; virtual void setMasterBpm(double bpm) = 0; }; - -#endif /* CLOCK_H */ diff --git a/src/engine/sync/enginesync.cpp b/src/engine/sync/enginesync.cpp index 62a7555abc63..bf27fbd1a725 100644 --- a/src/engine/sync/enginesync.cpp +++ b/src/engine/sync/enginesync.cpp @@ -1,21 +1,3 @@ -/*************************************************************************** - enginesync.cpp - master sync control for - maintaining beatmatching amongst n decks - ------------------- - begin : Mon Mar 12 2012 - copyright : (C) 2012 by Owen Williams - email : owilliams@mixxx.org -***************************************************************************/ - -/*************************************************************************** -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) any later version. * -* * -***************************************************************************/ - #include "engine/sync/enginesync.h" #include @@ -24,7 +6,6 @@ #include "engine/enginebuffer.h" #include "engine/sync/internalclock.h" #include "util/assert.h" -#include "util/defs.h" #include "util/logger.h" namespace { diff --git a/src/engine/sync/enginesync.h b/src/engine/sync/enginesync.h index 29fc05ff2b18..86304cd73edf 100644 --- a/src/engine/sync/enginesync.h +++ b/src/engine/sync/enginesync.h @@ -1,23 +1,4 @@ -/*************************************************************************** - enginesync.h - master sync control for - maintaining beatmatching amongst n decks - ------------------- - begin : Mon Mar 12 2012 - copyright : (C) 2012 by Owen Williams - email : owilliams@mixxx.org -***************************************************************************/ - -/*************************************************************************** -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) any later version. * -* * -***************************************************************************/ - -#ifndef ENGINESYNC_H -#define ENGINESYNC_H +#pragma once #include "preferences/usersettings.h" #include "engine/sync/syncable.h" @@ -86,5 +67,3 @@ class EngineSync : public BaseSyncableListener { // Unsets all sync state on a Syncable. void deactivateSync(Syncable* pSyncable); }; - -#endif diff --git a/src/engine/sync/internalclock.h b/src/engine/sync/internalclock.h index aa2e6b989cc4..a243b5e770c2 100644 --- a/src/engine/sync/internalclock.h +++ b/src/engine/sync/internalclock.h @@ -1,5 +1,4 @@ -#ifndef INTERNALCLOCK_H -#define INTERNALCLOCK_H +#pragma once #include #include @@ -84,5 +83,3 @@ class InternalClock : public QObject, public Clock, public Syncable { // distance is m_dClockPosition / m_dBeatLength). double m_dClockPosition; }; - -#endif /* INTERNALCLOCK_H */ diff --git a/src/engine/sync/syncable.h b/src/engine/sync/syncable.h index 2f3513a19131..12d0c79ada10 100644 --- a/src/engine/sync/syncable.h +++ b/src/engine/sync/syncable.h @@ -1,5 +1,4 @@ -#ifndef SYNCABLE_H -#define SYNCABLE_H +#pragma once #include @@ -132,5 +131,3 @@ class SyncableListener { virtual Syncable* getMasterSyncable() = 0; }; - -#endif /* SYNCABLE_H */ diff --git a/src/engine/sync/synccontrol.h b/src/engine/sync/synccontrol.h index 3a0c3c24a639..66e797d7347c 100644 --- a/src/engine/sync/synccontrol.h +++ b/src/engine/sync/synccontrol.h @@ -1,5 +1,4 @@ -#ifndef SYNCCONTROL_H -#define SYNCCONTROL_H +#pragma once #include #include @@ -135,6 +134,3 @@ class SyncControl : public EngineControl, public Syncable { // m_pBeats is written from an engine worker thread mixxx::BeatsPointer m_pBeats; }; - - -#endif /* SYNCCONTROL_H */ diff --git a/src/errordialoghandler.cpp b/src/errordialoghandler.cpp index 4acde4ee50db..e9c4ec67192d 100644 --- a/src/errordialoghandler.cpp +++ b/src/errordialoghandler.cpp @@ -1,20 +1,3 @@ -/*************************************************************************** - errordialoghandler.cpp - description - ------------------- - begin : Sun Feb 22 2009 - copyright : (C) 2009 by Sean M. Pappalardo - email : pegasus@c64.org -***************************************************************************/ - -/*************************************************************************** -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) any later version. * -* * -***************************************************************************/ - #include "errordialoghandler.h" #include diff --git a/src/errordialoghandler.h b/src/errordialoghandler.h index 285546b07966..c4142be8178a 100644 --- a/src/errordialoghandler.h +++ b/src/errordialoghandler.h @@ -1,22 +1,4 @@ -/*************************************************************************** - errordialoghandler.h - description - ------------------- - begin : Fri Feb 20 2009 - copyright : (C) 2009 by Sean M. Pappalardo - email : pegasus@c64.org - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -#ifndef ERRORDIALOGHANDLER_H -#define ERRORDIALOGHANDLER_H +#pragma once #include #include @@ -26,13 +8,8 @@ #include "util/class.h" -/** - * Class used to allow all threads to display message boxes on error conditions - * with a custom list of standard buttons and to be able to react to them - * - *@author Sean M. Pappalardo - */ - +/** Class used to allow all threads to display message boxes on error conditions + * with a custom list of standard buttons and to be able to react to them. */ typedef enum { DLG_FATAL = 5, DLG_CRITICAL = 4, @@ -181,5 +158,3 @@ class ErrorDialogHandler : public QObject { DISALLOW_COPY_AND_ASSIGN(ErrorDialogHandler); }; - -#endif diff --git a/src/library/analysisfeature.cpp b/src/library/analysisfeature.cpp index ebdc605105e8..5ef8dd6b246f 100644 --- a/src/library/analysisfeature.cpp +++ b/src/library/analysisfeature.cpp @@ -1,7 +1,3 @@ -// analysisfeature.cpp -// Created 8/23/2009 by RJ Ryan (rryan@mit.edu) -// Forked 11/11/2009 by Albert Santoni (alberts@mixxx.org) - #include "library/analysisfeature.h" #include diff --git a/src/library/analysisfeature.h b/src/library/analysisfeature.h index a66086a4e705..f9a60047c12b 100644 --- a/src/library/analysisfeature.h +++ b/src/library/analysisfeature.h @@ -1,9 +1,4 @@ -// analysisfeature.h -// Created 8/23/2009 by RJ Ryan (rryan@mit.edu) -// Forked 11/11/2009 by Albert Santoni (alberts@mixxx.org) - -#ifndef ANALYSISFEATURE_H -#define ANALYSISFEATURE_H +#pragma once #include #include @@ -79,6 +74,3 @@ class AnalysisFeature : public LibraryFeature { // The title is dynamic and reflects the current progress QString m_title; }; - - -#endif /* ANALYSISFEATURE_H */ diff --git a/src/library/autodj/autodjfeature.cpp b/src/library/autodj/autodjfeature.cpp index 51bbeb10b9fa..51160c99518b 100644 --- a/src/library/autodj/autodjfeature.cpp +++ b/src/library/autodj/autodjfeature.cpp @@ -1,7 +1,3 @@ -// autodjfeature.cpp -// FORK FORK FORK on 11/1/2009 by Albert Santoni (alberts@mixxx.org) -// Created 8/23/2009 by RJ Ryan (rryan@mit.edu) - #include "library/autodj/autodjfeature.h" #include diff --git a/src/library/autodj/autodjprocessor.h b/src/library/autodj/autodjprocessor.h index 4fb7e4f52c05..1504d9c62fc4 100644 --- a/src/library/autodj/autodjprocessor.h +++ b/src/library/autodj/autodjprocessor.h @@ -1,5 +1,4 @@ -#ifndef AUTODJPROCESSOR_H -#define AUTODJPROCESSOR_H +#pragma once #include #include @@ -299,5 +298,3 @@ class AutoDJProcessor : public QObject { DISALLOW_COPY_AND_ASSIGN(AutoDJProcessor); }; - -#endif /* AUTODJPROCESSOR_H */ diff --git a/src/library/autodj/dlgautodj.h b/src/library/autodj/dlgautodj.h index 28697287d5b5..de5a7499d594 100644 --- a/src/library/autodj/dlgautodj.h +++ b/src/library/autodj/dlgautodj.h @@ -1,5 +1,4 @@ -#ifndef DLGAUTODJ_H -#define DLGAUTODJ_H +#pragma once #include #include @@ -69,5 +68,3 @@ class DlgAutoDJ : public QWidget, public Ui::DlgAutoDJ, public LibraryView { QString m_enableBtnTooltip; QString m_disableBtnTooltip; }; - -#endif //DLGAUTODJ_H diff --git a/src/library/banshee/bansheedbconnection.h b/src/library/banshee/bansheedbconnection.h index d7e2df6dddee..5b59bd638d36 100644 --- a/src/library/banshee/bansheedbconnection.h +++ b/src/library/banshee/bansheedbconnection.h @@ -1,5 +1,4 @@ -#ifndef BANSHEEDBCONNECTION_H -#define BANSHEEDBCONNECTION_H +#pragma once #include #include @@ -64,5 +63,3 @@ class BansheeDbConnection QMap m_albumMap; }; - -#endif // BANSHEEDBCONNECTION_H diff --git a/src/library/banshee/bansheefeature.h b/src/library/banshee/bansheefeature.h index 23e86900b823..46e9bcf695c2 100644 --- a/src/library/banshee/bansheefeature.h +++ b/src/library/banshee/bansheefeature.h @@ -1,6 +1,4 @@ - -#ifndef BANSHEEFEATURE_H -#define BANSHEEFEATURE_H +#pragma once #include #include @@ -58,5 +56,3 @@ class BansheeFeature : public BaseExternalLibraryFeature { static const QString BANSHEE_MOUNT_KEY; }; - -#endif // BANSHEEFEATURE_H diff --git a/src/library/banshee/bansheeplaylistmodel.h b/src/library/banshee/bansheeplaylistmodel.h index 795bfe742c20..04cd7d01c66a 100644 --- a/src/library/banshee/bansheeplaylistmodel.h +++ b/src/library/banshee/bansheeplaylistmodel.h @@ -1,5 +1,4 @@ -#ifndef BANSHEEPLAYLISTMODEL_H -#define BANSHEEPLAYLISTMODEL_H +#pragma once #include #include @@ -39,5 +38,3 @@ class BansheePlaylistModel final : public BaseSqlTableModel { int m_playlistId; QString m_tempTableName; }; - -#endif // BANSHEEPLAYLISTMODEL_H diff --git a/src/library/baseexternalplaylistmodel.h b/src/library/baseexternalplaylistmodel.h index 8befddc6930b..ba8f8b81b276 100644 --- a/src/library/baseexternalplaylistmodel.h +++ b/src/library/baseexternalplaylistmodel.h @@ -1,5 +1,4 @@ -#ifndef BASEEXTERNALPLAYLISTMODEL_H -#define BASEEXTERNALPLAYLISTMODEL_H +#pragma once #include #include @@ -37,5 +36,3 @@ class BaseExternalPlaylistModel : public BaseSqlTableModel { QString m_playlistTracksTable; QSharedPointer m_trackSource; }; - -#endif /* BASEEXTERNALPLAYLISTMODEL_H */ diff --git a/src/library/baseexternaltrackmodel.h b/src/library/baseexternaltrackmodel.h index d7e1cf2e6dde..859267209c5c 100644 --- a/src/library/baseexternaltrackmodel.h +++ b/src/library/baseexternaltrackmodel.h @@ -1,5 +1,4 @@ -#ifndef BASEEXTERNALTRACKMODEL_H -#define BASEEXTERNALTRACKMODEL_H +#pragma once #include #include @@ -29,5 +28,3 @@ class BaseExternalTrackModel : public BaseSqlTableModel { private: TrackId doGetTrackId(const TrackPointer& pTrack) const override; }; - -#endif /* BASEEXTERNALTRACKMODEL_H */ diff --git a/src/library/basesqltablemodel.cpp b/src/library/basesqltablemodel.cpp index 0edc5dcac2f2..73e261a9eb8f 100644 --- a/src/library/basesqltablemodel.cpp +++ b/src/library/basesqltablemodel.cpp @@ -1,5 +1,3 @@ -// Created by RJ Ryan (rryan@mit.edu) 1/29/2010 - #include "library/basesqltablemodel.h" #include diff --git a/src/library/basetrackcache.cpp b/src/library/basetrackcache.cpp index deb7f942ffef..bc8c66292c12 100644 --- a/src/library/basetrackcache.cpp +++ b/src/library/basetrackcache.cpp @@ -1,6 +1,3 @@ -// basetrackcache.cpp -// Created 7/3/2011 by RJ Ryan (rryan@mit.edu) - #include "library/basetrackcache.h" #include "library/queryutil.h" diff --git a/src/library/bpmdelegate.h b/src/library/bpmdelegate.h index b6919b2b31d5..02db4ad09b58 100644 --- a/src/library/bpmdelegate.h +++ b/src/library/bpmdelegate.h @@ -1,5 +1,4 @@ -#ifndef BPMDELEGATE_H -#define BPMDELEGATE_H +#pragma once #include #include @@ -22,5 +21,3 @@ class BPMDelegate : public TableItemDelegate { QCheckBox* m_pCheckBox; QItemEditorFactory* m_pFactory; }; - -#endif // BPMDELEGATE_H diff --git a/src/library/browse/browsefeature.cpp b/src/library/browse/browsefeature.cpp index c851c8f18e9b..68aee79d2279 100644 --- a/src/library/browse/browsefeature.cpp +++ b/src/library/browse/browsefeature.cpp @@ -1,6 +1,3 @@ -// browsefeature.cpp -// Created 9/8/2009 by RJ Ryan (rryan@mit.edu) - #include "library/browse/browsefeature.h" #include diff --git a/src/library/browse/browsefeature.h b/src/library/browse/browsefeature.h index 0cab0654fe2b..a90fdded19a6 100644 --- a/src/library/browse/browsefeature.h +++ b/src/library/browse/browsefeature.h @@ -1,8 +1,4 @@ -// browsefeature.h -// Created 9/8/2009 by RJ Ryan (rryan@mit.edu) - -#ifndef BROWSEFEATURE_H -#define BROWSEFEATURE_H +#pragma once #include #include @@ -80,5 +76,3 @@ class BrowseFeature : public LibraryFeature { QIcon m_icon; QPointer m_pSidebarWidget; }; - -#endif // BROWSEFEATURE_H diff --git a/src/library/browse/browsetablemodel.h b/src/library/browse/browsetablemodel.h index 560d74c9f702..eb95e63c4ddc 100644 --- a/src/library/browse/browsetablemodel.h +++ b/src/library/browse/browsetablemodel.h @@ -1,5 +1,4 @@ -#ifndef BROWSETABLEMODEL_H -#define BROWSETABLEMODEL_H +#pragma once #include #include @@ -93,5 +92,3 @@ class BrowseTableModel final : public QStandardItemModel, public virtual TrackMo QMap m_sortColumnIdByColumnIndex; }; - -#endif diff --git a/src/library/browse/browsethread.h b/src/library/browse/browsethread.h index cee56c2dade0..08c15630d210 100644 --- a/src/library/browse/browsethread.h +++ b/src/library/browse/browsethread.h @@ -2,8 +2,7 @@ * browsethread.h (C) 2011 Tobias Rafreider */ -#ifndef BROWSETHREAD_H -#define BROWSETHREAD_H +#pragma once #include #include @@ -55,5 +54,3 @@ class BrowseThread : public QThread { static QWeakPointer m_weakInstanceRef; }; - -#endif // BROWSETHREAD_H diff --git a/src/library/browse/foldertreemodel.h b/src/library/browse/foldertreemodel.h index 240e26b44723..2bff73671a3f 100644 --- a/src/library/browse/foldertreemodel.h +++ b/src/library/browse/foldertreemodel.h @@ -1,5 +1,4 @@ -#ifndef FOLDER_TREE_MODEL -#define FOLDER_TREE_MODEL +#pragma once #include #include @@ -27,5 +26,3 @@ class FolderTreeModel : public TreeItemModel { // Used for memoizing the results of directoryHasChildren mutable QHash m_directoryCache; }; - -#endif diff --git a/src/library/columncache.h b/src/library/columncache.h index de32e1767b6c..23f5c8004b28 100644 --- a/src/library/columncache.h +++ b/src/library/columncache.h @@ -1,5 +1,4 @@ -#ifndef COLUMNCACHE_H -#define COLUMNCACHE_H +#pragma once #include #include @@ -122,5 +121,3 @@ class ColumnCache : public QObject { private slots: void slotSetKeySortOrder(double); }; - -#endif /* COLUMNCACHE_H */ diff --git a/src/library/dao/analysisdao.h b/src/library/dao/analysisdao.h index 3a7992832d7d..1519b30f2260 100644 --- a/src/library/dao/analysisdao.h +++ b/src/library/dao/analysisdao.h @@ -1,5 +1,4 @@ -#ifndef ANALYSISDAO_H -#define ANALYSISDAO_H +#pragma once #include #include @@ -67,5 +66,3 @@ class AnalysisDao : public DAO { const UserSettingsPointer m_pConfig; }; - -#endif // ANALYSISDAO_H diff --git a/src/library/dao/cuedao.cpp b/src/library/dao/cuedao.cpp index d72e69e35071..afab8ab2ec43 100644 --- a/src/library/dao/cuedao.cpp +++ b/src/library/dao/cuedao.cpp @@ -1,6 +1,3 @@ -// cuedao.cpp -// Created 10/26/2009 by RJ Ryan (rryan@mit.edu) - #include "library/dao/cuedao.h" #include diff --git a/src/library/dao/libraryhashdao.cpp b/src/library/dao/libraryhashdao.cpp index 32cc824cb0b1..4e0e1347e901 100644 --- a/src/library/dao/libraryhashdao.cpp +++ b/src/library/dao/libraryhashdao.cpp @@ -1,4 +1,3 @@ - #include #include #include diff --git a/src/library/dao/libraryhashdao.h b/src/library/dao/libraryhashdao.h index e3e4b4bf470b..0f16cefa5b7d 100644 --- a/src/library/dao/libraryhashdao.h +++ b/src/library/dao/libraryhashdao.h @@ -1,5 +1,4 @@ -#ifndef LIBRARYHASHDAO_H -#define LIBRARYHASHDAO_H +#pragma once #include #include @@ -26,5 +25,3 @@ class LibraryHashDAO : public DAO { const bool deleted, const bool verified); QStringList getDeletedDirectories(); }; - -#endif //LIBRARYHASHDAO_H diff --git a/src/library/dao/playlistdao.h b/src/library/dao/playlistdao.h index a9de3d8e2a88..dc4c24f1851e 100644 --- a/src/library/dao/playlistdao.h +++ b/src/library/dao/playlistdao.h @@ -1,5 +1,4 @@ -#ifndef PLAYLISTDAO_H -#define PLAYLISTDAO_H +#pragma once #include #include @@ -151,5 +150,3 @@ class PlaylistDAO : public QObject, public virtual DAO { AutoDJProcessor* m_pAutoDJProcessor; DISALLOW_COPY_AND_ASSIGN(PlaylistDAO); }; - -#endif //PLAYLISTDAO_H diff --git a/src/library/dao/trackdao.h b/src/library/dao/trackdao.h index 12b297371341..a805b19f40dd 100644 --- a/src/library/dao/trackdao.h +++ b/src/library/dao/trackdao.h @@ -1,5 +1,4 @@ -#ifndef TRACKDAO_H -#define TRACKDAO_H +#pragma once #include #include @@ -184,5 +183,3 @@ class TrackDAO : public QObject, public virtual DAO, public virtual GlobalTrackC }; Q_DECLARE_OPERATORS_FOR_FLAGS(TrackDAO::ResolveTrackIdFlags) - -#endif //TRACKDAO_H diff --git a/src/library/dlganalysis.h b/src/library/dlganalysis.h index 5e8b7a9cd259..e279fcfc8a99 100644 --- a/src/library/dlganalysis.h +++ b/src/library/dlganalysis.h @@ -1,5 +1,4 @@ -#ifndef DLGANALYSIS_H -#define DLGANALYSIS_H +#pragma once #include #include @@ -63,5 +62,3 @@ class DlgAnalysis : public QWidget, public Ui::DlgAnalysis, public virtual Libra WAnalysisLibraryTableView* m_pAnalysisLibraryTableView; AnalysisLibraryTableModel* m_pAnalysisLibraryTableModel; }; - -#endif //DLGTRIAGE_H diff --git a/src/library/export/trackexportdlg.h b/src/library/export/trackexportdlg.h index b63956c554d3..f4b2776aeb8e 100644 --- a/src/library/export/trackexportdlg.h +++ b/src/library/export/trackexportdlg.h @@ -1,5 +1,4 @@ -#ifndef DLGTRACKEXPORT_H -#define DLGTRACKEXPORT_H +#pragma once #include #include @@ -50,5 +49,3 @@ class TrackExportDlg : public QDialog, public Ui::DlgTrackExport { TrackPointerList m_tracks; TrackExportWorker* m_worker; }; - -#endif // DLGTRACKEXPORT_H diff --git a/src/library/export/trackexportwizard.h b/src/library/export/trackexportwizard.h index 9c9971e0c257..9954b8fa39f8 100644 --- a/src/library/export/trackexportwizard.h +++ b/src/library/export/trackexportwizard.h @@ -6,8 +6,7 @@ // FLAC -> AIFF for CDJ // * Export sidecar metadata files for import into Mixxx -#ifndef TRACKEXPORT_H -#define TRACKEXPORT_H +#pragma once #include #include @@ -39,5 +38,3 @@ class TrackExportWizard : public QObject { QScopedPointer m_dialog; QScopedPointer m_worker; }; - -#endif // TRACKEXPORT_H diff --git a/src/library/export/trackexportworker.h b/src/library/export/trackexportworker.h index 0bd2ea369549..353abc002ffe 100644 --- a/src/library/export/trackexportworker.h +++ b/src/library/export/trackexportworker.h @@ -1,5 +1,4 @@ -#ifndef TRACKEXPORTWORKER_H -#define TRACKEXPORTWORKER_H +#pragma once #include #include @@ -86,5 +85,3 @@ class TrackExportWorker : public QThread { const QString m_destDir; const TrackPointerList m_tracks; }; - -#endif // TRACKEXPORTWORKER_H diff --git a/src/library/hiddentablemodel.h b/src/library/hiddentablemodel.h index 685a47e75691..f2fabc9d3e57 100644 --- a/src/library/hiddentablemodel.h +++ b/src/library/hiddentablemodel.h @@ -1,5 +1,4 @@ -#ifndef HIDDENTABLEMODEL_H -#define HIDDENTABLEMODEL_H +#pragma once #include "library/basesqltablemodel.h" @@ -17,5 +16,3 @@ class HiddenTableModel final : public BaseSqlTableModel { Qt::ItemFlags flags(const QModelIndex &index) const final; Capabilities getCapabilities() const final; }; - -#endif diff --git a/src/library/itunes/itunesfeature.h b/src/library/itunes/itunesfeature.h index 92358e9dcb70..a3cd26b1ffe4 100644 --- a/src/library/itunes/itunesfeature.h +++ b/src/library/itunes/itunesfeature.h @@ -1,8 +1,4 @@ -// itunesfeaturefeature.h -// Created 8/23/2009 by RJ Ryan (rryan@mit.edu) - -#ifndef ITUNESFEATURE_H -#define ITUNESFEATURE_H +#pragma once #include #include @@ -75,5 +71,3 @@ class ITunesFeature : public BaseExternalLibraryFeature { QPointer m_pSidebarWidget; QIcon m_icon; }; - -#endif // ITUNESFEATURE_H diff --git a/src/library/library_preferences.h b/src/library/library_preferences.h index a30a452fa7c9..3622c99dcfdb 100644 --- a/src/library/library_preferences.h +++ b/src/library/library_preferences.h @@ -1,8 +1,5 @@ -#ifndef LIBRARY_PREFERENCES_H -#define LIBRARY_PREFERENCES_H +#pragma once #define PREF_LEGACY_LIBRARY_DIR ConfigKey("[Playlist]","Directory") #define PREF_LIBRARY_EDIT_METADATA_DEFAULT false - -#endif /* LIBRARY_PREFERENCES_H */ diff --git a/src/library/librarycontrol.h b/src/library/librarycontrol.h index ed799773ae6f..c04bf9ecdd1f 100644 --- a/src/library/librarycontrol.h +++ b/src/library/librarycontrol.h @@ -1,5 +1,4 @@ -#ifndef LIBRARYMIDICONTROL_H -#define LIBRARYMIDICONTROL_H +#pragma once #include @@ -175,5 +174,3 @@ class LibraryControl : public QObject { ControlProxy m_numPreviewDecks; std::map> m_loadToGroupControllers; }; - -#endif //LIBRARYMIDICONTROL_H diff --git a/src/library/libraryfeature.cpp b/src/library/libraryfeature.cpp index 153be49c21c2..bf3a0e2e6217 100644 --- a/src/library/libraryfeature.cpp +++ b/src/library/libraryfeature.cpp @@ -1,6 +1,3 @@ -// libraryfeature.cpp -// Created 8/17/2009 by RJ Ryan (rryan@mit.edu) - #include "library/libraryfeature.h" #include diff --git a/src/library/libraryfeature.h b/src/library/libraryfeature.h index c0fd1d3d8370..465b48c23f21 100644 --- a/src/library/libraryfeature.h +++ b/src/library/libraryfeature.h @@ -1,8 +1,4 @@ -// libraryfeature.h -// Created 8/17/2009 by RJ Ryan (rryan@mit.edu) - -#ifndef LIBRARYFEATURE_H -#define LIBRARYFEATURE_H +#pragma once #include #include @@ -139,5 +135,3 @@ class LibraryFeature : public QObject { private: QStringList getPlaylistFiles(QFileDialog::FileMode mode) const; }; - -#endif /* LIBRARYFEATURE_H */ diff --git a/src/library/librarytablemodel.h b/src/library/librarytablemodel.h index 0ab2a6c4b56c..b5a6c359cbad 100644 --- a/src/library/librarytablemodel.h +++ b/src/library/librarytablemodel.h @@ -1,5 +1,4 @@ -#ifndef LIBRARYTABLEMODEL_H -#define LIBRARYTABLEMODEL_H +#pragma once #include "library/basesqltablemodel.h" @@ -18,5 +17,3 @@ class LibraryTableModel : public BaseSqlTableModel { int addTracks(const QModelIndex& index, const QList& locations) final; TrackModel::Capabilities getCapabilities() const final; }; - -#endif diff --git a/src/library/libraryview.h b/src/library/libraryview.h index 3b6ab8897b02..112c294ca2a1 100644 --- a/src/library/libraryview.h +++ b/src/library/libraryview.h @@ -4,8 +4,7 @@ /// LibraryView is an abstract interface that all views to be used with the /// Library widget should support. -#ifndef LIBRARYVIEW_H -#define LIBRARYVIEW_H +#pragma once #include @@ -47,5 +46,3 @@ class LibraryView { virtual void assignPreviousTrackColor(){}; virtual void assignNextTrackColor(){}; }; - -#endif /* LIBRARYVIEW_H */ diff --git a/src/library/mixxxlibraryfeature.cpp b/src/library/mixxxlibraryfeature.cpp index 722a059938b5..8117328d579e 100644 --- a/src/library/mixxxlibraryfeature.cpp +++ b/src/library/mixxxlibraryfeature.cpp @@ -1,6 +1,3 @@ -// mixxxlibraryfeature.cpp -// Created 8/23/2009 by RJ Ryan (rryan@mit.edu) - #include "library/mixxxlibraryfeature.h" #include diff --git a/src/library/mixxxlibraryfeature.h b/src/library/mixxxlibraryfeature.h index b40fe005a8e0..3dc0700fdeac 100644 --- a/src/library/mixxxlibraryfeature.h +++ b/src/library/mixxxlibraryfeature.h @@ -1,8 +1,4 @@ -// mixxxlibraryfeature.h -// Created 8/23/2009 by RJ Ryan (rryan@mit.edu) - -#ifndef MIXXXLIBRARYFEATURE_H -#define MIXXXLIBRARYFEATURE_H +#pragma once #include #include @@ -65,5 +61,3 @@ class MixxxLibraryFeature final : public LibraryFeature { DlgMissing* m_pMissingView; DlgHidden* m_pHiddenView; }; - -#endif /* MIXXXLIBRARYFEATURE_H */ diff --git a/src/library/parser.cpp b/src/library/parser.cpp index 5a8ab4bd3bc2..eca875f3682f 100644 --- a/src/library/parser.cpp +++ b/src/library/parser.cpp @@ -19,11 +19,6 @@ #include "library/parser.h" -/** - @author Ingo Kossyk (kossyki@cs.tu-berlin.de) - **/ - - Parser::Parser() { } diff --git a/src/library/parser.h b/src/library/parser.h index 53e617e497ac..4a666bdde812 100644 --- a/src/library/parser.h +++ b/src/library/parser.h @@ -11,8 +11,7 @@ // // -#ifndef PARSER_H -#define PARSER_H +#pragma once /**Developer Information: This is the rootclass for all parser classes for the Importer class. @@ -60,5 +59,3 @@ class Parser : public QObject { const QString& playlistEntry, const QString& basePath = QString()); }; - -#endif diff --git a/src/library/parsercsv.h b/src/library/parsercsv.h index ee15981292c7..ecf1e1167ed8 100644 --- a/src/library/parsercsv.h +++ b/src/library/parsercsv.h @@ -11,8 +11,7 @@ // Copyright: See COPYING file that comes with this distribution // // -#ifndef PARSERCSV_H -#define PARSERCSV_H +#pragma once #include #include @@ -39,5 +38,3 @@ class ParserCsv : public Parser }; - -#endif diff --git a/src/library/parserm3u.cpp b/src/library/parserm3u.cpp index 1a6bb13f1d11..cfab773c2bad 100644 --- a/src/library/parserm3u.cpp +++ b/src/library/parserm3u.cpp @@ -21,10 +21,6 @@ #include "moc_parserm3u.cpp" -/** - @author Ingo Kossyk (kossyki@cs.tu-berlin.de) - **/ - /** ToDo: - parse ALL information from the pls file if available , diff --git a/src/library/parserm3u.h b/src/library/parserm3u.h index 1ff214947193..1b8829fa8d0d 100644 --- a/src/library/parserm3u.h +++ b/src/library/parserm3u.h @@ -10,8 +10,7 @@ // Copyright: See COPYING file that comes with this distribution // // -#ifndef PARSERM3U_H -#define PARSERM3U_H +#pragma once #include #include @@ -39,5 +38,3 @@ class ParserM3u : public Parser }; - -#endif diff --git a/src/library/parserpls.cpp b/src/library/parserpls.cpp index 5e33d304b849..522d47bffcc6 100644 --- a/src/library/parserpls.cpp +++ b/src/library/parserpls.cpp @@ -20,10 +20,6 @@ #include "moc_parserpls.cpp" -/** - @author Ingo Kossyk (kossyki@cs.tu-berlin.de) - **/ - /** ToDo: - parse ALL information from the pls file if available , diff --git a/src/library/parserpls.h b/src/library/parserpls.h index 4f8ba7cbce62..a7ca089da3ad 100644 --- a/src/library/parserpls.h +++ b/src/library/parserpls.h @@ -9,8 +9,7 @@ // Copyright: See COPYING file that comes with this distribution // // -#ifndef PARSERPLS_H -#define PARSERPLS_H +#pragma once #include "library/parser.h" @@ -35,5 +34,3 @@ class ParserPls : public Parser { QString getFilePath(QTextStream*, const QString& basePath); }; - -#endif diff --git a/src/library/proxytrackmodel.cpp b/src/library/proxytrackmodel.cpp index 32316194e598..ee463eb47125 100644 --- a/src/library/proxytrackmodel.cpp +++ b/src/library/proxytrackmodel.cpp @@ -1,5 +1,4 @@ -// proxytrackmodel.cpp -// Created 10/22/2009 by RJ Ryan (rryan@mit.edu) +#include "library/proxytrackmodel.h" #include "library/proxytrackmodel.h" diff --git a/src/library/queryutil.h b/src/library/queryutil.h index f3e7d8a544da..7c22376d8df7 100644 --- a/src/library/queryutil.h +++ b/src/library/queryutil.h @@ -1,5 +1,4 @@ -#ifndef QUERYUTIL_H -#define QUERYUTIL_H +#pragma once #include #include @@ -102,5 +101,3 @@ class FieldEscaper final { QSqlDatabase m_database; mutable QSqlField m_stringField; }; - -#endif /* QUERYUTIL_H */ diff --git a/src/library/recording/recordingfeature.cpp b/src/library/recording/recordingfeature.cpp index 96f428fa544a..43655334291b 100644 --- a/src/library/recording/recordingfeature.cpp +++ b/src/library/recording/recordingfeature.cpp @@ -1,6 +1,3 @@ -// recordingfeature.cpp -// Created 03/26/2010 by Tobias Rafreider - #include "library/recording/recordingfeature.h" #include "controllers/keyboard/keyboardeventfilter.h" diff --git a/src/library/recording/recordingfeature.h b/src/library/recording/recordingfeature.h index 2fb8234f73cb..61b26ad78211 100644 --- a/src/library/recording/recordingfeature.h +++ b/src/library/recording/recordingfeature.h @@ -1,8 +1,4 @@ -// recordingfeature.h -// Created 03/26/2010 by Tobias Rafreider - -#ifndef RECORDING_FEATURE_H -#define RECORDING_FEATURE_H +#pragma once #include #include @@ -45,5 +41,3 @@ class RecordingFeature final : public LibraryFeature { FolderTreeModel m_childModel; }; - -#endif diff --git a/src/library/rekordbox/rekordbox_anlz.h b/src/library/rekordbox/rekordbox_anlz.h index d4cab6ee1c09..0cd43827d81c 100644 --- a/src/library/rekordbox/rekordbox_anlz.h +++ b/src/library/rekordbox/rekordbox_anlz.h @@ -1,5 +1,4 @@ -#ifndef REKORDBOX_ANLZ_H_ -#define REKORDBOX_ANLZ_H_ +#pragma once // This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild @@ -1039,5 +1038,3 @@ class rekordbox_anlz_t : public kaitai::kstruct { rekordbox_anlz_t* _root() const { return m__root; } kaitai::kstruct* _parent() const { return m__parent; } }; - -#endif // REKORDBOX_ANLZ_H_ diff --git a/src/library/rekordbox/rekordbox_pdb.h b/src/library/rekordbox/rekordbox_pdb.h index bb920b62ac8b..9b251b59364d 100644 --- a/src/library/rekordbox/rekordbox_pdb.h +++ b/src/library/rekordbox/rekordbox_pdb.h @@ -1,5 +1,4 @@ -#ifndef REKORDBOX_PDB_H_ -#define REKORDBOX_PDB_H_ +#pragma once // This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild @@ -1756,5 +1755,3 @@ class rekordbox_pdb_t : public kaitai::kstruct { rekordbox_pdb_t* _root() const { return m__root; } kaitai::kstruct* _parent() const { return m__parent; } }; - -#endif // REKORDBOX_PDB_H_ diff --git a/src/library/rekordbox/rekordboxfeature.cpp b/src/library/rekordbox/rekordboxfeature.cpp index a9238ecb03c8..7a1adade130d 100644 --- a/src/library/rekordbox/rekordboxfeature.cpp +++ b/src/library/rekordbox/rekordboxfeature.cpp @@ -1,6 +1,3 @@ -// rekordboxfeature.cpp -// Created 05/24/2019 by Evan Dekker - #include "library/rekordbox/rekordboxfeature.h" #include diff --git a/src/library/rekordbox/rekordboxfeature.h b/src/library/rekordbox/rekordboxfeature.h index 8f41aa22710c..c1388cef3f1f 100644 --- a/src/library/rekordbox/rekordboxfeature.h +++ b/src/library/rekordbox/rekordboxfeature.h @@ -1,6 +1,3 @@ -// rekordboxfeature.h -// Created 05/24/2019 by Evan Dekker - // This feature reads tracks, playlists and folders from removable Recordbox // prepared devices (USB drives, etc), by parsing the binary *.PDB files // stored on each removable device. It does not read the locally stored @@ -25,8 +22,7 @@ // https://github.com/Deep-Symmetry/crate-digger/blob/master/src/main/kaitai/rekordbox_pdb.ksy -#ifndef REKORDBOX_FEATURE_H -#define REKORDBOX_FEATURE_H +#pragma once #include #include @@ -96,5 +92,3 @@ class RekordboxFeature : public BaseExternalLibraryFeature { QSharedPointer m_trackSource; QIcon m_icon; }; - -#endif // REKORDBOX_FEATURE_H diff --git a/src/library/rhythmbox/rhythmboxfeature.h b/src/library/rhythmbox/rhythmboxfeature.h index 40607659a339..fd2ef67f76c7 100644 --- a/src/library/rhythmbox/rhythmboxfeature.h +++ b/src/library/rhythmbox/rhythmboxfeature.h @@ -1,8 +1,4 @@ -// rhythmboxfeature.h -// Created 8/23/2009 by RJ Ryan (rryan@mit.edu) - -#ifndef RHYTHMBOXFEATURE_H -#define RHYTHMBOXFEATURE_H +#pragma once #include #include @@ -64,5 +60,3 @@ class RhythmboxFeature : public BaseExternalLibraryFeature { QSharedPointer m_trackSource; QIcon m_icon; }; - -#endif // RHYTHMBOXFEATURE_H diff --git a/src/library/scanner/libraryscanner.h b/src/library/scanner/libraryscanner.h index 8bda84b91cb1..ee0de3478b08 100644 --- a/src/library/scanner/libraryscanner.h +++ b/src/library/scanner/libraryscanner.h @@ -1,5 +1,4 @@ -#ifndef MIXXX_LIBRARYSCANNER_H -#define MIXXX_LIBRARYSCANNER_H +#pragma once #include @@ -123,5 +122,3 @@ class LibraryScanner : public QThread { QStringList m_libraryRootDirs; QScopedPointer m_pProgressDlg; }; - -#endif // MIXXX_LIBRARYSCANNER_H diff --git a/src/library/scanner/libraryscannerdlg.cpp b/src/library/scanner/libraryscannerdlg.cpp index 514f06161bca..3acf76dde20f 100644 --- a/src/library/scanner/libraryscannerdlg.cpp +++ b/src/library/scanner/libraryscannerdlg.cpp @@ -1,21 +1,3 @@ -/*************************************************************************** - LibraryScannerDlg.cpp - shows library scanning - progress - ------------------- - begin : 11/27/2007 - copyright : (C) 2007 Albert Santoni and Adam Davison - email : gamegod \a\t users.sf.net -***************************************************************************/ - -/*************************************************************************** -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) any later version. * -* * -***************************************************************************/ - #include "library/scanner/libraryscannerdlg.h" #include diff --git a/src/library/scanner/libraryscannerdlg.h b/src/library/scanner/libraryscannerdlg.h index 3db2b6d1a401..076427335f76 100644 --- a/src/library/scanner/libraryscannerdlg.h +++ b/src/library/scanner/libraryscannerdlg.h @@ -1,23 +1,4 @@ -/*************************************************************************** - LibraryScannerDlg.cpp - shows library scanning - progress - ------------------- - begin : 11/27/2007 - copyright : (C) 2007 Albert Santoni and Adam Davison - email : gamegod \a\t users.sf.net -***************************************************************************/ - -/*************************************************************************** -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) any later version. * -* * -***************************************************************************/ - -#ifndef LIBRARYSCANNERDLG_H -#define LIBRARYSCANNERDLG_H +#pragma once #include #include @@ -46,5 +27,3 @@ class LibraryScannerDlg : public QWidget { PerformanceTimer m_timer; bool m_bCancelled; }; - -#endif diff --git a/src/library/scanner/scannerglobal.h b/src/library/scanner/scannerglobal.h index 6feedeb12d23..e97d0e19cc74 100644 --- a/src/library/scanner/scannerglobal.h +++ b/src/library/scanner/scannerglobal.h @@ -1,5 +1,4 @@ -#ifndef SCANNERGLOBAL_H -#define SCANNERGLOBAL_H +#pragma once #include #include @@ -223,5 +222,3 @@ class ScannerGlobal { }; typedef QSharedPointer ScannerGlobalPointer; - -#endif /* SCANNERGLOBAL_H */ diff --git a/src/library/scanner/scannertask.h b/src/library/scanner/scannertask.h index ca27f6ea10b6..7f96a21cd19f 100644 --- a/src/library/scanner/scannertask.h +++ b/src/library/scanner/scannertask.h @@ -1,5 +1,4 @@ -#ifndef SCANNERTASK_H -#define SCANNERTASK_H +#pragma once #include #include @@ -41,5 +40,3 @@ class ScannerTask : public QObject, public QRunnable { private: bool m_success; }; - -#endif /* SCANNERTASK_H */ diff --git a/src/library/scanner/scannerutil.h b/src/library/scanner/scannerutil.h index 7ddf918cb813..e5cf7c349102 100644 --- a/src/library/scanner/scannerutil.h +++ b/src/library/scanner/scannerutil.h @@ -1,5 +1,4 @@ -#ifndef SCANNERUTIL_H -#define SCANNERUTIL_H +#pragma once #include #include @@ -31,5 +30,3 @@ class ScannerUtil { private: ScannerUtil() {} }; - -#endif /* SCANNERUTIL_H */ diff --git a/src/library/searchqueryparser.h b/src/library/searchqueryparser.h index 07038df99223..9878149c0a7b 100644 --- a/src/library/searchqueryparser.h +++ b/src/library/searchqueryparser.h @@ -1,5 +1,4 @@ -#ifndef SEARCHQUERYPARSER_H -#define SEARCHQUERYPARSER_H +#pragma once #include #include @@ -45,5 +44,3 @@ class SearchQueryParser { DISALLOW_COPY_AND_ASSIGN(SearchQueryParser); }; - -#endif /* SEARCHQUERYPARSER_H */ diff --git a/src/library/serato/seratofeature.cpp b/src/library/serato/seratofeature.cpp index 2b85d74afc3b..9abbd1b0ea66 100644 --- a/src/library/serato/seratofeature.cpp +++ b/src/library/serato/seratofeature.cpp @@ -1,6 +1,3 @@ -// seratofeature.cpp -// Created 2020-01-31 by Jan Holthuis - #include "library/serato/seratofeature.h" #include diff --git a/src/library/sidebarmodel.h b/src/library/sidebarmodel.h index 2a331785c7b2..25cee03ecf06 100644 --- a/src/library/sidebarmodel.h +++ b/src/library/sidebarmodel.h @@ -1,8 +1,4 @@ -// sidebarmodel.h -// Created 8/21/09 by RJ Ryan (rryan@mit.edu) - -#ifndef SIDEBARMODEL_H -#define SIDEBARMODEL_H +#pragma once #include #include @@ -90,5 +86,3 @@ class SidebarModel : public QAbstractItemModel { void startPressedUntilClickedTimer(const QModelIndex& pressedIndex); void stopPressedUntilClickedTimer(); }; - -#endif /* SIDEBARMODEL_H */ diff --git a/src/library/songdownloader.h b/src/library/songdownloader.h index 88fa54e32468..7e08427352b1 100644 --- a/src/library/songdownloader.h +++ b/src/library/songdownloader.h @@ -1,5 +1,4 @@ -#ifndef SONGDOWNLOADER_H -#define SONGDOWNLOADER_H +#pragma once #include #include @@ -38,5 +37,3 @@ class SongDownloader : public QObject { QNetworkReply* m_pReply; QNetworkRequest* m_pRequest; }; - -#endif // SONGDOWNLOADER_H diff --git a/src/library/stardelegate.cpp b/src/library/stardelegate.cpp index 370027b0d312..8d000e605ae5 100644 --- a/src/library/stardelegate.cpp +++ b/src/library/stardelegate.cpp @@ -1,20 +1,3 @@ -/*************************************************************************** - stardelegate.cpp - ------------------- - copyright : (C) 2010 Tobias Rafreider - copyright : (C) 2009 Nokia Corporation - -***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - #include "library/stardelegate.h" #include diff --git a/src/library/stardelegate.h b/src/library/stardelegate.h index 999c65e2ffc1..27ce03f13118 100644 --- a/src/library/stardelegate.h +++ b/src/library/stardelegate.h @@ -1,23 +1,4 @@ -/*************************************************************************** - stardelegate.h - ------------------- - copyright : (C) 2010 Tobias Rafreider - copyright : (C) 2009 Nokia Corporation - -***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - - -#ifndef STARDELEGATE_H -#define STARDELEGATE_H +#pragma once #include "library/tableitemdelegate.h" @@ -57,5 +38,3 @@ class StarDelegate : public TableItemDelegate { QPersistentModelIndex m_currentEditedCellIndex; bool m_isOneCellInEditMode; }; - -#endif diff --git a/src/library/stareditor.cpp b/src/library/stareditor.cpp index ab6bd2420d18..92a7c919b961 100644 --- a/src/library/stareditor.cpp +++ b/src/library/stareditor.cpp @@ -1,29 +1,3 @@ -/*************************************************************************** - stareditor.cpp - ------------------- - copyright : (C) 2010 Tobias Rafreider - copyright : (C) 2009 Nokia Corporation - -***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -/*************************************************************************** - * * - * StarEditor inherits QWidget and is used by StarDelegate to let the user * - * edit a star rating in the library using the mouse. * - * * - * The class has been adapted from the official "Star Delegate Example", * - * see http://doc.trolltech.com/4.5/itemviews-stardelegate.html * - ***************************************************************************/ - #include "library/stareditor.h" #include @@ -32,12 +6,16 @@ #include "moc_stareditor.cpp" #include "util/painterscope.h" -/* - * We enable mouse tracking on the widget so we can follow the cursor even - * when the user doesn't hold down any mouse button. We also turn on - * QWidget's auto-fill background feature to obtain an opaque background. - * (Without the call, the view's background would shine through the editor.) - */ +// We enable mouse tracking on the widget so we can follow the cursor even +// when the user doesn't hold down any mouse button. We also turn on +// QWidget's auto-fill background feature to obtain an opaque background. +// (Without the call, the view's background would shine through the editor.) + +/// StarEditor inherits QWidget and is used by StarDelegate to let the user +/// edit a star rating in the library using the mouse. +/// +/// The class has been adapted from the official "Star Delegate Example", +/// see http://doc.trolltech.com/4.5/itemviews-stardelegate.html StarEditor::StarEditor(QWidget *parent, QTableView* pTableView, const QModelIndex& index, const QStyleOptionViewItem& option) diff --git a/src/library/stareditor.h b/src/library/stareditor.h index 7dd75fb67bbe..6393473830c1 100644 --- a/src/library/stareditor.h +++ b/src/library/stareditor.h @@ -1,31 +1,4 @@ -/*************************************************************************** - stareditor.h - ------------------- - copyright : (C) 2010 Tobias Rafreider - copyright : (C) 2009 Nokia Corporation - -***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -/*************************************************************************** - * * - * StarEditor inherits QWidget and is used by StarDelegate to let the user * - * edit a star rating in the library using the mouse. * - * * - * The class has been adapted from the official "Star Delegate Example", * - * see http://doc.trolltech.com/4.5/itemviews-stardelegate.html * - ***************************************************************************/ - -#ifndef STAREDITOR_H -#define STAREDITOR_H +#pragma once #include #include @@ -74,5 +47,3 @@ class StarEditor : public QWidget { QStyleOptionViewItem m_styleOption; StarRating m_starRating; }; - -#endif diff --git a/src/library/traktor/traktorfeature.cpp b/src/library/traktor/traktorfeature.cpp index e6def70ac135..4ef58f721b85 100644 --- a/src/library/traktor/traktorfeature.cpp +++ b/src/library/traktor/traktorfeature.cpp @@ -1,6 +1,3 @@ -// traktorfeature.cpp -// Created 9/26/2010 by Tobias Rafreider - #include "library/traktor/traktorfeature.h" #include diff --git a/src/library/traktor/traktorfeature.h b/src/library/traktor/traktorfeature.h index 79e5f9ae1495..b685eb119374 100644 --- a/src/library/traktor/traktorfeature.h +++ b/src/library/traktor/traktorfeature.h @@ -1,8 +1,4 @@ -// traktorfeature.h -// Created 9/26/2010 by Tobias Rafreider - -#ifndef TRAKTOR_FEATURE_H -#define TRAKTOR_FEATURE_H +#pragma once #include #include @@ -80,5 +76,3 @@ class TraktorFeature : public BaseExternalLibraryFeature { QSharedPointer m_trackSource; QIcon m_icon; }; - -#endif // TRAKTOR_FEATURE_H diff --git a/src/library/treeitemmodel.h b/src/library/treeitemmodel.h index 0bed90e31d87..78c6e68ac478 100644 --- a/src/library/treeitemmodel.h +++ b/src/library/treeitemmodel.h @@ -1,5 +1,4 @@ -#ifndef TREE_ITEM_MODEL_H -#define TREE_ITEM_MODEL_H +#pragma once #include #include @@ -50,5 +49,3 @@ class TreeItemModel : public QAbstractItemModel { private: std::unique_ptr m_pRootItem; }; - -#endif diff --git a/src/main.cpp b/src/main.cpp index 4a1894ceae91..4cf913ed125a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,20 +1,3 @@ -/*************************************************************************** - main.cpp - description - ------------------- - begin : Mon Feb 18 09:48:17 CET 2002 - copyright : (C) 2002 by Tue and Ken Haste Andersen - email : -***************************************************************************/ - -/*************************************************************************** -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) any later version. * -* * -***************************************************************************/ - #include #include #include diff --git a/src/mixer/auxiliary.h b/src/mixer/auxiliary.h index 7f9f378f2bdf..209cfa0d62e0 100644 --- a/src/mixer/auxiliary.h +++ b/src/mixer/auxiliary.h @@ -1,5 +1,4 @@ -#ifndef MIXER_AUXILIARY_H -#define MIXER_AUXILIARY_H +#pragma once #include #include @@ -33,5 +32,3 @@ class Auxiliary : public BasePlayer { parented_ptr m_pInputConfigured; parented_ptr m_pAuxMasterEnabled; }; - -#endif /* MIXER_AUXILIARY_H */ diff --git a/src/mixer/baseplayer.h b/src/mixer/baseplayer.h index 5d02d5fcd705..ae7905ce95a8 100644 --- a/src/mixer/baseplayer.h +++ b/src/mixer/baseplayer.h @@ -1,5 +1,4 @@ -#ifndef MIXER_BASEPLAYER_H -#define MIXER_BASEPLAYER_H +#pragma once #include #include @@ -17,5 +16,3 @@ class BasePlayer : public QObject { private: const QString m_group; }; - -#endif /* MIXER_BASEPLAYER_H */ diff --git a/src/mixer/basetrackplayer.h b/src/mixer/basetrackplayer.h index 190eab8637aa..8e6186d99f2d 100644 --- a/src/mixer/basetrackplayer.h +++ b/src/mixer/basetrackplayer.h @@ -1,5 +1,4 @@ -#ifndef MIXER_BASETRACKPLAYER_H -#define MIXER_BASETRACKPLAYER_H +#pragma once #include #include @@ -159,5 +158,3 @@ class BaseTrackPlayerImpl : public BaseTrackPlayer { parented_ptr m_pVinylControlEnabled; parented_ptr m_pVinylControlStatus; }; - -#endif // MIXER_BASETRACKPLAYER_H diff --git a/src/mixer/microphone.h b/src/mixer/microphone.h index 58f8c2b26585..9b3b14e8a71e 100644 --- a/src/mixer/microphone.h +++ b/src/mixer/microphone.h @@ -1,5 +1,4 @@ -#ifndef MIXER_MICROPHONE_H -#define MIXER_MICROPHONE_H +#pragma once #include #include @@ -33,5 +32,3 @@ class Microphone : public BasePlayer { parented_ptr m_pInputConfigured; parented_ptr m_pTalkoverEnabled; }; - -#endif /* MIXER_MICROPHONE_H */ diff --git a/src/mixer/playerinfo.cpp b/src/mixer/playerinfo.cpp index ece8eca8501b..ee894310fb89 100644 --- a/src/mixer/playerinfo.cpp +++ b/src/mixer/playerinfo.cpp @@ -1,19 +1,4 @@ -/*************************************************************************** - playerinfo.cpp - Helper class to have easy access - to a lot of data (singleton) - ------------------- - copyright : (C) 2007 by Wesley Stessens - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - +// Helper class to have easy access #include "mixer/playerinfo.h" #include diff --git a/src/mixer/playerinfo.h b/src/mixer/playerinfo.h index 7d6cb574c7b0..2b06412cb090 100644 --- a/src/mixer/playerinfo.h +++ b/src/mixer/playerinfo.h @@ -1,21 +1,5 @@ -/*************************************************************************** - playerinfo.h - Helper class to have easy access - to a lot of data (singleton) - ------------------- - copyright : (C) 2007 by Wesley Stessens - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -#ifndef MIXER_PLAYERINFO_H -#define MIXER_PLAYERINFO_H +// Helper class to have easy access +#pragma once #include #include @@ -78,5 +62,3 @@ class PlayerInfo : public QObject { static PlayerInfo* m_pPlayerinfo; }; - -#endif /* MIXER_PLAYERINFO_H */ diff --git a/src/mixer/previewdeck.h b/src/mixer/previewdeck.h index 71c4d36467e7..2da64603c49b 100644 --- a/src/mixer/previewdeck.h +++ b/src/mixer/previewdeck.h @@ -1,5 +1,4 @@ -#ifndef MIXER_PREVIEWDECK_H -#define MIXER_PREVIEWDECK_H +#pragma once #include "mixer/basetrackplayer.h" @@ -15,5 +14,3 @@ class PreviewDeck : public BaseTrackPlayerImpl { const ChannelHandleAndGroup& handleGroup); ~PreviewDeck() override = default; }; - -#endif /* MIXER_PREVIEWDECK_H */ diff --git a/src/mixer/samplerbank.h b/src/mixer/samplerbank.h index dbf6c3a291ab..748f2587abe9 100644 --- a/src/mixer/samplerbank.h +++ b/src/mixer/samplerbank.h @@ -1,5 +1,4 @@ -#ifndef MIXER_SAMPLERBANK_H -#define MIXER_SAMPLERBANK_H +#pragma once #include #include "util/memory.h" @@ -30,5 +29,3 @@ class SamplerBank : public QObject { std::unique_ptr m_pCOSaveBank; ControlProxy* m_pCONumSamplers; }; - -#endif /* MIXER_SAMPLERBANK_H */ diff --git a/src/mixxxapplication.h b/src/mixxxapplication.h index a9a5a67524f5..cb1f24494419 100644 --- a/src/mixxxapplication.h +++ b/src/mixxxapplication.h @@ -1,5 +1,4 @@ -#ifndef MIXXXAPPLICATION_H -#define MIXXXAPPLICATION_H +#pragma once #include @@ -21,5 +20,3 @@ class MixxxApplication : public QApplication { ControlProxy* m_pTouchShift; }; - -#endif // MIXXXAPPLICATION_H diff --git a/src/musicbrainz/chromaprinter.h b/src/musicbrainz/chromaprinter.h index 9f127424f0f9..681605fb9741 100644 --- a/src/musicbrainz/chromaprinter.h +++ b/src/musicbrainz/chromaprinter.h @@ -1,5 +1,4 @@ -#ifndef CHROMAPRINTER_H -#define CHROMAPRINTER_H +#pragma once #include @@ -12,5 +11,3 @@ class ChromaPrinter: public QObject { explicit ChromaPrinter(QObject* parent = NULL); QString getFingerprint(TrackPointer pTrack); }; - -#endif //CHROMAPRINTER_H diff --git a/src/musicbrainz/crc.h b/src/musicbrainz/crc.h index fea8816a8510..5cf5c8d5c43f 100644 --- a/src/musicbrainz/crc.h +++ b/src/musicbrainz/crc.h @@ -13,8 +13,7 @@ * ReflectOut = True * Algorithm = table-driven *****************************************************************************/ -#ifndef __CRC_H__ -#define __CRC_H__ +#pragma once #include #include @@ -79,5 +78,3 @@ crc_t crc_update(crc_t crc, const unsigned char *data, size_t data_len); #ifdef __cplusplus } /* closing brace for extern "C" */ #endif - -#endif /* __CRC_H__ */ diff --git a/src/musicbrainz/gzip.cpp b/src/musicbrainz/gzip.cpp index 66ee8837874d..d0a88e3c48fb 100644 --- a/src/musicbrainz/gzip.cpp +++ b/src/musicbrainz/gzip.cpp @@ -1,7 +1,3 @@ -/***************************************************************************** - * Author: Lukáš Lalinský * - *****************************************************************************/ - #include "musicbrainz/crc.h" #include "musicbrainz/gzip.h" diff --git a/src/musicbrainz/gzip.h b/src/musicbrainz/gzip.h index 9808026afd05..de23909fe2ce 100644 --- a/src/musicbrainz/gzip.h +++ b/src/musicbrainz/gzip.h @@ -1,12 +1,5 @@ -/***************************************************************************** - * Author: Lukáš Lalinský * - *****************************************************************************/ - -#ifndef FPSUBMIT_GZIP_H_ -#define FPSUBMIT_GZIP_H_ +#pragma once #include QByteArray gzipCompress(const QByteArray &data); - -#endif diff --git a/src/preferences/beatdetectionsettings.h b/src/preferences/beatdetectionsettings.h index 1731f2158ad1..b247e8413cf0 100644 --- a/src/preferences/beatdetectionsettings.h +++ b/src/preferences/beatdetectionsettings.h @@ -1,5 +1,4 @@ -#ifndef PREFERENCES_BEATDETECTIONSETTINGS_H -#define PREFERENCES_BEATDETECTIONSETTINGS_H +#pragma once #include "preferences/usersettings.h" @@ -61,5 +60,3 @@ class BeatDetectionSettings { private: UserSettingsPointer m_pConfig; }; - -#endif /* PREFERENCES_BEATDETECTIONSETTINGS_H */ diff --git a/src/preferences/broadcastprofile.cpp b/src/preferences/broadcastprofile.cpp index 474bbadeabaf..3912a1bb2c04 100644 --- a/src/preferences/broadcastprofile.cpp +++ b/src/preferences/broadcastprofile.cpp @@ -1,6 +1,3 @@ -// broadcastprofile.cpp -// Created June 2nd 2017 by Stéphane Lepin - #include #include #include diff --git a/src/preferences/broadcastprofile.h b/src/preferences/broadcastprofile.h index b72713f1918c..17592f98c9b3 100644 --- a/src/preferences/broadcastprofile.h +++ b/src/preferences/broadcastprofile.h @@ -1,8 +1,4 @@ -// broadcastprofile.h -// Created June 2nd 2017 by Stéphane Lepin - -#ifndef BROADCASTPROFILE_H -#define BROADCASTPROFILE_H +#pragma once #include #include @@ -199,5 +195,3 @@ class BroadcastProfile : public QObject { QAtomicInt m_connectionStatus; }; - -#endif // BROADCASTPROFILE_H diff --git a/src/preferences/broadcastsettings.h b/src/preferences/broadcastsettings.h index ec48f9c2e535..6af26e568bf7 100644 --- a/src/preferences/broadcastsettings.h +++ b/src/preferences/broadcastsettings.h @@ -1,5 +1,4 @@ -#ifndef PREFERENCES_BROADCASTSETTINGS_H -#define PREFERENCES_BROADCASTSETTINGS_H +#pragma once #include #include @@ -49,5 +48,3 @@ class BroadcastSettings : public QObject { }; typedef QSharedPointer BroadcastSettingsPointer; - -#endif /* PREFERENCES_BROADCASTSETTINGS_H */ diff --git a/src/preferences/broadcastsettingsmodel.cpp b/src/preferences/broadcastsettingsmodel.cpp index e73b2150b83f..33ebcb895d8a 100644 --- a/src/preferences/broadcastsettingsmodel.cpp +++ b/src/preferences/broadcastsettingsmodel.cpp @@ -1,6 +1,3 @@ -// broadcastsettingsmodel.cpp -// Created on August 7th by Stéphane Lepin (Palakis) - #include "preferences/broadcastsettingsmodel.h" #include diff --git a/src/preferences/broadcastsettingsmodel.h b/src/preferences/broadcastsettingsmodel.h index 5100638dcf29..84d136227566 100644 --- a/src/preferences/broadcastsettingsmodel.h +++ b/src/preferences/broadcastsettingsmodel.h @@ -1,8 +1,4 @@ -// broadcastsettingsmodel.h -// Created on August 7th by Stéphane Lepin (Palakis) - -#ifndef PREFERENCES_BROADCASTSETTINGSMODEL_H -#define PREFERENCES_BROADCASTSETTINGSMODEL_H +#pragma once #include #include @@ -47,5 +43,3 @@ class BroadcastSettingsModel : public QAbstractTableModel { QMap m_profiles; }; - -#endif // PREFERENCES_BROADCASTSETTINGSMODEL_H diff --git a/src/preferences/configobject.h b/src/preferences/configobject.h index c68cb7ff1c77..229f8c8a9dd4 100644 --- a/src/preferences/configobject.h +++ b/src/preferences/configobject.h @@ -1,5 +1,4 @@ -#ifndef PREFERENCES_CONFIGOBJECT_H -#define PREFERENCES_CONFIGOBJECT_H +#pragma once #include #include @@ -203,5 +202,3 @@ template class ConfigObject { // not be opened; otherwise true. bool parse(); }; - -#endif // PREFERENCES_CONFIGOBJECT_H diff --git a/src/preferences/constants.h b/src/preferences/constants.h index 4bc73c32ec96..57f96a3b247f 100644 --- a/src/preferences/constants.h +++ b/src/preferences/constants.h @@ -1,5 +1,4 @@ -#ifndef PREFERENCES_CONSTANTS_H -#define PREFERENCES_CONSTANTS_H +#pragma once namespace mixxx { @@ -19,5 +18,3 @@ enum class ScreenSaverPreference { }; } // namespace mixxx - -#endif /* PREFERENCES_CONSTANTS_H */ diff --git a/src/preferences/dialog/dlgprefautodj.h b/src/preferences/dialog/dlgprefautodj.h index 174c75d0eb09..56dc245ad77e 100644 --- a/src/preferences/dialog/dlgprefautodj.h +++ b/src/preferences/dialog/dlgprefautodj.h @@ -1,5 +1,4 @@ -#ifndef DLGPREFAUTODJ_H -#define DLGPREFAUTODJ_H +#pragma once #include @@ -30,5 +29,3 @@ class DlgPrefAutoDJ : public DlgPreferencePage, public Ui::DlgPrefAutoDJDlg { private: UserSettingsPointer m_pConfig; }; - -#endif /* DLGPREFAUTODJ_H */ diff --git a/src/preferences/dialog/dlgprefbeats.h b/src/preferences/dialog/dlgprefbeats.h index 80700e0698b0..69a6bf2db2dc 100644 --- a/src/preferences/dialog/dlgprefbeats.h +++ b/src/preferences/dialog/dlgprefbeats.h @@ -1,9 +1,4 @@ -// Created on: 28/apr/2011 -// Author: vittorio - - -#ifndef DLGPREFBEATS_H -#define DLGPREFBEATS_H +#pragma once #include #include @@ -55,5 +50,3 @@ class DlgPrefBeats : public DlgPreferencePage, public Ui::DlgBeatsDlg { bool m_bReanalyze; bool m_bReanalyzeImported; }; - -#endif // DLGPREFBEATS_H diff --git a/src/preferences/dialog/dlgprefbroadcast.h b/src/preferences/dialog/dlgprefbroadcast.h index 6c9db8e17c33..f8e78c1862f8 100644 --- a/src/preferences/dialog/dlgprefbroadcast.h +++ b/src/preferences/dialog/dlgprefbroadcast.h @@ -1,5 +1,4 @@ -#ifndef DLGPREFBROADCAST_H -#define DLGPREFBROADCAST_H +#pragma once #include #include @@ -57,5 +56,3 @@ class DlgPrefBroadcast : public DlgPreferencePage, public Ui::DlgPrefBroadcastDl ControlProxy* m_pBroadcastEnabled; BroadcastProfilePtr m_pProfileListSelection; }; - -#endif diff --git a/src/preferences/dialog/dlgprefcrossfader.h b/src/preferences/dialog/dlgprefcrossfader.h index 1574fbcf5040..a6b1a3290db4 100644 --- a/src/preferences/dialog/dlgprefcrossfader.h +++ b/src/preferences/dialog/dlgprefcrossfader.h @@ -1,5 +1,4 @@ -#ifndef DLGPREFCROSSFADER_H -#define DLGPREFCROSSFADER_H +#pragma once #include @@ -46,5 +45,3 @@ class DlgPrefCrossfader : public DlgPreferencePage, public Ui::DlgPrefCrossfader bool m_xFaderReverse; }; - -#endif diff --git a/src/preferences/dialog/dlgprefdeck.h b/src/preferences/dialog/dlgprefdeck.h index 41644d765691..7a97c668f8f5 100644 --- a/src/preferences/dialog/dlgprefdeck.h +++ b/src/preferences/dialog/dlgprefdeck.h @@ -49,10 +49,6 @@ enum class KeyunlockMode { KeepLockedKey }; -/** - *@author Tue & Ken Haste Andersen - */ - class DlgPrefDeck : public DlgPreferencePage, public Ui::DlgPrefDeckDlg { Q_OBJECT public: diff --git a/src/preferences/dialog/dlgprefeffects.h b/src/preferences/dialog/dlgprefeffects.h index f8a5e6a688dd..c787804bc1bf 100644 --- a/src/preferences/dialog/dlgprefeffects.h +++ b/src/preferences/dialog/dlgprefeffects.h @@ -1,5 +1,4 @@ -#ifndef DLGPREFEFFECTS_H -#define DLGPREFEFFECTS_H +#pragma once #include @@ -32,5 +31,3 @@ class DlgPrefEffects : public DlgPreferencePage, public Ui::DlgPrefEffectsDlg { UserSettingsPointer m_pConfig; EffectsManager* m_pEffectsManager; }; - -#endif /* DLGPREFEFFECTS_H */ diff --git a/src/preferences/dialog/dlgprefeq.cpp b/src/preferences/dialog/dlgprefeq.cpp index e187ad469b0f..e20ab978ca75 100644 --- a/src/preferences/dialog/dlgprefeq.cpp +++ b/src/preferences/dialog/dlgprefeq.cpp @@ -1,20 +1,3 @@ -/*************************************************************************** - dlgprefeq.cpp - description - ------------------- - begin : Thu Jun 7 2007 - copyright : (C) 2007 by John Sully - email : jsully@scs.ryerson.ca -***************************************************************************/ - -/*************************************************************************** -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) any later version. * -* * -***************************************************************************/ - #include "preferences/dialog/dlgprefeq.h" #include diff --git a/src/preferences/dialog/dlgprefeq.h b/src/preferences/dialog/dlgprefeq.h index d0f80d0273de..f6c10c96291c 100644 --- a/src/preferences/dialog/dlgprefeq.h +++ b/src/preferences/dialog/dlgprefeq.h @@ -1,22 +1,4 @@ -/*************************************************************************** - dlgprefeq.h - description - ------------------- - begin : Thu Jun 7 2007 - copyright : (C) 2007 by John Sully - email : jsully@scs.ryerson.ca - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -#ifndef DLGPREFEQ_H -#define DLGPREFEQ_H +#pragma once #include #include @@ -28,9 +10,6 @@ #include "effects/effectsmanager.h" #include "effects/effectrack.h" -/** - *@author John Sully - */ class DlgPrefEQ : public DlgPreferencePage, public Ui::DlgPrefEQDlg { Q_OBJECT public: @@ -109,5 +88,3 @@ class DlgPrefEQ : public DlgPreferencePage, public Ui::DlgPrefEQDlg { bool m_bEqAutoReset; bool m_bGainAutoReset; }; - -#endif diff --git a/src/preferences/dialog/dlgpreferences.cpp b/src/preferences/dialog/dlgpreferences.cpp index b5ea23e63f70..072cc1125957 100644 --- a/src/preferences/dialog/dlgpreferences.cpp +++ b/src/preferences/dialog/dlgpreferences.cpp @@ -1,20 +1,3 @@ -/*************************************************************************** - dlgpreferences.cpp - description - ------------------ - begin : Sun Jun 30 2002 - copyright : (C) 2002 by Tue & Ken Haste Andersen - email : haste@diku.dk -***************************************************************************/ - -/*************************************************************************** -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) any later version. * -* * -***************************************************************************/ - #include "preferences/dialog/dlgpreferences.h" #include diff --git a/src/preferences/dialog/dlgpreferences.h b/src/preferences/dialog/dlgpreferences.h index 218174503f54..ac05188f4022 100644 --- a/src/preferences/dialog/dlgpreferences.h +++ b/src/preferences/dialog/dlgpreferences.h @@ -1,22 +1,4 @@ -/*************************************************************************** - dlgpreferences.h - description - ------------------- - begin : Sun Jun 30 2002 - copyright : (C) 2002 by Tue & Ken Haste Andersen - email : haste@diku.dk - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -#ifndef DLGPREFERENCES_H -#define DLGPREFERENCES_H +#pragma once #include #include @@ -133,5 +115,3 @@ DlgPreferences(MixxxMainWindow* mixxx, QSize m_pageSizeHint; }; - -#endif diff --git a/src/preferences/dialog/dlgprefinterface.h b/src/preferences/dialog/dlgprefinterface.h index 00b98633b915..1dfe7aaf6e20 100644 --- a/src/preferences/dialog/dlgprefinterface.h +++ b/src/preferences/dialog/dlgprefinterface.h @@ -1,22 +1,4 @@ -/*************************************************************************** - dlgprefcontrols.h - description - ------------------- - begin : Sat Jul 5 2003 - copyright : (C) 2003 by Tue & Ken Haste Andersen - email : haste@diku.dk - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -#ifndef DLGPREFCONTROLS_H -#define DLGPREFCONTROLS_H +#pragma once #include @@ -32,10 +14,6 @@ class PlayerManager; class MixxxMainWindow; class ControlObject; -/** - *@author Tue & Ken Haste Andersen - */ - class DlgPrefInterface : public DlgPreferencePage, public Ui::DlgPrefControlsDlg { Q_OBJECT public: @@ -86,5 +64,3 @@ class DlgPrefInterface : public DlgPreferencePage, public Ui::DlgPrefControlsDlg bool m_bRebootMixxxView; }; - -#endif diff --git a/src/preferences/dialog/dlgprefkey.cpp b/src/preferences/dialog/dlgprefkey.cpp index d6fe6322c23d..02bd789e6655 100644 --- a/src/preferences/dialog/dlgprefkey.cpp +++ b/src/preferences/dialog/dlgprefkey.cpp @@ -1,20 +1,3 @@ -/*************************************************************************** - dlgprefkey.cpp - description - ------------------- - begin : Thu Jun 7 2012 - copyright : (C) 2012 by Keith Salisbury - email : keithsalisbury@gmail.com -***************************************************************************/ - -/*************************************************************************** -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) any later version. * -* * -***************************************************************************/ - #include "preferences/dialog/dlgprefkey.h" #include diff --git a/src/preferences/dialog/dlgprefkey.h b/src/preferences/dialog/dlgprefkey.h index f25c6ff68dea..f76a02babc0d 100644 --- a/src/preferences/dialog/dlgprefkey.h +++ b/src/preferences/dialog/dlgprefkey.h @@ -1,5 +1,4 @@ -#ifndef DLGPREFKEY_H -#define DLGPREFKEY_H +#pragma once #include #include @@ -54,5 +53,3 @@ class DlgPrefKey : public DlgPreferencePage, Ui::DlgPrefKeyDlg { bool m_bFastAnalysisEnabled; bool m_bReanalyzeEnabled; }; - -#endif diff --git a/src/preferences/dialog/dlgpreflibrary.h b/src/preferences/dialog/dlgpreflibrary.h index 9adde26be437..09bbd9a33601 100644 --- a/src/preferences/dialog/dlgpreflibrary.h +++ b/src/preferences/dialog/dlgpreflibrary.h @@ -1,5 +1,4 @@ -#ifndef DLGPREFLIBRARY_H -#define DLGPREFLIBRARY_H +#pragma once #include #include @@ -12,10 +11,6 @@ #include "preferences/dlgpreferencepage.h" #include "preferences/usersettings.h" -/** - *@author Tue & Ken Haste Andersen - */ - class DlgPrefLibrary : public DlgPreferencePage, public Ui::DlgPrefLibraryDlg { Q_OBJECT public: @@ -72,5 +67,3 @@ class DlgPrefLibrary : public DlgPreferencePage, public Ui::DlgPrefLibraryDlg { QFont m_originalTrackTableFont; int m_iOriginalTrackTableRowHeight; }; - -#endif diff --git a/src/preferences/dialog/dlgpreflv2.h b/src/preferences/dialog/dlgpreflv2.h index ff38c07020c7..b3c9318d6c96 100644 --- a/src/preferences/dialog/dlgpreflv2.h +++ b/src/preferences/dialog/dlgpreflv2.h @@ -1,5 +1,4 @@ -#ifndef DLGPREFLV2_H -#define DLGPREFLV2_H +#pragma once #include #include @@ -37,5 +36,3 @@ class DlgPrefLV2 : public DlgPreferencePage, public Ui::DlgPrefLV2Dlg { int m_iCheckedParameters; EffectsManager* m_pEffectsManager; }; - -#endif diff --git a/src/preferences/dialog/dlgprefmodplug.cpp b/src/preferences/dialog/dlgprefmodplug.cpp index 75a3e158e798..f3c28fc221ca 100644 --- a/src/preferences/dialog/dlgprefmodplug.cpp +++ b/src/preferences/dialog/dlgprefmodplug.cpp @@ -1,4 +1,3 @@ - #include "preferences/dialog/dlgprefmodplug.h" #include diff --git a/src/preferences/dialog/dlgprefmodplug.h b/src/preferences/dialog/dlgprefmodplug.h index 87b967c8899e..1e59f528f6a6 100644 --- a/src/preferences/dialog/dlgprefmodplug.h +++ b/src/preferences/dialog/dlgprefmodplug.h @@ -1,8 +1,6 @@ -// dlgprefmodplug.h - modplug settings dialog -// created 2013 by Stefan Nuernberger +// modplug settings dialog -#ifndef DLGPREFMODPLUG_H -#define DLGPREFMODPLUG_H +#pragma once #include #include "preferences/usersettings.h" @@ -32,5 +30,3 @@ class DlgPrefModplug : public DlgPreferencePage { Ui::DlgPrefModplug* m_pUi; UserSettingsPointer m_pConfig; }; - -#endif // DLGPREFMODPLUG_H diff --git a/src/preferences/dialog/dlgprefnovinyl.cpp b/src/preferences/dialog/dlgprefnovinyl.cpp index e6788bc4a5ff..fb9afe21d4c9 100644 --- a/src/preferences/dialog/dlgprefnovinyl.cpp +++ b/src/preferences/dialog/dlgprefnovinyl.cpp @@ -1,20 +1,3 @@ -/*************************************************************************** - DlgPrefNoVinyl.cpp - description - ------------------- - begin : Thu Feb 24 2011 - copyright : (C) 2011 by Owen Williams - email : owen-bugs@ywwg.com -***************************************************************************/ - -/*************************************************************************** -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) any later version. * -* * -***************************************************************************/ - #include "preferences/dialog/dlgprefnovinyl.h" #include diff --git a/src/preferences/dialog/dlgprefnovinyl.h b/src/preferences/dialog/dlgprefnovinyl.h index 4ce696339733..b03d9237b8e8 100644 --- a/src/preferences/dialog/dlgprefnovinyl.h +++ b/src/preferences/dialog/dlgprefnovinyl.h @@ -1,22 +1,4 @@ -/*************************************************************************** - dlgprefnovinyl.h - description - ------------------- - begin : Thu Feb 24 2011 - copyright : (C) 2011 by Owen Williams - email : owen-bugs@ywwg.com - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -#ifndef DLGPREFNOVINYL_H -#define DLGPREFNOVINYL_H +#pragma once #include @@ -26,16 +8,9 @@ class SoundManager; -/** - *@author Stefan Langhammer - *@author Albert Santoni - */ - class DlgPrefNoVinyl : public DlgPreferencePage, Ui::DlgPrefNoVinylDlg { Q_OBJECT public: DlgPrefNoVinyl(QWidget *parent, SoundManager* soundman, UserSettingsPointer _config); virtual ~DlgPrefNoVinyl(); }; - -#endif diff --git a/src/preferences/dialog/dlgprefrecord.h b/src/preferences/dialog/dlgprefrecord.h index f07f8b25e51f..c6ff03eb2524 100644 --- a/src/preferences/dialog/dlgprefrecord.h +++ b/src/preferences/dialog/dlgprefrecord.h @@ -1,5 +1,4 @@ -#ifndef DLGPREFRECORD_H -#define DLGPREFRECORD_H +#pragma once #include #include @@ -55,5 +54,3 @@ class DlgPrefRecord : public DlgPreferencePage, public Ui::DlgPrefRecordDlg { QList m_formatButtons; QList m_optionWidgets; }; - -#endif diff --git a/src/preferences/dialog/dlgprefreplaygain.h b/src/preferences/dialog/dlgprefreplaygain.h index 7204f1230244..6153a51f2ad3 100644 --- a/src/preferences/dialog/dlgprefreplaygain.h +++ b/src/preferences/dialog/dlgprefreplaygain.h @@ -1,5 +1,4 @@ -#ifndef DLGPREFREPLAYGAIN_H -#define DLGPREFREPLAYGAIN_H +#pragma once #include #include @@ -45,5 +44,3 @@ class DlgPrefReplayGain: public DlgPreferencePage, QButtonGroup m_analysisButtonGroup; }; - -#endif /* DLGPREFREPLAYGAIN_H */ diff --git a/src/preferences/dialog/dlgprefsound.cpp b/src/preferences/dialog/dlgprefsound.cpp index d4df2e27e1cd..7309f936d749 100644 --- a/src/preferences/dialog/dlgprefsound.cpp +++ b/src/preferences/dialog/dlgprefsound.cpp @@ -1,18 +1,3 @@ -/** - * @file dlgprefsound.cpp - * @author Bill Good - * @date 20100625 - */ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - #include "preferences/dialog/dlgprefsound.h" #include diff --git a/src/preferences/dialog/dlgprefsound.h b/src/preferences/dialog/dlgprefsound.h index 2ef52be53459..8eea151afe01 100644 --- a/src/preferences/dialog/dlgprefsound.h +++ b/src/preferences/dialog/dlgprefsound.h @@ -1,20 +1,4 @@ -/** - * @file dlgprefsound.h - * @author Bill Good - * @date 20100625 - */ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -#ifndef DLGPREFSOUND_H -#define DLGPREFSOUND_H +#pragma once #include "defs_urls.h" #include "preferences/dialog/ui_dlgprefsounddlg.h" @@ -117,5 +101,3 @@ class DlgPrefSound : public DlgPreferencePage, public Ui::DlgPrefSoundDlg { bool m_bSkipConfigClear; bool m_loading; }; - -#endif diff --git a/src/preferences/dialog/dlgprefsounditem.cpp b/src/preferences/dialog/dlgprefsounditem.cpp index 50946ede5bfb..e493d6085590 100644 --- a/src/preferences/dialog/dlgprefsounditem.cpp +++ b/src/preferences/dialog/dlgprefsounditem.cpp @@ -1,18 +1,3 @@ -/** - * @file dlgprefsounditem.cpp - * @author Bill Good - * @date 20100704 - */ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - #include "preferences/dialog/dlgprefsounditem.h" #include diff --git a/src/preferences/dialog/dlgprefsounditem.h b/src/preferences/dialog/dlgprefsounditem.h index efe88ec05ae5..25b778054dc3 100644 --- a/src/preferences/dialog/dlgprefsounditem.h +++ b/src/preferences/dialog/dlgprefsounditem.h @@ -1,20 +1,4 @@ -/** - * @file dlgprefsounditem.h - * @author Bill Good - * @date 20100704 - */ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -#ifndef DLGPREFSOUNDITEM_H -#define DLGPREFSOUNDITEM_H +#pragma once #include "preferences/dialog/ui_dlgprefsounditem.h" #include "soundio/soundmanagerutil.h" @@ -69,5 +53,3 @@ class DlgPrefSoundItem : public QWidget, public Ui::DlgPrefSoundItem { QPoint m_savedChannel; bool m_inhibitSettingChanged; }; - -#endif diff --git a/src/preferences/dialog/dlgprefvinyl.cpp b/src/preferences/dialog/dlgprefvinyl.cpp index f44f0b67f8b9..31c09ba830d0 100644 --- a/src/preferences/dialog/dlgprefvinyl.cpp +++ b/src/preferences/dialog/dlgprefvinyl.cpp @@ -1,22 +1,3 @@ -/*************************************************************************** - dlgprefvinyl.cpp - description - ------------------- - begin : Thu Oct 23 2006 - copyright : (C) 2006 by Stefan Langhammer - (C) 2007 by Albert Santoni - email : stefan.langhammer@9elements.com - gamegod \a\t users.sf.net -***************************************************************************/ - -/*************************************************************************** -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) any later version. * -* * -***************************************************************************/ - #include "preferences/dialog/dlgprefvinyl.h" #include @@ -167,7 +148,7 @@ void DlgPrefVinyl::slotVinylType4Changed(const QString& text) { LeadinTime4->setValue(getDefaultLeadIn(text)); } -/** @brief Performs any necessary actions that need to happen when the prefs dialog is opened */ +/// Performs any necessary actions that need to happen when the prefs dialog is opened. void DlgPrefVinyl::slotShow() { if (m_pVCManager) { for (int i = 0; i < kMaximumVinylControlInputs; ++i) { @@ -181,7 +162,7 @@ void DlgPrefVinyl::slotShow() { } } -/** @brief Performs any necessary actions that need to happen when the prefs dialog is closed */ +/** Performs any necessary actions that need to happen when the prefs dialog is closed. */ void DlgPrefVinyl::slotHide() { if (m_pVCManager) { for (int i = 0; i < kMaximumVinylControlInputs; ++i) { diff --git a/src/preferences/dialog/dlgprefvinyl.h b/src/preferences/dialog/dlgprefvinyl.h index 778dfe6bdd06..16f6fd20c1cd 100644 --- a/src/preferences/dialog/dlgprefvinyl.h +++ b/src/preferences/dialog/dlgprefvinyl.h @@ -1,22 +1,4 @@ -/*************************************************************************** - dlgprefvinyl.h - description - ------------------- - begin : Thu Oct 23 2006 - copyright : (C) 2006 by Stefan Langhammer - email : stefan.langhammer@9elements.com - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -#ifndef DLGPREFVINYL_H -#define DLGPREFVINYL_H +#pragma once #include #include @@ -71,5 +53,3 @@ class DlgPrefVinyl : public DlgPreferencePage, Ui::DlgPrefVinylDlg { QList m_COSpeeds; ControlProxy* m_pNumDecks; }; - -#endif diff --git a/src/preferences/dialog/dlgprefwaveform.h b/src/preferences/dialog/dlgprefwaveform.h index 339038d07ad0..e3325cf1ec60 100644 --- a/src/preferences/dialog/dlgprefwaveform.h +++ b/src/preferences/dialog/dlgprefwaveform.h @@ -1,5 +1,4 @@ -#ifndef DLGPREFWAVEFORM_H -#define DLGPREFWAVEFORM_H +#pragma once #include @@ -48,6 +47,3 @@ class DlgPrefWaveform : public DlgPreferencePage, public Ui::DlgPrefWaveformDlg Library* m_pLibrary; MixxxMainWindow* m_pMixxx; }; - - -#endif /* DLGPREFWAVEFORM_H */ diff --git a/src/preferences/effectsettingsmodel.h b/src/preferences/effectsettingsmodel.h index c89bea82eb5b..471ef5bc6b78 100644 --- a/src/preferences/effectsettingsmodel.h +++ b/src/preferences/effectsettingsmodel.h @@ -1,5 +1,4 @@ -#ifndef PREFERENCES_EFFECTSETTINGSMODEL_H -#define PREFERENCES_EFFECTSETTINGSMODEL_H +#pragma once #include #include @@ -49,5 +48,3 @@ class EffectSettingsModel : public QAbstractTableModel { private: QList m_profiles; }; - -#endif // PREFERENCES_EFFECTSETTINGSMODEL_H diff --git a/src/preferences/keydetectionsettings.h b/src/preferences/keydetectionsettings.h index 5f059891806d..c547764bdf99 100644 --- a/src/preferences/keydetectionsettings.h +++ b/src/preferences/keydetectionsettings.h @@ -1,5 +1,4 @@ -#ifndef PREFERENCES_KEYDETECTIONSETTINGS_H -#define PREFERENCES_KEYDETECTIONSETTINGS_H +#pragma once #include "preferences/usersettings.h" @@ -68,5 +67,3 @@ class KeyDetectionSettings { private: UserSettingsPointer m_pConfig; }; - -#endif /* PREFERENCES_KEYDETECTIONSETTINGS_H */ diff --git a/src/preferences/replaygainsettings.h b/src/preferences/replaygainsettings.h index 4ce83b77f0bc..c5a3ae66ac18 100644 --- a/src/preferences/replaygainsettings.h +++ b/src/preferences/replaygainsettings.h @@ -1,5 +1,4 @@ -#ifndef PREFERENCES_REPLAYGAINSETTINGS_H -#define PREFERENCES_REPLAYGAINSETTINGS_H +#pragma once #include "preferences/usersettings.h" #include "track/track_decl.h" @@ -28,5 +27,3 @@ class ReplayGainSettings { // Pointer to config object UserSettingsPointer m_pConfig; }; - -#endif /* PREFERENCES_REPLAYGAINSETTINGS_H */ diff --git a/src/preferences/upgrade.cpp b/src/preferences/upgrade.cpp index fc810ed02372..caea917b3264 100644 --- a/src/preferences/upgrade.cpp +++ b/src/preferences/upgrade.cpp @@ -1,20 +1,3 @@ -/*************************************************************************** - upgrade.cpp - description - ------------------- - begin : Fri Mar 13 2009 - copyright : (C) 2009 by Sean M. Pappalardo - email : pegasus@c64.org -***************************************************************************/ - -/*************************************************************************** -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) any later version. * -* * -***************************************************************************/ - #include "preferences/upgrade.h" #include diff --git a/src/preferences/upgrade.h b/src/preferences/upgrade.h index 60fe57454b0a..d382d9a8ef8f 100644 --- a/src/preferences/upgrade.h +++ b/src/preferences/upgrade.h @@ -1,22 +1,4 @@ -/*************************************************************************** - upgrade.h - description - ------------------- - begin : Mon Apr 13 2009 - copyright : (C) 2009 by Sean M. Pappalardo - email : pegasus@c64.org -***************************************************************************/ - -/*************************************************************************** -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) any later version. * -* * -***************************************************************************/ - -#ifndef PREFERENCES_UPGRADE_H -#define PREFERENCES_UPGRADE_H +#pragma once #include "preferences/usersettings.h" @@ -35,5 +17,3 @@ class Upgrade { bool m_bFirstRun; bool m_bRescanLibrary; }; - -#endif /* PREFERENCES_UPGRADE_H */ diff --git a/src/preferences/usersettings.h b/src/preferences/usersettings.h index dcaa4163a8e1..7e58dfe01ea0 100644 --- a/src/preferences/usersettings.h +++ b/src/preferences/usersettings.h @@ -1,5 +1,4 @@ -#ifndef PREFERENCES_USERSETTINGS_H -#define PREFERENCES_USERSETTINGS_H +#pragma once #include #include @@ -35,5 +34,3 @@ typedef QWeakPointer UserSettingsWeakPointer; m_pConfig->setValue(ConfigKey(preference_group, preference_item), \ value); \ } - -#endif /* PREFERENCES_USERSETTINGS_H */ diff --git a/src/preferences/waveformsettings.h b/src/preferences/waveformsettings.h index 3b9ce951e662..073e465bca5e 100644 --- a/src/preferences/waveformsettings.h +++ b/src/preferences/waveformsettings.h @@ -1,5 +1,4 @@ -#ifndef PREFERENCES_WAVEFORMSETTINGS_H -#define PREFERENCES_WAVEFORMSETTINGS_H +#pragma once #include "preferences/usersettings.h" @@ -30,5 +29,3 @@ class WaveformSettings { private: UserSettingsPointer m_pConfig; }; - -#endif /* PREFERENCES_WAVEFORMSETTINGS_H */ diff --git a/src/recording/defs_recording.h b/src/recording/defs_recording.h index 67f1f7de5184..15de72aec208 100644 --- a/src/recording/defs_recording.h +++ b/src/recording/defs_recording.h @@ -1,5 +1,4 @@ -#ifndef __RECORDING_DEFS_H__ -#define __RECORDING_DEFS_H__ +#pragma once #define RECORDING_PREF_KEY "[Recording]" #define ENCODING_WAVE "WAV" @@ -32,5 +31,3 @@ #define SIZE_1GB Q_UINT64_C(1'070'000'000) #define SIZE_2GB Q_UINT64_C(2'140'000'000) #define SIZE_4GB Q_UINT64_C(4'280'000'000) - -#endif diff --git a/src/skin/colorschemeparser.cpp b/src/skin/colorschemeparser.cpp index ce0a221d0003..481152f39f2f 100644 --- a/src/skin/colorschemeparser.cpp +++ b/src/skin/colorschemeparser.cpp @@ -1,4 +1,3 @@ - #include "skin/colorschemeparser.h" #include "widget/wpixmapstore.h" diff --git a/src/skin/colorschemeparser.h b/src/skin/colorschemeparser.h index 6decd79a92f8..95ea0a331201 100644 --- a/src/skin/colorschemeparser.h +++ b/src/skin/colorschemeparser.h @@ -1,5 +1,4 @@ -#ifndef COLORSCHEMEPARSER_H -#define COLORSCHEMEPARSER_H +#pragma once #include "preferences/usersettings.h" #include "skin/legacyskinparser.h" @@ -20,5 +19,3 @@ class ColorSchemeParser { ColorSchemeParser() { } ~ColorSchemeParser() { } }; - -#endif /* COLORSCHEMEPARSER_H */ diff --git a/src/skin/imgcolor.h b/src/skin/imgcolor.h index aced3157a6a8..1253e7cd462f 100644 --- a/src/skin/imgcolor.h +++ b/src/skin/imgcolor.h @@ -1,22 +1,4 @@ -/*************************************************************************** - imgcolor.h - description - ------------------- - begin : 14 April 2007 - copyright : (C) 2007 by Adam Davison - email : adamdavison@gmail.com - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -#ifndef IMGCOLOR_H -#define IMGCOLOR_H +#pragma once #include "imgsource.h" @@ -88,5 +70,3 @@ class ImgHSVTweak : public ImgColorProcessor { m_hconst, m_sconst, m_vconst; float m_hfact, m_sfact, m_vfact; }; -#endif - diff --git a/src/skin/imginvert.cpp b/src/skin/imginvert.cpp index 3f06a48eecbe..6e29086affc5 100644 --- a/src/skin/imginvert.cpp +++ b/src/skin/imginvert.cpp @@ -6,4 +6,3 @@ QColor ImgInvert::doColorCorrection(const QColor& c) const { 0xff - c.blue(), c.alpha()); } - diff --git a/src/skin/imginvert.h b/src/skin/imginvert.h index fbcea21b93ce..2e26031a3f46 100644 --- a/src/skin/imginvert.h +++ b/src/skin/imginvert.h @@ -1,22 +1,4 @@ -/*************************************************************************** - imginvert.h - description - ------------------- - begin : 14 April 2007 - copyright : (C) 2007 by Adam Davison - email : adamdavison@gmail.com - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -#ifndef IMGINVERT_H -#define IMGINVERT_H +#pragma once #include "imgsource.h" @@ -26,6 +8,3 @@ class ImgInvert : public ImgColorProcessor { inline ImgInvert(ImgSource* parent) : ImgColorProcessor(parent) {} QColor doColorCorrection(const QColor& c) const override; }; - -#endif - diff --git a/src/skin/imgloader.cpp b/src/skin/imgloader.cpp index 1b97e8f1df6f..439ec6722f43 100644 --- a/src/skin/imgloader.cpp +++ b/src/skin/imgloader.cpp @@ -1,4 +1,3 @@ - #include #include diff --git a/src/skin/imgloader.h b/src/skin/imgloader.h index cd34541397f0..b295244e1c12 100644 --- a/src/skin/imgloader.h +++ b/src/skin/imgloader.h @@ -1,22 +1,4 @@ -/*************************************************************************** - imgloader.h - description - ------------------- - begin : 14 April 2007 - copyright : (C) 2007 by Adam Davison - email : adamdavison@gmail.com - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -#ifndef IMGLOADER_H -#define IMGLOADER_H +#pragma once #include "imgsource.h" @@ -26,6 +8,3 @@ class ImgLoader : public ImgSource { ImgLoader(); QImage* getImage(const QString &fileName, double scaleFactor) const override; }; - -#endif - diff --git a/src/skin/imgsource.h b/src/skin/imgsource.h index 9e26cce47f50..216c95e2b511 100644 --- a/src/skin/imgsource.h +++ b/src/skin/imgsource.h @@ -1,22 +1,4 @@ -/*************************************************************************** - imgsource.h - description - ------------------- - begin : 14 April 2007 - copyright : (C) 2007 by Adam Davison - email : adamdavison@gmail.com - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -#ifndef IMGSOURCE_H -#define IMGSOURCE_H +#pragma once #include #include @@ -136,5 +118,3 @@ class ImgColorProcessor : public ImgProcessor { bool willCorrectColors() const override { return true; } }; - -#endif diff --git a/src/skin/legacyskinparser.cpp b/src/skin/legacyskinparser.cpp index 57317a692894..22e6bf30c377 100644 --- a/src/skin/legacyskinparser.cpp +++ b/src/skin/legacyskinparser.cpp @@ -1,6 +1,3 @@ -// legacyskinparser.cpp -// Created 9/19/2010 by RJ Ryan (rryan@mit.edu) - #include "skin/legacyskinparser.h" #include diff --git a/src/skin/pixmapsource.h b/src/skin/pixmapsource.h index 4ae1ffd924af..25126731264b 100644 --- a/src/skin/pixmapsource.h +++ b/src/skin/pixmapsource.h @@ -1,5 +1,4 @@ -#ifndef PIXMAPSOURCE_H -#define PIXMAPSOURCE_H +#pragma once #include #include @@ -29,5 +28,3 @@ class PixmapSource final { QByteArray m_svgSourceData; enum Type m_eType; }; - -#endif /* PIXMAPSOURCE_H */ diff --git a/src/skin/skinloader.cpp b/src/skin/skinloader.cpp index 2cd7e9f5fbb0..4afc1a501d20 100644 --- a/src/skin/skinloader.cpp +++ b/src/skin/skinloader.cpp @@ -1,6 +1,3 @@ -// skinloader.cpp -// Created 6/21/2010 by RJ Ryan (rryan@mit.edu) - #include "skin/skinloader.h" #include diff --git a/src/skin/skinparser.h b/src/skin/skinparser.h index 928f60c3273d..3e906c6503e1 100644 --- a/src/skin/skinparser.h +++ b/src/skin/skinparser.h @@ -1,5 +1,4 @@ -#ifndef SKINPARSER_H -#define SKINPARSER_H +#pragma once #include #include @@ -12,5 +11,3 @@ class SkinParser { virtual bool canParse(const QString& skinPath) = 0; virtual QWidget* parseSkin(const QString& skinPath, QWidget* pParent) = 0; }; - -#endif /* SKINPARSER_H */ diff --git a/src/skin/tooltips.h b/src/skin/tooltips.h index 35b2fc05ec7b..047be54abfbe 100644 --- a/src/skin/tooltips.h +++ b/src/skin/tooltips.h @@ -1,5 +1,4 @@ -#ifndef TOOLTIPS_H -#define TOOLTIPS_H +#pragma once #include #include @@ -19,6 +18,3 @@ class Tooltips : public QObject { QHash m_tooltips; }; - - -#endif /* TOOLTIPS_H */ diff --git a/src/soundio/sounddevice.cpp b/src/soundio/sounddevice.cpp index 40e4b75257fe..209f65141e2e 100644 --- a/src/soundio/sounddevice.cpp +++ b/src/soundio/sounddevice.cpp @@ -1,20 +1,3 @@ -/*************************************************************************** - sounddevice.cpp - ------------------- - begin : Sun Aug 12, 2007, past my bedtime - copyright : (C) 2007 Albert Santoni - email : gamegod \a\t users.sf.net -***************************************************************************/ - -/*************************************************************************** -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) any later version. * -* * -***************************************************************************/ - #include "soundio/sounddevice.h" #include diff --git a/src/soundio/sounddevice.h b/src/soundio/sounddevice.h index 5a9b103bc046..da42f418f376 100644 --- a/src/soundio/sounddevice.h +++ b/src/soundio/sounddevice.h @@ -1,22 +1,4 @@ -/*************************************************************************** - sounddevice.cpp - ------------------- - begin : Sun Aug 12, 2007, past my bedtime - copyright : (C) 2007 Albert Santoni - email : gamegod \a\t users.sf.net - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -#ifndef SOUNDDEVICE_H -#define SOUNDDEVICE_H +#pragma once #include #include @@ -108,5 +90,3 @@ class SoundDevice { }; typedef QSharedPointer SoundDevicePointer; - -#endif diff --git a/src/soundio/sounddeviceerror.h b/src/soundio/sounddeviceerror.h index 7fac1d7c41b1..7d6968b1fe9d 100644 --- a/src/soundio/sounddeviceerror.h +++ b/src/soundio/sounddeviceerror.h @@ -1,5 +1,4 @@ -#ifndef SOUNDDEVICEERROR_H -#define SOUNDDEVICEERROR_H +#pragma once // Used for returning errors from sounddevice functions. enum SoundDeviceError { @@ -10,5 +9,3 @@ enum SoundDeviceError { SOUNDDEVICE_ERROR_EXCESSIVE_INPUT_CHANNEL, SOUNDDEVICE_ERROR_DEVICE_COUNT }; - -#endif /* SOUNDDEVICEERROR_H */ diff --git a/src/soundio/sounddevicenetwork.h b/src/soundio/sounddevicenetwork.h index 3d28aeb8443b..7c5b8686e795 100644 --- a/src/soundio/sounddevicenetwork.h +++ b/src/soundio/sounddevicenetwork.h @@ -1,5 +1,4 @@ -#ifndef SOUNDDEVICENETWORK_H -#define SOUNDDEVICENETWORK_H +#pragma once #include #include @@ -103,5 +102,3 @@ class SoundDeviceNetworkThread : public QThread { SoundDeviceNetwork* m_pParent; bool m_stop; }; - -#endif // SOUNDDEVICENETWORK_H diff --git a/src/soundio/sounddevicenotfound.h b/src/soundio/sounddevicenotfound.h index 2e33dbf7f994..7ff817d48057 100644 --- a/src/soundio/sounddevicenotfound.h +++ b/src/soundio/sounddevicenotfound.h @@ -1,5 +1,4 @@ -#ifndef SOUNDDEVICENOTFOUND_H -#define SOUNDDEVICENOTFOUND_H +#pragma once #include @@ -38,5 +37,3 @@ class SoundDeviceNotFound : public SoundDevice { return 44100; } }; - -#endif // SOUNDDEVICENOTFOUND_H diff --git a/src/soundio/soundmanager.cpp b/src/soundio/soundmanager.cpp index 3963287d118a..65993a9383ac 100644 --- a/src/soundio/soundmanager.cpp +++ b/src/soundio/soundmanager.cpp @@ -1,19 +1,3 @@ -/** - * @file soundmanager.cpp - * @author Albert Santoni - * @author Bill Good - * @date 20070815 - */ - -/*************************************************************************** -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) any later version. * -* * -***************************************************************************/ - #include "soundio/soundmanager.h" #include diff --git a/src/soundio/soundmanagerconfig.cpp b/src/soundio/soundmanagerconfig.cpp index 6e77113c218f..1ffa35fb7b90 100644 --- a/src/soundio/soundmanagerconfig.cpp +++ b/src/soundio/soundmanagerconfig.cpp @@ -1,18 +1,3 @@ -/** - * @file soundmanagerconfig.cpp - * @author Bill Good - * @date 20100709 - */ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - #include #include "soundio/soundmanagerconfig.h" diff --git a/src/soundio/soundmanagerconfig.h b/src/soundio/soundmanagerconfig.h index 0e030ebcdd98..d158ae3cd6fc 100644 --- a/src/soundio/soundmanagerconfig.h +++ b/src/soundio/soundmanagerconfig.h @@ -1,20 +1,4 @@ -/** - * @file soundmanagerconfig.h - * @author Bill Good - * @date 20100709 - */ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -#ifndef SOUNDMANAGERCONFIG_H -#define SOUNDMANAGERCONFIG_H +#pragma once #ifndef SOUNDMANAGERCONFIG_FILENAME #define SOUNDMANAGERCONFIG_FILENAME "soundconfig.xml" @@ -103,4 +87,3 @@ class SoundManagerConfig { bool m_bExternalRecordBroadcastConnected; SoundManager* m_pSoundManager; }; -#endif diff --git a/src/soundio/soundmanagerutil.cpp b/src/soundio/soundmanagerutil.cpp index 1381313c589e..f64cfd8b533f 100644 --- a/src/soundio/soundmanagerutil.cpp +++ b/src/soundio/soundmanagerutil.cpp @@ -1,18 +1,3 @@ -/** - * @file soundmanagerutil.cpp - * @author Bill Good - * @date 20100611 - */ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - #include "soundio/soundmanagerutil.h" #include "engine/channels/enginechannel.h" diff --git a/src/sources/mp3decoding.h b/src/sources/mp3decoding.h index bf272c7cdc1a..00fa1041feb6 100644 --- a/src/sources/mp3decoding.h +++ b/src/sources/mp3decoding.h @@ -1,5 +1,4 @@ -#ifndef MIXXX_MP3DECODING_H -#define MIXXX_MP3DECODING_H +#pragma once #include "util/types.h" @@ -12,5 +11,3 @@ namespace mixxx { constexpr SINT kMp3SeekFramePrefetchCount = 29; } // namespace mixxx - -#endif // MIXXX_MP3DECODING_H diff --git a/src/sources/urlresource.h b/src/sources/urlresource.h index 747daf68c743..e93971370695 100644 --- a/src/sources/urlresource.h +++ b/src/sources/urlresource.h @@ -1,5 +1,4 @@ -#ifndef MIXXX_URLRESOURCE_H -#define MIXXX_URLRESOURCE_H +#pragma once #include "util/assert.h" @@ -41,5 +40,3 @@ class UrlResource { }; } // namespace mixxx - -#endif // MIXXX_URLRESOURCE_H diff --git a/src/sources/v1/legacyaudiosource.h b/src/sources/v1/legacyaudiosource.h index 983e7ba3222d..1651bec322de 100644 --- a/src/sources/v1/legacyaudiosource.h +++ b/src/sources/v1/legacyaudiosource.h @@ -1,5 +1,4 @@ -#ifndef MIXXX_LEGACYAUDIOSOURCE_H -#define MIXXX_LEGACYAUDIOSOURCE_H +#pragma once #include "util/types.h" @@ -36,5 +35,3 @@ class LegacyAudioSource { }; } // namespace mixxx - -#endif // MIXXX_LEGACYAUDIOSOURCE_H diff --git a/src/sources/v1/legacyaudiosourceadapter.h b/src/sources/v1/legacyaudiosourceadapter.h index 40aa362b7025..61dd8f2d59d8 100644 --- a/src/sources/v1/legacyaudiosourceadapter.h +++ b/src/sources/v1/legacyaudiosourceadapter.h @@ -1,5 +1,4 @@ -#ifndef MIXXX_LEGACYAUDIOSOURCEADAPTER_H -#define MIXXX_LEGACYAUDIOSOURCEADAPTER_H +#pragma once #include "sources/v1/legacyaudiosource.h" @@ -24,5 +23,3 @@ class LegacyAudioSourceAdapter : public virtual /*implements*/ IAudioSourceReade }; } // namespace mixxx - -#endif // MIXXX_LEGACYAUDIOSOURCEADAPTER_H diff --git a/src/test/baseeffecttest.h b/src/test/baseeffecttest.h index 566f3d002570..7e945bb2c324 100644 --- a/src/test/baseeffecttest.h +++ b/src/test/baseeffecttest.h @@ -1,5 +1,4 @@ -#ifndef BASEEFFECTTEST_H -#define BASEEFFECTTEST_H +#pragma once #include #include @@ -80,6 +79,3 @@ class BaseEffectTest : public MixxxTest { TestEffectBackend* m_pTestBackend; QScopedPointer m_pEffectsManager; }; - - -#endif /* BASEEFFECTTEST_H */ diff --git a/src/test/mockedenginebackendtest.h b/src/test/mockedenginebackendtest.h index 8d33143673ec..3b06886f26bc 100644 --- a/src/test/mockedenginebackendtest.h +++ b/src/test/mockedenginebackendtest.h @@ -1,5 +1,4 @@ -#ifndef MOCKENGINEBACKENDTEST_H_ -#define MOCKENGINEBACKENDTEST_H_ +#pragma once #include #include @@ -96,5 +95,3 @@ class MockedEngineBackendTest : public BaseSignalPathTest { MockScaler *m_pMockScaleKeylock1, *m_pMockScaleKeylock2, *m_pMockScaleKeylock3; TrackPointer m_pTrack1, m_pTrack2, m_pTrack3; }; - -#endif /* MOCKEDENGINEBACKENDTEST_H_ */ diff --git a/src/track/beatfactory.h b/src/track/beatfactory.h index c6c941bea80b..84012ef4a857 100644 --- a/src/track/beatfactory.h +++ b/src/track/beatfactory.h @@ -1,5 +1,4 @@ -#ifndef BEATFACTORY_H -#define BEATFACTORY_H +#pragma once #include @@ -39,5 +38,3 @@ class BeatFactory { private: static void deleteBeats(mixxx::Beats* pBeats); }; - -#endif /* BEATFACTORY_H */ diff --git a/src/track/beatgrid.h b/src/track/beatgrid.h index 8ea9056951cd..bd4747cc7994 100644 --- a/src/track/beatgrid.h +++ b/src/track/beatgrid.h @@ -1,5 +1,4 @@ -#ifndef BEATGRID_H -#define BEATGRID_H +#pragma once #include @@ -98,5 +97,3 @@ class BeatGrid final : public Beats { }; } // namespace mixxx - -#endif /* BEATGRID_H */ diff --git a/src/track/beatmap.h b/src/track/beatmap.h index d6ad4e7b3251..d3f05c259110 100644 --- a/src/track/beatmap.h +++ b/src/track/beatmap.h @@ -5,8 +5,7 @@ * Author: vittorio */ -#ifndef BEATMAP_H_ -#define BEATMAP_H_ +#pragma once #include @@ -113,4 +112,3 @@ class BeatMap final : public Beats { }; } // namespace mixxx -#endif /* BEATMAP_H_ */ diff --git a/src/track/beats.cpp b/src/track/beats.cpp index 80db56bf41fd..58d90a965991 100644 --- a/src/track/beats.cpp +++ b/src/track/beats.cpp @@ -1,4 +1,3 @@ - #include "track/beats.h" #include "moc_beats.cpp" diff --git a/src/track/beats.h b/src/track/beats.h index cdd155e97d3b..c3ae7e568e57 100644 --- a/src/track/beats.h +++ b/src/track/beats.h @@ -1,5 +1,4 @@ -#ifndef BEATS_H -#define BEATS_H +#pragma once #include #include @@ -174,4 +173,3 @@ class Beats : public QObject { }; } // namespace mixxx -#endif /* BEATS_H */ diff --git a/src/track/beatutils.h b/src/track/beatutils.h index 10a6a8b49fdf..46814da6fb99 100644 --- a/src/track/beatutils.h +++ b/src/track/beatutils.h @@ -1,8 +1,4 @@ -// Created on: 30/nov/2011 -// Author: vittorio - -#ifndef BEATUTILS_H_ -#define BEATUTILS_H_ +#pragma once // to tell the msvs compiler about `isnan` #include "util/math.h" @@ -86,5 +82,3 @@ class BeatUtils { const int sampleRate, QMap* frequencyHistogram); }; - -#endif /* BEATUTILS_H_ */ diff --git a/src/track/bpm.h b/src/track/bpm.h index 83b415ced48f..117b9946649e 100644 --- a/src/track/bpm.h +++ b/src/track/bpm.h @@ -1,5 +1,4 @@ -#ifndef MIXXX_BPM_H -#define MIXXX_BPM_H +#pragma once #include @@ -101,5 +100,3 @@ QDebug operator<<(QDebug dbg, const Bpm& arg) { Q_DECLARE_TYPEINFO(mixxx::Bpm, Q_MOVABLE_TYPE); Q_DECLARE_METATYPE(mixxx::Bpm) - -#endif // MIXXX_BPM_H diff --git a/src/track/cue.cpp b/src/track/cue.cpp index a71b383a325c..16ef540b088b 100644 --- a/src/track/cue.cpp +++ b/src/track/cue.cpp @@ -1,6 +1,3 @@ -// cue.cpp -// Created 10/26/2009 by RJ Ryan (rryan@mit.edu) - #include "track/cue.h" #include diff --git a/src/track/keyfactory.h b/src/track/keyfactory.h index 246d7f0a18fb..72ce8c873b38 100644 --- a/src/track/keyfactory.h +++ b/src/track/keyfactory.h @@ -1,5 +1,4 @@ -#ifndef KEYFACTORY_H -#define KEYFACTORY_H +#pragma once #include #include @@ -30,5 +29,3 @@ class KeyFactory { const QHash& extraVersionInfo, const int iSampleRate, const int iTotalSamples); }; - -#endif /* KEYFACTORY_H */ diff --git a/src/track/keys.h b/src/track/keys.h index faa0f2f7b4dd..ddc0b414c164 100644 --- a/src/track/keys.h +++ b/src/track/keys.h @@ -1,5 +1,4 @@ -#ifndef KEYS_H -#define KEYS_H +#pragma once #include #include @@ -53,5 +52,3 @@ class Keys final { // For private constructor access. friend class KeyFactory; }; - -#endif /* KEYS_H */ diff --git a/src/track/keyutils.h b/src/track/keyutils.h index b23f999dae71..5ac8d19dc0a8 100644 --- a/src/track/keyutils.h +++ b/src/track/keyutils.h @@ -1,5 +1,4 @@ -#ifndef KEYUTILS_H -#define KEYUTILS_H +#pragma once #include #include @@ -162,5 +161,3 @@ class KeyUtils { static QMap s_notation; static QMap s_reverseNotation; }; - -#endif /* KEYUTILS_H */ diff --git a/src/track/replaygain.h b/src/track/replaygain.h index 8f47ed44bfce..9c943e828cca 100644 --- a/src/track/replaygain.h +++ b/src/track/replaygain.h @@ -1,5 +1,4 @@ -#ifndef MIXXX_REPLAYGAIN_H -#define MIXXX_REPLAYGAIN_H +#pragma once #include "util/types.h" @@ -123,5 +122,3 @@ QDebug operator<<(QDebug dbg, const ReplayGain& arg) { Q_DECLARE_TYPEINFO(mixxx::ReplayGain, Q_MOVABLE_TYPE); Q_DECLARE_METATYPE(mixxx::ReplayGain) - -#endif // MIXXX_REPLAYGAIN_H diff --git a/src/track/tracknumbers.h b/src/track/tracknumbers.h index 70a8cdc9b5ca..6e9e6ef66ecb 100644 --- a/src/track/tracknumbers.h +++ b/src/track/tracknumbers.h @@ -1,5 +1,4 @@ -#ifndef TRACKNUMBERS_H -#define TRACKNUMBERS_H +#pragma once #include #include @@ -123,5 +122,3 @@ bool operator!=(const TrackNumbers& lhs, const TrackNumbers& rhs) { Q_DECLARE_TYPEINFO(TrackNumbers, Q_MOVABLE_TYPE); Q_DECLARE_METATYPE(TrackNumbers) - -#endif // TRACKNUMBERS_H diff --git a/src/util/alphabetafilter.h b/src/util/alphabetafilter.h index 4eea8ae185ce..71367c541b53 100644 --- a/src/util/alphabetafilter.h +++ b/src/util/alphabetafilter.h @@ -1,16 +1,4 @@ -/*************************************************************************** - alphabetafilter.h - description - ------------------- -begin : Wed May 12 2010 -copyright : (C) 2010 by Sean M. Pappalardo -email : spappalardo@mixxx.org - -This is essentially just a C++ version of xwax's pitch.h, - which is Copyright (C) 2010 Mark Hills -***************************************************************************/ - -#ifndef ALPHABETAFILTER_H -#define ALPHABETAFILTER_H +#pragma once // This is a simple alpha-beta filter. It follows the example from Wikipedia // closely: http://en.wikipedia.org/wiki/Alpha_beta_filter @@ -18,6 +6,9 @@ This is essentially just a C++ version of xwax's pitch.h, // Given an initial position and velocity, learning parameters alpha and beta, // and a series of input observations of the distance travelled, the filter // predicts the real position and velocity. +// +// This is essentially just a C++ version of xwax's pitch.h, +// which is Copyright (C) 2010 Mark Hills class AlphaBetaFilter { public: AlphaBetaFilter() @@ -77,5 +68,3 @@ class AlphaBetaFilter { // State of the rate calculation filter double m_dt, m_x, m_v, m_alpha, m_beta; }; - -#endif diff --git a/src/util/battery/battery.h b/src/util/battery/battery.h index 7f41035fe3ed..3e9fdc82fa06 100644 --- a/src/util/battery/battery.h +++ b/src/util/battery/battery.h @@ -1,5 +1,4 @@ -#ifndef UTIL_BATTERY_BATTERY_H -#define UTIL_BATTERY_BATTERY_H +#pragma once #include "util/timer.h" @@ -46,5 +45,3 @@ class Battery : public QObject { private: GuiTickTimer m_timer; }; - -#endif /* UTIL_BATTERY_BATTERY_H */ diff --git a/src/util/battery/batterylinux.h b/src/util/battery/batterylinux.h index 921617180529..eb1e5e059d90 100644 --- a/src/util/battery/batterylinux.h +++ b/src/util/battery/batterylinux.h @@ -1,5 +1,4 @@ -#ifndef UTIL_BATTERY_BATTERYLINUX_H -#define UTIL_BATTERY_BATTERYLINUX_H +#pragma once #include "util/battery/battery.h" @@ -14,5 +13,3 @@ class BatteryLinux : public Battery { private: void* m_client; }; - -#endif /* UTIL_BATTERY_BATTERYLINUX_H */ diff --git a/src/util/battery/batterymac.h b/src/util/battery/batterymac.h index 04921f741c7b..77656e06933c 100644 --- a/src/util/battery/batterymac.h +++ b/src/util/battery/batterymac.h @@ -1,5 +1,4 @@ -#ifndef UTIL_BATTERY_BATTERYMAC_H -#define UTIL_BATTERY_BATTERYMAC_H +#pragma once #include "util/battery/battery.h" @@ -11,5 +10,3 @@ class BatteryMac : public Battery { protected: void read() override; }; - -#endif /* UTIL_BATTERY_BATTERYMAC_H */ diff --git a/src/util/battery/batterywindows.h b/src/util/battery/batterywindows.h index 6dcf64402fa8..4981d11ed68f 100644 --- a/src/util/battery/batterywindows.h +++ b/src/util/battery/batterywindows.h @@ -1,5 +1,4 @@ -#ifndef UTIL_BATTERY_BATTERYWINDOWS_H -#define UTIL_BATTERY_BATTERYWINDOWS_H +#pragma once #include "util/battery/battery.h" @@ -11,5 +10,3 @@ class BatteryWindows : public Battery { protected: void read() override; }; - -#endif /* UTIL_BATTERY_BATTERYWINDOWS_H */ diff --git a/src/util/circularbuffer.h b/src/util/circularbuffer.h index 3d6ccfc91d8a..1fe650f24155 100644 --- a/src/util/circularbuffer.h +++ b/src/util/circularbuffer.h @@ -1,5 +1,4 @@ -#ifndef CIRCULARBUFFER_H -#define CIRCULARBUFFER_H +#pragma once #include @@ -93,5 +92,3 @@ class CircularBuffer { unsigned int m_iWritePos; unsigned int m_iReadPos; }; - -#endif /* CIRCULARBUFFER_H */ diff --git a/src/util/class.h b/src/util/class.h index c9e32d7cfcca..ad313c561fd8 100644 --- a/src/util/class.h +++ b/src/util/class.h @@ -1,10 +1,7 @@ -#ifndef MIXXX_UTIL_CLASS_H -#define MIXXX_UTIL_CLASS_H +#pragma once // A macro to disallow the copy constructor and operator= functions // This should be used in the private: declarations for a class #define DISALLOW_COPY_AND_ASSIGN(TypeName) \ TypeName(const TypeName&); \ void operator=(const TypeName&) - -#endif /* MIXXX_UTIL_CLASS_H */ diff --git a/src/util/console.cpp b/src/util/console.cpp index 3edb34f44e58..589977088665 100644 --- a/src/util/console.cpp +++ b/src/util/console.cpp @@ -1,4 +1,3 @@ - #include "console.h" #include diff --git a/src/util/console.h b/src/util/console.h index f209994118d0..ceaa93d01a1f 100644 --- a/src/util/console.h +++ b/src/util/console.h @@ -1,6 +1,4 @@ - -#ifndef CONSOLE_H_ -#define CONSOLE_H_ +#pragma once #ifdef __WINDOWS__ #include @@ -21,5 +19,3 @@ class Console { TCHAR m_oldTitle[MAX_PATH]; #endif }; - -#endif /* CONSOLE_H_ */ diff --git a/src/util/counter.h b/src/util/counter.h index d69f645750b0..b859d0919618 100644 --- a/src/util/counter.h +++ b/src/util/counter.h @@ -1,5 +1,4 @@ -#ifndef COUNTER_H -#define COUNTER_H +#pragma once #include "util/stat.h" @@ -26,5 +25,3 @@ class Counter { private: QString m_tag; }; - -#endif /* COUNTER_H */ diff --git a/src/util/db/dbconnection.h b/src/util/db/dbconnection.h index dfe91dbf860a..847604a42bc3 100644 --- a/src/util/db/dbconnection.h +++ b/src/util/db/dbconnection.h @@ -1,6 +1,4 @@ -#ifndef MIXXX_DBCONNECTION_H -#define MIXXX_DBCONNECTION_H - +#pragma once #include #include @@ -68,6 +66,3 @@ class DbConnection final { }; } // namespace mixxx - - -#endif // MIXXX_DBCONNECTION_H diff --git a/src/util/db/dbconnectionpool.h b/src/util/db/dbconnectionpool.h index 1ecfd8ed511f..bc9b3ce25807 100644 --- a/src/util/db/dbconnectionpool.h +++ b/src/util/db/dbconnectionpool.h @@ -1,6 +1,4 @@ -#ifndef MIXXX_DBCONNECTIONPOOL_H -#define MIXXX_DBCONNECTIONPOOL_H - +#pragma once #include #include @@ -65,6 +63,3 @@ class DbConnectionPool final { }; } // namespace mixxx - - -#endif // MIXXX_DBCONNECTIONPOOL_H diff --git a/src/util/db/dbconnectionpooled.h b/src/util/db/dbconnectionpooled.h index 6eb31e6fd015..69d0d0f3abb8 100644 --- a/src/util/db/dbconnectionpooled.h +++ b/src/util/db/dbconnectionpooled.h @@ -1,6 +1,4 @@ -#ifndef MIXXX_DBCONNECTIONPOOLED_H -#define MIXXX_DBCONNECTIONPOOLED_H - +#pragma once #include @@ -40,6 +38,3 @@ class DbConnectionPooled final { }; } // namespace mixxx - - -#endif // MIXXX_DBCONNECTIONPOOLED_H diff --git a/src/util/db/dbentity.h b/src/util/db/dbentity.h index 968cdc2d4e2a..605075d09ccc 100644 --- a/src/util/db/dbentity.h +++ b/src/util/db/dbentity.h @@ -1,6 +1,4 @@ -#ifndef MIXXX_DBENTITY_H -#define MIXXX_DBENTITY_H - +#pragma once #include "util/db/dbid.h" @@ -31,6 +29,3 @@ class DbEntity { private: T m_id; }; - - -#endif // MIXXX_DBENTITY_H diff --git a/src/util/db/dbfieldindex.h b/src/util/db/dbfieldindex.h index c39688e1d48b..fc156e3556bb 100644 --- a/src/util/db/dbfieldindex.h +++ b/src/util/db/dbfieldindex.h @@ -1,6 +1,4 @@ -#ifndef MIXXX_DBFIELDINDEX_H -#define MIXXX_DBFIELDINDEX_H - +#pragma once // Type-safe wrapper with a default constructor that encapsulates // field indices of QSqlRecord. @@ -27,6 +25,3 @@ class DbFieldIndex { }; Q_DECLARE_METATYPE(DbFieldIndex) - - -#endif // MIXXX_DBFIELDINDEX_H diff --git a/src/util/db/fwdsqlqueryselectresult.h b/src/util/db/fwdsqlqueryselectresult.h index 8bfe0fbfc940..cf94908cb3e9 100644 --- a/src/util/db/fwdsqlqueryselectresult.h +++ b/src/util/db/fwdsqlqueryselectresult.h @@ -1,6 +1,4 @@ -#ifndef MIXXX_FWDSQLQUERYSELECTRESULT_H -#define MIXXX_FWDSQLQUERYSELECTRESULT_H - +#pragma once #include "util/db/fwdsqlquery.h" #include "util/db/sqlqueryfinisher.h" @@ -49,6 +47,3 @@ class FwdSqlQuerySelectResult { FwdSqlQuery m_query; SqlQueryFinisher m_queryFinisher; }; - - -#endif // MIXXX_FWDSQLQUERYSELECTRESULT_H diff --git a/src/util/db/sqllikewildcardescaper.h b/src/util/db/sqllikewildcardescaper.h index 06ebc88fb2ee..fd3329bbc209 100644 --- a/src/util/db/sqllikewildcardescaper.h +++ b/src/util/db/sqllikewildcardescaper.h @@ -1,6 +1,4 @@ -#ifndef MIXXX_SQLLIKEWILDCARDESCAPER_H -#define MIXXX_SQLLIKEWILDCARDESCAPER_H - +#pragma once #include @@ -17,6 +15,3 @@ class SqlLikeWildcardEscaper final { private: SqlLikeWildcardEscaper() = delete; // utility class }; - - -#endif // MIXXX_SQLLIKEWILDCARDESCAPER_H diff --git a/src/util/db/sqllikewildcards.h b/src/util/db/sqllikewildcards.h index ef7cb026bcaa..cc357014b2b5 100644 --- a/src/util/db/sqllikewildcards.h +++ b/src/util/db/sqllikewildcards.h @@ -1,12 +1,7 @@ -#ifndef MIXXX_SQLLIKEWILDCARDS_H -#define MIXXX_SQLLIKEWILDCARDS_H - +#pragma once #include const QChar kSqlLikeMatchOne = '_'; const QChar kSqlLikeMatchAll = '%'; - - -#endif // MIXXX_SQLLIKEWILDCARDS_H diff --git a/src/util/db/sqlqueryfinisher.h b/src/util/db/sqlqueryfinisher.h index 299bb7733b1f..a6fc06902cc8 100644 --- a/src/util/db/sqlqueryfinisher.h +++ b/src/util/db/sqlqueryfinisher.h @@ -1,6 +1,4 @@ -#ifndef MIXXX_SQLQUERYFINISHER_H -#define MIXXX_SQLQUERYFINISHER_H - +#pragma once #include @@ -33,6 +31,3 @@ class SqlQueryFinisher final { QSqlQuery m_query; // implicitly shared }; - - -#endif // MIXXX_SQLQUERYFINISHER_H diff --git a/src/util/db/sqlstorage.h b/src/util/db/sqlstorage.h index 7b5fb461a55d..463bdeb34a8b 100644 --- a/src/util/db/sqlstorage.h +++ b/src/util/db/sqlstorage.h @@ -1,6 +1,4 @@ -#ifndef MIXXX_SQLSTORAGE_H -#define MIXXX_SQLSTORAGE_H - +#pragma once #include @@ -47,6 +45,3 @@ class SqlStorage { SqlStorage& operator=(const SqlStorage&) = delete; }; - - -#endif // MIXXX_SQLSTORAGE_H diff --git a/src/util/db/sqlstringformatter.h b/src/util/db/sqlstringformatter.h index 98b3b6ca02a1..9ca732f78b01 100644 --- a/src/util/db/sqlstringformatter.h +++ b/src/util/db/sqlstringformatter.h @@ -1,6 +1,4 @@ -#ifndef MIXXX_SQLSTRINGFORMATTER_H -#define MIXXX_SQLSTRINGFORMATTER_H - +#pragma once #include #include @@ -28,6 +26,3 @@ class SqlStringFormatter final { private: SqlStringFormatter() = delete; // utility class }; - - -#endif // MIXXX_SQLSTRINGFORMATTER_H diff --git a/src/util/db/sqlsubselectmode.h b/src/util/db/sqlsubselectmode.h index 7ab5db1d25c4..048e135549d5 100644 --- a/src/util/db/sqlsubselectmode.h +++ b/src/util/db/sqlsubselectmode.h @@ -1,11 +1,6 @@ -#ifndef MIXXX_SQLSUBSELECTMODE_H -#define MIXXX_SQLSUBSELECTMODE_H - +#pragma once enum SqlSubselectMode { SQL_SUBSELECT_IN, SQL_SUBSELECT_NOT_IN, }; - - -#endif // MIXXX_SQLSUBSELECTMODE_H diff --git a/src/util/db/sqltransaction.h b/src/util/db/sqltransaction.h index 8a172cea5a14..42ae8a0ad0ba 100644 --- a/src/util/db/sqltransaction.h +++ b/src/util/db/sqltransaction.h @@ -1,6 +1,4 @@ -#ifndef MIXXX_SQLTRANSACTION_H -#define MIXXX_SQLTRANSACTION_H - +#pragma once #include @@ -30,6 +28,3 @@ class SqlTransaction final { QSqlDatabase m_database; bool m_active; }; - - -#endif // MIXXX_SQLTRANSACTION_H diff --git a/src/util/debug.h b/src/util/debug.h index f405e70b8a4c..6adb46b6c379 100644 --- a/src/util/debug.h +++ b/src/util/debug.h @@ -1,5 +1,4 @@ -#ifndef DEBUG_H -#define DEBUG_H +#pragma once #include #include @@ -44,5 +43,3 @@ inline void reportCriticalErrorAndQuit(const QString& message) { dialogHandler->requestErrorDialog(DLG_CRITICAL, message, true); } } - -#endif /* DEBUG_H */ diff --git a/src/util/defs.h b/src/util/defs.h index f34bf34f99b9..a2ce1b2502a3 100644 --- a/src/util/defs.h +++ b/src/util/defs.h @@ -1,10 +1,7 @@ -#ifndef DEFS_H -#define DEFS_H +#pragma once // Maximum buffer length to each EngineObject::process call. //TODO: Replace this with mixxx::AudioParameters::bufferSize() const unsigned int MAX_BUFFER_LEN = 160000; const int kMaxNumberOfDecks = 4; - -#endif /* DEFS_H */ diff --git a/src/util/denormalsarezero.h b/src/util/denormalsarezero.h index 694463d03947..6e4eb838a3d8 100644 --- a/src/util/denormalsarezero.h +++ b/src/util/denormalsarezero.h @@ -1,4 +1,3 @@ - #pragma once // This was copied from the gcc header pmmintrin.h which requires SSE3 diff --git a/src/util/desktophelper.cpp b/src/util/desktophelper.cpp index 670c0cca74c5..06faae00cd70 100644 --- a/src/util/desktophelper.cpp +++ b/src/util/desktophelper.cpp @@ -1,4 +1,3 @@ - #include "util/desktophelper.h" #include @@ -173,4 +172,3 @@ void DesktopHelper::openInFileBrowser(const QStringList& paths) { } } // namespace mixxx - diff --git a/src/util/event.h b/src/util/event.h index 65a19c5cf647..d03e04535dad 100644 --- a/src/util/event.h +++ b/src/util/event.h @@ -1,5 +1,4 @@ -#ifndef EVENT_H -#define EVENT_H +#pragma once #include #include @@ -39,5 +38,3 @@ class Event { static bool start(const char*) = delete; static bool end(const char*) = delete; }; - -#endif /* EVENT_H */ diff --git a/src/util/experiment.h b/src/util/experiment.h index 507cc67c67d1..1dc77e9ef2cd 100644 --- a/src/util/experiment.h +++ b/src/util/experiment.h @@ -1,5 +1,4 @@ -#ifndef EXPERIMENT_H -#define EXPERIMENT_H +#pragma once #include @@ -47,5 +46,3 @@ class Experiment { static volatile Mode s_mode; }; - -#endif /* EXPERIMENT_H */ diff --git a/src/util/fifo.h b/src/util/fifo.h index 0b22ee9bbf55..dac6b28a1b5c 100644 --- a/src/util/fifo.h +++ b/src/util/fifo.h @@ -1,5 +1,4 @@ -#ifndef FIFO_H -#define FIFO_H +#pragma once #include "pa_ringbuffer.h" @@ -69,5 +68,3 @@ class FIFO { PaUtilRingBuffer m_ringBuffer; DISALLOW_COPY_AND_ASSIGN(FIFO); }; - -#endif /* FIFO_H */ diff --git a/src/util/file.h b/src/util/file.h index c0b5b35cf662..d1950d0ca95d 100644 --- a/src/util/file.h +++ b/src/util/file.h @@ -1,5 +1,4 @@ -#ifndef FILE_H -#define FILE_H +#pragma once #include #include @@ -34,5 +33,3 @@ class MDir { QDir m_dir; SecurityTokenPointer m_pSecurityToken; }; - -#endif /* FILE_H */ diff --git a/src/util/font.h b/src/util/font.h index 25a997689e64..f5b760e8e1d6 100644 --- a/src/util/font.h +++ b/src/util/font.h @@ -1,5 +1,4 @@ -#ifndef FONT_H -#define FONT_H +#pragma once #include #include @@ -65,5 +64,3 @@ class FontUtils { private: FontUtils() {} }; - -#endif /* FONT_H */ diff --git a/src/util/fpclassify.h b/src/util/fpclassify.h index c1df4fdedd8e..b27dccefea4d 100644 --- a/src/util/fpclassify.h +++ b/src/util/fpclassify.h @@ -1,5 +1,4 @@ -#ifndef UTIL_FPCLASSIFY_H -#define UTIL_FPCLASSIFY_H +#pragma once #ifdef _MSC_VER @@ -34,5 +33,3 @@ int util_isnan(double x); int util_isinf(double x); #endif - -#endif // UTIL_FPCLASSIFY_H diff --git a/src/util/logger.h b/src/util/logger.h index b6c09641f286..01efefaa9b2f 100644 --- a/src/util/logger.h +++ b/src/util/logger.h @@ -1,6 +1,4 @@ -#ifndef MIXXX_UTIL_LOGGER_H -#define MIXXX_UTIL_LOGGER_H - +#pragma once #include #include @@ -75,6 +73,3 @@ class Logger final { }; } // namespace mixxx - - -#endif /* MIXXX_UTIL_LOGGER_H */ diff --git a/src/util/mac.h b/src/util/mac.h index ce70571ae8e9..bf005dc67fef 100644 --- a/src/util/mac.h +++ b/src/util/mac.h @@ -1,6 +1,5 @@ // Platform-specific helpers for OS X and iOS. -#ifndef MAC_H -#define MAC_H +#pragma once #include @@ -11,5 +10,3 @@ QString CFStringToQString(CFStringRef str); CFStringRef QStringToCFString(const QString& str); #endif - -#endif /* MAC_H */ diff --git a/src/util/mutex.h b/src/util/mutex.h index a46f8dee3565..bf0bc17b2bd7 100644 --- a/src/util/mutex.h +++ b/src/util/mutex.h @@ -1,5 +1,4 @@ -#ifndef UTIL_MUTEX_H -#define UTIL_MUTEX_H +#pragma once // Thread annotation aware variants of locks, read-write locks and scoped // lockers. This allows us to use Clang thread safety analysis in Mixxx. @@ -85,5 +84,3 @@ class SCOPED_CAPABILITY MReadLocker { private: QReadLocker m_locker; }; - -#endif /* UTIL_MUTEX_H */ diff --git a/src/util/path.h b/src/util/path.h index 92afba759f57..073e862290eb 100644 --- a/src/util/path.h +++ b/src/util/path.h @@ -1,5 +1,4 @@ -#ifndef PATH_H -#define PATH_H +#pragma once #ifndef PATH_MAX #ifndef MAX_PATH @@ -11,5 +10,3 @@ enum { PATH_MAX = MAX_PATH }; #endif - -#endif /* PATH_H */ diff --git a/src/util/performancetimer.h b/src/util/performancetimer.h index d4ac8b392256..2625d5010a61 100644 --- a/src/util/performancetimer.h +++ b/src/util/performancetimer.h @@ -39,8 +39,7 @@ ** ****************************************************************************/ -#ifndef PERFORMANCETIMER_H -#define PERFORMANCETIMER_H +#pragma once // // This is a fork of QPerformanceTimer just without the Q prefix @@ -74,5 +73,3 @@ class PerformanceTimer qint64 t2; #endif }; - -#endif // PERFORMANCETIMER_H diff --git a/src/util/platform.h b/src/util/platform.h index 8f248b265659..d3660a42b94a 100644 --- a/src/util/platform.h +++ b/src/util/platform.h @@ -1,5 +1,4 @@ -#ifndef MIXXX_UTIL_PLATFORM_H -#define MIXXX_UTIL_PLATFORM_H +#pragma once #if defined(__GNUC__) && !defined(__INTEL_COMPILER) // Clang and GCC @@ -39,5 +38,3 @@ do { \ } while (0) #endif - -#endif /* MIXXX_UTIL_PLATFORM_H */ diff --git a/src/util/rampingvalue.h b/src/util/rampingvalue.h index 51fa17f31437..367e1cd9c10d 100644 --- a/src/util/rampingvalue.h +++ b/src/util/rampingvalue.h @@ -1,6 +1,4 @@ -#ifndef MIXXX_UTIL_RAMPINGVALUE_H -#define MIXXX_UTIL_RAMPINGVALUE_H - +#pragma once template class RampingValue { @@ -18,5 +16,3 @@ class RampingValue { T m_value; T m_increment; }; - -#endif // MIXXX_UTIL_RAMPINGVALUE_H diff --git a/src/util/reference.h b/src/util/reference.h index 85f34b7e6044..6d3f181ac961 100644 --- a/src/util/reference.h +++ b/src/util/reference.h @@ -1,5 +1,4 @@ -#ifndef REFERENCE_H -#define REFERENCE_H +#pragma once // General tool for removing concrete dependencies while still incrementing a // reference count. @@ -20,6 +19,3 @@ class ReferenceHolder : public BaseReferenceHolder { private: QSharedPointer m_reference; }; - - -#endif /* REFERENCE_H */ diff --git a/src/util/regex.h b/src/util/regex.h index 5cc58c7b79f3..527d0b3ffe35 100644 --- a/src/util/regex.h +++ b/src/util/regex.h @@ -1,5 +1,4 @@ -#ifndef REGEX_H -#define REGEX_H +#pragma once #include #include @@ -19,6 +18,3 @@ class RegexUtils { private: RegexUtils() {} }; - - -#endif /* REGEX_H */ diff --git a/src/util/rescaler.h b/src/util/rescaler.h index 26286a30d4a3..c0d6bb9f367d 100644 --- a/src/util/rescaler.h +++ b/src/util/rescaler.h @@ -1,7 +1,4 @@ -#ifndef RESCALER_H -#define RESCALER_H - - +#pragma once class RescalerUtils { public: @@ -23,7 +20,3 @@ class RescalerUtils { private: RescalerUtils() {} }; - - - -#endif // RESCALER_H diff --git a/src/util/rlimit.h b/src/util/rlimit.h index d96fc88e4e8a..1f8b50ea6ec7 100644 --- a/src/util/rlimit.h +++ b/src/util/rlimit.h @@ -1,5 +1,4 @@ -#ifndef RLIMIT_H -#define RLIMIT_H +#pragma once #ifdef __LINUX__ @@ -11,4 +10,3 @@ class RLimit { }; #endif // __LINUX__ -#endif // RLIMIT_H_ diff --git a/src/util/rotary.h b/src/util/rotary.h index 4d78e1627671..c886a1a9bc9c 100644 --- a/src/util/rotary.h +++ b/src/util/rotary.h @@ -1,5 +1,4 @@ -#ifndef MIXXX_UTIL_ROTARY_H -#define MIXXX_UTIL_ROTARY_H +#pragma once class Rotary { public: @@ -38,5 +37,3 @@ class Rotary { double m_dLastValue; int m_iCalibrationCount; }; - -#endif /* MIXXX_UTIL_ROTARY_H */ diff --git a/src/util/sample.h b/src/util/sample.h index 4ccabe13c081..455543b77113 100644 --- a/src/util/sample.h +++ b/src/util/sample.h @@ -1,5 +1,4 @@ -#ifndef MIXXX_UTIL_SAMPLE_H -#define MIXXX_UTIL_SAMPLE_H +#pragma once #include #include // memset @@ -287,5 +286,3 @@ class SampleUtil { }; Q_DECLARE_OPERATORS_FOR_FLAGS(SampleUtil::CLIP_STATUS); - -#endif /* MIXXX_UTIL_SAMPLE_H */ diff --git a/src/util/sample_autogen.h b/src/util/sample_autogen.h index 0f0d8254e0ec..53c34c0a35b7 100644 --- a/src/util/sample_autogen.h +++ b/src/util/sample_autogen.h @@ -1,5 +1,4 @@ -#ifndef MIXXX_UTIL_SAMPLEAUTOGEN_H -#define MIXXX_UTIL_SAMPLEAUTOGEN_H +#pragma once //////////////////////////////////////////////////////// // THIS FILE IS AUTO-GENERATED. DO NOT EDIT DIRECTLY! // // SEE tools/generate_sample_functions.py // @@ -8836,4 +8835,3 @@ static inline void copy32WithRampingGain(CSAMPLE* M_RESTRICT pDest, pSrc31[i * 2 + 1] * gain31; } } -#endif /* MIXXX_UTIL_SAMPLEAUTOGEN_H */ diff --git a/src/util/sandbox.h b/src/util/sandbox.h index 4076a44c1ea4..d25bc5f8cbfd 100644 --- a/src/util/sandbox.h +++ b/src/util/sandbox.h @@ -1,5 +1,4 @@ -#ifndef SANDBOX_H -#define SANDBOX_H +#pragma once #include #include @@ -81,6 +80,3 @@ class Sandbox { static QSharedPointer> s_pSandboxPermissions; static QHash s_activeTokens; }; - - -#endif /* SANDBOX_H */ diff --git a/src/util/scopedoverridecursor.h b/src/util/scopedoverridecursor.h index ccce7dc38679..af08eb50d3de 100644 --- a/src/util/scopedoverridecursor.h +++ b/src/util/scopedoverridecursor.h @@ -1,5 +1,4 @@ -#ifndef SCOPEDOVERRIDECURSOR_H -#define SCOPEDOVERRIDECURSOR_H +#pragma once #include @@ -22,5 +21,3 @@ class ScopedWaitCursor : public ScopedOverrideCursor { { } }; - -#endif // SCOPEDOVERRIDECURSOR_H diff --git a/src/util/screensaver.cpp b/src/util/screensaver.cpp index 266abf20b08e..022312f20754 100644 --- a/src/util/screensaver.cpp +++ b/src/util/screensaver.cpp @@ -336,4 +336,3 @@ void ScreenSaverHelper::uninhibitInternal() } // namespace mixxx - diff --git a/src/util/screensaver.h b/src/util/screensaver.h index 03c3be778bbc..73d91835dbea 100644 --- a/src/util/screensaver.h +++ b/src/util/screensaver.h @@ -1,5 +1,4 @@ -#ifndef MIXXX_SCREENSAVER_H -#define MIXXX_SCREENSAVER_H +#pragma once #ifdef Q_OS_MAC #include @@ -35,5 +34,3 @@ class ScreenSaverHelper { }; } - -#endif // MIXXX_SCREENSAVER_H diff --git a/src/util/singleton.h b/src/util/singleton.h index ce195be3ed27..ae4a0531003b 100644 --- a/src/util/singleton.h +++ b/src/util/singleton.h @@ -1,5 +1,4 @@ -#ifndef SINGLETON_H -#define SINGLETON_H +#pragma once #include @@ -48,5 +47,3 @@ class Singleton { template T* Singleton::m_instance = nullptr; - -#endif // SINGLETON_H diff --git a/src/util/sleep.h b/src/util/sleep.h index e20960b2bfc9..0eca42c241b0 100644 --- a/src/util/sleep.h +++ b/src/util/sleep.h @@ -1,5 +1,4 @@ -#ifndef SLEEP_H -#define SLEEP_H +#pragma once #ifdef __WINDOWS__ #include @@ -8,5 +7,3 @@ #else #include #endif - -#endif /* SLEEP_H */ diff --git a/src/util/sleepableqthread.cpp b/src/util/sleepableqthread.cpp index 6c0ae94d3711..9d3ab5b315b4 100644 --- a/src/util/sleepableqthread.cpp +++ b/src/util/sleepableqthread.cpp @@ -1,6 +1,3 @@ -// sleepableqthread.cpp -// Created May 21, 2012 by Bill Good -// // This is just a dummy file meant to be shoved in the build list so that moc // runs on the class and linker errors are avoided. diff --git a/src/util/sleepableqthread.h b/src/util/sleepableqthread.h index 1d0b6e3d593d..4c3768b558f3 100644 --- a/src/util/sleepableqthread.h +++ b/src/util/sleepableqthread.h @@ -1,5 +1,3 @@ -// sleepableqthread.h -// Created May 21, 2012 by Bill Good #pragma once #include diff --git a/src/util/statmodel.h b/src/util/statmodel.h index 60b0273550f2..f66bbf02adc0 100644 --- a/src/util/statmodel.h +++ b/src/util/statmodel.h @@ -1,5 +1,4 @@ -#ifndef STATMODEL_H -#define STATMODEL_H +#pragma once #include #include @@ -50,5 +49,3 @@ class StatModel final : public QAbstractTableModel { QList m_stats; QHash m_statNameToRow; }; - -#endif /* STATMODEL_H */ diff --git a/src/util/tapfilter.h b/src/util/tapfilter.h index d6805dcd3155..232a27b15a34 100644 --- a/src/util/tapfilter.h +++ b/src/util/tapfilter.h @@ -1,5 +1,4 @@ -#ifndef TAPFILTER_H -#define TAPFILTER_H +#pragma once #include #include @@ -27,5 +26,3 @@ class TapFilter : public QObject { mixxx::Duration m_maxInterval; QMutex m_mutex; }; - -#endif /* TAPFILTER_H */ diff --git a/src/util/task.h b/src/util/task.h index 49110fbfdc5b..4fae197e74b3 100644 --- a/src/util/task.h +++ b/src/util/task.h @@ -1,5 +1,4 @@ -#ifndef TASK_H -#define TASK_H +#pragma once #include #include @@ -29,5 +28,3 @@ class TaskWatcher : public QObject { private: QAtomicInt m_activeTasks; }; - -#endif /* TASK_H */ diff --git a/src/util/thread_annotations.h b/src/util/thread_annotations.h index eb6a0ef0809d..f7c7a246e16f 100644 --- a/src/util/thread_annotations.h +++ b/src/util/thread_annotations.h @@ -1,5 +1,4 @@ -#ifndef UTIL_THREAD_ANNOTATIONS_H -#define UTIL_THREAD_ANNOTATIONS_H +#pragma once // NOTE(rryan): Taken from http://clang.llvm.org/docs/ThreadSafetyAnalysis.html. // Assumed to be in the public domain. @@ -68,5 +67,3 @@ #define NO_THREAD_SAFETY_ANALYSIS \ THREAD_ANNOTATION_ATTRIBUTE__(no_thread_safety_analysis) - -#endif /* UTIL_THREAD_ANNOTATIONS_H */ diff --git a/src/util/threadcputimer.cpp b/src/util/threadcputimer.cpp index bc2bb9eda507..13f62803160a 100644 --- a/src/util/threadcputimer.cpp +++ b/src/util/threadcputimer.cpp @@ -1,4 +1,3 @@ - #include "util/threadcputimer.h" #if defined(Q_OS_MAC) diff --git a/src/util/threadcputimer.h b/src/util/threadcputimer.h index 9e625659c7a1..6a5a569fc185 100644 --- a/src/util/threadcputimer.h +++ b/src/util/threadcputimer.h @@ -1,5 +1,4 @@ -#ifndef UTIL_THREADCPUTIMER_H -#define UTIL_THREADCPUTIMER_H +#pragma once #include "util/duration.h" #include "util/performancetimer.h" @@ -13,5 +12,3 @@ class ThreadCpuTimer { qint64 t1; qint64 t2; }; - -#endif // UTIL_THREADCPUTIMER_H diff --git a/src/util/time.h b/src/util/time.h index 8e097d83e16b..47fe6e0d4953 100644 --- a/src/util/time.h +++ b/src/util/time.h @@ -1,5 +1,4 @@ -#ifndef MIXXX_UTIL_TIME_H -#define MIXXX_UTIL_TIME_H +#pragma once #include "util/performancetimer.h" #include "util/threadcputimer.h" @@ -43,5 +42,3 @@ class Time { }; } // namespace mixxx - -#endif /* MIXXX_UTIL_TIME_H */ diff --git a/src/util/timer.h b/src/util/timer.h index 57fd4d58601d..8be1adf939f7 100644 --- a/src/util/timer.h +++ b/src/util/timer.h @@ -1,5 +1,4 @@ -#ifndef UTIL_TIMER_H -#define UTIL_TIMER_H +#pragma once #include @@ -134,5 +133,3 @@ class GuiTickTimer : public QObject { mixxx::Duration m_lastUpdate; bool m_bActive; }; - -#endif /* UTIL_TIMER_H */ diff --git a/src/util/trace.h b/src/util/trace.h index 18c5cb60b134..4c9615bb8677 100644 --- a/src/util/trace.h +++ b/src/util/trace.h @@ -1,5 +1,4 @@ -#ifndef UTIL_TRACE_H -#define UTIL_TRACE_H +#pragma once #include #include @@ -100,5 +99,3 @@ class DebugTrace : public Trace { virtual ~DebugTrace() { } }; - -#endif /* UTIL_TRACE_H */ diff --git a/src/util/translations.h b/src/util/translations.h index 117cb2a402f9..a5a7e64f0efd 100644 --- a/src/util/translations.h +++ b/src/util/translations.h @@ -1,5 +1,4 @@ -#ifndef MIXXX_UTIL_TRANSLATIONS_H -#define MIXXX_UTIL_TRANSLATIONS_H +#pragma once #include #include @@ -103,6 +102,3 @@ class Translations { }; } // namespace mixxx - - -#endif /* MIXXX_UTIL_TRANSLATIONS_H */ diff --git a/src/util/types.h b/src/util/types.h index 15b45e604ee9..cc1ded5db54d 100644 --- a/src/util/types.h +++ b/src/util/types.h @@ -1,5 +1,4 @@ -#ifndef TYPES_H -#define TYPES_H +#pragma once #include #include @@ -62,5 +61,3 @@ inline CSAMPLE_GAIN CSAMPLE_GAIN_clamp(CSAMPLE_GAIN in) { return math_clamp(in, CSAMPLE_GAIN_MIN, CSAMPLE_GAIN_MAX); } - -#endif /* TYPES_H */ diff --git a/src/util/valuetransformer.h b/src/util/valuetransformer.h index 12018c666b99..95a46a5bda65 100644 --- a/src/util/valuetransformer.h +++ b/src/util/valuetransformer.h @@ -1,5 +1,4 @@ -#ifndef VALUETRANSFORMER_H -#define VALUETRANSFORMER_H +#pragma once #include #include @@ -94,5 +93,3 @@ class ValueTransformer { QList m_transformers; }; - -#endif /* VALUETRANSFORMER_H */ diff --git a/src/util/version.h b/src/util/version.h index 61f645314c15..625a86974e20 100644 --- a/src/util/version.h +++ b/src/util/version.h @@ -1,5 +1,4 @@ -#ifndef VERSION_H -#define VERSION_H +#pragma once #include @@ -32,5 +31,3 @@ class Version { // Prints out diagnostic information about this build. static void logBuildDetails(); }; - -#endif /* VERSION_H */ diff --git a/src/util/xml.h b/src/util/xml.h index b736edb6fe5d..c16431bd9a92 100644 --- a/src/util/xml.h +++ b/src/util/xml.h @@ -1,5 +1,4 @@ -#ifndef XML_H -#define XML_H +#pragma once #include #include @@ -53,5 +52,3 @@ class XmlParse { XmlParse() {} ~XmlParse() {} }; - -#endif diff --git a/src/vinylcontrol/defs_vinylcontrol.h b/src/vinylcontrol/defs_vinylcontrol.h index aa37b7b04bdf..69a8b54ec9c9 100644 --- a/src/vinylcontrol/defs_vinylcontrol.h +++ b/src/vinylcontrol/defs_vinylcontrol.h @@ -1,5 +1,4 @@ -#ifndef DEFS_VINYLCONTROL_H -#define DEFS_VINYLCONTROL_H +#pragma once #define VINYL_PREF_KEY "[VinylControl]" @@ -46,5 +45,3 @@ const int VINYL_STATUS_ERROR = 3; #define MIXXX_VINYL_SCOPE_SIZE 100 const int kMaximumVinylControlInputs = 4; - -#endif /* DEFS_VINYLCONTROL_H */ diff --git a/src/vinylcontrol/steadypitch.cpp b/src/vinylcontrol/steadypitch.cpp index 39596ac58823..ec431903bf71 100644 --- a/src/vinylcontrol/steadypitch.cpp +++ b/src/vinylcontrol/steadypitch.cpp @@ -1,20 +1,3 @@ -/*************************************************************************** - steadypitch.cpp - ------------------- - begin : Halloween, 2011 - copyright : (C) 2011 Owen Williams - email : owilliams@mixxx.org -***************************************************************************/ - -/*************************************************************************** -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) any later version. * -* * -***************************************************************************/ - #include #include "vinylcontrolxwax.h" diff --git a/src/vinylcontrol/steadypitch.h b/src/vinylcontrol/steadypitch.h index 972e2e0c101c..6b37d7efaa75 100644 --- a/src/vinylcontrol/steadypitch.h +++ b/src/vinylcontrol/steadypitch.h @@ -1,5 +1,4 @@ -#ifndef STEADYPITCH_H -#define STEADYPITCH_H +#pragma once #include @@ -23,5 +22,3 @@ class SteadyPitch { double m_dPitchThreshold; int m_iPlayDirection; }; - -#endif diff --git a/src/vinylcontrol/vinylcontrol.h b/src/vinylcontrol/vinylcontrol.h index cdc142fc0a41..c3ffd02a2ba1 100644 --- a/src/vinylcontrol/vinylcontrol.h +++ b/src/vinylcontrol/vinylcontrol.h @@ -1,5 +1,4 @@ -#ifndef VINYLCONTROL_H -#define VINYLCONTROL_H +#pragma once #include @@ -79,5 +78,3 @@ class VinylControl : public QObject { // Whether this VinylControl instance is enabled. bool m_bIsEnabled; }; - -#endif diff --git a/src/vinylcontrol/vinylcontrolmanager.cpp b/src/vinylcontrol/vinylcontrolmanager.cpp index 4a83dc2afd5e..f406599047f7 100644 --- a/src/vinylcontrol/vinylcontrolmanager.cpp +++ b/src/vinylcontrol/vinylcontrolmanager.cpp @@ -1,9 +1,3 @@ -/** - * @file vinylcontrolmanager.cpp - * @author Bill Good - * @date April 15, 2011 - */ - #include "vinylcontrol/vinylcontrolmanager.h" #include "control/controlobject.h" diff --git a/src/vinylcontrol/vinylcontrolmanager.h b/src/vinylcontrol/vinylcontrolmanager.h index bbd26808d4ee..5a346d80a206 100644 --- a/src/vinylcontrol/vinylcontrolmanager.h +++ b/src/vinylcontrol/vinylcontrolmanager.h @@ -1,11 +1,4 @@ -/** - * @file vinylcontrolmanager.h - * @author Bill Good - * @date April 15, 2011 - */ - -#ifndef VINYLCONTROLMANAGER_H -#define VINYLCONTROLMANAGER_H +#pragma once #include #include @@ -69,5 +62,3 @@ class VinylControlManager : public QObject { ControlProxy* m_pNumDecks; int m_iNumConfiguredDecks; }; - -#endif // VINYLCONTROLMANAGER_H diff --git a/src/vinylcontrol/vinylcontrolprocessor.h b/src/vinylcontrol/vinylcontrolprocessor.h index 0ea9d3fa9246..5666db0af76b 100644 --- a/src/vinylcontrol/vinylcontrolprocessor.h +++ b/src/vinylcontrol/vinylcontrolprocessor.h @@ -1,5 +1,4 @@ -#ifndef VINYLCONTROLPROCESSOR_H -#define VINYLCONTROLPROCESSOR_H +#pragma once #include #include @@ -80,6 +79,3 @@ class VinylControlProcessor : public QThread, public AudioDestination { volatile bool m_bQuit; volatile bool m_bReloadConfig; }; - - -#endif /* VINYLCONTROLPROCESSOR_H */ diff --git a/src/vinylcontrol/vinylcontrolsignalwidget.cpp b/src/vinylcontrol/vinylcontrolsignalwidget.cpp index 7b4289d5cfcd..d0aab519a329 100644 --- a/src/vinylcontrol/vinylcontrolsignalwidget.cpp +++ b/src/vinylcontrol/vinylcontrolsignalwidget.cpp @@ -1,20 +1,3 @@ -/*************************************************************************** - vinylcontrolsignalwidget.cpp - ------------------- - begin : July 5, 2008 - copyright : (C) 2008 by Albert Santoni - email : gamegod \a\t users.sf.net -***************************************************************************/ - -/*************************************************************************** -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) any later version. * -* * -***************************************************************************/ - #include "vinylcontrol/vinylcontrolsignalwidget.h" #include "moc_vinylcontrolsignalwidget.cpp" diff --git a/src/vinylcontrol/vinylcontrolsignalwidget.h b/src/vinylcontrol/vinylcontrolsignalwidget.h index 702e65d43fbb..90bb687c70b9 100644 --- a/src/vinylcontrol/vinylcontrolsignalwidget.h +++ b/src/vinylcontrol/vinylcontrolsignalwidget.h @@ -5,8 +5,7 @@ * Author: asantoni */ -#ifndef VINYLCONTROLSIGNALWIDGET_H -#define VINYLCONTROLSIGNALWIDGET_H +#pragma once #include #include @@ -42,5 +41,3 @@ class VinylControlSignalWidget : public QWidget, public VinylSignalQualityListen float m_fSignalQuality; bool m_bVinylActive; }; - -#endif /* VINYLCONTROLSIGNALWIDGET_H */ diff --git a/src/vinylcontrol/vinylcontrolxwax.cpp b/src/vinylcontrol/vinylcontrolxwax.cpp index f4f134eb393c..84234060d2c0 100644 --- a/src/vinylcontrol/vinylcontrolxwax.cpp +++ b/src/vinylcontrol/vinylcontrolxwax.cpp @@ -1,24 +1,3 @@ -/*************************************************************************** - vinylcontrolxwax.cpp - ------------------- - begin : Sometime in Summer 2007 - copyright : (C) 2007 Albert Santoni - (C) 2007 Mark Hills - (C) 2011 Owen Williams - Portions of xwax used under the terms of the GPL - current maintainer : Owen Williams - email : owilliams@mixxx.org -***************************************************************************/ - -/*************************************************************************** -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) any later version. * -* * -***************************************************************************/ - #include #include @@ -35,7 +14,6 @@ 2) Tons of cleanup 3) Speed up needle dropping 4) Extrapolate small dropouts and keep track of "dynamics" - ********************/ namespace { diff --git a/src/vinylcontrol/vinylcontrolxwax.h b/src/vinylcontrol/vinylcontrolxwax.h index 45567003f165..71a5f72a79f3 100644 --- a/src/vinylcontrol/vinylcontrolxwax.h +++ b/src/vinylcontrol/vinylcontrolxwax.h @@ -1,5 +1,4 @@ -#ifndef __VINYLCONTROLXWAX_H__ -#define __VINYLCONTROLXWAX_H__ +#pragma once #include @@ -139,5 +138,3 @@ class VinylControlXwax : public VinylControl { static QMutex s_xwaxLUTMutex; static bool s_bLUTInitialized; }; - -#endif diff --git a/src/vinylcontrol/vinylsignalquality.h b/src/vinylcontrol/vinylsignalquality.h index 670f677656bd..ee99e2b56cd7 100644 --- a/src/vinylcontrol/vinylsignalquality.h +++ b/src/vinylcontrol/vinylsignalquality.h @@ -1,5 +1,4 @@ -#ifndef VINYLSIGNALQUALITY_H -#define VINYLSIGNALQUALITY_H +#pragma once #include "vinylcontrol/defs_vinylcontrol.h" @@ -14,5 +13,3 @@ class VinylSignalQualityListener { public: virtual void onVinylSignalQualityUpdate(const VinylSignalQualityReport& report) = 0; }; - -#endif /* VINYLSIGNALQUALITY_H */ diff --git a/src/waveform/guitick.h b/src/waveform/guitick.h index fc788e4aa121..29d4bed6e02a 100644 --- a/src/waveform/guitick.h +++ b/src/waveform/guitick.h @@ -1,5 +1,4 @@ -#ifndef GUITICK_H -#define GUITICK_H +#pragma once #include @@ -22,5 +21,3 @@ class GuiTick { mixxx::Duration m_lastUpdateTime; mixxx::Duration m_cpuTimeLastTick; }; - -#endif // GUITICK_H diff --git a/src/waveform/renderers/qtvsynctestrenderer.h b/src/waveform/renderers/qtvsynctestrenderer.h index 99386f5ffb98..85e646794faf 100644 --- a/src/waveform/renderers/qtvsynctestrenderer.h +++ b/src/waveform/renderers/qtvsynctestrenderer.h @@ -1,5 +1,4 @@ -#ifndef QTVSYNCTESTRENDERER_H -#define QTVSYNCTESTRENDERER_H +#pragma once #include "waveformrenderersignalbase.h" @@ -15,5 +14,3 @@ class QtVSyncTestRenderer : public WaveformRendererSignalBase { private: int m_drawcount; }; - -#endif // QTVSYNCTESTRENDERER_H diff --git a/src/waveform/renderers/qtwaveformrendererfilteredsignal.h b/src/waveform/renderers/qtwaveformrendererfilteredsignal.h index e3a685445e09..c7fed5db4b4d 100644 --- a/src/waveform/renderers/qtwaveformrendererfilteredsignal.h +++ b/src/waveform/renderers/qtwaveformrendererfilteredsignal.h @@ -1,5 +1,4 @@ -#ifndef QTWAVEFROMRENDERERFILTEREDSIGNAL_H -#define QTWAVEFROMRENDERERFILTEREDSIGNAL_H +#pragma once #include "waveformrenderersignalbase.h" @@ -30,5 +29,3 @@ class QtWaveformRendererFilteredSignal : public WaveformRendererSignalBase { QVector m_polygon[3]; }; - -#endif // QTWAVEFROMRENDERERFILTEREDSIGNAL_H diff --git a/src/waveform/renderers/qtwaveformrenderersimplesignal.h b/src/waveform/renderers/qtwaveformrenderersimplesignal.h index a041fc9ca135..c2380249c709 100644 --- a/src/waveform/renderers/qtwaveformrenderersimplesignal.h +++ b/src/waveform/renderers/qtwaveformrenderersimplesignal.h @@ -1,5 +1,4 @@ -#ifndef QTWAVEFORMRENDERERSIMPLESIGNAL_H -#define QTWAVEFORMRENDERERSIMPLESIGNAL_H +#pragma once #include "waveformrenderersignalbase.h" @@ -26,5 +25,3 @@ class QtWaveformRendererSimpleSignal : public WaveformRendererSignalBase { QPen m_borderPen; QVector m_polygon; }; - -#endif // QTWAVEFORMRENDERERSIMPLESIGNAL_H diff --git a/src/waveform/renderers/waveformmark.h b/src/waveform/renderers/waveformmark.h index caa6b3fa814d..bef85b1e29c0 100644 --- a/src/waveform/renderers/waveformmark.h +++ b/src/waveform/renderers/waveformmark.h @@ -1,5 +1,4 @@ -#ifndef WAVEFORMMARK_H -#define WAVEFORMMARK_H +#pragma once #include #include @@ -132,5 +131,3 @@ inline bool operator<(const WaveformMarkPointer& lhs, const WaveformMarkPointer& } return leftPosition < rightPosition; } - -#endif // WAVEFORMMARK_H diff --git a/src/waveform/renderers/waveformmarkset.h b/src/waveform/renderers/waveformmarkset.h index 9997eeffc7e4..996fd957dd78 100644 --- a/src/waveform/renderers/waveformmarkset.h +++ b/src/waveform/renderers/waveformmarkset.h @@ -1,5 +1,4 @@ -#ifndef WAVEFORMMARKSET_H -#define WAVEFORMMARKSET_H +#pragma once #include @@ -35,5 +34,3 @@ class WaveformMarkSet { DISALLOW_COPY_AND_ASSIGN(WaveformMarkSet); }; - -#endif // WAVEFORMMARKSET_H diff --git a/src/waveform/renderers/waveformrenderbackground.h b/src/waveform/renderers/waveformrenderbackground.h index d2b38e2e1261..a877e19ceb49 100644 --- a/src/waveform/renderers/waveformrenderbackground.h +++ b/src/waveform/renderers/waveformrenderbackground.h @@ -1,5 +1,4 @@ -#ifndef WAVEFORMRENDERBACKGROUND_H -#define WAVEFORMRENDERBACKGROUND_H +#pragma once #include #include @@ -29,5 +28,3 @@ class WaveformRenderBackground : public WaveformRendererAbstract { DISALLOW_COPY_AND_ASSIGN(WaveformRenderBackground); }; - -#endif /* WAVEFORMRENDERBACKGROUND_H */ diff --git a/src/waveform/renderers/waveformrenderbeat.h b/src/waveform/renderers/waveformrenderbeat.h index 444afba7b25d..6d3aff520392 100644 --- a/src/waveform/renderers/waveformrenderbeat.h +++ b/src/waveform/renderers/waveformrenderbeat.h @@ -1,5 +1,4 @@ -#ifndef WAVEFORMRENDERBEAT_H -#define WAVEFORMRENDERBEAT_H +#pragma once #include @@ -21,5 +20,3 @@ class WaveformRenderBeat : public WaveformRendererAbstract { DISALLOW_COPY_AND_ASSIGN(WaveformRenderBeat); }; - -#endif //WAVEFORMRENDERBEAT_H diff --git a/src/waveform/renderers/waveformrendererabstract.h b/src/waveform/renderers/waveformrendererabstract.h index efb0a7a5072c..a1856e70f2ab 100644 --- a/src/waveform/renderers/waveformrendererabstract.h +++ b/src/waveform/renderers/waveformrendererabstract.h @@ -1,5 +1,4 @@ -#ifndef WAVEFORMRENDERERABSTRACT_H -#define WAVEFORMRENDERERABSTRACT_H +#pragma once #include #include @@ -46,5 +45,3 @@ class WaveformRendererAbstract { friend class WaveformWidgetRenderer; }; - -#endif // WAVEFORMRENDERERABSTRACT_H diff --git a/src/waveform/renderers/waveformrendererendoftrack.h b/src/waveform/renderers/waveformrendererendoftrack.h index a085d94d83e5..fd18f9a0183b 100644 --- a/src/waveform/renderers/waveformrendererendoftrack.h +++ b/src/waveform/renderers/waveformrendererendoftrack.h @@ -1,5 +1,4 @@ -#ifndef WAVEFORMRENDERERENDOFTRACK_H -#define WAVEFORMRENDERERENDOFTRACK_H +#pragma once #include #include @@ -41,5 +40,3 @@ class WaveformRendererEndOfTrack : public WaveformRendererAbstract { DISALLOW_COPY_AND_ASSIGN(WaveformRendererEndOfTrack); }; - -#endif // WAVEFORMRENDERERENDOFTRACK_H diff --git a/src/waveform/renderers/waveformrendererfilteredsignal.h b/src/waveform/renderers/waveformrendererfilteredsignal.h index 03a04295967e..ba8e41a2eba9 100644 --- a/src/waveform/renderers/waveformrendererfilteredsignal.h +++ b/src/waveform/renderers/waveformrendererfilteredsignal.h @@ -1,5 +1,4 @@ -#ifndef WAVEFORMRENDERERFILTEREDSIGNAL_H -#define WAVEFORMRENDERERFILTEREDSIGNAL_H +#pragma once #include #include @@ -26,5 +25,3 @@ class WaveformRendererFilteredSignal : public WaveformRendererSignalBase { DISALLOW_COPY_AND_ASSIGN(WaveformRendererFilteredSignal); }; - -#endif // WAVEFORMRENDERERFILTEREDSIGNAL_H diff --git a/src/waveform/renderers/waveformrendererhsv.h b/src/waveform/renderers/waveformrendererhsv.h index 75038de4023a..4c13b61c9a33 100644 --- a/src/waveform/renderers/waveformrendererhsv.h +++ b/src/waveform/renderers/waveformrendererhsv.h @@ -1,5 +1,4 @@ -#ifndef WAVEFORMRENDERERHSV_H -#define WAVEFORMRENDERERHSV_H +#pragma once #include "util/class.h" #include "waveformrenderersignalbase.h" @@ -17,5 +16,3 @@ class WaveformRendererHSV : public WaveformRendererSignalBase { private: DISALLOW_COPY_AND_ASSIGN(WaveformRendererHSV); }; - -#endif // WAVEFORMRENDERERFILTEREDSIGNAL_H diff --git a/src/waveform/renderers/waveformrendererpreroll.h b/src/waveform/renderers/waveformrendererpreroll.h index 3866c092ad73..47236275d14e 100644 --- a/src/waveform/renderers/waveformrendererpreroll.h +++ b/src/waveform/renderers/waveformrendererpreroll.h @@ -1,5 +1,4 @@ -#ifndef WAVEFORMRENDERPREROLL_H -#define WAVEFORMRENDERPREROLL_H +#pragma once #include @@ -20,5 +19,3 @@ class WaveformRendererPreroll : public WaveformRendererAbstract { DISALLOW_COPY_AND_ASSIGN(WaveformRendererPreroll); }; - -#endif /* WAVEFORMRENDERPREROLL_H */ diff --git a/src/waveform/renderers/waveformrendererrgb.h b/src/waveform/renderers/waveformrendererrgb.h index e52f8a21df4f..fa8e8bbc12f9 100644 --- a/src/waveform/renderers/waveformrendererrgb.h +++ b/src/waveform/renderers/waveformrendererrgb.h @@ -1,5 +1,4 @@ -#ifndef WAVEFORMRENDERERRGB_H -#define WAVEFORMRENDERERRGB_H +#pragma once #include "util/class.h" #include "waveformrenderersignalbase.h" @@ -16,5 +15,3 @@ class WaveformRendererRGB : public WaveformRendererSignalBase { private: DISALLOW_COPY_AND_ASSIGN(WaveformRendererRGB); }; - -#endif // WAVEFORMRENDERERRGB_H diff --git a/src/waveform/renderers/waveformrenderersignalbase.h b/src/waveform/renderers/waveformrenderersignalbase.h index ab47b753d94e..ea7ec99781e3 100644 --- a/src/waveform/renderers/waveformrenderersignalbase.h +++ b/src/waveform/renderers/waveformrenderersignalbase.h @@ -1,5 +1,4 @@ -#ifndef WAVEFORMRENDERERSIGNALBASE_H -#define WAVEFORMRENDERERSIGNALBASE_H +#pragma once #include "waveformrendererabstract.h" #include "waveformsignalcolors.h" @@ -47,5 +46,3 @@ class WaveformRendererSignalBase : public WaveformRendererAbstract { qreal m_rgbMidColor_r, m_rgbMidColor_g, m_rgbMidColor_b; qreal m_rgbHighColor_r, m_rgbHighColor_g, m_rgbHighColor_b; }; - -#endif // WAVEFORMRENDERERSIGNALBASE_H diff --git a/src/waveform/renderers/waveformrendermark.h b/src/waveform/renderers/waveformrendermark.h index dc0fad17c90f..54900ec963ab 100644 --- a/src/waveform/renderers/waveformrendermark.h +++ b/src/waveform/renderers/waveformrendermark.h @@ -1,5 +1,4 @@ -#ifndef WAVEFORMRENDERMARK_H -#define WAVEFORMRENDERMARK_H +#pragma once #include @@ -38,5 +37,3 @@ class WaveformRenderMark : public QObject, public WaveformRendererAbstract { WaveformMarkSet m_marks; DISALLOW_COPY_AND_ASSIGN(WaveformRenderMark); }; - -#endif diff --git a/src/waveform/renderers/waveformrendermarkrange.h b/src/waveform/renderers/waveformrendermarkrange.h index 7307a339958e..63c0b5a234f2 100644 --- a/src/waveform/renderers/waveformrendermarkrange.h +++ b/src/waveform/renderers/waveformrendermarkrange.h @@ -1,5 +1,4 @@ -#ifndef WAVEFORMRENDERMARKRANGE_H -#define WAVEFORMRENDERMARKRANGE_H +#pragma once #include #include @@ -30,5 +29,3 @@ class WaveformRenderMarkRange : public WaveformRendererAbstract { std::vector m_markRanges; }; - -#endif diff --git a/src/waveform/renderers/waveformsignalcolors.h b/src/waveform/renderers/waveformsignalcolors.h index ae554b0cec3a..30bab4997555 100644 --- a/src/waveform/renderers/waveformsignalcolors.h +++ b/src/waveform/renderers/waveformsignalcolors.h @@ -1,5 +1,4 @@ -#ifndef WAVEFORMSIGNALCOLORS_H -#define WAVEFORMSIGNALCOLORS_H +#pragma once #include #include @@ -74,5 +73,3 @@ class WaveformSignalColors { QColor m_bgColor; int m_dimBrightThreshold; }; - -#endif // WAVEFORMSIGNALCOLORS_H diff --git a/src/waveform/renderers/waveformwidgetrenderer.h b/src/waveform/renderers/waveformwidgetrenderer.h index 26f5582f75a2..9ee6db607f2e 100644 --- a/src/waveform/renderers/waveformwidgetrenderer.h +++ b/src/waveform/renderers/waveformwidgetrenderer.h @@ -1,5 +1,4 @@ -#ifndef WAVEFORMWIDGETRENDERER_H -#define WAVEFORMWIDGETRENDERER_H +#pragma once #include #include @@ -211,5 +210,3 @@ class WaveformWidgetRenderer { QPointF p2, QPointF p3); }; - -#endif // WAVEFORMWIDGETRENDERER_H diff --git a/src/waveform/visualplayposition.h b/src/waveform/visualplayposition.h index 0ca4e16b666c..9975adbef3b1 100644 --- a/src/waveform/visualplayposition.h +++ b/src/waveform/visualplayposition.h @@ -1,5 +1,4 @@ -#ifndef VISUALPLAYPOSITION_H -#define VISUALPLAYPOSITION_H +#pragma once #include #include @@ -78,5 +77,3 @@ class VisualPlayPosition : public QObject { // Time stamp for m_timeInfo in main CPU time static PerformanceTimer m_timeInfoTime; }; - -#endif // VISUALPLAYPOSITION_H diff --git a/src/waveform/vsyncthread.h b/src/waveform/vsyncthread.h index 7d110f871540..f7310aee56d9 100644 --- a/src/waveform/vsyncthread.h +++ b/src/waveform/vsyncthread.h @@ -1,5 +1,4 @@ -#ifndef VSYNCTHREAD_H -#define VSYNCTHREAD_H +#pragma once #include #include @@ -57,6 +56,3 @@ class VSyncThread : public QThread { double m_displayFrameRate; int m_vSyncPerRendering; }; - - -#endif // VSYNCTHREAD_H diff --git a/src/waveform/waveform.h b/src/waveform/waveform.h index 813d846c0b59..e9df058148ff 100644 --- a/src/waveform/waveform.h +++ b/src/waveform/waveform.h @@ -1,5 +1,4 @@ -#ifndef WAVEFORM_H -#define WAVEFORM_H +#pragma once #include @@ -185,5 +184,3 @@ class Waveform { typedef QSharedPointer WaveformPointer; typedef QSharedPointer ConstWaveformPointer; - -#endif // WAVEFORM_H diff --git a/src/waveform/waveformfactory.h b/src/waveform/waveformfactory.h index 114244478dda..e3848adda5fc 100644 --- a/src/waveform/waveformfactory.h +++ b/src/waveform/waveformfactory.h @@ -1,5 +1,4 @@ -#ifndef WAVEFORMFACTORY_H -#define WAVEFORMFACTORY_H +#pragma once #include "library/dao/analysisdao.h" @@ -51,5 +50,3 @@ class WaveformFactory { static QString currentWaveformSummaryVersion(); static QString currentWaveformSummaryDescription(); }; - -#endif /* WAVEFORMFACTORY_H */ diff --git a/src/waveform/widgets/emptywaveformwidget.h b/src/waveform/widgets/emptywaveformwidget.h index c9056554fef6..28fd5b401b63 100644 --- a/src/waveform/widgets/emptywaveformwidget.h +++ b/src/waveform/widgets/emptywaveformwidget.h @@ -1,5 +1,4 @@ -#ifndef EMPTYWAVEFORM_H -#define EMPTYWAVEFORM_H +#pragma once #include @@ -30,5 +29,3 @@ class EmptyWaveformWidget : public QWidget, public WaveformWidgetAbstract { EmptyWaveformWidget(const QString& group, QWidget* parent); friend class WaveformWidgetFactory; }; - -#endif // EMPTYWAVEFORM_H diff --git a/src/waveform/widgets/glrgbwaveformwidget.h b/src/waveform/widgets/glrgbwaveformwidget.h index d479c22d95d7..8d6391ad7912 100644 --- a/src/waveform/widgets/glrgbwaveformwidget.h +++ b/src/waveform/widgets/glrgbwaveformwidget.h @@ -1,5 +1,4 @@ -#ifndef GLRGBWAVEFORMWIDGET_H -#define GLRGBWAVEFORMWIDGET_H +#pragma once #include @@ -27,5 +26,3 @@ class GLRGBWaveformWidget : public QGLWidget, public WaveformWidgetAbstract { private: friend class WaveformWidgetFactory; }; - -#endif // GLRGBWAVEFORMWIDGET_H diff --git a/src/waveform/widgets/glsimplewaveformwidget.h b/src/waveform/widgets/glsimplewaveformwidget.h index 7cc3ddfc7c87..1aacfaed80a0 100644 --- a/src/waveform/widgets/glsimplewaveformwidget.h +++ b/src/waveform/widgets/glsimplewaveformwidget.h @@ -1,5 +1,4 @@ -#ifndef GLSIMPLEWAVEFORMWIDGET_H -#define GLSIMPLEWAVEFORMWIDGET_H +#pragma once #include @@ -27,4 +26,3 @@ class GLSimpleWaveformWidget : public QGLWidget, public WaveformWidgetAbstract { private: friend class WaveformWidgetFactory; }; -#endif // GLSIMPLEWAVEFORMWIDGET_H diff --git a/src/waveform/widgets/glvsynctestwidget.h b/src/waveform/widgets/glvsynctestwidget.h index 6a3aaf3a8b19..38b094f9117e 100644 --- a/src/waveform/widgets/glvsynctestwidget.h +++ b/src/waveform/widgets/glvsynctestwidget.h @@ -1,5 +1,4 @@ -#ifndef GLVSYNCTESTWIDGET_H -#define GLVSYNCTESTWIDGET_H +#pragma once #include @@ -27,4 +26,3 @@ class GLVSyncTestWidget : public QGLWidget, public WaveformWidgetAbstract { private: friend class WaveformWidgetFactory; }; -#endif // GLVSYNCTESTWIDGET_H diff --git a/src/waveform/widgets/glwaveformwidget.h b/src/waveform/widgets/glwaveformwidget.h index ea81612bcacb..fa27180e676b 100644 --- a/src/waveform/widgets/glwaveformwidget.h +++ b/src/waveform/widgets/glwaveformwidget.h @@ -1,5 +1,4 @@ -#ifndef GLWAVEFORMWIDGET_H -#define GLWAVEFORMWIDGET_H +#pragma once #include @@ -27,5 +26,3 @@ class GLWaveformWidget : public QGLWidget, public WaveformWidgetAbstract { private: friend class WaveformWidgetFactory; }; - -#endif // GLWAVEFORMWIDGET_H diff --git a/src/waveform/widgets/hsvwaveformwidget.h b/src/waveform/widgets/hsvwaveformwidget.h index e035b60d792d..399f12601594 100644 --- a/src/waveform/widgets/hsvwaveformwidget.h +++ b/src/waveform/widgets/hsvwaveformwidget.h @@ -1,5 +1,4 @@ -#ifndef HSVWAVEFORMWIDGET_H -#define HSVWAVEFORMWIDGET_H +#pragma once #include @@ -26,5 +25,3 @@ class HSVWaveformWidget : public QWidget, public WaveformWidgetAbstract { HSVWaveformWidget(const QString& group, QWidget* parent); friend class WaveformWidgetFactory; }; - -#endif // HSVWAVEFORMWIDGET_H diff --git a/src/waveform/widgets/qthsvwaveformwidget.h b/src/waveform/widgets/qthsvwaveformwidget.h index 6a013cb1a020..4bf412623110 100644 --- a/src/waveform/widgets/qthsvwaveformwidget.h +++ b/src/waveform/widgets/qthsvwaveformwidget.h @@ -1,5 +1,4 @@ -#ifndef QTHSVWAVEFORMWIDGET_H -#define QTHSVWAVEFORMWIDGET_H +#pragma once #include @@ -27,5 +26,3 @@ class QtHSVWaveformWidget : public QGLWidget, public WaveformWidgetAbstract { QtHSVWaveformWidget(const QString& group, QWidget* parent); friend class WaveformWidgetFactory; }; - -#endif // QTHSVWAVEFORMWIDGET_H diff --git a/src/waveform/widgets/qtrgbwaveformwidget.h b/src/waveform/widgets/qtrgbwaveformwidget.h index 57d60b40bf6b..314771690728 100644 --- a/src/waveform/widgets/qtrgbwaveformwidget.h +++ b/src/waveform/widgets/qtrgbwaveformwidget.h @@ -1,5 +1,4 @@ -#ifndef QTRGBWAVEFORMWIDGET_H -#define QTRGBWAVEFORMWIDGET_H +#pragma once #include @@ -27,5 +26,3 @@ class QtRGBWaveformWidget : public QGLWidget, public WaveformWidgetAbstract { QtRGBWaveformWidget(const QString& group, QWidget* parent); friend class WaveformWidgetFactory; }; - -#endif // QTRGBWAVEFORMWIDGET_H diff --git a/src/waveform/widgets/qtsimplewaveformwidget.h b/src/waveform/widgets/qtsimplewaveformwidget.h index a00f7ec36bd3..18687901326c 100644 --- a/src/waveform/widgets/qtsimplewaveformwidget.h +++ b/src/waveform/widgets/qtsimplewaveformwidget.h @@ -1,5 +1,4 @@ -#ifndef QTSIMPLEWAVEFORMWIDGET_H -#define QTSIMPLEWAVEFORMWIDGET_H +#pragma once #include @@ -28,5 +27,3 @@ class QtSimpleWaveformWidget : public QGLWidget, public WaveformWidgetAbstract { private: friend class WaveformWidgetFactory; }; - -#endif // QTSIMPLEWAVEFORMWIDGET_H diff --git a/src/waveform/widgets/qtvsynctestwidget.h b/src/waveform/widgets/qtvsynctestwidget.h index bb575d54b46f..e0b987937054 100644 --- a/src/waveform/widgets/qtvsynctestwidget.h +++ b/src/waveform/widgets/qtvsynctestwidget.h @@ -1,5 +1,4 @@ -#ifndef QTVSYNCTESTWIDGET_H -#define QTVSYNCTESTWIDGET_H +#pragma once #include @@ -27,5 +26,3 @@ class QtVSyncTestWidget : public QGLWidget, public WaveformWidgetAbstract { private: friend class WaveformWidgetFactory; }; - -#endif // QTVSYNCTESTWIDGET_H diff --git a/src/waveform/widgets/qtwaveformwidget.h b/src/waveform/widgets/qtwaveformwidget.h index bb9b58c2e627..4c4ef085dc67 100644 --- a/src/waveform/widgets/qtwaveformwidget.h +++ b/src/waveform/widgets/qtwaveformwidget.h @@ -1,5 +1,4 @@ -#ifndef QTWAVEFORMWIDGET_H -#define QTWAVEFORMWIDGET_H +#pragma once #include @@ -27,5 +26,3 @@ class QtWaveformWidget : public QGLWidget, public WaveformWidgetAbstract { private: friend class WaveformWidgetFactory; }; - -#endif // QTWAVEFORMWIDGET_H diff --git a/src/waveform/widgets/rgbwaveformwidget.h b/src/waveform/widgets/rgbwaveformwidget.h index dd4202b593bc..045c0ab734be 100644 --- a/src/waveform/widgets/rgbwaveformwidget.h +++ b/src/waveform/widgets/rgbwaveformwidget.h @@ -1,5 +1,4 @@ -#ifndef RGBWAVEFORMWIDGET_H -#define RGBWAVEFORMWIDGET_H +#pragma once #include @@ -26,5 +25,3 @@ class RGBWaveformWidget : public QWidget, public WaveformWidgetAbstract { RGBWaveformWidget(const QString& group, QWidget* parent); friend class WaveformWidgetFactory; }; - -#endif // RGBWAVEFORMWIDGET_H diff --git a/src/waveform/widgets/softwarewaveformwidget.h b/src/waveform/widgets/softwarewaveformwidget.h index da6319501cd0..ff9ac610b581 100644 --- a/src/waveform/widgets/softwarewaveformwidget.h +++ b/src/waveform/widgets/softwarewaveformwidget.h @@ -1,5 +1,4 @@ -#ifndef SOFTWAREWAVEFORMWIDGET_H -#define SOFTWAREWAVEFORMWIDGET_H +#pragma once #include @@ -26,5 +25,3 @@ class SoftwareWaveformWidget : public QWidget, public WaveformWidgetAbstract { SoftwareWaveformWidget(const QString& groupp, QWidget* parent); friend class WaveformWidgetFactory; }; - -#endif // SOFTWAREWAVEFORMWIDGET_H diff --git a/src/waveform/widgets/waveformwidgetabstract.h b/src/waveform/widgets/waveformwidgetabstract.h index 5f79f2f69c03..3b975c71897c 100644 --- a/src/waveform/widgets/waveformwidgetabstract.h +++ b/src/waveform/widgets/waveformwidgetabstract.h @@ -1,5 +1,4 @@ -#ifndef WAVEFORMWIDGETABSTRACT_H -#define WAVEFORMWIDGETABSTRACT_H +#pragma once #include #include @@ -42,5 +41,3 @@ class WaveformWidgetAbstract : public WaveformWidgetRenderer { friend class WaveformWidgetFactory; }; - -#endif // WAVEFORMWIDGETABSTRACT_H diff --git a/src/waveform/widgets/waveformwidgettype.h b/src/waveform/widgets/waveformwidgettype.h index 5d87a67ece17..a2a889a033bb 100644 --- a/src/waveform/widgets/waveformwidgettype.h +++ b/src/waveform/widgets/waveformwidgettype.h @@ -1,5 +1,4 @@ -#ifndef WAVEFORMWIDGETTYPE_H -#define WAVEFORMWIDGETTYPE_H +#pragma once class WaveformWidgetType { public: @@ -25,5 +24,3 @@ class WaveformWidgetType { Count_WaveformwidgetType // Also used as invalid value }; }; - -#endif // WAVEFORMWIDGETTYPE_H diff --git a/src/widget/controlwidgetconnection.h b/src/widget/controlwidgetconnection.h index 36b8ef39d144..0b487dedd967 100644 --- a/src/widget/controlwidgetconnection.h +++ b/src/widget/controlwidgetconnection.h @@ -1,5 +1,4 @@ -#ifndef CONTROLWIDGETCONNECTION_H -#define CONTROLWIDGETCONNECTION_H +#pragma once #include #include @@ -140,5 +139,3 @@ class ControlWidgetPropertyConnection final : public ControlWidgetConnection { private: QByteArray m_propertyName; }; - -#endif /* CONTROLWIDGETCONNECTION_H */ diff --git a/src/widget/effectwidgetutils.h b/src/widget/effectwidgetutils.h index f2fd08c1c75b..3d2b2c75a939 100644 --- a/src/widget/effectwidgetutils.h +++ b/src/widget/effectwidgetutils.h @@ -1,5 +1,4 @@ -#ifndef EFFECTWIDGETUTILS_H -#define EFFECTWIDGETUTILS_H +#pragma once #include @@ -121,5 +120,3 @@ class EffectWidgetUtils { private: EffectWidgetUtils() = default; }; - -#endif /* EFFECTWIDGETUTILS_H */ diff --git a/src/widget/hexspinbox.h b/src/widget/hexspinbox.h index 6942000d3c44..709bd99fa597 100644 --- a/src/widget/hexspinbox.h +++ b/src/widget/hexspinbox.h @@ -1,5 +1,4 @@ -#ifndef HEXSPINBOX_H -#define HEXSPINBOX_H +#pragma once #include #include @@ -14,5 +13,3 @@ class HexSpinBox : public QSpinBox { int valueFromText(const QString& text) const override; QValidator::State validate(QString& input, int& pos) const override; }; - -#endif /* HEXSPINBOX_H */ diff --git a/src/widget/knobeventhandler.h b/src/widget/knobeventhandler.h index e502336763fb..f06fbc26cece 100644 --- a/src/widget/knobeventhandler.h +++ b/src/widget/knobeventhandler.h @@ -1,5 +1,4 @@ -#ifndef KNOBEVENTHANDLER_H -#define KNOBEVENTHANDLER_H +#pragma once #include #include @@ -110,5 +109,3 @@ class KnobEventHandler { QPoint m_startPos; QCursor m_blankCursor; }; - -#endif /* KNOBEVENTHANDLER_H */ diff --git a/src/widget/paintable.cpp b/src/widget/paintable.cpp index 2b84241e9153..073d7ba841ab 100644 --- a/src/widget/paintable.cpp +++ b/src/widget/paintable.cpp @@ -1,4 +1,3 @@ - #include "widget/wpixmapstore.h" #include diff --git a/src/widget/paintable.h b/src/widget/paintable.h index af36b2b38479..9f3aa591f50e 100644 --- a/src/widget/paintable.h +++ b/src/widget/paintable.h @@ -1,6 +1,4 @@ - -#ifndef PAINTABLE_H -#define PAINTABLE_H +#pragma once #include #include @@ -61,5 +59,3 @@ class Paintable { DrawMode m_drawMode; PixmapSource m_source; }; - -#endif // PAINTABLE diff --git a/src/widget/slidereventhandler.h b/src/widget/slidereventhandler.h index aa6a22e62e52..a41aef7c6d1c 100644 --- a/src/widget/slidereventhandler.h +++ b/src/widget/slidereventhandler.h @@ -1,5 +1,4 @@ -#ifndef SLIDEREVENTHANDLER_H -#define SLIDEREVENTHANDLER_H +#pragma once #include #include @@ -203,5 +202,3 @@ class SliderEventHandler { // Is true if events is emitted while the slider is dragged bool m_bEventWhileDrag; }; - -#endif /* SLIDEREVENTHANDLER_H */ diff --git a/src/widget/trackdroptarget.h b/src/widget/trackdroptarget.h index 01c0b99be516..6933a4d70f1a 100644 --- a/src/widget/trackdroptarget.h +++ b/src/widget/trackdroptarget.h @@ -1,6 +1,4 @@ - -#ifndef TRACKDROPTARGET_H -#define TRACKDROPTARGET_H +#pragma once #include @@ -26,5 +24,3 @@ class TrackDropTarget { virtual void trackDropped(const QString& filename, const QString& group) = 0; virtual void cloneDeck(const QString& sourceGroup, const QString& targetGroup) = 0; }; - -#endif // TRACKDROPTARGET diff --git a/src/widget/wanalysislibrarytableview.h b/src/widget/wanalysislibrarytableview.h index f929520d7bce..b732a0f54b2a 100644 --- a/src/widget/wanalysislibrarytableview.h +++ b/src/widget/wanalysislibrarytableview.h @@ -1,5 +1,4 @@ -#ifndef WANALYSISLIBRARYTABLEVIEW_H -#define WANALYSISLIBRARYTABLEVIEW_H +#pragma once #include @@ -16,5 +15,3 @@ class WAnalysisLibraryTableView : public WTrackTableView { void onSearch(const QString& text) override; }; - -#endif diff --git a/src/widget/wbasewidget.h b/src/widget/wbasewidget.h index 8b67602903be..78923dea6c04 100644 --- a/src/widget/wbasewidget.h +++ b/src/widget/wbasewidget.h @@ -1,5 +1,4 @@ -#ifndef WBASEWIDGET_H -#define WBASEWIDGET_H +#pragma once #include #include @@ -100,5 +99,3 @@ class WBaseWidget { friend class ControlParameterWidgetConnection; }; - -#endif /* WBASEWIDGET_H */ diff --git a/src/widget/wbattery.h b/src/widget/wbattery.h index 31253a354d64..e645a8184a7b 100644 --- a/src/widget/wbattery.h +++ b/src/widget/wbattery.h @@ -1,5 +1,4 @@ -#ifndef WBATTERY_H -#define WBATTERY_H +#pragma once #include #include @@ -41,5 +40,3 @@ class WBattery : public WWidget { QVector m_dischargingPixmaps; QVector m_chargingPixmaps; }; - -#endif /* WBATTERY_H */ diff --git a/src/widget/wbeatspinbox.h b/src/widget/wbeatspinbox.h index 7f253033d720..6800d15da5f3 100644 --- a/src/widget/wbeatspinbox.h +++ b/src/widget/wbeatspinbox.h @@ -1,5 +1,4 @@ -#ifndef WBEATSPINBOX_H -#define WBEATSPINBOX_H +#pragma once #include "control/controlobject.h" #include "control/controlproxy.h" @@ -55,7 +54,3 @@ class WBeatLineEdit : public QLineEdit { bool event(QEvent* pEvent) override; double m_scaleFactor; }; - - - -#endif diff --git a/src/widget/wcombobox.h b/src/widget/wcombobox.h index 930aacb94293..b871419a5a5d 100644 --- a/src/widget/wcombobox.h +++ b/src/widget/wcombobox.h @@ -1,5 +1,4 @@ -#ifndef WCOMBOBOX_H -#define WCOMBOBOX_H +#pragma once #include #include @@ -23,5 +22,3 @@ class WComboBox : public QComboBox, public WBaseWidget { private slots: void slotCurrentIndexChanged(int index); }; - -#endif /* WCOMBOBOX_H */ diff --git a/src/widget/wcoverart.h b/src/widget/wcoverart.h index 8d43c9659b71..7cc673afc342 100644 --- a/src/widget/wcoverart.h +++ b/src/widget/wcoverart.h @@ -1,5 +1,4 @@ -#ifndef WCOVERART_H -#define WCOVERART_H +#pragma once #include #include @@ -76,5 +75,3 @@ class WCoverArt : public QWidget, public WBaseWidget, public TrackDropTarget { DlgCoverArtFullSize* m_pDlgFullSize; QTimer m_clickTimer; }; - -#endif // WCOVERART_H diff --git a/src/widget/wcoverartmenu.h b/src/widget/wcoverartmenu.h index e86c713d4d9e..a22e3e03d8cb 100644 --- a/src/widget/wcoverartmenu.h +++ b/src/widget/wcoverartmenu.h @@ -1,5 +1,4 @@ -#ifndef WCOVERARTMENU_H -#define WCOVERARTMENU_H +#pragma once #include #include @@ -38,5 +37,3 @@ class WCoverArtMenu : public QMenu { CoverInfo m_coverInfo; }; - -#endif // WCOVERARTMENU_H diff --git a/src/widget/wdisplay.cpp b/src/widget/wdisplay.cpp index 9e457b334afa..d3a78e120642 100644 --- a/src/widget/wdisplay.cpp +++ b/src/widget/wdisplay.cpp @@ -1,20 +1,3 @@ -/*************************************************************************** - wdisplay.cpp - description - ------------------- - begin : Fri Jun 21 2002 - copyright : (C) 2002 by Tue & Ken Haste Andersen - email : haste@diku.dk -***************************************************************************/ - -/*************************************************************************** -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) any later version. * -* * -***************************************************************************/ - #include "widget/wdisplay.h" #include diff --git a/src/widget/wdisplay.h b/src/widget/wdisplay.h index b5b8acad3338..0aca733810c5 100644 --- a/src/widget/wdisplay.h +++ b/src/widget/wdisplay.h @@ -1,22 +1,4 @@ -/*************************************************************************** - wdisplay.h - description - ------------------- - begin : Fri Jun 21 2002 - copyright : (C) 2002 by Tue & Ken Haste Andersen - email : haste@diku.dk - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -#ifndef WDISPLAY_H -#define WDISPLAY_H +#pragma once #include #include @@ -78,5 +60,3 @@ class WDisplay : public WWidget { // List of disabled pixmaps. QVector m_disabledPixmaps; }; - -#endif diff --git a/src/widget/weffect.h b/src/widget/weffect.h index 6a0e736cec1f..8334a1cd5fc8 100644 --- a/src/widget/weffect.h +++ b/src/widget/weffect.h @@ -1,5 +1,4 @@ -#ifndef WEFFECT_H -#define WEFFECT_H +#pragma once #include @@ -26,6 +25,3 @@ class WEffect : public WLabel { EffectsManager* m_pEffectsManager; EffectSlotPointer m_pEffectSlot; }; - - -#endif /* WEFFECT_H */ diff --git a/src/widget/weffectbuttonparameter.h b/src/widget/weffectbuttonparameter.h index 2e6b845a9f1d..5b204efc8a3a 100644 --- a/src/widget/weffectbuttonparameter.h +++ b/src/widget/weffectbuttonparameter.h @@ -1,5 +1,4 @@ -#ifndef WEFFECTBUTTONPARAMETER_H -#define WEFFECTBUTTONPARAMETER_H +#pragma once #include @@ -16,6 +15,3 @@ class WEffectButtonParameter : public WEffectParameterBase { void setup(const QDomNode& node, const SkinContext& context) override; }; - - -#endif /* WEFFECTBUTTONPARAMETER_H */ diff --git a/src/widget/weffectchain.h b/src/widget/weffectchain.h index 45b81c8700a3..2bfa9658c6b8 100644 --- a/src/widget/weffectchain.h +++ b/src/widget/weffectchain.h @@ -1,5 +1,4 @@ -#ifndef WEFFECTCHAIN_H -#define WEFFECTCHAIN_H +#pragma once #include #include @@ -28,5 +27,3 @@ class WEffectChain : public WLabel { EffectsManager* m_pEffectsManager; EffectChainSlotPointer m_pEffectChainSlot; }; - -#endif /* WEFFECTCHAIN_H */ diff --git a/src/widget/weffectparameter.h b/src/widget/weffectparameter.h index d7a37ab5e2e6..1dd8265d622c 100644 --- a/src/widget/weffectparameter.h +++ b/src/widget/weffectparameter.h @@ -1,5 +1,4 @@ -#ifndef WEFFECTPARAMETER_H -#define WEFFECTPARAMETER_H +#pragma once #include @@ -16,6 +15,3 @@ class WEffectParameter : public WEffectParameterBase { void setup(const QDomNode& node, const SkinContext& context) override; }; - - -#endif /* WEFFECTPARAMETER_H */ diff --git a/src/widget/weffectparameterbase.h b/src/widget/weffectparameterbase.h index 2b6c9497e223..18acf5e1c517 100644 --- a/src/widget/weffectparameterbase.h +++ b/src/widget/weffectparameterbase.h @@ -1,5 +1,4 @@ -#ifndef WEFFECTPARAMETERBASE_H -#define WEFFECTPARAMETERBASE_H +#pragma once #include @@ -27,5 +26,3 @@ class WEffectParameterBase : public WLabel { EffectsManager* m_pEffectsManager; EffectParameterSlotBasePointer m_pEffectParameterSlot; }; - -#endif /* WEFFECTPARAMETERBASE_H */ diff --git a/src/widget/weffectparameterknob.h b/src/widget/weffectparameterknob.h index 6fdeaf8afe30..3fa13863d908 100644 --- a/src/widget/weffectparameterknob.h +++ b/src/widget/weffectparameterknob.h @@ -1,5 +1,4 @@ -#ifndef WEFFECTKNOB_H -#define WEFFECTKNOB_H +#pragma once #include "widget/wknob.h" #include "effects/effectparameterslot.h" @@ -30,5 +29,3 @@ class WEffectParameterKnob : public WKnob { EffectsManager* m_pEffectsManager; EffectParameterSlotBasePointer m_pEffectParameterSlot; }; - -#endif // WEFFECTKNOB_H diff --git a/src/widget/weffectparameterknobcomposed.h b/src/widget/weffectparameterknobcomposed.h index 4449ffccfec0..5131f985b09d 100644 --- a/src/widget/weffectparameterknobcomposed.h +++ b/src/widget/weffectparameterknobcomposed.h @@ -1,5 +1,4 @@ -#ifndef WEFFECTKNOBCOMPOSED_H -#define WEFFECTKNOBCOMPOSED_H +#pragma once #include "widget/wknobcomposed.h" #include "effects/effectparameterslot.h" @@ -31,5 +30,3 @@ class WEffectParameterKnobComposed : public WKnobComposed { EffectsManager* m_pEffectsManager; EffectParameterSlotBasePointer m_pEffectParameterSlot; }; - -#endif // WEFFECTKNOBCOMPOSED_H diff --git a/src/widget/weffectpushbutton.h b/src/widget/weffectpushbutton.h index 595486f8f01b..63f5366a7407 100644 --- a/src/widget/weffectpushbutton.h +++ b/src/widget/weffectpushbutton.h @@ -1,5 +1,4 @@ -#ifndef WEFFECTPUSHBUTTON_H -#define WEFFECTPUSHBUTTON_H +#pragma once #include #include @@ -41,5 +40,3 @@ class WEffectPushButton : public WPushButton { EffectParameterSlotBasePointer m_pEffectParameterSlot; QMenu* m_pButtonMenu; }; - -#endif // WEFFECTPUSHBUTTON_H diff --git a/src/widget/weffectselector.h b/src/widget/weffectselector.h index a9816f62f2f3..dd358af06728 100644 --- a/src/widget/weffectselector.h +++ b/src/widget/weffectselector.h @@ -1,5 +1,4 @@ -#ifndef WEFFECTSELECTOR_H -#define WEFFECTSELECTOR_H +#pragma once #include #include @@ -31,6 +30,3 @@ class WEffectSelector : public QComboBox, public WBaseWidget { EffectRackPointer m_pRack; double m_scaleFactor; }; - - -#endif /* WEFFECTSELECTOR_H */ diff --git a/src/widget/wimagestore.h b/src/widget/wimagestore.h index 9d77ae40aaae..249356a3ad97 100644 --- a/src/widget/wimagestore.h +++ b/src/widget/wimagestore.h @@ -1,4 +1,3 @@ - #pragma once #include diff --git a/src/widget/wkey.h b/src/widget/wkey.h index 6ceba4506769..706337ea06ed 100644 --- a/src/widget/wkey.h +++ b/src/widget/wkey.h @@ -1,5 +1,4 @@ -#ifndef WKEY_H -#define WKEY_H +#pragma once #include @@ -26,5 +25,3 @@ class WKey : public WLabel { ControlProxy m_keyNotation; ControlProxy m_engineKeyDistance; }; - -#endif /* WKEY_H */ diff --git a/src/widget/wknob.cpp b/src/widget/wknob.cpp index 3b7fae157e9f..83fae02dcaf8 100644 --- a/src/widget/wknob.cpp +++ b/src/widget/wknob.cpp @@ -1,20 +1,3 @@ -/*************************************************************************** - wknob.cpp - description - ------------------- - begin : Fri Jun 21 2002 - copyright : (C) 2002 by Tue & Ken Haste Andersen - email : haste@diku.dk -***************************************************************************/ - -/*************************************************************************** -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) any later version. * -* * -***************************************************************************/ - #include "widget/wknob.h" #include diff --git a/src/widget/wknob.h b/src/widget/wknob.h index 3e56b4f979cb..62298cab54b4 100644 --- a/src/widget/wknob.h +++ b/src/widget/wknob.h @@ -1,5 +1,4 @@ -#ifndef WKNOB_H -#define WKNOB_H +#pragma once #include #include @@ -33,5 +32,3 @@ class WKnob : public WDisplay { KnobEventHandler m_handler; friend class KnobEventHandler; }; - -#endif diff --git a/src/widget/wknobcomposed.h b/src/widget/wknobcomposed.h index 489c5db9a170..789e2d1dbf0e 100644 --- a/src/widget/wknobcomposed.h +++ b/src/widget/wknobcomposed.h @@ -1,5 +1,4 @@ -#ifndef WKNOBCOMPOSED_H -#define WKNOBCOMPOSED_H +#pragma once #include #include @@ -67,5 +66,3 @@ class WKnobComposed : public WWidget { friend class KnobEventHandler; }; - -#endif /* WKNOBCOMPOSED_H */ diff --git a/src/widget/wlabel.cpp b/src/widget/wlabel.cpp index b9d5acb4c11f..a732eab87b08 100644 --- a/src/widget/wlabel.cpp +++ b/src/widget/wlabel.cpp @@ -1,20 +1,3 @@ -/*************************************************************************** - wlabel.cpp - description - ------------------- - begin : Wed Jan 5 2005 - copyright : (C) 2003 by Tue Haste Andersen - email : haste@diku.dk -***************************************************************************/ - -/*************************************************************************** -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) any later version. * -* * -***************************************************************************/ - #include "widget/wlabel.h" #include diff --git a/src/widget/wlabel.h b/src/widget/wlabel.h index d63ff5b12369..d29bfe8b811d 100644 --- a/src/widget/wlabel.h +++ b/src/widget/wlabel.h @@ -1,22 +1,4 @@ -/*************************************************************************** - wlabel.h - description - ------------------- - begin : Wed Jan 5 2005 - copyright : (C) 2003 by Tue Haste Andersen - email : haste@diku.dk - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -#ifndef WLABEL_H -#define WLABEL_H +#pragma once #include #include @@ -60,5 +42,3 @@ class WLabel : public QLabel, public WBaseWidget { double m_scaleFactor; int m_highlight; }; - -#endif diff --git a/src/widget/wlibrary.cpp b/src/widget/wlibrary.cpp index 3edd9915405e..1d0b3d9b32e7 100644 --- a/src/widget/wlibrary.cpp +++ b/src/widget/wlibrary.cpp @@ -1,6 +1,3 @@ -// wlibrary.cpp -// Created 8/28/2009 by RJ Ryan (rryan@mit.edu) - #include "widget/wlibrary.h" #include diff --git a/src/widget/wlibrarysidebar.h b/src/widget/wlibrarysidebar.h index 784458365f24..3e97e003e123 100644 --- a/src/widget/wlibrarysidebar.h +++ b/src/widget/wlibrarysidebar.h @@ -1,5 +1,4 @@ -#ifndef WLIBRARYSIDEBAR_H -#define WLIBRARYSIDEBAR_H +#pragma once #include #include @@ -43,5 +42,3 @@ class WLibrarySidebar : public QTreeView, public WBaseWidget { QBasicTimer m_expandTimer; QModelIndex m_hoverIndex; }; - -#endif /* WLIBRARYSIDEBAR_H */ diff --git a/src/widget/wlibrarytableview.h b/src/widget/wlibrarytableview.h index 2b65c949c03e..89d4f1bc4acb 100644 --- a/src/widget/wlibrarytableview.h +++ b/src/widget/wlibrarytableview.h @@ -1,8 +1,4 @@ -// wlibrarytableview.h -// Created 10/19/2009 by RJ Ryan (rryan@mit.edu) - -#ifndef WLIBRARYTABLEVIEW_H -#define WLIBRARYTABLEVIEW_H +#pragma once #include #include @@ -26,14 +22,13 @@ class WLibraryTableView : public QTableView, public virtual LibraryView { void moveSelection(int delta) override; /** - * @brief saveVScrollBarPos function saves current position of scrollbar - * using string key - can be any value but should invariant for model + * Saves current position of scrollbar using string key + * can be any value but should invariant for model * @param key unique for trackmodel */ void saveVScrollBarPos(TrackModel* key); /** - * @brief restoreVScrollBarPos function finds scrollbar value associated with model - * by given key and restores it + * Finds scrollbar value associated with model by given key and restores it * @param key unique for trackmodel */ void restoreVScrollBarPos(TrackModel* key); @@ -69,6 +64,3 @@ class WLibraryTableView : public QTableView, public virtual LibraryView { // executed int m_noSearchVScrollBarPos; }; - - -#endif /* WLIBRARYTABLEVIEW_H */ diff --git a/src/widget/wlibrarytextbrowser.cpp b/src/widget/wlibrarytextbrowser.cpp index ce986d330f23..64b7139ef8a2 100644 --- a/src/widget/wlibrarytextbrowser.cpp +++ b/src/widget/wlibrarytextbrowser.cpp @@ -1,6 +1,3 @@ -// wlibrarytextbrowser.cpp -// Created 10/23/2009 by RJ Ryan (rryan@mit.edu) - #include "widget/wlibrarytextbrowser.h" #include "moc_wlibrarytextbrowser.cpp" diff --git a/src/widget/wlibrarytextbrowser.h b/src/widget/wlibrarytextbrowser.h index e61c38efa09e..b1e952301f88 100644 --- a/src/widget/wlibrarytextbrowser.h +++ b/src/widget/wlibrarytextbrowser.h @@ -1,8 +1,4 @@ -// wlibrarytextbrowser.h -// Created 10/23/2009 by RJ Ryan (rryan@mit.edu) - -#ifndef WLIBRARYTEXTBROWSER_H -#define WLIBRARYTEXTBROWSER_H +#pragma once #include @@ -15,5 +11,3 @@ class WLibraryTextBrowser : public QTextBrowser, public LibraryView { void onShow() override {} bool hasFocus() const override; }; - -#endif /* WLIBRARYTEXTBROWSER_H */ diff --git a/src/widget/wmainmenubar.h b/src/widget/wmainmenubar.h index a40be8d49b51..afcc3785f650 100644 --- a/src/widget/wmainmenubar.h +++ b/src/widget/wmainmenubar.h @@ -1,5 +1,4 @@ -#ifndef WIDGET_WMAINMENUBAR -#define WIDGET_WMAINMENUBAR +#pragma once #include #include @@ -90,5 +89,3 @@ class WMainMenuBar : public QMenuBar { QList m_loadToDeckActions; QList m_vinylControlEnabledActions; }; - -#endif /* WIDGET_WMAINMENUBAR */ diff --git a/src/widget/wnumber.cpp b/src/widget/wnumber.cpp index 0e53647ecc6c..b0f8a9134aaf 100644 --- a/src/widget/wnumber.cpp +++ b/src/widget/wnumber.cpp @@ -1,20 +1,3 @@ -/*************************************************************************** - wnumber.cpp - description - ------------------- - begin : Wed Jun 18 2003 - copyright : (C) 2003 by Tue & Ken Haste Andersen - email : haste@diku.dk -***************************************************************************/ - -/*************************************************************************** -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) any later version. * -* * -***************************************************************************/ - #include "widget/wnumber.h" #include "moc_wnumber.cpp" diff --git a/src/widget/wnumber.h b/src/widget/wnumber.h index 7974ffcfd9d2..780b8f2ba768 100644 --- a/src/widget/wnumber.h +++ b/src/widget/wnumber.h @@ -1,22 +1,4 @@ -/*************************************************************************** - wnumber.h - description - ------------------- - begin : Wed Jun 18 2003 - copyright : (C) 2003 by Tue & Ken Haste Andersen - email : haste@diku.dk - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -#ifndef WNUMBER_H -#define WNUMBER_H +#pragma once #include @@ -39,5 +21,3 @@ class WNumber : public WLabel { // Number of digits to round to. int m_iNoDigits; }; - -#endif diff --git a/src/widget/wnumberdb.cpp b/src/widget/wnumberdb.cpp index 336ebb623678..8a1371cb677e 100644 --- a/src/widget/wnumberdb.cpp +++ b/src/widget/wnumberdb.cpp @@ -1,4 +1,3 @@ - #include "widget/wnumberdb.h" #include diff --git a/src/widget/wnumberdb.h b/src/widget/wnumberdb.h index 9cd5e98d531a..e8f7a1b66105 100644 --- a/src/widget/wnumberdb.h +++ b/src/widget/wnumberdb.h @@ -1,6 +1,4 @@ - -#ifndef WNUMBERDB_H -#define WNUMBERDB_H +#pragma once #include @@ -15,5 +13,3 @@ class WNumberDb : public WNumber { public slots: void setValue(double dValue) override; }; - -#endif // WNUMBERDB_H diff --git a/src/widget/wnumberpos.cpp b/src/widget/wnumberpos.cpp index 3e0ac92a257b..9a6e65dfef9a 100644 --- a/src/widget/wnumberpos.cpp +++ b/src/widget/wnumberpos.cpp @@ -1,5 +1,3 @@ -// Tue Haste Andersen , (C) 2003 - #include "widget/wnumberpos.h" #include "control/controlobject.h" diff --git a/src/widget/wnumberpos.h b/src/widget/wnumberpos.h index 74f43c43c124..0d22cbc7de76 100644 --- a/src/widget/wnumberpos.h +++ b/src/widget/wnumberpos.h @@ -1,7 +1,4 @@ -// Tue Haste Andersen , (C) 2003 - -#ifndef WNUMBERPOS_H -#define WNUMBERPOS_H +#pragma once #include @@ -37,5 +34,3 @@ class WNumberPos : public WNumber { ControlProxy* m_pShowTrackTimeRemaining; ControlProxy* m_pTimeFormat; }; - -#endif diff --git a/src/widget/wnumberrate.h b/src/widget/wnumberrate.h index 5c8aca255e56..1c447f551d72 100644 --- a/src/widget/wnumberrate.h +++ b/src/widget/wnumberrate.h @@ -9,8 +9,7 @@ // Copyright: See COPYING file that comes with this distribution // // -#ifndef WNUMBERRATE_H -#define WNUMBERRATE_H +#pragma once #include "widget/wnumber.h" @@ -29,5 +28,3 @@ class WNumberRate final : public WNumber { private: ControlProxy* m_pRateRatio; }; - -#endif diff --git a/src/widget/woverview.h b/src/widget/woverview.h index 915f72291794..ace7d0a3b748 100644 --- a/src/widget/woverview.h +++ b/src/widget/woverview.h @@ -9,8 +9,7 @@ // Copyright: See COPYING file that comes with this distribution // // -#ifndef WOVERVIEW_H -#define WOVERVIEW_H +#pragma once #include #include @@ -198,5 +197,3 @@ class WOverview : public WWidget, public TrackDropTarget { bool m_trackLoaded; double m_scaleFactor; }; - -#endif diff --git a/src/widget/woverviewhsv.h b/src/widget/woverviewhsv.h index ab8c26d4ce7b..9876040adf28 100644 --- a/src/widget/woverviewhsv.h +++ b/src/widget/woverviewhsv.h @@ -1,5 +1,4 @@ -#ifndef WOVERVIEWHSV_H -#define WOVERVIEWHSV_H +#pragma once #include "widget/woverview.h" @@ -14,5 +13,3 @@ class WOverviewHSV : public WOverview { private: bool drawNextPixmapPart() override; }; - -#endif // WOVERVIEWHSV_H diff --git a/src/widget/woverviewlmh.h b/src/widget/woverviewlmh.h index 4fbb2c0c8e92..3b1913c85bc7 100644 --- a/src/widget/woverviewlmh.h +++ b/src/widget/woverviewlmh.h @@ -1,5 +1,4 @@ -#ifndef WOVERVIEWLMH_H -#define WOVERVIEWLMH_H +#pragma once #include "widget/woverview.h" @@ -14,5 +13,3 @@ class WOverviewLMH : public WOverview { private: bool drawNextPixmapPart() override; }; - -#endif // WOVERVIEWLMH_H diff --git a/src/widget/woverviewrgb.h b/src/widget/woverviewrgb.h index 8d862a89d5bb..d249243998d5 100644 --- a/src/widget/woverviewrgb.h +++ b/src/widget/woverviewrgb.h @@ -1,5 +1,4 @@ -#ifndef WOVERVIEWRGB_H -#define WOVERVIEWRGB_H +#pragma once #include "widget/woverview.h" @@ -14,5 +13,3 @@ class WOverviewRGB : public WOverview { private: bool drawNextPixmapPart() override; }; - -#endif // WOVERVIEWRGB_H diff --git a/src/widget/wpixmapstore.h b/src/widget/wpixmapstore.h index 01100a0c57e6..bab91657c575 100644 --- a/src/widget/wpixmapstore.h +++ b/src/widget/wpixmapstore.h @@ -1,22 +1,4 @@ -/*************************************************************************** - wpixmapstore.h - description - ------------------- - begin : Mon Jun 28 2003 - copyright : (C) 2003 by Tue & Ken Haste Andersen - email : haste@diku.dk - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -#ifndef WPIXMAPSTORE_H -#define WPIXMAPSTORE_H +#pragma once #include #include @@ -51,5 +33,3 @@ class WPixmapStore { static QHash m_paintableCache; static QSharedPointer m_loader; }; - -#endif diff --git a/src/widget/wpushbutton.cpp b/src/widget/wpushbutton.cpp index 768a1ed0312b..8c64f5452986 100644 --- a/src/widget/wpushbutton.cpp +++ b/src/widget/wpushbutton.cpp @@ -1,20 +1,3 @@ -/*************************************************************************** - wpushbutton.cpp - description - ------------------- - begin : Fri Jun 21 2002 - copyright : (C) 2002 by Tue & Ken Haste Andersen - email : haste@diku.dk -***************************************************************************/ - -/*************************************************************************** -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) any later version. * -* * -***************************************************************************/ - #include "widget/wpushbutton.h" #include diff --git a/src/widget/wpushbutton.h b/src/widget/wpushbutton.h index 6393ea571019..efc8d7d7cee4 100644 --- a/src/widget/wpushbutton.h +++ b/src/widget/wpushbutton.h @@ -1,22 +1,4 @@ -/*************************************************************************** - wpushbutton.h - description - ------------------- - begin : Fri Jun 21 2002 - copyright : (C) 2002 by Tue & Ken Haste Andersen - email : haste@diku.dk - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -#ifndef WPUSHBUTTON_H -#define WPUSHBUTTON_H +#pragma once #include #include @@ -129,5 +111,3 @@ class WPushButton : public WWidget { QTimer m_clickTimer; QVector m_align; }; - -#endif diff --git a/src/widget/wrecordingduration.h b/src/widget/wrecordingduration.h index e6adbd5411eb..a67821bf84c8 100644 --- a/src/widget/wrecordingduration.h +++ b/src/widget/wrecordingduration.h @@ -1,9 +1,7 @@ -// wrecordingduration.h // WRecordingDuration is a widget showing the duration of running recoding -// In skin it is represented by a node. +// In skins it is represented by a node. -#ifndef WRECORDINGDURATION_H -#define WRECORDINGDURATION_H +#pragma once #include "widget/wlabel.h" #include "skin/skincontext.h" @@ -25,5 +23,3 @@ class WRecordingDuration: public WLabel { RecordingManager* m_pRecordingManager; QString m_inactiveText; }; - -#endif /* WRECORDINGDURATION_H */ diff --git a/src/widget/wsingletoncontainer.h b/src/widget/wsingletoncontainer.h index 168e263ad4a1..f5e6c4a37502 100644 --- a/src/widget/wsingletoncontainer.h +++ b/src/widget/wsingletoncontainer.h @@ -44,8 +44,7 @@ // in the skin. Note that if a Singleton is visible twice at the same time, // behavior is undefined and could be crashy. -#ifndef WSINGLETONCONTAINER_H -#define WSINGLETONCONTAINER_H +#pragma once #include @@ -83,6 +82,3 @@ class SingletonMap { private: QMap m_singletons; }; - - -#endif // WSINGLETONCONTAINER_H diff --git a/src/widget/wsizeawarestack.h b/src/widget/wsizeawarestack.h index 56bbd594be56..97032b894077 100644 --- a/src/widget/wsizeawarestack.h +++ b/src/widget/wsizeawarestack.h @@ -1,5 +1,4 @@ -#ifndef WSIZEAWARESTACK_H -#define WSIZEAWARESTACK_H +#pragma once #include #include @@ -22,5 +21,3 @@ class WSizeAwareStack : public QWidget, public WBaseWidget { private: SizeAwareLayout* m_layout; }; - -#endif /* WSIZEAWARESTACK_H */ diff --git a/src/widget/wskincolor.cpp b/src/widget/wskincolor.cpp index 38270ffc52e5..d1c0357431b5 100644 --- a/src/widget/wskincolor.cpp +++ b/src/widget/wskincolor.cpp @@ -12,4 +12,3 @@ void WSkinColor::setLoader(QSharedPointer ld) { QColor WSkinColor::getCorrectColor(QColor c) { return loader->getCorrectColor(c); } - diff --git a/src/widget/wskincolor.h b/src/widget/wskincolor.h index 30c21ba263a8..687a6597cfd6 100644 --- a/src/widget/wskincolor.h +++ b/src/widget/wskincolor.h @@ -1,22 +1,4 @@ -/*************************************************************************** - wskincolor.h - description - ------------------- - begin : 14 April 2007 - copyright : (C) 2007 by Adam Davison - email : adamdavison@gmail.com - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -#ifndef WSKINCOLOR_H -#define WSKINCOLOR_H +#pragma once #include #include "skin/imgsource.h" @@ -28,6 +10,3 @@ class WSkinColor { private: static QSharedPointer loader; }; - -#endif - diff --git a/src/widget/wslidercomposed.cpp b/src/widget/wslidercomposed.cpp index 186d8a3dd028..20b65726a209 100644 --- a/src/widget/wslidercomposed.cpp +++ b/src/widget/wslidercomposed.cpp @@ -1,20 +1,3 @@ -/*************************************************************************** - wslidercomposed.cpp - description - ------------------- - begin : Tue Jun 25 2002 - copyright : (C) 2002 by Tue & Ken Haste Andersen - email : haste@diku.dk -***************************************************************************/ - -/*************************************************************************** -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) any later version. * -* * -***************************************************************************/ - #include "widget/wslidercomposed.h" #include diff --git a/src/widget/wslidercomposed.h b/src/widget/wslidercomposed.h index 5324de6da121..a79cda8127a1 100644 --- a/src/widget/wslidercomposed.h +++ b/src/widget/wslidercomposed.h @@ -1,22 +1,4 @@ -/*************************************************************************** - wslidercomposed.h - description - ------------------- - begin : Tue Jun 25 2002 - copyright : (C) 2002 by Tue & Ken Haste Andersen - email : haste@diku.dk - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -#ifndef WSLIDERCOMPOSED_H -#define WSLIDERCOMPOSED_H +#pragma once #include #include @@ -32,12 +14,7 @@ #include "widget/wwidget.h" #include "widget/wpixmapstore.h" -/** - * A widget for a slider composed of a background pixmap and a handle. - * - *@author Tue & Ken Haste Andersen - */ - +/** A widget for a slider composed of a background pixmap and a handle. */ class WSliderComposed : public WWidget { Q_OBJECT public: @@ -101,5 +78,3 @@ class WSliderComposed : public WWidget { friend class SliderEventHandler; }; - -#endif diff --git a/src/widget/wspinny.h b/src/widget/wspinny.h index 88c2bf7b4510..a8000d56078d 100644 --- a/src/widget/wspinny.h +++ b/src/widget/wspinny.h @@ -1,6 +1,4 @@ - -#ifndef _WSPINNY_H -#define _WSPINNY_H +#pragma once #include #include @@ -136,5 +134,3 @@ class WSpinny : public QGLWidget, public WBaseWidget, public VinylSignalQualityL DlgCoverArtFullSize* m_pDlgCoverArt; WCoverArtMenu* m_pCoverMenu; }; - -#endif //_WSPINNY_H diff --git a/src/widget/wsplitter.h b/src/widget/wsplitter.h index 76b2422e409e..bf5f76435505 100644 --- a/src/widget/wsplitter.h +++ b/src/widget/wsplitter.h @@ -1,5 +1,4 @@ -#ifndef WSPLITTER_H -#define WSPLITTER_H +#pragma once #include #include @@ -26,5 +25,3 @@ class WSplitter : public QSplitter, public WBaseWidget { UserSettingsPointer m_pConfig; ConfigKey m_configKey; }; - -#endif /* WSPLITTER_H */ diff --git a/src/widget/wstarrating.h b/src/widget/wstarrating.h index 426701042b95..805febc598ef 100644 --- a/src/widget/wstarrating.h +++ b/src/widget/wstarrating.h @@ -1,5 +1,4 @@ -#ifndef WSTARRATING_H -#define WSTARRATING_H +#pragma once #include #include @@ -50,5 +49,3 @@ class WStarRating : public WWidget { std::unique_ptr m_pStarsUp; std::unique_ptr m_pStarsDown; }; - -#endif /* WSTARRATING_H */ diff --git a/src/widget/wstatuslight.cpp b/src/widget/wstatuslight.cpp index 8a14624bd191..7cf486322eb0 100644 --- a/src/widget/wstatuslight.cpp +++ b/src/widget/wstatuslight.cpp @@ -1,21 +1,3 @@ -/*************************************************************************** - wstatuslight.cpp - description - ------------------- - begin : Wed May 30 2007 - copyright : (C) 2003 by Tue & Ken Haste Andersen - (C) 2007 by John Sully (converted from WVumeter) - email : jsully@scs.ryerson.ca -***************************************************************************/ - -/*************************************************************************** -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) any later version. * -* * -***************************************************************************/ - #include "widget/wstatuslight.h" #include diff --git a/src/widget/wstatuslight.h b/src/widget/wstatuslight.h index 9ac71aa00608..41fabdf53e86 100644 --- a/src/widget/wstatuslight.h +++ b/src/widget/wstatuslight.h @@ -1,24 +1,4 @@ -/*************************************************************************** - wstatuslight.h - A general purpose status light - for indicating boolean events - ------------------- - begin : Fri Jul 22 2007 - copyright : (C) 2003 by Tue & Ken Haste Andersen - (C) 2007 by John Sully (derived from WVumeter) - email : jsully@scs.ryerson.ca - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -#ifndef WSTATUSLIGHT_H -#define WSTATUSLIGHT_H +#pragma once #include #include @@ -31,6 +11,7 @@ #include "widget/wpixmapstore.h" #include "skin/skincontext.h" +/// A general purpose status light for indicating boolean events. class WStatusLight : public WWidget { Q_OBJECT public: @@ -59,5 +40,3 @@ class WStatusLight : public WWidget { // Associated pixmaps QVector m_pixmaps; }; - -#endif diff --git a/src/widget/wtime.h b/src/widget/wtime.h index 1db63c164d01..d82cc708e140 100644 --- a/src/widget/wtime.h +++ b/src/widget/wtime.h @@ -1,9 +1,7 @@ -// wtime.h // WTime is a widget showing the current time -// In skin.xml, it is represented by a