Commit Graph

32 Commits

Author SHA1 Message Date
Jonas Kvinge df070ac0cf Optimize `Song::InitFromQuery`
Use `QSqlQuery::value(int)` or `QSqlRecord::value(int)` instead of `QSqlQuery::value(QString)`.
Make `SqlRow` use `QSqlRecord` directly instead iterating over all columns.
2024-04-21 15:42:29 +02:00
Jonas Kvinge 0c6872b352 Disable automatic conversions from 8-bit strings 2024-04-13 05:05:33 +02:00
Jonas Kvinge 58944993b8 Use QStringLiteral 2024-04-09 23:20:26 +02:00
Jonas Kvinge 310b7b9065 CollectionQuery: Add F for float 2023-10-14 22:08:50 +02:00
Jonas Kvinge 1493164df9 CollectionQuery: Strip off whitespaces after colon and simplify code
Fixes #1290
2023-10-10 19:15:20 +02:00
Dakes 7aa7cdf6f3 Add filtering of numerical cols to collection
CollectionFilterWidget: Updated the tooltip, to reflect the changes.
CollectionQuery: Add parsing for SQL operators and insert right SQL
"where" searches.
Song: Add list of numerical columns
playlistfilterparser.cpp/FilterParser: move time and rating parsing
functions to new file:
searchparserutils.cpp: Contains common code used to parse search terms
in playlist and collection filters.
2023-08-02 16:52:27 +02:00
Jonas Kvinge 75ab6f25f4 Check return of QSqlQuery::prepare 2023-07-21 07:12:20 +02:00
Jonas Kvinge d6b53f78ab Cleanup includes 2023-07-21 05:25:57 +02:00
Jonas Kvinge dd72fb4ca5 Use C++11 enum class 2023-02-18 14:09:30 +01:00
Jonas Kvinge b5fa401db9 Collection: Make sure `RunQuery` does not access collection items
- Rename `QueryOptions` to `CollectionFilterOptions`.
- Create new class `CollectionQueryOptions` for passing options from model to `CollectionQuery`.
- Rename `Directory` to `CollectionDirectory`.

Fixes #1095
2023-01-08 18:16:16 +01:00
Jonas Kvinge f6b70fda71 Formatting 2022-03-22 21:09:05 +01:00
Jonas Kvinge d35d3aabc3 Show error dialog for failed SQL queries 2021-09-09 21:45:46 +02:00
Jonas Kvinge a6742d401c Formatting 2021-07-11 07:40:57 +02:00
Jonas Kvinge 584f5e5935 Change bool/int condition 2021-06-22 14:04:42 +02:00
Jonas Kvinge 58a5367015 Make const 2021-06-22 14:04:42 +02:00
Jonas Kvinge 1295033fae Clang-Tidy and Clazy fixes 2021-06-20 19:04:08 +02:00
Jonas Kvinge 5a58ac2845 Make CollectionQuery subclass QSqlQuery, don't copy QSqlQuery 2021-04-10 03:21:05 +02:00
Jonas Kvinge 59bffed47f Use static_cast 2021-03-21 18:53:02 +01:00
Jonas Kvinge 54f2aa5f77 Update copyrights 2021-03-20 21:14:47 +01:00
Jonas Kvinge f7b36ac4c7 Replace use of QVariant::type() with Qt 6 2020-10-24 03:32:40 +02:00
Jonas Kvinge ac859eb576 Make sure we query empty instead of null 2020-10-20 17:14:38 +02:00
Jonas Kvinge dd6e254e4f Use quotes in collection query to allow special characters
Fixes #492
2020-07-29 21:41:35 +02:00
Jonas Kvinge e5b3df41e9 Replace QRegExp with QRegularExpression 2020-07-18 04:05:07 +02:00
Jonas Kvinge c35235371a Replace QString::SkipEmptyParts with Qt::SkipEmptyParts on Qt 5.14.0 or higher 2020-05-29 17:40:11 +02:00
Jonas Kvinge 8e0d792bf0 Reduce includes 2020-02-08 03:40:30 +01:00
Jonas Kvinge 8a0e66bf11
Switch to FTS5 with unicode61 (#229)
* Switch to FTS5 with unicode61

* Update required sqlite version in README

* Update README

* Change back db file
2019-07-30 22:45:22 +02:00
Jonas Kvinge 87e543b5ef Fix collection query 2019-07-26 19:14:15 +02:00
Jonas Kvinge 37b923bea3 Change query to find both albums by artist and album artist 2019-04-18 00:45:32 +02:00
Jonas Kvinge ac6cac8da1 New context with albums and lyrics +++ much more
* Added new lyrics provider with lyrics from AudD and API Seeds
* New improved context widget with albums and lyrics
* Fixed playing and context widget getting stuck in play mode when there was an error
* Changed icons for artists in collection, tidal and cover manager
* Removed "search" icon from "Search automatically" checkbox (right click) that looked ugly
* Removed some unused widgets from the src/widgets directory
* Fixed initial size of window and side panel
* Fixed saving window size correctly
2018-08-29 21:42:24 +02:00
Jonas Kvinge c518e42e18 Remove whitespace 2018-08-09 18:39:44 +02:00
Jonas Kvinge e337b7933b Includes, comments and bugfixes
- Fix includes
- Use common regex (Song::kCoverRemoveDisc) for removing Disc/CD from album
- Remove Disc/CD from album when creating hash
- Make imobiledevice support compile
- Fix setting device on windows
2018-05-01 00:41:33 +02:00
Jonas Kvinge b2b1ba7abe Initial commit. 2018-02-27 18:06:05 +01:00