Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into crate-archives
Browse files Browse the repository at this point in the history
  • Loading branch information
ywwg committed May 22, 2023
2 parents fd3b63b + 7f79194 commit 7778f64
Show file tree
Hide file tree
Showing 35 changed files with 2,536 additions and 415 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1738,6 +1738,7 @@ add_executable(mixxx-test
src/test/hotcuecontrol_test.cpp
src/test/imageutils_test.cpp
src/test/indexrange_test.cpp
src/test/itunesxmlimportertest.cpp
src/test/keyutilstest.cpp
src/test/lcstest.cpp
src/test/learningutilstest.cpp
Expand Down
11 changes: 9 additions & 2 deletions res/skins/Deere/style.qss
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,14 @@ WLibrarySidebar::item:selected,
color: #D6D6D6;
background-color: #006596;
}
WLibrarySidebar::item:selected:focus {
outline: none;
border: 0px;
}
WLibrarySidebar::item:!selected:focus {
outline: none;
border: 1px solid white;
}
/* Use the native focus decoration */
/* This is for all cells including Played and Location */
WTrackTableView,
Expand Down Expand Up @@ -412,8 +420,7 @@ WSearchLineEdit {
qproperty-layoutSpacing: 0;
}

WLibrarySidebar,
WLibrarySidebar::item:focus {
WLibrarySidebar {
outline: none;
/* Spacing between treeview and preview deck/search bar */
margin: 0px;
Expand Down
11 changes: 8 additions & 3 deletions res/skins/LateNight/style_classic.qss
Original file line number Diff line number Diff line change
Expand Up @@ -2071,6 +2071,14 @@ WTrackTableView::item:selected,
color: #fff;
background-color: #5e4507;
}
WLibrarySidebar::item:selected:focus {
outline: none;
border: 0px;
}
WLibrarySidebar::item:!selected:focus {
outline: none;
border: 1px solid white;
}

/* Use the native focus decoration */
/* This is for all cells including Played and Location */
Expand All @@ -2088,9 +2096,6 @@ WTrackTableView {

WLibrarySidebar {
show-decoration-selected: 0;
}
WLibrarySidebar,
WLibrarySidebar::item:focus {
outline: none;
}

Expand Down
11 changes: 9 additions & 2 deletions res/skins/LateNight/style_palemoon.qss
Original file line number Diff line number Diff line change
Expand Up @@ -2544,16 +2544,23 @@ WLibrarySidebar {
/* background of Color delegate in selected row */
selection-background-color: #2c454f;
}
WLibrarySidebar {
outline: none;
}
/* Selected rows in Tree and Tracks table */
WLibrarySidebar::item:selected,
WTrackTableView::item:selected,
#LibraryBPMButton::item:selected {
color: #fff;
background-color: #2c454f;
}
WLibrarySidebar,
WLibrarySidebar::item:focus {
WLibrarySidebar::item:selected:focus {
outline: none;
border: 0px;
}
WLibrarySidebar::item:!selected:focus {
outline: none;
border: 1px solid white;
}

WTrackTableView:focus,
Expand Down
11 changes: 9 additions & 2 deletions res/skins/Shade/style.qss
Original file line number Diff line number Diff line change
Expand Up @@ -470,9 +470,16 @@ WLibrarySidebar::branch:selected,
WSearchLineEdit::indicator {
width: 0;
}
WLibrarySidebar,
WLibrarySidebar::item:focus {
WLibrarySidebar {
outline: none;
}
WLibrarySidebar::item:selected:focus {
outline: none;
border: 0px;
}
WLibrarySidebar::item:!selected:focus {
outline: none;
border: 1px solid white;
}

/* Use the native focus decoration */
Expand Down
8 changes: 8 additions & 0 deletions res/skins/Tango/style.qss
Original file line number Diff line number Diff line change
Expand Up @@ -2650,6 +2650,14 @@ WLibrarySidebar::item:!selected {
background-color: #0f0f0f;
color: #999;
}
WLibrarySidebar::item:selected:focus {
outline: none;
border: 0px;
}
WLibrarySidebar::item:!selected:focus {
outline: none;
border: 1px solid white;
}

WTrackTableViewHeader {
/* Don't set a font size to pick up the system font size. */
Expand Down
4 changes: 2 additions & 2 deletions src/library/banshee/bansheeplaylistmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const QString kCrate = QStringLiteral(CLM_CRATE);
BansheePlaylistModel::BansheePlaylistModel(QObject* pParent, TrackCollectionManager* pTrackCollectionManager, BansheeDbConnection* pConnection)
: BaseSqlTableModel(pParent, pTrackCollectionManager, "mixxx.db.model.banshee_playlist"),
m_pConnection(pConnection),
m_playlistId(-1) {
m_playlistId(kInvalidPlaylistId) {
m_tempTableName = BANSHEE_TABLE + QString::number(sTableNumber.fetchAndAddAcquire(1));
}

Expand All @@ -77,7 +77,7 @@ BansheePlaylistModel::~BansheePlaylistModel() {
void BansheePlaylistModel::dropTempTable() {
if (m_playlistId >= 0) {
// Clear old playlist
m_playlistId = -1;
m_playlistId = kInvalidPlaylistId;
QSqlQuery query(m_database);
QString strQuery("DROP TABLE IF EXISTS %1");
if (!query.exec(strQuery.arg(m_tempTableName))) {
Expand Down
2 changes: 1 addition & 1 deletion src/library/baseexternallibraryfeature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ void BaseExternalLibraryFeature::slotImportAsMixxxPlaylist() {

int playlistId = playlistDao.createUniquePlaylist(&playlist);

if (playlistId != -1) {
if (playlistId != kInvalidPlaylistId) {
playlistDao.appendTracksToPlaylist(trackIds, playlistId);
} else {
// Do not change strings here without also changing strings in
Expand Down
8 changes: 4 additions & 4 deletions src/library/baseexternalplaylistmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ BaseExternalPlaylistModel::BaseExternalPlaylistModel(QObject* parent,
m_playlistsTable(playlistsTable),
m_playlistTracksTable(playlistTracksTable),
m_trackSource(trackSource),
m_currentPlaylistId(-1) {
m_currentPlaylistId(kInvalidPlaylistId) {
}

BaseExternalPlaylistModel::~BaseExternalPlaylistModel() {
Expand Down Expand Up @@ -100,20 +100,20 @@ void BaseExternalPlaylistModel::setPlaylist(const QString& playlist_path) {
}

// TODO(XXX): Why not last-insert id?
int playlistId = -1;
int playlistId = kInvalidPlaylistId;
QSqlRecord finder_query_record = finder_query.record();
while (finder_query.next()) {
playlistId = finder_query.value(finder_query_record.indexOf("id")).toInt();
}

if (playlistId == -1) {
if (playlistId == kInvalidPlaylistId) {
qWarning() << "ERROR: Could not get the playlist ID for playlist:" << playlist_path;
return;
}

// Store search text
QString currSearch = currentSearch();
if (m_currentPlaylistId != -1) {
if (m_currentPlaylistId != kInvalidPlaylistId) {
if (!currSearch.trimmed().isEmpty()) {
m_searchTexts.insert(m_currentPlaylistId, currSearch);
} else {
Expand Down
Loading

0 comments on commit 7778f64

Please sign in to comment.