772 Commits

Author SHA1 Message Date
Craig Drummond
d95798f7e4 Merge branch 'master' of ssh://github.com/CDrummond/cantata 2018-12-09 20:38:54 +00:00
Craig Drummond
7cc3e3c196 MPRIS seeks command specifies an offset from current position.
Closes #1417
2018-12-09 20:38:21 +00:00
CraigD
89354dbf13 Merge pull request #1416 from DarkSwan86/patch-1
Updated italian translation
2018-12-06 19:46:29 +00:00
DarkSwan86
5206378a5e Updated italian translation
I have fixed some errors that I have found when I was using Cantata with the Italian translation.
2018-12-06 17:36:37 +01:00
Craig Drummond
67cbf7b373 When loading URLs via commandline use AppendAndPlay.
Closes #1413
2018-12-03 22:53:37 +00:00
Craig Drummond
6e8faee328 Fix MusicBrainz disc ID calculation.
Closes #1408
2018-11-29 20:49:00 +00:00
Craig Drummond
c746f22188 When copying tracks to a device, only update cache if configured to do so.
Closes #1406
2018-11-25 13:10:57 +00:00
Craig Drummond
23cd241aa4 Fix MPD cover art retreival 2018-11-12 19:38:53 +00:00
Craig Drummond
e039683be7 Fix MPD albumart reading 2018-11-11 09:17:16 +00:00
Craig Drummond
16a8b739df For MPD>=21, use its albumart protocol to fetch covers. 2018-11-10 18:37:37 +00:00
Craig Drummond
f5243ff83f Add more actions to search page results.
Closes #1398
2018-10-28 16:24:09 +00:00
Craig Drummond
3ce8ef2aff Handle empty VolumeIdentifier in MTP devices.
Issue #1397
2018-10-23 21:23:17 +01:00
CraigD
6eaabc7dc0 Merge pull request #1394 from mbouron/mbouron/httpstream-cleanup-v2
httpstream cleanups
2018-10-23 08:08:34 +01:00
Matthieu Bouron
229760c8ea HttpStream: cosmetics 2018-10-22 10:41:54 +02:00
Matthieu Bouron
da4b250024 HttpStream: stop the vlc player if MPD is paused 2018-10-22 10:31:27 +02:00
Matthieu Bouron
91889729ad HttpStream: simplify start player condition 2018-10-22 10:31:27 +02:00
Craig Drummond
b709e5bccd Add more verbose covers debug
Issue #1395
2018-10-20 14:08:11 +01:00
Craig Drummond
1105ac4dd3 Don't stop library scan just because of failure in 1 directory.
Closes #1389
2018-10-18 19:29:22 +01:00
CraigD
aa4e79b41c Merge pull request #1393 from mbouron/mbouron/httpstream-cleanup-v1
httpstream cleanups
2018-10-18 18:37:59 +01:00
Matthieu Bouron
864ebcf66d HttpStream: remove unneeded check on player media url
This check is already performed in streamUrl().
2018-10-18 17:36:29 +02:00
Matthieu Bouron
152042cfa0 HttpStream: fix reorder warning 2018-10-18 17:36:29 +02:00
Matthieu Bouron
51477c6eb2 HttpStream: properly detect stream url changes
Media url property has been removed in a previous commit.
2018-10-18 17:36:29 +02:00
Matthieu Bouron
f904eeb28f HttpStream: remove unused variable 2018-10-18 17:36:29 +02:00
Craig Drummond
acecc90776 Add another qt5ct palette work-around.
Issue #1381
2018-10-02 16:47:21 +01:00
Craig Drummond
d29e511743 Change toolbar colours if palette changes.
Issue #1381
2018-10-01 19:45:18 +01:00
Craig Drummond
01b3267072 Update 2018-10-01 18:27:24 +01:00
CraigD
5988d1d0ee Merge pull request #1384 from ccoors/sort-by-title
Add option to sort smart playlists by title
2018-10-01 18:26:47 +01:00
CraigD
12ec5fe3d5 Merge pull request #1382 from mbouron/mbouron/fix-build-with-libvlc
Fix build with libvlc
2018-10-01 17:52:18 +01:00
Christian Friedrich Coors
d97cd43f9e Add option to sort smart playlists by title 2018-10-01 18:16:50 +02:00
Matthieu Bouron
f584da861d Fix build with libvlc
Fixes regression introduced by f8a8a5bb2d.
2018-10-01 16:29:02 +02:00
Craig Drummond
7163230255 Don't try to reduce brackets when showing album name and year.
Issue #1373
2018-09-30 09:12:02 +01:00
Craig Drummond
4c79ec2c5f In grouped style playqueue, only show album duration if there is more than one track from the album.
Closes #1375
2018-09-30 09:09:42 +01:00
CraigD
4e09a9a05b Merge pull request #1376 from mbouron/mbouron/fix-http-playback
Wait QMediaPlayer buffering before entering playing state
2018-09-30 09:04:35 +01:00
Matthieu Bouron
f8a8a5bb2d Wait QMediaPlayer buffering before entering playing state
QMediaPlayer needs to fill its internal buffer before it can play the
stream otherwise it can end up in a stalled state.

This commit also simplifies the logic for when the player needs to be
restarted and remove the need of an internal timer to poll the player
state.

Fixes choppy http playback.
2018-09-28 13:51:21 +02:00
Craig Drummond
f1ac6bb634 When expand intrface, don't shrink width. Conversely, when collapsing don't expand width. 2018-09-19 17:26:27 +01:00
Craig Drummond
571fae83cc Fix 'Show Current Song Information' (i) toolbar button showing when interface is collpased and resized. 2018-09-19 17:22:04 +01:00
Craig Drummond
1f732eb690 Always show volume control. 2018-09-19 17:20:11 +01:00
Craig Drummond
26627b4140 If HTTP stream is not enabled, return -1 for volume 2018-09-19 17:16:53 +01:00
CraigD
4dfe319be5 Merge pull request #1372 from ivanradanov/master
Add missing ifdef for libvlc support
2018-09-18 07:26:34 +01:00
Ivan Radanov Ivanov
c9a3cd4f76 Add missing ifdef for libvlc support
QMediaPlayer related code was not ifdef'ed out when libvlc is used.
2018-09-18 08:28:26 +03:00
Craig Drummond
7e66bbf8d5 Update 2018-09-15 22:42:33 +01:00
CraigD
7e6b42c3c6 Merge pull request #1371 from theirix/fix-qmediaplayer
Fixed QMediaPlayer stuck with network streams
2018-09-15 22:41:15 +01:00
theirix
4699dee13f Fixed QMediaPlayer stuck with network streams
- QMediaPlayer is often stuck after stopping in InvalidMedia media state
and it is needed to call again setMedia and then play not just play.
- Fixed starting playback even if MPD state has not changed
2018-09-15 21:44:09 +03:00
Craig Drummond
8f7f4c8c9f Allow .jpeg as extension from cover dialog.
Closes #1368
2018-09-12 19:48:41 +01:00
Craig Drummond
201dc114d1 When getting 'basic' title of song, also remove any 'prod. XXX', etc.
values.
2018-09-11 22:38:18 +01:00
CraigD
bbfbac98de Merge pull request #1367 from aqua36/master
mpd-interface: basic(str) now strips producer names too
2018-09-11 22:27:52 +01:00
aqua36
1570018ea9 mpd-interface: basic(str) now strips producer names too 2018-09-11 20:08:37 +03:00
Craig Drummond
069bc5eb6a Don't package .github folder 2018-09-02 22:45:33 +01:00
CraigD
edce462b9e Update issue templates 2018-09-02 22:42:29 +01:00
CraigD
108430deb5 Update issue templates 2018-09-02 22:41:45 +01:00
Craig Drummond
6679cf5542 Add doc explaining FontAwsome mods, and include license file 2018-09-02 10:16:20 +01:00
Craig Drummond
11ef9932a0 Merge branch 'master' of ssh://github.com/CDrummond/cantata 2018-09-01 23:32:49 +01:00
Craig Drummond
8d49459f4f Fix saving 'Descending' order for smart playlists.
Issue #1356
2018-09-01 23:29:17 +01:00
CraigD
e980cbcb61 Merge pull request #1354 from rptx/patch-1
Update cantata_fr.ts
2018-09-01 10:54:56 +01:00
rptx
161d8464ee Update cantata_fr.ts
Typos and wording.
2018-08-31 22:05:23 +02:00
Craig Drummond
d932126e1f Remove confirmation dialog when saving replaygain tags. 2018-08-27 18:27:50 +01:00
Craig Drummond
b985fa9328 Set ReplayGain/R128 difference to 0 - as this is the only combination
that sounds the same between FLACs and OPUS for me with MPD 0.20.21

Also, only apply the difference (when reading tags) if the unmodified
tag is not 0

Issue #1345
2018-08-27 09:50:50 +01:00
Craig Drummond
47dc61e9db Adjust R128 tags to take into account difference between R128 and
ReplayGain
Issue #1345
2018-08-23 18:28:31 +01:00
Craig Drummond
bc41098483 Use same 'album key' for all discs in an album, so that playqueue groups them together, and shuffle by albums keeps them together.
Closes #1349
2018-08-23 17:47:58 +01:00
Craig Drummond
4aaa94e2c9 Opus RG issues 2018-08-21 23:12:28 +01:00
Craig Drummond
8919693d10 Fix setting of R128 tags?
Issue #1345
2018-08-21 17:38:53 +01:00
Craig Drummond
2679e72517 Opus does not use replaygain peak tags 2018-08-20 19:33:48 +01:00
Craig Drummond
5e98e54351 If artist, album, and title are empty in replaygain dialog, then show filename in title column. 2018-08-20 16:52:21 +01:00
Craig Drummond
562fd3ff89 Initialise network proxy factory when starting.
Issue #1346
2018-08-14 15:57:39 +01:00
Craig Drummond
cdf4363df9 Add '.opus' to list of recognised extensions for local files. 2018-08-11 08:31:40 +01:00
Craig Drummond
4184c18880 Add 'paranoiaOffset' config item to set cdparanoia offset whe reading
discs.
Issue #1341
2018-08-10 11:31:24 +01:00
Craig Drummond
f0b0d722e2 Remove user-agent checking when serving local files, this is easily fake-able and breaks playback to forked-daap (and mopidy?)
Issue #1339
2018-08-10 09:37:17 +01:00
Craig Drummond
b66d0f0959 For Opus files, use R128_TRACK_GAIN and R128_ALBUM_GAIN to store replaygain values.
Issue #1345
2018-08-10 09:04:41 +01:00
Craig Drummond
f5cb0b4559 Suru is Yaru for ubuntu - but don't install icon by default. 2018-08-02 18:31:17 +01:00
Craig Drummond
d74a5d8dc5 Revert rgReferenceLevel change 2018-08-02 16:46:48 +01:00
Craig Drummond
894d059466 Add non-GUI rgReferenceLevel config item to set the reference level for ReplayGain scanning. e.g. add 'rgReferenceLevel=-16.0" to the "General" section.
Issue #1337
2018-08-01 23:19:34 +01:00
Craig Drummond
fe158f41db Use ":/" as root path for windows folder browse, seems to then list each
drive.
Closes #1331
2018-07-29 18:03:01 +01:00
Craig Drummond
21f7b43021 Proxy config is now standard 2018-07-27 22:45:10 +01:00
Craig Drummond
bb595cfbba If a dynamic playlist has rating 0..5 stars, then include all songs (even those without an explicit rating).
Closes #1334
2018-07-24 16:31:50 +01:00
Craig Drummond
75f7a5d447 Add all drives (apart from A and B) to folder page for windows.
Issue #1331
2018-07-20 22:57:39 +01:00
Craig Drummond
10004277de Due to reports of crashes in libvlc code, default to using QtMultiMedia for HTTP stream playback on Linux builds (already default for Mac/Win).
Issue #1329
2018-07-19 21:54:15 +01:00
Craig Drummond
6078090681 Fix libVLC crash with invalid HTTP streams - check with QUrl that URL is valid and scheme starts with http.
Issue #1329
2018-07-19 17:46:46 +01:00
CraigD
99af1e1f42 Merge pull request #1325 from edhelas/master
Small updates in CMakeLists for CPack
2018-07-12 17:07:43 +01:00
Timothée Jaussoin
9ecbf856d6 Set properly the description with cpack
Generate the dependencies using shlibdeps
2018-07-12 00:01:44 +02:00
Craig Drummond
95a3d9c037 Brazilian Portuguese 2018-07-10 22:30:38 +01:00
Craig Drummond
c480caf7a9 Add source translation, not compiled version 2018-07-10 17:37:33 +01:00
Craig Drummond
64742047d1 Fix 'Locate In Library / Album' for albums with musicbrainz ID.
Issue #1324
2018-07-09 16:37:38 +01:00
Craig Drummond
8a3973cc97 Update 2018-07-07 14:32:49 +01:00
Craig Drummond
f6669f6096 Add Portuguese translation - thanks to Wanderson Gonçalves Pereira 2018-07-05 16:43:15 +01:00
Craig Drummond
5814e66684 Fix enable output signal 2018-06-30 13:55:11 +01:00
Craig Drummond
233bc19f73 Enable proxy settings config by default
Closes #1323
2018-06-30 13:53:01 +01:00
Craig Drummond
650f05430a Fix smart playlists with a rating range and no song include/exclude rules. 2018-06-24 16:18:27 +01:00
Craig Drummond
a2267503a2 Unpoarsed arguments is file list 2018-06-24 16:05:01 +01:00
Craig Drummond
9cbc9de146 When marking podcast episodes for download, and 'show only uplayed' is checked, then only download unplayed episodes.
Closes #1313
2018-06-23 09:47:29 +01:00
Craig Drummond
c6cdd780a3 Use 32-bit unsigned int to store output IDs.
Closes #1316
2018-06-23 09:24:32 +01:00
Craig Drummond
d97e5d28bc Emit errors when trying to add local files to playqueue, and these cannot be added. 2018-06-16 11:59:00 +01:00
Craig Drummond
5eff774989 Mark strings for translation 2018-06-16 11:58:43 +01:00
Craig Drummond
b66dd5655c Spelling 2018-06-15 17:49:15 +01:00
Craig Drummond
afc4f8315d Remove internal Samba shre mounting code, this had some privilege escalation issues, and is not well tested 2018-06-15 17:48:11 +01:00
Craig Drummond
ce78cdbc81 When moving foldes, move all recognized filetypes
Closes #1305
2018-06-10 19:56:59 +01:00
Craig Drummond
a9c30af316 Install cantata.png to use as Windows tray icon.
Closes #1308
2018-06-10 19:51:30 +01:00
Craig Drummond
76818a543a Add a cantata.png for windows, to use in system tray
Issue #1308
2018-06-10 19:30:26 +01:00
Craig Drummond
72c41d8743 When using Track Organizer to rename music tracks, rename any other files that have the same basename as the music file.
Issue #1305
2018-06-08 16:57:31 +01:00
Craig Drummond
af7a346435 s/AlbumArt/albumart 2018-06-08 16:56:05 +01:00
Craig Drummond
d75d903c64 Use chevron from font awesome 2018-06-07 22:55:41 +01:00
Craig Drummond
b2204b599c Update 2018-06-07 22:48:51 +01:00
Craig Drummond
04ede3658a Remove Qt and TagLib texts, not required 2018-06-07 20:40:49 +01:00
Craig Drummond
ea76b58cd0 Initially show text about remote dynamizer not running 2018-06-07 20:37:06 +01:00
Craig Drummond
fca2efdd8c Store actual song path for local files (mainly affects windows
Issue #1304
2018-06-07 20:35:06 +01:00
Craig Drummond
d193cfe336 Fix path 2018-06-05 19:04:41 +01:00
Craig Drummond
deceb32fab Add note about lrelease 2018-06-05 19:03:06 +01:00
Craig Drummond
795aa6c411 Remove qtmedia_audioengine.dll from mediaservice folder 2018-06-05 18:42:27 +01:00
Craig Drummond
5ff9a440cf Fix windows colours 2018-06-05 18:40:11 +01:00
Craig Drummond
ec0e9ddab0 Add file max-age to dynamic playlist rules.
Closes #1298
2018-06-01 19:21:04 +01:00
Craig Drummond
145ed761be Fix MaxAge saving 2018-06-01 19:19:56 +01:00
Craig Drummond
c6aca97b0a Fix checking of ratings if no inc rules 2018-06-01 19:06:40 +01:00
Craig Drummond
bd3d238c9d Better list icon? 2018-06-01 19:04:01 +01:00
Craig Drummond
3b3c750965 Limit soundcloud to 200 tracks, otherwise no results
Closes #1297
2018-06-01 17:31:47 +01:00
Craig Drummond
5924369539 Fix loading of MPD playlists the very first time Cantata is started.
Closes #1299
2018-06-01 17:26:55 +01:00
Craig Drummond
b1b70e9d2f Use isChecked() 2018-05-30 22:04:44 +01:00
Craig Drummond
c613b2b940 Enable HTTP streaming by default 2018-05-30 22:04:09 +01:00
CraigD
303303733b Merge pull request #1295 from stef34280/master
Update french translation
2018-05-30 18:59:01 +01:00
Craig Drummond
1777078157 Limit ShoutCast to 250 matches too 2018-05-30 18:53:44 +01:00
Craig Drummond
1dd7c1a7b8 Limit SoundCloud results to 250 matches.
Closes #1297
2018-05-30 18:52:04 +01:00
stef34280
20388a80c9 Add files via upload
Update french translation
2018-05-30 09:00:00 +02:00
stef34280
462416b708 Delete cantata_fr.ts 2018-05-30 08:58:42 +02:00
stef34280
fd27355a46 Add files via upload 2018-05-30 08:56:41 +02:00
Craig Drummond
d3249bf5ea Fix segfault...
Closes #1294
2018-05-29 07:19:38 +01:00
Craig Drummond
1e13266613 Ensure local playback enbled for user mpd
Issue #1293
2018-05-28 22:11:02 +01:00
Craig Drummond
0d32865080 When saving podcasts, remove queries from filename.
Issue #1293
2018-05-28 17:17:36 +01:00
Craig Drummond
82ea7447a5 Remove qt5ct work-around.
Issue #1291
2018-05-27 17:51:48 +01:00
Craig Drummond
45aace9d48 Fix saving of podcast images to JPG. 2018-05-26 19:24:13 +01:00
Craig Drummond
8ec9a7f30b Simplify whitespace of podcast name and episode names. 2018-05-26 19:04:14 +01:00
Craig Drummond
96df12148e Fix case 2018-05-26 18:53:58 +01:00
Craig Drummond
f43eb70661 Set spacing to 1, to match PQ 2018-05-26 16:11:04 +01:00
Craig Drummond
a9d0b3cc76 Don't set spacing to 0 2018-05-26 16:09:20 +01:00
Craig Drummond
1f62bbd763 If plain widget (eg. spacer) then add 4 pixels 2018-05-26 16:07:35 +01:00
Craig Drummond
5004d6f1f0 Use 2*PM_FocusFrameHMargin ??? 2018-05-26 15:53:57 +01:00
Craig Drummond
3f1e0f54a8 Use function to set size? 2018-05-26 10:10:21 +01:00
Craig Drummond
2d8a94a7a7 Alternate sizing? 2018-05-26 09:59:54 +01:00
Craig Drummond
afce3c1ce8 Add note about CMAKE_PREFIX_PATH 2018-05-26 08:46:45 +01:00
Craig Drummond
6de7ab2e0b Fix playback of downloaded podcasts. 2018-05-25 18:22:26 +01:00
Craig Drummond
83fab176b8 When toggle 'Show Unplayed' go to top 2018-05-25 18:19:12 +01:00
Craig Drummond
a82fba3e23 Fix usage of podcast cover in title widget. 2018-05-25 18:18:38 +01:00
Craig Drummond
67f5fa513d Change icon 2018-05-25 18:15:26 +01:00
Craig Drummond
79c08db6e5 Add icons to buttons, if set by style 2018-05-25 18:14:02 +01:00
Craig Drummond
a05cf3d466 Style more icons 2018-05-25 17:31:39 +01:00
Craig Drummond
3e09b8d506 Fix inactive icon colours 2018-05-25 17:23:56 +01:00
Craig Drummond
5a42f13e1d Allow icons on buttons for KDE 2018-05-25 17:20:53 +01:00
Craig Drummond
3206196750 Add slight padding on left for list view 2018-05-24 19:15:58 +01:00
Craig Drummond
bbff59d793 Remove QIcon::fromTheme usage 2018-05-24 19:11:59 +01:00
Craig Drummond
74fb297167 Make 'Icon' a namespace not class 2018-05-24 19:05:54 +01:00
Craig Drummond
a5bf12ebb9 Get icons from style 2018-05-24 18:10:22 +01:00
Craig Drummond
b5dda707c4 Change dirble icon 2018-05-24 18:07:39 +01:00
Craig Drummond
ed3fc33f91 Fix QTemporaryFile usage 2018-05-24 18:03:48 +01:00
Craig Drummond
aed7f14705 Close dialog before showing error 2018-05-24 18:02:15 +01:00
Craig Drummond
535d17c5ba Fix saving stream settings. 2018-05-24 18:01:28 +01:00
Craig Drummond
55a6da1487 Only install cantata translations, not blank file! 2018-05-24 17:59:23 +01:00
Craig Drummond
b3d34210cb Mono icons 2018-05-24 17:58:40 +01:00
Craig Drummond
f0701eb48a Remove group warning from initial wizard. 2018-05-24 17:57:41 +01:00
Craig Drummond
2cc2465865 Fix location of symbolic icon 2018-05-23 22:58:12 +01:00
Craig Drummond
5d6dadd738 Reduce number of confirmation dialogs.
Closes #1289
2018-05-23 22:36:08 +01:00
Craig Drummond
f2077882e4 Fix adding streams from provider dialog. 2018-05-23 21:19:15 +01:00
Craig Drummond
153c68f0b1 Use more mono icons 2018-05-23 21:14:42 +01:00
Craig Drummond
0a29ae17e1 Mono icons for podcast search 2018-05-23 19:46:50 +01:00
Craig Drummond
0a2eb20a59 Better metrics? 2018-05-23 19:28:21 +01:00
Craig Drummond
79b3587808 Fix GNOME shell tray icon 2018-05-23 19:25:02 +01:00
Craig Drummond
570df1b679 Fix app icon in titlebar and about dialog for macOS (and windows?) 2018-05-22 09:57:12 +01:00
Craig Drummond
6f106acbf8 No need to differentiate between GNOME and Ubuntu GNOME 2018-05-21 17:28:10 +01:00
Craig Drummond
36689620eb Use symbolic icon for GNOME panel 2018-05-21 17:23:41 +01:00
CraigD
cab846014a Merge pull request #1288 from aqua36/master
add comma+period to skipped chars when formatting url for genius.com
2018-05-20 19:55:44 +01:00
chm
ac96721ece add comma+period to skipped chars when formatting url for genius.com 2018-05-20 18:55:00 +03:00
Craig Drummond
fa63996716 Replace & with and - for genius.com
Issue #1286
2018-05-20 16:22:44 +01:00
CraigD
6924bf1432 Merge pull request #1287 from aqua36/master
modify genius lyrics provider to support more accented characters
2018-05-20 16:19:04 +01:00
aqua36
699e24b5ca fix typos in previous commits 2018-05-20 18:14:48 +03:00
chm
0ff72932db modify genius lyrics provider to support accented chars; fix typo 2018-05-20 18:00:30 +03:00
chm
51d6a2e88f modify genius lyrics provider to support more accented characters 2018-05-20 17:15:07 +03:00
Craig Drummond
69bc455ab4 When looking for lyrics, remove "ft. X", "featuring X", etc, from song title as well as artist.
Issue #1286
2018-05-20 13:41:05 +01:00
Craig Drummond
c764d7c0d0 Cache lyrics using 'basic' artist name - e.g. X ft. Y => X 2018-05-20 12:32:53 +01:00
Craig Drummond
9c64abb6d1 Add genius.com to list of lyrics providers.
Issue #1286
2018-05-20 11:29:32 +01:00
Craig Drummond
f72947db47 Don't report errors when listing playlists, as MPD reports error if user has disabled these.
Closes #1284
2018-05-19 16:01:43 +01:00
Craig Drummond
60d14e2dc8 Fix covers settings from wizard not being saved.
Closes #1283
2018-05-19 15:55:15 +01:00
Craig Drummond
c40337ac08 Fix saving of 'Fadeout on stop' duration.
Closes #1282
2018-05-19 08:23:12 +01:00
Craig Drummond
9f612ec438 Look for translations in "translations" folder within current cantata
folder - mainly for dev builds.
2018-05-17 17:29:50 +01:00
Craig Drummond
cbc6f14c87 Don't install SVGs, they're embeded 2018-05-17 17:28:08 +01:00
Craig Drummond
48326a0064 Fix loading of FLAC images with older TagLib.
Closes #1281
2018-05-17 17:26:30 +01:00
Craig Drummond
0609f982b6 Fix showing of statusbar items
Closes #1279
2018-05-17 17:24:26 +01:00
Craig Drummond
e86be2974a Control view/buttons when window is shown
Issue #1279
2018-05-16 22:56:10 +01:00
Craig Drummond
370832f302 Embed mpd template 2018-05-16 22:46:18 +01:00
Craig Drummond
534ddb9181 Embed more files into cantata 2018-05-16 22:43:54 +01:00
Craig Drummond
537388ad4c Embed podcast directories and icons 2018-05-16 19:13:02 +01:00
Craig Drummond
0e8b2a2ce1 Remove "New York Times" podcast directory - not available? 2018-05-16 19:10:41 +01:00
Craig Drummond
01105da8fa TTF is embeded, so no need to install 2018-05-16 19:03:59 +01:00
Craig Drummond
12adde4adb ...add qrc file! 2018-05-16 17:17:56 +01:00
Craig Drummond
427cdbecd3 Formatting 2018-05-16 17:17:44 +01:00
Craig Drummond
2145a1f95d Embed FontAwesome into Cantata. 2018-05-16 17:16:52 +01:00
Craig Drummond
d2e65833d2 Build all apps into same folder, to allow dev versions to run without
install
2018-05-16 17:01:49 +01:00
Craig Drummond
815fb98520 Install panel-light to suru, and use 2018-05-16 16:58:31 +01:00
Craig Drummond
4e83db92e1 No need to install panel icon 2018-05-16 06:17:15 +01:00
Craig Drummond
1cbf5a6e80 Remove uneeded parts 2018-05-16 06:17:03 +01:00
Craig Drummond
8ea06054e6 Change icon 2018-05-16 06:14:58 +01:00
Craig Drummond
87bd672663 Dont set theme name/path 2018-05-16 06:14:05 +01:00
Craig Drummond
a5573a65bd Show technical info to the left of ratings.
Closes #1278
2018-05-14 22:29:50 +01:00
Craig Drummond
25eb72397f Remove custom icon theme, and just use FontAwesome.
Issue #1277
2018-05-14 22:24:49 +01:00
Craig Drummond
48b91721a7 Remove executable flag 2018-05-14 22:22:39 +01:00
Craig Drummond
35b501f3da Modify name of supplied font-awesome font to Cantata-FontAwesome, so as to
avoid conflicts with any system installed font.
Issue #1276
2018-05-13 10:32:26 +01:00
Craig Drummond
b4a4f5a6ab Fix crash if try to expand dirble and --no-network passed to Cantata. 2018-05-11 17:37:09 +01:00
Craig Drummond
1978c743f4 Fix genre selected colour 2018-05-11 17:35:12 +01:00
Craig Drummond
2c7ef90ef2 Fix info label alignment 2018-05-11 17:32:52 +01:00
Craig Drummond
636f645e50 Set 'love' icon size
Issue #1273
2018-05-09 22:30:27 +01:00
Craig Drummond
a2d4593191 Add monochrome tray icon for Ubuntu GNOME 2018-05-09 22:19:59 +01:00
Craig Drummond
9dd63be262 Use small, italic font, for help labels. 2018-05-09 20:37:34 +01:00
Craig Drummond
8141ef0a46 Update 2018-05-09 20:35:33 +01:00
Craig Drummond
a135fd0fac Initialise more pointers to null
Issue #1272
2018-05-09 20:33:59 +01:00
Craig Drummond
424b8d20a6 Add "--collection" commandline option to control the initial collection
to use.
Closes #1268
2018-05-08 22:55:49 +01:00
Craig Drummond
93314e841d Allow adding Jamendo/Magnatune tracks to stored playlists. 2018-05-08 22:46:14 +01:00
Craig Drummond
b5a1a9b14e Remove OnlineDevice - not used. 2018-05-08 22:43:43 +01:00
Craig Drummond
f7cbee4693 Don't overwrite genre with file type for Jamendo. 2018-05-08 22:43:14 +01:00
Craig Drummond
4909a7cf9c Don't allow slashes, asterisks, or question marks in collection name. 2018-05-08 22:40:50 +01:00
Craig Drummond
08dd7dccc2 Use JSON to encode song details when adding online tracks. 2018-05-08 22:37:19 +01:00
Craig Drummond
f1828ea5f4 Fix enabling of add/replace play queue actions for Jamendo/Magnatune. 2018-05-08 22:25:10 +01:00
Craig Drummond
3b8f3360bd Guard acess to album key map
Issue #1269
2018-05-08 22:20:47 +01:00
Craig Drummond
fb29cff135 Fix preference dialog size under windows.
Closes #1251
2018-05-05 17:16:33 +01:00
Craig Drummond
b8ef7384f4 Revert #62537412bf66c023af3be969ec606c7f1fa4ab5f
Closes #1267
2018-05-05 12:04:46 +01:00
Craig Drummond
490683db1a Update 2018-05-03 21:45:45 +01:00
Craig Drummond
67361af3ca Set UTF8 encoding and BOM for windows.
Issue #1261
2018-05-03 21:44:14 +01:00
Craig Drummond
5656244990 Set codec for windows?
Issue #1261
2018-05-03 19:41:40 +01:00
Craig Drummond
1fd195a834 If MPD path is a HTTP url and loading of lyrics via http fails, still
need to look into cache
2018-05-03 19:33:46 +01:00
Craig Drummond
a782b05db3 Fix creation of refresh action under windows 2018-05-03 19:31:53 +01:00
Craig Drummond
9dd79917ae Fix http: check 2018-05-03 19:31:20 +01:00
Craig Drummond
4c4afe82d8 When searching on 'any', do a second search on 'file' and combine results.
Looks as if MPD does not search filenames/paths when using 'any.'
Issue #1264
2018-05-03 17:11:37 +01:00
Craig Drummond
7e01ac00f5 Don't attempt to align main menu for Windows < 10, as Qt seems to add some
menu animation that just looks weird when menu is moved.
2018-05-03 17:07:48 +01:00
Craig Drummond
a32a05efe5 Update suru icon - was a little too small. 2018-05-03 17:04:02 +01:00
Craig Drummond
eee094ff8e ADd kvantum titlebar size code to macOS 2018-05-02 21:53:10 +01:00
Craig Drummond
62537412bf Open text files with QIODevice::Text
Issue #1261
2018-05-02 21:41:08 +01:00
Craig Drummond
2baf762ee3 Crash fix
Issue #1263
2018-05-02 21:24:02 +01:00
Craig Drummond
2a4b14f42a Add a slight border to context view when in sidebar. 2018-05-01 22:28:03 +01:00
Craig Drummond
f092974a01 Slightly reduce height of toolbar. 2018-05-01 22:23:52 +01:00
Craig Drummond
84716e819b - When playing, only poll MPD every 5 seconds.
- When updating play seekbar from MPDStatus, only upate if more than 1
  second from calculated position.
Closes #1260
2018-05-01 22:21:10 +01:00
Craig Drummond
8dcf14f9ef Don't enable AA_EnableHighDpiScaling for windows builds, seems to
interfere with fractional scaling.
Closes #1257
2018-05-01 22:18:31 +01:00
Craig Drummond
08256ce3c1 Stretching albums covers not working under Windows, so just remove option.
Closes #1252
2018-04-30 22:23:56 +01:00
Craig Drummond
eeb55435f3 Fix playback of local non-MPD files under Windows.
Issue #1250
2018-04-30 22:18:32 +01:00
Craig Drummond
03c28a32ba Use smaller text for help text in Tweaks section of preferences dialog.
Issue #1251
2018-04-30 18:11:50 +01:00
Craig Drummond
e729e785f1 For windows, when adding local files (served via internal HTTP server) add
the real file path as a query item.
Issue #1250
2018-04-30 18:00:15 +01:00
Craig Drummond
ed9e60cfbf Better control of playqueue status bar buttons when
contracting/expanding.
2018-04-30 17:56:48 +01:00
Craig Drummond
0fd146e7dd Move scrobling 'love' button into toolbar. Use unfilled heart before loved,
and filled when loved.
Closes #1253
2018-04-30 17:52:19 +01:00
Craig Drummond
ff0f487265 Reduce width of statusbar spacer. 2018-04-30 17:42:03 +01:00
Craig Drummond
e51229d1ed Only sort playlists in folders view, and place these after tracks.
Closes #1258
2018-04-30 17:40:49 +01:00
Craig Drummond
f4a3326761 Set Smart rules 'files added in the last days' limit to 10*365 2018-04-29 22:51:56 +01:00
Craig Drummond
bb42160260 Ensure always return a value for ApiKeys::isLimitReached
Closes #1255
2018-04-29 22:27:27 +01:00
Craig Drummond
b170aa31a3 Update 2018-04-29 22:25:10 +01:00
CraigD
ba9beea798 Merge pull request #1254 from Tichy/patch-23
Fixed a typo in cantata_it.ts
2018-04-29 22:23:41 +01:00
Tichy
f58eb17b3a Fixed a typo
I just found it, but it's too late for 2.3.0. Sorry.
2018-04-27 20:42:46 +02:00
Craig Drummond
738c044337 Adda default to keep compiler happy 2018-04-26 17:44:22 +01:00
Craig Drummond
2932240d0e Make sure we always return something! 2018-04-26 17:43:37 +01:00
Craig Drummond
4bc717477a Mark function as override 2018-04-26 17:38:59 +01:00
Craig Drummond
1a47e0751a Update version for release 2018-04-26 17:24:26 +01:00
Craig Drummond
6d6b6c341a Set toolbar min height 2018-04-26 17:19:40 +01:00
Craig Drummond
a197f5bf4e Update debug 2018-04-25 22:04:20 +01:00
Craig Drummond
d215562a07 Use last index value and total file duration to determine duration of
last track in CUE file.
Issue #1249
2018-04-25 18:50:24 +01:00
Craig Drummond
77822d870e Adjust cover cache maxCost based upon pixel ratio
Closes #1248
2018-04-25 16:34:57 +01:00
Craig Drummond
8ff9019e0b Be more lenient when parsing times from CUE files.
Issue #1249
2018-04-24 22:49:24 +01:00
Craig Drummond
fc076d334e Take fractional part of time into account when calculating durations for
Cue file tracks
Issue #1249
2018-04-24 22:29:25 +01:00
Craig Drummond
f15cd7bedf Add Suru icon for Ubuntu builds. 2018-04-10 18:48:59 +01:00
Craig Drummond
037651ddbc Update Czech translation 2018-04-09 20:09:28 +01:00
Craig Drummond
94bb2b7ac6 Properly handle local files - Use QUrl::fromLocalFile
Closes #1247
2018-04-08 18:23:06 +01:00
Craig Drummond
740ef874c2 Merge branch 'master' of ssh://github.com/CDrummond/cantata 2018-04-08 11:20:39 +01:00
Craig Drummond
859e9049bf XiphComment::pictureList requires taglib>=1.11 2018-04-08 11:20:03 +01:00
Craig Drummond
fb221163b9 Use QDir::rootPath() 2018-04-08 11:15:36 +01:00
CraigD
0345196a66 Merge pull request #1246 from Tichy/patch-22
Added GenericName[it] to .desktop file
2018-04-08 10:45:48 +01:00
Tichy
32e3c6e2ed Update cantata.desktop 2018-04-08 01:09:56 +02:00
Tichy
d7cd24ee61 Added GenericName[it] 2018-04-08 01:06:27 +02:00
Craig Drummond
386c8f596b Fix mac build 2018-04-07 16:00:14 +01:00
Craig Drummond
87b9d568a4 Change include guard - to fix mac build 2018-04-07 15:22:23 +01:00
Craig Drummond
371080015d Add include guards 2018-04-07 15:12:13 +01:00
Craig Drummond
d5cc850532 Explicitly set some widgets to nullptr, as they will be checked later
Issue #1245
2018-04-03 23:17:13 +01:00
Craig Drummond
dd10b528db Update ebur128 copy 2018-04-03 20:00:16 +01:00
Craig Drummond
f747d19e47 Check wwidgets have been constructed. qt5ct work-around causes
controlView to be called before fully initialised
Closes #1244
2018-04-03 19:53:31 +01:00
Craig Drummond
5f843a0a37 For Linux GCC builds, print stack trace on crash. 2018-04-02 23:04:18 +01:00
Craig Drummond
92335d6a0d If QFile::copy() fails, try read + write ?
Issue #1239
2018-04-02 16:39:16 +01:00
Craig Drummond
9aeb6c1e08 More debug, and check file types
Issue #1239
2018-04-02 15:47:51 +01:00
Craig Drummond
4e6d39fd2b Remove debug 2018-04-02 15:33:05 +01:00
Craig Drummond
8a3368cc3b When copying covers to/from devices - also look for 1st image in source
folder
Issue #1239
2018-04-02 14:47:07 +01:00
Craig Drummond
4e1ba8e8e5 Add debug when copying covers 2018-04-02 14:36:02 +01:00
Craig Drummond
3621b5fe9a Fix SSH password prompting under GNOME shell.
Allow SSH passwords to be asked for even if started from commandline.
2018-04-02 12:02:48 +01:00
Craig Drummond
e724584288 Add device name to thread name 2018-04-02 11:19:21 +01:00
Craig Drummond
740abaa235 Add 'all' to debug options 2018-04-02 11:11:10 +01:00
Craig Drummond
3a507f5e9f Update Korean 2018-04-02 10:54:54 +01:00
Craig Drummond
767f40f0ee Fix adding Last.FM API key to URLs
Closes #1242
2018-04-01 20:13:13 +01:00
Craig Drummond
5b7cf0363c Update typos 2018-04-01 19:54:08 +01:00
CraigD
31b573cb65 Merge pull request #1243 from scootergrisen/patch-5
Update cantata_da.ts
2018-04-01 19:49:06 +01:00
CraigD
ac3e31d77e Merge pull request #1241 from scootergrisen/patch-4
Switch Artist and Album
2018-04-01 19:48:52 +01:00
CraigD
60399c4562 Merge pull request #1240 from scootergrisen/patch-3
Double space
2018-04-01 19:47:38 +01:00
CraigD
53c74829ea Merge pull request #1238 from Tichy/patch-21
Update cantata_it.ts
2018-04-01 19:47:26 +01:00
scootergrisen
2cf542f5cd Update cantata_da.ts 2018-04-01 19:17:50 +02:00
scootergrisen
2dc3de7879 Switch Artist and Album 2018-04-01 17:54:15 +02:00
scootergrisen
169f434bc5 Double space 2018-04-01 17:36:30 +02:00
Tichy
327f6d8603 Update cantata_it.ts 2018-04-01 15:20:05 +02:00
Craig Drummond
7d63131af9 Make icon-only sidebar items a little wider 2018-03-25 16:10:26 +01:00
Craig Drummond
431013fd97 Set minimum view width, and don't allow collapsing 2018-03-25 11:38:39 +01:00
Craig Drummond
8eca32de18 Fix setting of sidebar styles
Close #1235
2018-03-24 23:01:29 +00:00
Craig Drummond
abf2d3f5b6 If collapsed and should not be, then uncollapse 2018-03-24 18:32:19 +00:00
Craig Drummond
89df16e6b3 Update 2018-03-24 15:53:43 +00:00
Craig Drummond
0db982a082 Make automatic sidebar view change configurable 2018-03-24 15:43:39 +00:00
Craig Drummond
2bf746665d ...and contro when collapsed 2018-03-24 15:31:24 +00:00
Craig Drummond
f65e6075d7 Play queue buttons in statusbar should be controlled by width of
playqueue, not width of main window
2018-03-24 15:29:28 +00:00
Craig Drummond
5d89f1a9ca Try to make UI responseive to available width. Hide toolbar and
statusbar items in insufficient space. Switch view type when narrow.
2018-03-23 20:12:17 +00:00
Craig Drummond
6d98ffaae2 Fix small side-bar when at top, or bottom. 2018-03-20 19:16:59 +00:00
Craig Drummond
0bde58a9ad Don't use responsive layout for category view 2018-03-20 19:14:20 +00:00
Craig Drummond
3ee9aa2ca7 Change text 2018-03-20 17:26:19 +00:00
Craig Drummond
81dbb634f7 Set minimum size 2018-03-20 17:20:02 +00:00
Craig Drummond
1418b25b16 Update text 2018-03-20 17:16:49 +00:00
Craig Drummond
060ba5bf63 Update translation files 2018-03-19 19:44:20 +00:00
Craig Drummond
2821232eee Show debug areas in commandline help 2018-03-19 19:44:03 +00:00
Craig Drummond
2bfb48460d Update translations 2018-03-18 11:37:16 +00:00
Craig Drummond
a63e2c8ebb Add some help text 2018-03-18 11:37:03 +00:00
Craig Drummond
576db31924 Make links look like links 2018-03-17 11:40:58 +00:00
Craig Drummond
816ad3ae2a Update translations 2018-03-14 22:07:51 +00:00
Craig Drummond
4f92b3dd4c Better wording 2018-03-14 22:07:33 +00:00
Craig Drummond
a7c5f1e6d1 Show wanring if Dirble API monthly limit reached
Closes #1234
2018-03-14 22:05:47 +00:00
Craig Drummond
62316d3f46 Add settings page to configure API keys.
Issue #1234
2018-03-14 20:32:11 +00:00
Craig Drummond
6ad428cf61 Set message box icon size to 64px. 2018-03-13 19:32:42 +00:00
Craig Drummond
4e8b6d0f4b Remove actions from desktop file
Closes #1233
2018-03-13 19:27:29 +00:00
Craig Drummond
8abea637c1 Add current source and binary folders to include paths
Issue #1231
2018-03-10 09:49:01 +00:00
Craig Drummond
fdcc28b4f8 Add current source and binary folders to include paths
Issue #1231
2018-03-10 09:25:24 +00:00
Craig Drummond
f3e341534a setDesktopFilename is only from Qt >= 5.7
Issue #1231
2018-03-10 07:59:37 +00:00
Craig Drummond
46c3b2925b Update translations 2018-03-09 17:41:16 +00:00
Craig Drummond
af02fd2f31 Add more info text 2018-03-09 17:41:02 +00:00
Craig Drummond
5df0a6223f Update 2018-03-09 17:26:26 +00:00
Craig Drummond
f197259101 Merge branch '1224-categorizedview' 2018-03-09 17:25:34 +00:00
Craig Drummond
d9ccfe22df Fix cover refresh when using categorized view 2018-03-09 17:23:56 +00:00
Craig Drummond
3bccb1eebc Add 'last modified' categories 2018-03-09 17:15:42 +00:00
Craig Drummond
7a246e6406 Fade out end of line 2018-03-09 17:09:37 +00:00
Craig Drummond
4f2b005690 Fix adding album tracks when using categorized view 2018-03-09 17:05:06 +00:00
Craig Drummond
d97a923c30 Custom drawer 2018-03-08 22:40:57 +00:00
Craig Drummond
cffb8d6c70 Only allow categized view for albums 2018-03-08 22:32:47 +00:00
Craig Drummond
310a748769 More work on categrized view 2018-03-08 22:29:21 +00:00
Craig Drummond
93133e70b1 Add cat name to map! 2018-03-08 16:20:28 +00:00
Craig Drummond
323fc620da Fix crash when an albums tracks are populated 2018-03-08 16:19:19 +00:00
Craig Drummond
cd5db97b57 If categorizing by artist, no need to show artist under album name 2018-03-07 22:01:43 +00:00
Craig Drummond
2c1d32fe07 If grouping by album name (therefore letter) need to use sort if non
empty
2018-03-07 21:52:07 +00:00
Craig Drummond
1f2e9ebefc Return const reference 2018-03-07 19:23:31 +00:00
Craig Drummond
1829119baa showIndex() TODO 2018-03-07 19:20:51 +00:00
Craig Drummond
1b72aac873 No need to call KCategorizedView::selectionChanged() ?? 2018-03-07 19:20:42 +00:00
Craig Drummond
a2148b2c00 Only uppercase 1st leter when grouping by letter 2018-03-07 19:18:17 +00:00
Craig Drummond
616cdc00dd Merge branch 'master' into 1224-categorizedview 2018-03-07 19:08:59 +00:00
Craig Drummond
c5e7fa9c0d Use AUTOMOC 2018-03-07 19:04:14 +00:00
Craig Drummond
ec79a5de74 Connect listview signals 2018-03-06 22:16:04 +00:00
Craig Drummond
be3dbd973e Call mapToSource 2018-03-06 22:15:52 +00:00
Craig Drummond
5d373644e4 Fix mouse over events 2018-03-06 22:08:58 +00:00
Craig Drummond
d6fd1b4d32 Don't crash if model set to null 2018-03-06 22:00:03 +00:00
Craig Drummond
2ad371d6f9 Allow categorizedview to be responsive 2018-03-06 21:57:29 +00:00
Craig Drummond
98bf56b349 Add zooming to categorizedview 2018-03-06 20:03:34 +00:00
Craig Drummond
6e18028a71 Create own CategorizedView derevied from KCategorizedView 2018-03-06 19:55:24 +00:00
Craig Drummond
bfc9f49374 Create proxy model, and generate categories 2018-03-05 23:21:26 +00:00
Craig Drummond
a337d0a76e Add 'Categorized' to library view types. Currently non-functional... 2018-03-04 22:17:08 +00:00
Craig Drummond
92502ea92e Use qlonglong for Position
Issue #1227
2018-03-01 23:42:28 +00:00
Craig Drummond
37ba533c43 Fix reading of custom cover filename
Closes #1226
2018-03-01 17:04:34 +00:00
Craig Drummond
59f92ec686 Import KCategorizedView from KItemViews 2018-02-28 20:54:01 +00:00
Craig Drummond
578e3624b8 Use same format for notifications as for now playing widget.
Closes #1222
2018-02-25 21:53:46 +00:00
Craig Drummond
0ecdee96b5 Add support for .pls and .xspf playlist to local browse / drag'n'drop
Issue #1218
2018-02-20 23:18:53 +00:00
Craig Drummond
a982982f71 Disable listview for folders views. Local folder browse gets messed up
if the folder its in gets deleted - and I have not time/motivation to
fix. Therefore, to be consistent remove from all folder views.
2018-02-20 17:41:53 +00:00
CraigD
6f1f1c1339 Merge pull request #1216 from Tichy/patch-20
Update cantata_it.ts
2018-02-18 20:57:36 +00:00
Tichy
ca4ec3e51c Update cantata_it.ts 2018-02-18 21:39:25 +01:00
Craig Drummond
7995388194 Update translations 2018-02-18 19:45:09 +00:00
Craig Drummond
7cb2063f34 Allow to specify the max age of files to use in smart playlists.
Issue #1215
2018-02-18 19:42:24 +00:00
Craig Drummond
1eb39795d7 Fix reading of num tracks 2018-02-18 19:26:43 +00:00
Craig Drummond
52105320b4 Add colon at end of label 2018-02-18 19:24:32 +00:00
Craig Drummond
ddd653d9e2 macOS fixes 2018-02-17 15:38:17 +00:00
Craig Drummond
bff2d06fd5 Only update if index changed 2018-02-17 10:13:43 +00:00
Craig Drummond
e2e69363a2 Update 2018-02-16 21:50:47 +00:00
Craig Drummond
e1be48438c Make sidebar change pages on mouse wheel events.
Closes #1214
2018-02-16 21:50:18 +00:00
Craig Drummond
f23b4a9422 Fix small sidebar 2018-02-16 16:46:57 +00:00
Craig Drummond
00e8a3fbb5 Update translations 2018-02-15 21:45:20 +00:00
Craig Drummond
5a0b34f372 Fetch missing covers from iTunes.
Issue #988
2018-02-15 21:19:38 +00:00
Craig Drummond
71aaeb1736 Always fetch artist images - as these are only fetched if artist images
are enabled.
2018-02-15 20:35:03 +00:00
Craig Drummond
10e6524dce Update initial wizard to set cover preferences 2018-02-15 20:30:37 +00:00
Craig Drummond
9b5ca00680 Cleanup some settings. No longer offer to save lyrics, artist images,
and backdrops in MPD folder, just save in cache dir. Move cover setting
into interface settings - in a new 'Covers' tab.
2018-02-15 20:18:08 +00:00
Craig Drummond
7187103c13 Disable metrolyrics, parsing code is broken - and have no
time/motivation to fix.
Closes #1213
2018-02-15 18:10:15 +00:00
Craig Drummond
51fd940033 Remove lyricstime.com and seeklyrics.com - no longer available?
Closes #1212
2018-02-15 18:02:16 +00:00
Craig Drummond
63ab3d6df9 Set selector text colour 2018-02-14 22:25:22 +00:00
Craig Drummond
e496c99989 And more text... 2018-02-14 18:05:42 +00:00
Craig Drummond
a559a9d88f Add information text to views when these would otherwise be blank. 2018-02-14 18:04:15 +00:00
Craig Drummond
c1d85c28d6 Update 2018-02-14 17:48:14 +00:00
Craig Drummond
d0c1932850 Fix deleting of smart playlists. 2018-02-14 17:47:29 +00:00
Craig Drummond
0907644ebc Center images and header 2018-02-14 17:45:47 +00:00
Craig Drummond
f9da37f2e7 Fix reading embedded lyrics
Issue #1211
2018-02-14 17:43:29 +00:00
Craig Drummond
b23d3089b9 Ensure at least 32x32 2018-02-14 17:41:02 +00:00
Craig Drummond
9ff156961f As well as miking covers take full width, also shrink images if not
enough space
2018-02-14 17:39:57 +00:00
Craig Drummond
10e3578c8a Use QTimer to delay/group updates
Issue #1209
2018-02-14 17:34:40 +00:00
Craig Drummond
cee889a12a Ensure customBackdropFile is not empty 2018-02-14 17:31:15 +00:00
Craig Drummond
73b48c3489 Install 128px icon into cantata's own icon theme folder.
Issue #1206
2018-02-13 22:12:38 +00:00
Craig Drummond
9557f55f45 Set desktop filename 2018-02-13 19:54:51 +00:00
Craig Drummond
76d9e339f0 Fix context view for local files
Closes #1207
2018-02-13 18:54:25 +00:00
Craig Drummond
6b8fe01800 Add option to scale album cover in information view.
Closes #1205
2018-02-13 18:24:33 +00:00
Craig Drummond
c294c75185 "Preferences" menu item should have elipses 2018-02-12 18:35:25 +00:00
Craig Drummond
466f3d68a9 Check pointer 2018-02-12 18:31:42 +00:00
Craig Drummond
a9ee6d3805 Update toolbar cover tooltip when song changes.
Closes #1204
2018-02-12 18:27:28 +00:00
Craig Drummond
e60e5227f7 Use same size cover in titlewidget as in grouped view 2018-02-12 18:21:38 +00:00
Craig Drummond
235f6a945e Simplify 2018-02-12 18:17:07 +00:00
Craig Drummond
17697ad197 Fix layout 2018-02-12 18:14:05 +00:00
Craig Drummond
e0e07a2aec Merge branch 'Tichy-patch-14' 2018-02-10 16:06:07 +00:00
Craig Drummond
bee7f70014 Merge branch 'patch-14' of https://github.com/Tichy/cantata into Tichy-patch-14 2018-02-10 16:05:53 +00:00
Craig Drummond
7a7de7ff0a Fix typos 2018-02-10 16:00:59 +00:00
Craig Drummond
1ea4fcecac Sort dirctories 2018-02-10 15:59:00 +00:00
Craig Drummond
605cc22954 Remove duplicate URLs
Closes #1200
2018-02-10 15:57:42 +00:00
Craig Drummond
e1c0416f4d Better layout 2018-02-10 15:50:40 +00:00
Craig Drummond
b9c15129ab Fix buid with HTTP stream playback disabled
Closes #1199
2018-02-10 15:48:07 +00:00
Tichy
ebf69ce18e Update cantata_it.ts 2018-02-10 16:26:24 +01:00
Craig Drummond
8d5adbf8e7 Add more descriptive tooltips for seach. 2018-02-09 20:16:49 +00:00
Craig Drummond
6f40e36ec9 Merge branch '1173-http-volume' 2018-02-09 20:10:40 +00:00
Craig Drummond
d26e9274fa Update 2018-02-09 20:09:15 +00:00
Craig Drummond
a303313733 Finish(?) HTTP stream volume control
Issue #1173
2018-02-09 20:08:22 +00:00
Craig Drummond
37b113bd93 Add isMuted to HttpStream 2018-02-09 18:09:10 +00:00
CraigD
ffe733bf8d Merge pull request #1198 from padertux/bugfix/fix-tags-build-error
Fix build error
2018-02-09 08:57:38 +00:00
Craig Drummond
6e16ac6f51 Initial work on HTTP volume control. 2018-02-08 21:56:48 +00:00
padertux
2f7c4eba34 Fix build error
If compiled without tag lib support (-DENABLE_TAGLIB=0) cantata does not compile.
2018-02-08 21:43:55 +01:00
Craig Drummond
045f086de5 No need to call QString.replace("/", "_") as Covers::encodeName() does this 2018-02-08 18:32:17 +00:00
Craig Drummond
2f25577699 Check if playlist contains stream urls. http and https checked with
stream fetcher, others are just passed onto MPD.
Issue #1197
2018-02-08 18:24:33 +00:00
Craig Drummond
e5c614e1cd Responsive grid view - flashing fixed? 2018-02-08 16:57:42 +00:00
Craig Drummond
0287b7be79 Control browse action 2018-02-08 16:55:24 +00:00
Craig Drummond
703dd4dfa2 Disable search for local folders - not implemented 2018-02-08 16:49:51 +00:00
Craig Drummond
ee56a7fc58 Update translations 2018-02-07 22:48:25 +00:00
Craig Drummond
9017b5dbc7 Update 2018-02-07 22:47:29 +00:00
Craig Drummond
6208e9ea43 Fix replaygain crash
Closes #1196
2018-02-07 22:38:06 +00:00
Craig Drummond
6a21de75ba Add replaygain - currently crashing 2018-02-07 21:01:52 +00:00
Craig Drummond
87de3efdc1 No need to update MPD if edit local files 2018-02-07 19:49:34 +00:00
Craig Drummond
ce6b9005fe And add tag editor 2018-02-07 19:48:01 +00:00
Craig Drummond
4512fb56a0 Add support for custom actions
Issue #1180
2018-02-07 19:31:08 +00:00
Craig Drummond
6356c8a1aa Merge branch 'master' into 1180-local-fs-browsing 2018-02-07 19:18:29 +00:00
Craig Drummond
ece326a706 Fix reading embedded covers from OGG files.
Closes #1195
2018-02-07 19:14:13 +00:00
Craig Drummond
65c9dbeea4 Merge tag helper debug with main debug 2018-02-07 18:41:47 +00:00
Craig Drummond
ecca4e334d Use correct define! 2018-02-07 18:21:24 +00:00
Craig Drummond
7ff09dfebb TagLib extras not required 2018-02-07 18:20:52 +00:00
Craig Drummond
5c577db07a Add view modes 2018-02-07 17:22:45 +00:00
Craig Drummond
2e690fe083 Merge branch 'master' into 1180-local-fs-browsing 2018-02-06 22:45:32 +00:00
Craig Drummond
a20d712aca Fix loading of covers for Cantata streams
Closes #1191
2018-02-06 22:44:42 +00:00
Craig Drummond
d6c967f729 There is no "file" query item for cantata streams - the path is the file 2018-02-06 22:43:52 +00:00
Craig Drummond
37fa0b540a Only look in cache dir if it exists 2018-02-06 22:26:13 +00:00
Craig Drummond
f1d5e5f82d Use album artist for covers 2018-02-06 22:22:37 +00:00
Craig Drummond
2f66dcf084 Add some actions 2018-02-06 20:48:43 +00:00
Craig Drummond
be209af3d3 Remove debug! 2018-02-06 20:48:34 +00:00
Craig Drummond
64fa127746 Fix reading priority for cantata streams 2018-02-06 20:48:01 +00:00
Craig Drummond
d0254777a5 Support playlists in local browse 2018-02-06 19:38:25 +00:00
Craig Drummond
c5c19afb30 Merge branch 'master' into 1180-local-fs-browsing 2018-02-06 19:23:13 +00:00
Craig Drummond
7470185d82 Support dragging m3u and m3u8 playlists onto playqueue.
Closes #1192
2018-02-06 19:21:37 +00:00
Craig Drummond
3161ce376b Whn grouping byt album and navigate to tracks show "Album by Artist" in
tite widget.
2018-02-06 18:50:25 +00:00
Craig Drummond
b423ff8396 Fix layout 2018-02-06 18:40:23 +00:00
Craig Drummond
49db290cf3 Install event filter on viewport, so that clicks are not lost 2018-02-06 18:38:05 +00:00
Craig Drummond
2eef756266 Don't add year to album name, leads to duplicated year 2018-02-05 20:47:20 +00:00
Craig Drummond
b527afd08e Update ChangeLog 2018-02-05 20:06:21 +00:00
Craig Drummond
b38b25fa6f Tags not needed to serve files? 2018-02-05 20:05:32 +00:00
Craig Drummond
735f28a4a1 Connect actions 2018-02-05 20:02:00 +00:00
Craig Drummond
f21144ac79 Merge branch 'master' into 1180-local-fs-browsing 2018-02-05 19:42:47 +00:00
Craig Drummond
4ecb3058a7 Recurse (up to 5 levels deep) when drag'n'drop folders 2018-02-05 19:41:46 +00:00
Craig Drummond
1a00205163 Fix sub text colour 2018-02-05 19:33:11 +00:00
Craig Drummond
35624fe71d No config 2018-02-05 19:27:32 +00:00
Craig Drummond
5cc447165b Merge branch 'master' into 1180-local-fs-browsing 2018-02-05 19:24:55 +00:00
Craig Drummond
f5a887d717 Use QListView for titlewidget, to balance left and right views 2018-02-05 19:24:02 +00:00
Craig Drummond
e695d49b3a Disable responsive layout - still flickering! 2018-02-05 18:10:36 +00:00
Craig Drummond
f87a1e535a Fix compile 2018-02-05 18:09:46 +00:00
Craig Drummond
b2440cdd29 Initial work on browsing of local filesystem. Drag'n'drop of songs and
folders contining songs works. TODO: Recurse deeper into folders when
drag'n'drop, and make + and |> actions work.
Issue #1180
2018-02-04 20:02:46 +00:00
CraigD
26e9984c10 Merge pull request #1189 from Tichy/patch-12
Update cantata_it.ts
2018-02-04 09:58:32 +00:00
Tichy
1abcfef0b0 Update cantata_it.ts
Some fixes
2018-02-04 02:02:44 +01:00
CraigD
872cdf8e0b Merge pull request #1188 from Tichy/patch-10
Italian translation update
2018-02-03 23:37:16 +00:00
Tichy
3fe86da8b8 Italian translation update 2018-02-03 22:05:26 +01:00
Craig Drummond
ffb39ad2c2 Renable responsive cover view 2018-02-02 21:34:03 +00:00
Craig Drummond
54458285c7 Disable responsive covers for now - causes flickering 2018-02-02 19:19:29 +00:00
Craig Drummond
f7019ce8d2 Don't enable text interaction for toolbar text labels - as this breaks
window dragging via toolbar with Kvantum. Instead, add an action to copy
the info to clipboard. This action can the be assigned a keyboard
shortcut. #1146
2018-02-02 18:47:33 +00:00
Craig Drummond
8650da896c Adjust action icon position based upon dynamic sizing of grid items.
Closes #1186
2018-02-02 17:04:03 +00:00
Craig Drummond
2513869762 If changing from listview to non-listview, goToTop so that header is
reset.
Closes #1185
2018-02-02 16:50:22 +00:00
Craig Drummond
cd84e69380 In folder view, allow to add folders and files at the same time.
Closes #1187
2018-02-02 16:46:20 +00:00
Craig Drummond
b0a0682c5e Sort folder view items, as MPD does not seem to sort playlist names.
Closes #1148
2018-02-02 16:43:54 +00:00
Craig Drummond
3684f3b26d Add option to use 'Original Year' to display and sort albums.
Issue #1177
2018-02-01 19:36:27 +00:00
Craig Drummond
1d7fe019c1 Add original date to playlist table columns. 2018-02-01 19:11:17 +00:00
Craig Drummond
de2793c436 For consistency, place podcast view items in a View menu 2018-02-01 18:10:17 +00:00
Craig Drummond
60270f5eef Support dragging folder of music files onto playqueue.
Closes #1181
2018-01-31 20:09:57 +00:00
Craig Drummond
ecbdd741b1 Add Danish translations to NSI installer 2018-01-31 19:51:32 +00:00
Craig Drummond
a5f5538969 Make track links in context view work with CUE files.
Closes #1179
2018-01-31 18:42:21 +00:00
Craig Drummond
996a9626f3 Work-around Cantata preventing logout under GNOME/KDE if set to minimise
to system tray and main window is open.
Issue #1183
2018-01-31 18:05:05 +00:00
Craig Drummond
c57f8cb7a2 UDev is required for UDisks2
Closes #1175
2018-01-31 17:54:48 +00:00
CraigD
833f271171 Merge pull request #1182 from guillaume-uH57J9/master
Update french translation; Màj la traduction française
2018-01-31 17:52:28 +00:00
guillaume-uH57J9
2f21a0bb04 Update cantata_fr.ts 2018-01-30 22:42:51 +01:00
guillaume-uH57J9
e74a741677 Merge pull request #1 from CDrummond/master
Rebase
2018-01-30 22:15:15 +01:00
Craig Drummond
e219544063 Disable track links in contect view for cue tracks. There's no reliable
way to know if track is in playqueue or not.
Closes #1179
2018-01-29 20:12:30 +00:00
Craig Drummond
600a4197da Re-add option to show menubar under non-GNOME DE's
Closes #1176
2018-01-27 10:20:22 +00:00
Craig Drummond
de5ee0b9d9 Install QtMultimedia required dlls for windows.
Issue #1174
2018-01-26 20:42:19 +00:00
Craig Drummond
ca10b5ff90 Work-around yet more AVCodec API changes
Issue #1172
2018-01-25 16:40:47 +00:00
Craig Drummond
16414fa003 Update copy of ebur128 2018-01-25 14:50:02 +00:00
CraigD
d3be383a24 Merge pull request #1171 from guillaume-uH57J9/master
Lyrics providers update
2018-01-24 22:46:16 +00:00
guillaume-uH57J9
fc322aed3a Remove provides that are not longer available
lyricsbay.com and leoslyrics.com are no longer serving lyrics :-(
Looks like these domains are now serving ads, presumably they have expired and got taken over by advertisers
2018-01-24 23:00:57 +01:00
guillaume-uH57J9
e65876a6da Fetch lyrics using https for more providers
Update URLs for provides that serve lyrics through HTTPS and have a valid certificate
2018-01-24 22:57:21 +01:00
Craig Drummond
cd21f973f7 Update 2018-01-20 10:36:35 +00:00
Craig Drummond
48cd5dd72d Unify action settings text 2018-01-20 10:36:11 +00:00
Craig Drummond
43e59bf01d Adjust horizontal gap between icons in grid view to equal distribute
icons over space.
Issue #1169
2018-01-19 21:49:48 +00:00
Craig Drummond
81f64b86d8 Use nullptr not 0 2018-01-19 18:30:42 +00:00
Craig Drummond
7278b5e9c4 Don't ignore UMS devices just because vendor is Apple
Closes #1167
2018-01-19 18:24:15 +00:00
Craig Drummond
1c7ce20c60 Change text for priority shortcut selection 2018-01-18 07:10:39 +00:00
Craig Drummond
3ea67e19a9 Make more actions shortcut assignable.
Issue #1168
2018-01-17 23:16:56 +00:00
Craig Drummond
bd75fe23f7 Only use lsinfo response parsing to detect non-MPD servers. If this
fails, assume MPD
2018-01-17 23:13:56 +00:00
Craig Drummond
aa8c554601 ...and more 2018-01-16 23:15:08 +00:00
Craig Drummond
38ecccf975 Add more debug
Issue #1167
2018-01-16 23:13:22 +00:00
CraigD
a3be13e89c Merge pull request #1166 from scootergrisen/patch-2
Update cantata_da.ts
2018-01-16 22:58:10 +00:00
scootergrisen
32a977a3ea Update cantata_da.ts 2018-01-16 21:20:25 +01:00
Craig Drummond
9c9a109236 Use 'subCat' when iterating sub-categories.
Issue #1165
2018-01-11 22:29:17 +00:00
Craig Drummond
9eb5bbf8f6 Spelling 2018-01-11 19:18:01 +00:00
Craig Drummond
6ec9e3da91 Add link in server settings page to wiki page on github explaining how
files are accessed

Issue #1163
2018-01-10 19:44:16 +00:00
Craig Drummond
6c37eb45c2 Inherit from QLabel, not BuddyLabel 2018-01-10 19:40:34 +00:00
Craig Drummond
c48f052711 Fix URL clicks in NOTE labels 2018-01-10 18:32:44 +00:00
CraigD
a6098e8ea5 Merge pull request #1164 from padertux/feature/refactor-code
Use clang tidy to modernize code
2018-01-09 19:22:17 +00:00
padertux
d01f915b4a Refactor code to use C++11 nullptr 2018-01-08 23:01:25 +01:00
padertux
c2ee7e5ad8 Refactor code to use C++11 overriding 2018-01-08 22:51:48 +01:00
Craig Drummond
2d1a6e0261 Don't use transparent as view background colour when using image
backgrounds. Causes issues with Kvantum's overlay scrollbars.
2018-01-08 19:41:49 +00:00
Craig Drummond
9d7dea5bde Fix incorrectly added arg() 2018-01-08 18:54:10 +00:00
Craig Drummond
fce42c4c47 Add missing 'configure' option to podcast menu.
Issue #1160
2018-01-08 18:52:42 +00:00
Craig Drummond
5d0b7e7dce Add link to Cantata's issue tracker
Closes #1162
2018-01-08 18:42:27 +00:00
Craig Drummond
13cdbb9728 Some more, minor, updates
Issue #1157
2018-01-08 18:03:31 +00:00
CraigD
39e291b768 Merge pull request #1161 from scootergrisen/patch-2
Create cantata_da.ts
2018-01-08 17:55:36 +00:00
scootergrisen
92da481ed0 Create cantata_da.ts 2018-01-08 11:43:41 +01:00
Craig Drummond
c1cebdaf1b Typo
Issue #1157
2018-01-07 15:11:46 +00:00
Craig Drummond
fb028380fd Fix a couple of typos
Issue #1157
2018-01-05 17:54:24 +00:00
CraigD
805c625fb1 Merge pull request #1156 from scootergrisen/patch-1
Update danish translation
2018-01-05 17:48:55 +00:00
scootergrisen
3b86ca3153 Update danish translation 2018-01-04 22:19:39 +01:00
Craig Drummond
e97fb3d5c0 Sort single tracks by title, track artist, then track number, etc.
Issue #1155
2018-01-02 13:29:56 +00:00
Craig Drummond
1e7318ae0c Don't show track number for single tracks
Issue #1155
2018-01-02 13:29:32 +00:00
Craig Drummond
502554110a Update 2018-01-02 13:21:15 +00:00
Craig Drummond
a42ef608e5 Remove debug line 2018-01-02 11:02:03 +00:00
Craig Drummond
d837f3734c Indicate that 'Single Tracks' field can take a list of paths.
Issue #1155
2018-01-02 10:25:56 +00:00
Craig Drummond
72b744b67b For 'Single Tracks' ignore artist/album sort and music brainz IDs
Issue #1155
2018-01-02 10:18:40 +00:00
Craig Drummond
5ff2238fb7 Don't show year for 'Single Tracks' 2018-01-02 00:05:35 +00:00
Craig Drummond
445d1497ac Update (c) year 2018-01-01 10:11:39 +00:00
Craig Drummond
349d28aa0e Disable AA so that line is only 1 pix - to be consistent with grouped
view.
2018-01-01 09:52:51 +00:00
Craig Drummond
0a3605a9d7 Update 2017-12-31 18:54:36 +00:00
Craig Drummond
059c959eab Move PlayQueueTreeStyle class into source file, as its only used here. 2017-12-31 18:54:11 +00:00
CraigD
7c1fda1605 Merge pull request #1154 from padertux/feature/improve-drop-inidicator-in-table-playqueue
Improve drop indicator in table playqueue
2017-12-31 18:48:42 +00:00
padertux
cd76da1974 Improve drop indicator in table playqueue
In the table play queue the drop indicator is almost not visible when
tracks get moved by drag'n drop. In addition the drop indicator is
only shown in only one column and does not span the whole row. This
change does fix both issues.
2017-12-31 19:06:32 +01:00
Craig Drummond
d619e14312 Update 2017-12-30 17:22:43 +00:00
Craig Drummond
fa2c03912f Label consistency, and update tooltip 2017-12-30 17:22:07 +00:00
Craig Drummond
acdfeaedc3 Spelling 2017-12-30 17:15:37 +00:00
CraigD
3a149e27aa Merge pull request #1153 from padertux/feature/update-german-translation
Update german translation
2017-12-30 17:12:11 +00:00
padertux
bd81d317fe Update german translation 2017-12-30 17:27:53 +01:00
CraigD
0d1e35e5a5 Merge pull request #1152 from Tichy/patch-9
Spelling correction on Italian
2017-12-29 12:04:51 +00:00
Tichy
65ef00b966 Spelling correction on Italian 2017-12-28 20:07:57 +01:00
Craig Drummond
26472b8428 Enable remote (sshfs, samba) device support by default for Linux builds.
Issue #1151
2017-12-28 11:54:35 +00:00
Craig Drummond
c6ee5e12f8 Remove meubar deletion - not required 2017-12-24 21:22:37 +00:00
Craig Drummond
df99826fdd priorty -> priority 2017-12-24 16:37:04 +00:00
Craig Drummond
e20b5c74c4 Remove menubar?
Issue #1147
2017-12-24 15:00:13 +00:00
Craig Drummond
5cea460543 Improve scrollbars with some themes
Issue #1150
2017-12-24 14:57:45 +00:00
CraigD
69a218ece9 Merge pull request #1149 from llimeht/tmp/spelling
Spelling fixes
2017-12-24 13:16:24 +00:00
Stuart Prescott
1c20964aee Spelling fix 'Orignal' 2017-12-24 19:29:24 +11:00
Stuart Prescott
d327a1767f Spelling fix 'Quiting' 2017-12-24 19:24:29 +11:00
Stuart Prescott
f3ede2a42f Spelling fix 'therfore' 2017-12-24 19:23:54 +11:00
Craig Drummond
62e34c0089 Fix IPv6 support
Issue #1148
2017-12-23 17:06:44 +00:00
Craig Drummond
3779d897fa Menubar only used for macOS builds - therefore, no need to check when
calculating collapsed size
2017-12-23 16:58:31 +00:00
CraigD
c9652998a8 Merge pull request #1146 from padertux/feature/make-track-and-artist-selectable
Make track and artist selectable in the NowPlayingWidget
2017-12-20 09:02:21 +00:00
padertux
72caa35ce6 Make track and artist selectable in the NowPlayingWidget 2017-12-19 19:12:30 +01:00
Craig Drummond
b3f3506c0e Store pre-maximised state, so that when size is restored after starting
maximised it is restored to the correct size.
2017-12-18 19:07:46 +00:00
Craig Drummond
450c2a8d9b If starting maxised, then first set default size 2017-12-18 18:35:09 +00:00
Craig Drummond
8ab38995b4 Fix opening Cantata maximized under Windows if the info view is in the
sidebar.
Issue #1137
2017-12-18 13:40:41 +00:00
Craig Drummond
d8d1080504 Fix potential issue with missing covers when switching collections. 2017-12-17 19:47:15 +00:00
Craig Drummond
ff288b8209 Delete albumIdOnlyCoverQuery when changing connection.
Issue #1143
2017-12-17 18:49:57 +00:00
Craig Drummond
f82b984a70 Log track count 2017-12-17 18:46:36 +00:00
Craig Drummond
d1f6a9faec Close DB when reset 2017-12-17 18:45:14 +00:00
Craig Drummond
0bc2809073 Log db filenames 2017-12-17 18:45:05 +00:00
Craig Drummond
5b88776a1c Only bind used values 2017-12-17 17:29:09 +00:00
Craig Drummond
76c68a5887 Don't set album/artist cover song if its empty
Issue #1143
2017-12-17 17:18:31 +00:00
Craig Drummond
2551ec631e More covers debug
Issue #1143
2017-12-17 13:32:12 +00:00
Craig Drummond
6be52581e9 Only show 'Show artist images' when applicable 2017-12-17 13:21:49 +00:00
Craig Drummond
8a7d7ffd02 Add some debug to itemview 2017-12-17 11:22:44 +00:00
Craig Drummond
d2228c50be Add timestamp to all debug messages 2017-12-17 10:21:29 +00:00
Craig Drummond
10d753edec Add an extra line of verbose debug 2017-12-17 10:16:14 +00:00
Craig Drummond
09b47d7c10 Add verbose cover debug
Issue #1143
2017-12-16 23:10:10 +00:00
Craig Drummond
661cb42fd6 Fix limits 2017-12-16 22:46:07 +00:00
Craig Drummond
3a78bb239f Use <= for consistency 2017-12-16 22:45:11 +00:00
Craig Drummond
5d38162236 Adjust library seatch debounce based upon number of tracks in DB.
Issue #1144
2017-12-16 22:43:53 +00:00
Craig Drummond
2a39bf2459 ...and playlists
Issue #1139
2017-12-07 19:13:28 +00:00
Craig Drummond
dc05fbee51 Add filename and path to table stlye playqueue options.
Issue #1139
2017-12-07 19:08:15 +00:00
Craig Drummond
5c629d2ac0 Fix crash due to deleted widget
Issue #1134
2017-12-03 23:27:46 +00:00
Craig Drummond
94f2c7bec2 Revert to foreach
Issue #1136
2017-12-03 23:16:58 +00:00
Craig Drummond
5f0a90998f Use const 2017-12-03 23:10:04 +00:00
Craig Drummond
77edbeca3b Check for http and https when replacing 'Read more' 2017-12-03 20:57:06 +00:00
CraigD
801f91d4e7 Merge pull request #1133 from padertux/bugfix/fix-lastfm-artist-info-link
Fix last.fm artist info presentation
2017-12-03 20:54:29 +00:00
CraigD
5f96139df2 Merge pull request #1135 from Tichy/patch-8
Update italian translation
2017-12-03 20:52:06 +00:00
Tichy
0d934e4968 Update italian translation 2017-12-03 19:12:41 +01:00
padertux
1200343a55 Fix last.fm artist info presentation
The last.fm artist info comes with a "Read more on last.fm" link. This
link is removed in favor of our own link. Due to a change in the url of
the original link the removal did not work anymore so that the link was shown twice.
2017-12-03 14:06:52 +01:00
Craig Drummond
c8b051b4d2 Fix pressed toolbar icon mono colour 2017-12-03 12:01:32 +00:00
Craig Drummond
eaf05fdfeb No icons in kmessage widget 2017-12-03 11:57:20 +00:00
Craig Drummond
281b2636d7 Also add year filtering to playqueue
Issue #1131
2017-12-01 19:12:37 +00:00
Craig Drummond
1cbeee7ce7 Make it possible to filter on year (or range of years) in library search
field.
Issue #1131
2017-12-01 18:57:31 +00:00
Craig Drummond
4da7a9128f Create QSqlQuery, then call prepare
Issue #1130
2017-11-28 22:37:01 +00:00
Craig Drummond
948026d73b Use for(var: list) and not foreach(var, list) 2017-11-27 22:36:53 +00:00
Craig Drummond
a8e6b61951 Fix tab stops 2017-11-27 19:33:16 +00:00
Craig Drummond
612b4f3b4f Update 2017-11-27 19:17:49 +00:00
Craig Drummond
024a7c418a Update translation files 2017-11-26 23:29:28 +00:00
CraigD
5a402be825 Merge pull request #1129 from padertux/fix/fix-overlapping-checkboxes
Fix overlapping checkboxes
2017-11-26 23:28:02 +00:00
Craig Drummond
a8a837b5fd Always set cost when adding pixmap to cache
Issue #1128
2017-11-26 23:24:42 +00:00
padertux
6e0c3f14e1 Fix overlapping checkboxes
The checkboxes in Preferences->Interface->Toolbar were overlapping since
commit c30650adc.
2017-11-26 22:58:55 +01:00
Craig Drummond
7b0e517bef Add command-line options to set debugging and to disable network access.
Issue #1127
2017-11-26 18:16:21 +00:00
Craig Drummond
0e884e3ea0 Add GUI option to control volume step.
Issue #1127
2017-11-26 17:32:51 +00:00
CraigD
2cce7c1c4a Merge pull request #1125 from wolfmanx/mpd-server-rating-message
Proposal for MPD server detection
2017-11-22 19:09:58 +00:00
Wolfgang Scherer
7ff98497c3 forked-daapd does not generate valid play queue IDs 2017-11-20 06:30:36 +01:00
Wolfgang Scherer
c15170c621 Fix setServerType() 2017-11-20 05:36:09 +01:00
Wolfgang Scherer
967efeedf5 Do not use the prefix for member variables 2017-11-20 00:40:50 +01:00
Wolfgang Scherer
7f6ab8ec3f serverInfo.detect() moved to setDetails() 2017-11-19 18:27:14 +01:00
Wolfgang Scherer
3a631b5f09 Server feature detection 2017-11-19 16:49:01 +01:00
Craig Drummond
076b9d502c ...and use small font. 2017-11-18 12:27:50 +00:00
Craig Drummond
a820ca500b Only show samplerate, etc, if we have info 2017-11-18 12:26:31 +00:00
Craig Drummond
2c29d3420a Add checkbox to indicate that server auto-updates when files changed. 2017-11-13 22:36:43 +00:00
CraigD
77d0b1cb78 Merge pull request #1121 from wolfmanx/mpd-server-auto-update
Option to suppress update command after manipulating files
2017-11-13 22:34:01 +00:00
Wolfgang Scherer
9396ddce77 serversettings.ui + translations fixed 2017-11-12 23:28:28 +01:00
Wolfgang Scherer
140909214a Updated some German translations 2017-11-12 08:14:08 +01:00
Wolfgang Scherer
32b8c39359 Allow files as arguments for update.sh 2017-11-12 08:04:13 +01:00
Wolfgang Scherer
3dc1235e1c Option to suppress update command after manipulating files 2017-11-12 07:02:26 +01:00
Craig Drummond
442556980e Update 2017-11-11 19:33:53 +00:00
Craig Drummond
78b36e32fe Update 2017-11-11 19:33:43 +00:00
Craig Drummond
f0d1d7dbf3 Add support for forked-DAAP. 2017-11-11 19:31:50 +00:00
CraigD
c37695c087 Merge pull request #1118 from wolfmanx/forked-daapd-file-prefix
Forked daapd file prefix
2017-11-11 19:31:10 +00:00
Craig Drummond
c30650adc9 Add option to show bitrate, sample rate, and format in toolbar.
Issue #1120
2017-11-11 19:24:46 +00:00
Craig Drummond
dacf12e62d Fix MPRIS length field.
Issue #1119
2017-11-10 23:38:52 +00:00
Wolfgang Scherer
01a4b95593 Adjust trackorganiser for absolute song filenames 2017-11-10 23:54:05 +01:00
Wolfgang Scherer
dcf3f0432b Detect forked-daapd server 2017-11-10 23:51:27 +01:00
Wolfgang Scherer
4ae30dc3e3 Incorrect handling of absolute file names in tag editor fixed 2017-11-10 00:39:12 +01:00
Wolfgang Scherer
cd9c30791f PlayQueue actions "Edit Track Info" and "Locate In Library" fixed for forked-daapd 2017-11-09 20:14:34 +01:00
Wolfgang Scherer
426a47ec90 Some incorrect handling of absolute file names fixed 2017-11-09 07:50:55 +01:00
Wolfgang Scherer
b432c25a51 Support for forked-daapd file names 2017-11-09 07:46:56 +01:00
Craig Drummond
478e5c9571 Merge branch 'master' of ssh://github.com/CDrummond/cantata 2017-11-05 15:59:25 +00:00
Craig Drummond
ccc4ae54ec Remember last loaded/saved playlist name - and use this as the default
name when saving.

Closes #1116
2017-11-05 15:58:47 +00:00
CraigD
8e86625679 Merge pull request #1115 from Tichy/patch-7
Italian locale correction
2017-11-04 18:43:05 +00:00
Tichy
f0e3302a21 Italian locale correction 2017-11-04 17:20:58 +01:00
Craig Drummond
81d5b5b080 Mention Haiku support 2017-11-03 16:21:36 +00:00
CraigD
e82f6cc980 Merge pull request #1114 from miqlas/haiku_support
Haiku supporting patches
2017-11-03 16:20:40 +00:00
Craig Drummond
7b3acd2fb9 Update 2017-11-03 16:19:13 +00:00
Craig Drummond
cf00635632 Add "Add Local Files" to playqueu context menu.
Closes #1112
2017-11-03 16:18:45 +00:00
Craig Drummond
25fd03e847 Check socket, and use deleteLater to delete 2017-11-03 16:17:13 +00:00
Craig Drummond
e7788a9c38 When creating list of streams to allow, decode paths 2017-11-03 16:11:52 +00:00
Craig Drummond
9bbd299bcd Check socket is not null 2017-11-03 16:00:18 +00:00
Zoltán Mizsei
e2aa50632d Install fix. Haiku don't need the svg icons. 2017-11-03 16:45:27 +01:00
Zoltán Mizsei
de04a15cc1 Build fix 2017-11-03 16:34:31 +01:00
Craig Drummond
eb122edffd If dynamic playlists helper does not start, show link to wiki page
detailing perl dependencies.
Closes #1113
2017-11-03 13:41:37 +00:00
Zoltán Mizsei
bbe72b29ad More Haiku integration 2017-11-03 10:24:17 +01:00
Zoltán Mizsei
fc11070aba Haiku supporting patches:
DBUS is not reliable on Haiku and it not needed for basic
functionality.
2017-11-02 20:52:46 +01:00
Craig Drummond
2945e2da38 Qt does not seem to consistently apply the application font under
Windows.
To work-around this, set the application font to that used for a
listview.

Closes #1097 and #1109
2017-10-28 10:56:24 +01:00
Craig Drummond
c14511412d Add screenshot
Issue #1110
2017-10-26 18:54:18 +01:00
CraigD
5f4aeb43fb Merge pull request #1108 from Tichy/patch-6
Update italian translation
2017-10-23 23:05:37 +01:00
Tichy
4fce79e37c Update italian translation 2017-10-23 22:50:47 +02:00
Craig Drummond
d584ece32a Use a combo box for 'Transcode if...' options.
Issue #1107
2017-10-23 18:36:24 +01:00
Craig Drummond
4fb7878a43 If set to only transcode if source is different, or lossless, then only
change extension if song is actually transcoded.
Issue #23
2017-10-23 17:59:57 +01:00
Craig Drummond
cb37cdde72 Merge branch 'master' of ssh://github.com/CDrummond/cantata 2017-10-22 14:36:48 +01:00
CraigD
31bb00be7d Merge pull request #1105 from Tichy/patch-5
Italian translation update
2017-10-22 12:01:59 +01:00
Tichy
cbbd1194a3 Italian translation update 2017-10-22 11:30:30 +02:00
Craig Drummond
f7b92232fd Update 2017-10-21 11:42:52 +01:00
Craig Drummond
4da98f57bf Right align connection status text 2017-10-16 21:04:04 +01:00
Craig Drummond
45bb7b62a7 Increase initial size 2017-10-16 21:03:52 +01:00
Craig Drummond
f10924eb45 Fix missing icon in initial settings wizard 2017-10-16 21:01:22 +01:00
Craig Drummond
7c903051eb Control when custom actions should be enabled. For folder view, it can
only be enabled if files are selected.
2017-10-15 18:42:33 +01:00
Craig Drummond
77ac95dbe5 Add debug to custom actions 2017-10-15 18:37:58 +01:00
Craig Drummond
4c99f1d68c Update 2017-10-15 18:32:42 +01:00
Craig Drummond
8b11d0d305 Add more help text about in-built HTTP server 2017-10-15 18:32:21 +01:00
Craig Drummond
cca99b9c22 Set allowLocalStreaming to false by default 2017-10-15 18:17:29 +01:00
Craig Drummond
cf7939c771 If HTTP streaming enabled, then use this is in preference to direct
access
2017-10-15 18:16:56 +01:00
Craig Drummond
59684c8b72 HTTP server is configurable 2017-10-15 18:16:37 +01:00
CraigD
d23e55ce40 Merge pull request #1100 from horazont/feature/http-disableable
http: make HTTP server support configurable
2017-10-15 17:00:32 +01:00
Craig Drummond
073087c5c2 Update 2017-10-15 16:47:21 +01:00
Craig Drummond
a26562e52d Don't add zoom in / out actions to context menu! 2017-10-15 16:46:59 +01:00
Craig Drummond
92d8a6acfc Make zoom in / out actions configurable
Issue #1092
2017-10-15 16:43:41 +01:00
Craig Drummond
00ad77bb49 Use "Locate In Library / Track" (etc) for locate actions in shortcut
setting page
2017-10-15 16:41:08 +01:00
Craig Drummond
96fc791f10 Add actions to locate artist, album, and track in library
Issue #1098
2017-10-15 16:24:37 +01:00
Craig Drummond
30447a4fd6 More Avahi code style changes 2017-10-15 15:38:40 +01:00
Craig Drummond
900b4b1523 Place Avahi 'Discover...' button at end 2017-10-15 15:20:53 +01:00
Craig Drummond
294d173e7e Small changes to make Avahi code more consistent with rest of code base. 2017-10-15 15:19:27 +01:00
Jonas Wielicki
e4a18332a0 http: make HTTP server support configurable
This allows to configure the local files streaming option
per-connection. It defaults to enabled.
2017-10-15 16:11:42 +02:00
Craig Drummond
dd97ebbbeb Avahi is optional 2017-10-15 14:54:23 +01:00
Craig Drummond
7a7e2b35db Avahi support is a new feature, and adds new strings, therefore next
release needs to be a new minor version - not just patch.
2017-10-15 14:46:11 +01:00
CraigD
9b37c10f51 Merge pull request #1099 from padertux/feature/add-avahi-support
Add avahi support (Issue #955)
2017-10-15 14:43:34 +01:00
padertux
cec4990592 Add avahi support
This commit adds automatic avahi service discovery to Cantata. A new
dialog is added to the initial settings wizard and the settings menu
which lets the user choose the correct host configuration for all MPDs
on the network automatically.

(Issue #955)
2017-10-14 21:12:07 +02:00
Craig Drummond
832d81dd10 Add ability to change grid cover size - Ctrl+ / Ctrl-
Issue #1092
2017-10-08 14:43:23 +01:00
Craig Drummond
08feb064db User MPD support is only non-standard for windows/mac 2017-10-08 13:18:47 +01:00
Craig Drummond
3dbac6feb9 Remove some debug 2017-10-07 12:30:32 +01:00
Craig Drummond
8615282159 Only disable system tray support if org.kde.StatusNotifierWatcher is not
registered when running under Gnome.

Issue #1089
2017-10-04 20:40:48 +01:00
Craig Drummond
8a269e1a97 Change version number for release 2017-09-29 18:56:48 +01:00
Craig Drummond
999c3c68e9 Better minimum height 2017-09-24 20:39:50 +01:00
Craig Drummond
fdd12eaaec When playing MPD's HTTP output, stop backend when MPD is paused.
Issue #1086
2017-09-24 16:51:55 +01:00
Craig Drummond
ecd323ef9f When playing MPD's HTTP output, only ask media backend to start playback
if it is not already playing.

Issue #1086
2017-09-24 09:39:32 +01:00
Craig Drummond
e556640584 Hide menubutton for macOS - its not used. 2017-09-23 10:10:15 +01:00
CraigD
304a34034b Merge pull request #1085 from Tichy/patch-4
Update Italian
2017-09-18 18:29:06 +01:00
Tichy
d0b004ffe7 Update Italian 2017-09-18 18:31:43 +02:00
CraigD
96b2cdca20 Merge pull request #1084 from Takios/master
Improve german translation for stop after current track
2017-09-17 20:48:18 +01:00
Craig Drummond
dbed8a0c8a Update Polish 2017-09-17 20:46:37 +01:00
Fabian Niepelt
7538e998be Improve german translation for stop after current track 2017-09-17 19:38:24 +02:00
Craig Drummond
5e3031743a Revert "Work-around unfocused item vew colours with Kantum"
This reverts commit 526c662dff.
2017-09-10 18:54:50 +01:00
Craig Drummond
526c662dff Work-around unfocused item vew colours with Kantum 2017-09-10 14:47:26 +01:00
Craig Drummond
782a07de1f When using a backdrop for the playqueue initially fill with the base
colour (taking window state into account)
2017-09-09 10:50:35 +01:00
Craig Drummond
aae97159c1 nly enable system tray for Linux if org.kde.StatusNotifierWatcher DBUS
service is registered.
2017-09-08 20:25:20 +01:00
Craig Drummond
cacd4a1540 Mention MPRIS fixes 2017-09-08 20:14:23 +01:00
Craig Drummond
0810ec9e5b MPRIS: Fix updating of can go next/previous 2017-09-08 18:59:11 +01:00
Craig Drummond
9f747a4413 Set correct mpris:trackid
Issue #1082
2017-09-08 18:51:54 +01:00
Craig Drummond
79afc222a0 Fix time slider border 2017-09-07 22:51:08 +01:00
Craig Drummond
216de41d6c Use text colour of toolbar text for toolbar icons 2017-09-07 20:55:02 +01:00
Craig Drummond
96fb1dea50 Add semi-transparent background under progress, incase it is the same
colour as highlight
2017-09-07 20:33:15 +01:00
Craig Drummond
6d5ee052d5 Use toolbutton palette to set text colour 2017-09-06 00:05:52 +01:00
Craig Drummond
c7c2490c7f Type FALC -> FLAC 2017-09-05 19:05:31 +01:00
CraigD
0d3dff133c Merge pull request #1078 from Tichy/patch-2
Typo: FALC -> FLAC
2017-09-05 19:02:01 +01:00
CraigD
36b87da83c Merge pull request #1079 from Tichy/patch-3
Updated italian translation
2017-09-05 19:01:41 +01:00
Tichy
c2c1bbcf09 Updated italian translation 2017-09-05 07:43:11 +02:00
Tichy
4a7e3719e7 Typo: FALC -> FLAC 2017-09-05 07:41:31 +02:00
Craig Drummond
a0dbceeb3d Update Korean translation 2017-09-03 17:31:15 +01:00
Craig Drummond
baf6d4d0b5 Update 2017-09-03 13:36:13 +01:00
Craig Drummond
1f163f9676 Update translations 2017-09-02 20:19:10 +01:00
Craig Drummond
ed094da12b Typo 2017-09-02 20:17:58 +01:00
Craig Drummond
ee8c4be50f To support older GNOME settings daemon installations, if fail to use the
new MediaKeys DBUS interface the use the previous.
2017-09-02 18:01:12 +01:00
Craig Drummond
d34dfc8af2 Disable system-tray icon code for GNOME shell (but not Ubuntu's GNOME
shell session).
2017-09-01 22:57:54 +01:00
Craig Drummond
016daa3f34 Re-add last of custom dpi handling
Issue #1077
2017-08-31 19:19:52 +01:00
Craig Drummond
bea7c210cf Revert "Remove Cantata's high-dpi handling code, this should be done by Qt."
This reverts commit 28df204fc4.

Issue #1077
2017-08-30 19:25:26 +01:00
Craig Drummond
d8ed3cbdba Fix toolbar height calc?
Issue #1076
2017-08-29 20:28:23 +01:00
Craig Drummond
64770cdd1b Spelling! 2017-08-28 19:52:00 +01:00
Craig Drummond
dd83b15cba Formatting 2017-08-27 08:49:15 +01:00
Craig Drummond
35a3ff520c Reduce radious of action highlight 2017-08-26 19:56:57 +01:00
Craig Drummond
0813792ab7 Non-rounded current track highlight 2017-08-26 19:47:29 +01:00
CDrummond
69b9dc59e8 Non-rounded selection 2017-08-26 08:55:42 +01:00
CDrummond
c2ac801b3a Fix sidebar highlight for windows (at least for Windows 10). 2017-08-26 08:47:14 +01:00
Craig Drummond
9bd3c265a6 Only set Qt::AA_EnableHighDpiScaling for Windows builds.
Issue #1073
2017-08-25 22:19:56 +01:00
Craig Drummond
25dc32d5e8 Fix reading ascending/descending 2017-08-22 21:54:09 +01:00
Craig Drummond
fef21fb74e Show ascending/descending 2017-08-22 21:46:50 +01:00
Craig Drummond
c3bb3a50fc Fix getting all songs 2017-08-22 21:42:03 +01:00
Craig Drummond
5933000d46 Add file age to sorts, and add option for ascending or descending 2017-08-22 21:31:46 +01:00
Craig Drummond
f30cbff278 Only set Qt::AA_EnableHighDpiScaling under Linux if
QT_AUTO_SCREEN_SCALE_FACTOR is set and non-zero.
Issues #1063 #1073
2017-08-22 20:17:51 +01:00
CraigD
6f0047293c Merge pull request #1071 from padertux/make-cantata-build
Fix build error
2017-08-20 14:12:51 +01:00
Craig Drummond
a9963ad2b6 Reject HTTP requests which cannot be parsed
Issue #1072
2017-08-20 14:10:34 +01:00
Craig Drummond
8fd108c8a7 Reject HTTP requests that are greater than 32k
Issue #1072
2017-08-20 14:09:46 +01:00
Craig Drummond
7c9bd034c3 Reject HTTP incomming connections quicker if host does not match.
Issue #1072
2017-08-20 14:08:51 +01:00
padertux
99e3f13860 Fix build error 2017-08-19 22:43:19 +02:00
Craig Drummond
2903d7c43b Fix extraction of album names from DB - for use in tag editor and
playlist rules dialogs.
2017-08-19 14:49:38 +01:00
Craig Drummond
399a5fce60 Add device option to only transcode if source is FLAC or WAV (detection
is solely extension based).
Issue #1049
2017-08-19 14:24:11 +01:00
Craig Drummond
b67f681d66 Update german translation 2017-08-19 11:42:40 +01:00
Craig Drummond
7188dea49a Add sort order to smart playlists 2017-08-19 11:41:30 +01:00
Craig Drummond
9ffba0a564 Use em-dash where appropriate
Issue #1064
2017-08-18 22:54:24 +01:00
Craig Drummond
d9dc0593b5 Restrict toolbar to 3.5* font height
Issue #1063
2017-08-18 22:46:50 +01:00
Craig Drummond
ab8c33bfeb Initial implementation of smart playlists. NOT complete!!! 2017-08-18 22:45:18 +01:00
Craig Drummond
dbb4325e40 Only use menubar for macOS builds. 2017-08-18 22:44:21 +01:00
Craig Drummond
cc9468c70d Spelling 2017-08-18 22:33:21 +01:00
CraigD
2906687c8d Merge pull request #1069 from padertux/master
Fix build error
2017-08-18 20:57:50 +01:00
padertux
4f2e690a63 Fix build error 2017-08-18 20:06:59 +02:00
Craig Drummond
471c649daa Rename Dynamic to DynamicPlaylists 2017-08-17 18:05:12 +01:00
Craig Drummond
3bdcbdd022 Update contexts to reflect changed class names 2017-08-17 17:52:51 +01:00
Craig Drummond
9cad4db39d Add 'Say Thanks' button
Issue #1068
2017-08-17 17:12:28 +01:00
Craig Drummond
b381f446aa Fix build error - not sure why my gcc does not complain!
Issue #1067
2017-08-17 16:58:49 +01:00
Craig Drummond
cdf4e4386e Don't try to seek if no song loaded. 2017-08-17 16:57:55 +01:00
Craig Drummond
1198d96360 In playlists page, internet, etc, allo back navigation to go fully back. 2017-08-17 16:54:00 +01:00
Craig Drummond
7432a1d12b If the initial start-up connection fails, try again every .5 second for
a few seconds.
Issue #1037
2017-08-16 20:15:49 +01:00
Craig Drummond
1ece00457a Remove use of processEvents when expanding/collapsing
Issue #1066
2017-08-16 18:44:38 +01:00
Craig Drummond
dc5b95ad85 Remove USE_SYSTEM_MENU_ICON blocks 2017-08-16 18:30:26 +01:00
Craig Drummond
00f0a92d40 Simplify toolbar button size calcs
Issue #1063
2017-08-16 18:28:50 +01:00
Craig Drummond
42bbe81980 Rename some files 2017-08-16 18:16:06 +01:00
Craig Drummond
059b2b82d3 Fix some member initialisations
Issue #1066
2017-08-16 16:59:37 +01:00
Craig Drummond
dbf7554e67 Emit correct state
Dont log error if "stop" fails due to not connected
Issue #1037
2017-08-16 16:55:03 +01:00
Craig Drummond
a778dad230 If an error is to be shown, ensure Cantata is not minimised to system
tray.
Issue #1037
2017-08-16 16:39:48 +01:00
Craig Drummond
b43c4d689b If initial connection fails, inform ui
Issue #1037
2017-08-16 16:38:20 +01:00
Craig Drummond
28df204fc4 Remove Cantata's high-dpi handling code, this should be done by Qt.
Issue #1063
2017-08-15 23:20:18 +01:00
Craig Drummond
3ef49aa27d Revert "Use em-dash where appropriate"
This reverts commit aa41876e0c.
2017-08-15 23:00:26 +01:00
Craig Drummond
aa41876e0c Use em-dash where appropriate
Issue #1064
2017-08-15 22:57:07 +01:00
Craig Drummond
293b824d86 Re-organise playlists code... Still more todo... 2017-08-15 22:42:51 +01:00
Craig Drummond
93722d5cfd Fix desktop detection via XDG_CURRENT_DESKTOP - check for colon
separated values.
2017-08-15 12:34:08 +01:00
Craig Drummond
93f5e89dd5 To support alder GNOME settings daemon installations, revert to the
previous MediaKeys DBUS interface.
Issue #1060
2017-08-15 12:07:57 +01:00
Craig Drummond
54af882cb7 Fix compile 2017-08-15 12:06:42 +01:00
Craig Drummond
bb05708411 Remove unity menu icon work-around. 2017-08-14 22:42:17 +01:00
Craig Drummond
0b18f14089 When adding items with a custom priority, or updating a custom priority,
add option to have this priority decrease with each item.

Issue #1054
2017-08-14 19:42:11 +01:00
Craig Drummond
3e5862c91e Add to changelog: Fix potential issue with priority menu items being
disabled.
Issue #1054
2017-08-13 18:00:30 +01:00
Craig Drummond
08e0a2821d Add option to set application style. 2017-08-12 22:27:58 +01:00
Craig Drummond
23d3da001b Add option to specify number of play queue tracks for dynamic playlists.
Issue #1048
2017-08-12 20:05:15 +01:00
Craig Drummond
cd48d3e979 Separate actions for add and set priority
Issue #1054
2017-08-12 16:54:06 +01:00
Craig Drummond
a82b6d3366 Change version strings for 2.2.0 2017-08-12 16:43:17 +01:00
CraigD
acc4caecab Merge pull request #1052 from kde-freebsd/master
Include ctime for time_t and fix tr() call.
2017-08-12 16:40:18 +01:00
Tobias C. Berner
c3fe888997 Merge pull request #2 from kde-freebsd/stream-backend-fix
Fix QtMultimedia include
2017-08-01 13:08:48 +02:00
Tobias C. Berner
6376d0a1fb Fix QtMultimedia include
Don't include <QtMultimedia/QMediaPlayer> if the VLC backend is used.
2017-08-01 13:02:31 +02:00
Tobias C. Berner
8b825f21c9 Fix tr() call 2017-07-31 23:39:36 +02:00
Tobias C. Berner
31d81357d4 Merge pull request #1 from kde-freebsd/freebsd-build-fix
Include ctime for time_t
2017-07-31 23:36:01 +02:00
Tobias C. Berner
a60e461c08 Include ctime for time_t 2017-07-31 23:25:29 +02:00
816 changed files with 68354 additions and 33027 deletions

30
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@@ -0,0 +1,30 @@
---
name: Bug report
about: Create a report to help us improve
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Version Info**
- OS: [e.g. Linux, macOS, Windows]
- Cantata Version: [e.g. 2.3.2]
- MPD Version: [e.g. 0.20.1]
- CMake options (other than default):
**Additional context**
Add any other context about the problem here.

View File

@@ -0,0 +1,17 @@
---
name: Feature request
about: Suggest an idea for this project
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

File diff suppressed because it is too large Load Diff

View File

@@ -14,7 +14,7 @@ extern "C" {
#define EBUR128_VERSION_MAJOR 1
#define EBUR128_VERSION_MINOR 2
#define EBUR128_VERSION_PATCH 2
#define EBUR128_VERSION_PATCH 4
#include <stddef.h> /* for size_t */
@@ -175,7 +175,7 @@ int ebur128_change_parameters(ebur128_state* st,
/** \brief Set the maximum window duration.
*
* Set the maximum duration that will be used for ebur128_window_loudness().
* Set the maximum duration that will be used for ebur128_loudness_window().
* Note that this destroys the current content of the audio buffer.
*
* @param st library state.

View File

@@ -0,0 +1,15 @@
cmake_minimum_required(VERSION 2.6)
set(KCAT_SOURCES
kcategorizedsortfilterproxymodel.cpp
kcategorizedview.cpp
kcategorydrawer.cpp
)
include_directories( ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${QTINCLUDES} )
add_definitions(-DKITEMVIEWS_NO_DEPRECATED)
ADD_LIBRARY(kcategorizedview STATIC
${KCAT_SOURCES}
)

346
3rdparty/kcategorizedview/COPYING vendored Normal file
View File

@@ -0,0 +1,346 @@
NOTE! The GPL below is copyrighted by the Free Software Foundation, but
the instance of code that it refers to (the kde programs) are copyrighted
by the authors who actually wrote it.
---------------------------------------------------------------------------
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
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 program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19yy name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.

View File

@@ -1,482 +1,510 @@
GNU LIBRARY GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1991 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor
Boston, MA 02110-1301, USA.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the library GPL. It is
numbered 2 because it goes with version 2 of the ordinary GPL.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Library General Public License, applies to some
specially designated Free Software Foundation software, and to any
other libraries whose authors decide to use it. You can use it for
your libraries, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if
you distribute copies of the library, or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link a program with the library, you must provide
complete object files to the recipients so that they can relink them
with the library, after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
Our method of protecting your rights has two steps: (1) copyright
the library, and (2) offer you this license which gives you legal
permission to copy, distribute and/or modify the library.
Also, for each distributor's protection, we want to make certain
that everyone understands that there is no warranty for this free
library. If the library is modified by someone else and passed on, we
want its recipients to know that what they have is not the original
version, so that any problems introduced by others will not reflect on
the original authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that companies distributing free
software will individually obtain patent licenses, thus in effect
transforming the program into proprietary software. To prevent this,
we have made it clear that any patent must be licensed for everyone's
free use or not licensed at all.
Most GNU software, including some libraries, is covered by the ordinary
GNU General Public License, which was designed for utility programs. This
license, the GNU Library General Public License, applies to certain
designated libraries. This license is quite different from the ordinary
one; be sure to read it in full, and don't assume that anything in it is
the same as in the ordinary license.
The reason we have a separate public license for some libraries is that
they blur the distinction we usually make between modifying or adding to a
program and simply using it. Linking a program with a library, without
changing the library, is in some sense simply using the library, and is
analogous to running a utility program or application program. However, in
a textual and legal sense, the linked executable is a combined work, a
derivative of the original library, and the ordinary General Public License
treats it as such.
Because of this blurred distinction, using the ordinary General
Public License for libraries did not effectively promote software
sharing, because most developers did not use the libraries. We
concluded that weaker conditions might promote sharing better.
However, unrestricted linking of non-free programs would deprive the
users of those programs of all benefit from the free status of the
libraries themselves. This Library General Public License is intended to
permit developers of non-free programs to use free libraries, while
preserving your freedom as a user of such programs to change the free
libraries that are incorporated in them. (We have not seen how to achieve
this as regards changes in header files, but we have achieved it as regards
changes in the actual functions of the Library.) The hope is that this
will lead to faster development of free libraries.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, while the latter only
works together with the library.
Note that it is possible for a library to be covered by the ordinary
General Public License rather than by this special one.
GNU LIBRARY GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library which
contains a notice placed by the copyright holder or other authorized
party saying it may be distributed under the terms of this Library
General Public License (also called "this License"). Each licensee is
addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also compile or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
c) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
d) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the source code distributed need not include anything that is normally
distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Library General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).
To apply these terms, attach the following notices to the library. It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations
below.
When we speak of free software, we are referring to freedom of use,
not price. Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.
To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License. We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.
When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.
We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it
becomes a de-facto standard. To achieve this, non-free programs must
be allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software. For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.
Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control
compilation and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run time a
copy of the library already present on the user's computer system,
rather than copying library functions into the executable, and (2)
will operate properly with a modified version of the library, if
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at least
three years, to give the same user the materials specified in
Subsection 6a, above, for a charge no more than the cost of
performing this distribution.
d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply, and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License
may add an explicit geographical distribution limitation excluding those
countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms
of the ordinary General Public License).
To apply these terms, attach the following notices to the library.
It is safest to attach them to the start of each source file to most
effectively convey the exclusion of warranty; and each file should
have at least the "copyright" line and a pointer to where the full
notice is found.
<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or
your school, if any, to sign a "copyright disclaimer" for the library,
if necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James
Random Hacker.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!

View File

@@ -0,0 +1,164 @@
/**
* This file is part of the KDE project
* Copyright (C) 2007 Rafael Fernández López <ereslibre@kde.org>
* Copyright (C) 2007 John Tapsell <tapsell@kde.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#include "kcategorizedsortfilterproxymodel.h"
#include "kcategorizedsortfilterproxymodel_p.h"
#include <QItemSelection>
#include <QStringList>
#include <QSize>
#include <QCollator>
KCategorizedSortFilterProxyModel::KCategorizedSortFilterProxyModel(QObject *parent)
: QSortFilterProxyModel(parent)
, d(new KCategorizedSortFilterProxyModelPrivate())
{
}
KCategorizedSortFilterProxyModel::~KCategorizedSortFilterProxyModel()
{
delete d;
}
void KCategorizedSortFilterProxyModel::sort(int column, Qt::SortOrder order)
{
d->sortColumn = column;
d->sortOrder = order;
QSortFilterProxyModel::sort(column, order);
}
bool KCategorizedSortFilterProxyModel::isCategorizedModel() const
{
return d->categorizedModel;
}
void KCategorizedSortFilterProxyModel::setCategorizedModel(bool categorizedModel)
{
if (categorizedModel == d->categorizedModel) {
return;
}
d->categorizedModel = categorizedModel;
invalidate();
}
int KCategorizedSortFilterProxyModel::sortColumn() const
{
return d->sortColumn;
}
Qt::SortOrder KCategorizedSortFilterProxyModel::sortOrder() const
{
return d->sortOrder;
}
void KCategorizedSortFilterProxyModel::setSortCategoriesByNaturalComparison(bool sortCategoriesByNaturalComparison)
{
if (sortCategoriesByNaturalComparison == d->sortCategoriesByNaturalComparison) {
return;
}
d->sortCategoriesByNaturalComparison = sortCategoriesByNaturalComparison;
invalidate();
}
bool KCategorizedSortFilterProxyModel::sortCategoriesByNaturalComparison() const
{
return d->sortCategoriesByNaturalComparison;
}
/*
#ifndef KITEMVIEWS_NO_DEPRECATED
int KCategorizedSortFilterProxyModel::naturalCompare(const QString &a, const QString &b)
{
QCollator c;
c.setNumericMode(true);
c.setCaseSensitivity(Qt::CaseSensitive);
return c.compare(a, b);
}
#endif
*/
bool KCategorizedSortFilterProxyModel::lessThan(const QModelIndex &left, const QModelIndex &right) const
{
if (d->categorizedModel) {
int compare = compareCategories(left, right);
if (compare > 0) { // left is greater than right
return false;
} else if (compare < 0) { // left is less than right
return true;
}
}
return subSortLessThan(left, right);
}
bool KCategorizedSortFilterProxyModel::subSortLessThan(const QModelIndex &left, const QModelIndex &right) const
{
return QSortFilterProxyModel::lessThan(left, right);
}
int KCategorizedSortFilterProxyModel::compareCategories(const QModelIndex &left, const QModelIndex &right) const
{
QVariant l = (left.model() ? left.model()->data(left, CategorySortRole) : QVariant());
QVariant r = (right.model() ? right.model()->data(right, CategorySortRole) : QVariant());
Q_ASSERT(l.isValid());
Q_ASSERT(r.isValid());
Q_ASSERT(l.type() == r.type());
if (l.type() == QVariant::String) {
QString lstr = l.toString();
QString rstr = r.toString();
if (d->sortCategoriesByNaturalComparison) {
return d->m_collator.compare(lstr, rstr);
} else {
if (lstr < rstr) {
return -1;
}
if (lstr > rstr) {
return 1;
}
return 0;
}
}
qlonglong lint = l.toLongLong();
qlonglong rint = r.toLongLong();
if (lint < rint) {
return -1;
}
if (lint > rint) {
return 1;
}
return 0;
}

View File

@@ -0,0 +1,186 @@
/*
* This file is part of the KDE project
* Copyright (C) 2007 Rafael Fernández López <ereslibre@kde.org>
* Copyright (C) 2007 John Tapsell <tapsell@kde.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef KCATEGORIZEDSORTFILTERPROXYMODEL_H
#define KCATEGORIZEDSORTFILTERPROXYMODEL_H
#include <QSortFilterProxyModel>
//#include <kitemviews_export.h>
class KCategorizedSortFilterProxyModelPrivate;
class QItemSelection;
/**
* @class KCategorizedSortFilterProxyModel kcategorizedsortfilterproxymodel.h KCategorizedSortFilterProxyModel
*
* This class lets you categorize a view. It is meant to be used along with
* KCategorizedView class.
*
* In general terms all you need to do is to reimplement subSortLessThan() and
* compareCategories() methods. In order to make categorization work, you need
* to also call setCategorizedModel() class to enable it, since the categorization
* is disabled by default.
*
* @see KCategorizedView
*
* @author Rafael Fernández López <ereslibre@kde.org>
*/
class /*KITEMVIEWS_EXPORT*/ KCategorizedSortFilterProxyModel
: public QSortFilterProxyModel
{
public:
enum AdditionalRoles {
// Note: use printf "0x%08X\n" $(($RANDOM*$RANDOM))
// to define additional roles.
CategoryDisplayRole = 0x17CE990A, ///< This role is used for asking the category to a given index
CategorySortRole = 0x27857E60 ///< This role is used for sorting categories. You can return a
///< string or a long long value. Strings will be sorted alphabetically
///< while long long will be sorted by their value. Please note that this
///< value won't be shown on the view, is only for sorting purposes. What will
///< be shown as "Category" on the view will be asked with the role
///< CategoryDisplayRole.
};
KCategorizedSortFilterProxyModel(QObject *parent = nullptr);
virtual ~KCategorizedSortFilterProxyModel();
/**
* Overridden from QSortFilterProxyModel. Sorts the source model using
* @p column for the given @p order.
*/
void sort(int column, Qt::SortOrder order = Qt::AscendingOrder) Q_DECL_OVERRIDE;
/**
* @return whether the model is categorized or not. Disabled by default.
*/
bool isCategorizedModel() const;
/**
* Enables or disables the categorization feature.
*
* @param categorizedModel whether to enable or disable the categorization feature.
*/
void setCategorizedModel(bool categorizedModel);
/**
* @return the column being used for sorting.
*/
int sortColumn() const;
/**
* @return the sort order being used for sorting.
*/
Qt::SortOrder sortOrder() const;
/**
* Set if the sorting using CategorySortRole will use a natural comparison
* in the case that strings were returned. If enabled, QCollator
* will be used for sorting.
*
* @param sortCategoriesByNaturalComparison whether to sort using a natural comparison or not.
*/
void setSortCategoriesByNaturalComparison(bool sortCategoriesByNaturalComparison);
/**
* @return whether it is being used a natural comparison for sorting. Enabled by default.
*/
bool sortCategoriesByNaturalComparison() const;
/**
* Does a natural comparing of the strings. A negative value is returned if \a a
* is smaller than \a b. A positive value is returned if \a a is greater than \a b. 0
* is returned if both values are equal.
* @deprecated
* Use QCollator instead.
*/
/*
#ifndef KITEMVIEWS_NO_DEPRECATED
KITEMVIEWS_DEPRECATED static int naturalCompare(const QString &a, const QString &b);
#endif
*/
protected:
/**
* Overridden from QSortFilterProxyModel. If you are subclassing
* KCategorizedSortFilterProxyModel, you will probably not need to reimplement this
* method.
*
* It calls compareCategories() to sort by category. If the both items are in the
* same category (i.e. compareCategories returns 0), then subSortLessThan is called.
*
* @return Returns true if the item @p left is less than the item @p right when sorting.
*
* @warning You usually won't need to reimplement this method when subclassing
* from KCategorizedSortFilterProxyModel.
*/
bool lessThan(const QModelIndex &left, const QModelIndex &right) const Q_DECL_OVERRIDE;
/**
* This method has a similar purpose as lessThan() has on QSortFilterProxyModel.
* It is used for sorting items that are in the same category.
*
* @return Returns true if the item @p left is less than the item @p right when sorting.
*/
virtual bool subSortLessThan(const QModelIndex &left, const QModelIndex &right) const;
/**
* This method compares the category of the @p left index with the category
* of the @p right index.
*
* Internally and if not reimplemented, this method will ask for @p left and
* @p right models for role CategorySortRole. In order to correctly sort
* categories, the data() metod of the model should return a qlonglong (or numeric) value, or
* a QString object. QString objects will be sorted with QString::localeAwareCompare if
* sortCategoriesByNaturalComparison() is true.
*
* @note Please have present that:
* QString(QChar(QChar::ObjectReplacementCharacter)) >
* QString(QChar(QChar::ReplacementCharacter)) >
* [ all possible strings ] >
* QString();
*
* This means that QString() will be sorted the first one, while
* QString(QChar(QChar::ObjectReplacementCharacter)) and
* QString(QChar(QChar::ReplacementCharacter)) will be sorted in last
* position.
*
* @warning Please note that data() method of the model should return always
* information of the same type. If you return a QString for an index,
* you should return always QStrings for all indexes for role CategorySortRole
* in order to correctly sort categories. You can't mix by returning
* a QString for one index, and a qlonglong for other.
*
* @note If you need a more complex layout, you will have to reimplement this
* method.
*
* @return A negative value if the category of @p left should be placed before the
* category of @p right. 0 if @p left and @p right are on the same category, and
* a positive value if the category of @p left should be placed after the
* category of @p right.
*/
virtual int compareCategories(const QModelIndex &left, const QModelIndex &right) const;
private:
KCategorizedSortFilterProxyModelPrivate *const d;
};
#endif // KCATEGORIZEDSORTFILTERPROXYMODEL_H

View File

@@ -0,0 +1,53 @@
/**
* This file is part of the KDE project
* Copyright (C) 2007 Rafael Fernández López <ereslibre@kde.org>
* Copyright (C) 2007 John Tapsell <tapsell@kde.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef KCATEGORIZEDSORTFILTERPROXYMODEL_P_H
#define KCATEGORIZEDSORTFILTERPROXYMODEL_P_H
#include <QtCore/QCollator>
#include "kcategorizedsortfilterproxymodel.h"
class KCategorizedSortFilterProxyModelPrivate
{
public:
KCategorizedSortFilterProxyModelPrivate()
: sortColumn(0)
, sortOrder(Qt::AscendingOrder)
, categorizedModel(false)
, sortCategoriesByNaturalComparison(true)
{
m_collator.setNumericMode(true);
m_collator.setCaseSensitivity(Qt::CaseSensitive);
}
~KCategorizedSortFilterProxyModelPrivate()
{
}
int sortColumn;
Qt::SortOrder sortOrder;
bool categorizedModel;
bool sortCategoriesByNaturalComparison;
QCollator m_collator;
};
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,349 @@
/**
* This file is part of the KDE project
* Copyright (C) 2007, 2009 Rafael Fernández López <ereslibre@kde.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef KCATEGORIZEDVIEW_H
#define KCATEGORIZEDVIEW_H
#include <QListView>
//#include <kitemviews_export.h>
class KCategoryDrawer;
/**
* @class KCategorizedView kcategorizedview.h KCategorizedView
*
* @short Item view for listing items in a categorized fashion optionally
*
* KCategorizedView basically has the same functionality as QListView, only that it also lets you
* layout items in a way that they are categorized visually.
*
* For it to work you will need to set a KCategorizedSortFilterProxyModel and a KCategoryDrawer
* with methods setModel() and setCategoryDrawer() respectively. Also, the model will need to be
* flagged as categorized with KCategorizedSortFilterProxyModel::setCategorizedModel(true).
*
* The way it works (if categorization enabled):
*
* - When sorting, it does more things than QListView does. It will ask the model for the
* special role CategorySortRole (@see KCategorizedSortFilterProxyModel). This can return
* a QString or an int in order to tell the view the order of categories. In this sense, for
* instance, if we are sorting by name ascending, "A" would be before than "B". If we are
* sorting by size ascending, 512 bytes would be before 1024 bytes. This way categories are
* also sorted.
*
* - When the view has to paint, it will ask the model with the role CategoryDisplayRole
* (@see KCategorizedSortFilterProxyModel). It will for instance return "F" for "foo.pdf" if
* we are sorting by name ascending, or "Small" if a certain item has 100 bytes, for example.
*
* For drawing categories, KCategoryDrawer will be used. You can inherit this class to do your own
* drawing.
*
* @note All examples cited before talk about filesystems and such, but have present that this
* is a completely generic class, and it can be used for whatever your purpose is. For
* instance when talking about animals, you can separate them by "Mammal" and "Oviparous". In
* this very case, for example, the CategorySortRole and the CategoryDisplayRole could be the
* same ("Mammal" and "Oviparous").
*
* @note There is a really performance boost if CategorySortRole returns an int instead of a QString.
* Have present that this role is asked (n * log n) times when sorting and compared. Comparing
* ints is always faster than comparing strings, whithout mattering how fast the string
* comparison is. Consider thinking of a way of returning ints instead of QStrings if your
* model can contain a high number of items.
*
* @warning Note that for really drawing items in blocks you will need some things to be done:
* - The model set to this view has to be (or inherit if you want to do special stuff
* in it) KCategorizedSortFilterProxyModel.
* - This model needs to be set setCategorizedModel to true.
* - Set a category drawer by calling setCategoryDrawer.
*
* @see KCategorizedSortFilterProxyModel, KCategoryDrawer
*
* @author Rafael Fernández López <ereslibre@kde.org>
*/
class /*KITEMVIEWS_EXPORT*/ KCategorizedView
: public QListView
{
Q_OBJECT
Q_PROPERTY(int categorySpacing READ categorySpacing WRITE setCategorySpacing)
Q_PROPERTY(bool alternatingBlockColors READ alternatingBlockColors WRITE setAlternatingBlockColors)
Q_PROPERTY(bool collapsibleBlocks READ collapsibleBlocks WRITE setCollapsibleBlocks)
public:
KCategorizedView(QWidget *parent = nullptr);
~KCategorizedView();
/**
* Reimplemented from QAbstractItemView.
*/
void setModel(QAbstractItemModel *model) Q_DECL_OVERRIDE;
/**
* Calls to setGridSizeOwn().
*/
void setGridSize(const QSize &size);
/**
* @warning note that setGridSize is not virtual in the base class (QListView), so if you are
* calling to this method, make sure you have a KCategorizedView pointer around. This
* means that something like:
* @code
* QListView *lv = new KCategorizedView();
* lv->setGridSize(mySize);
* @endcode
*
* will not call to the expected setGridSize method. Instead do something like this:
*
* @code
* QListView *lv;
* ...
* KCategorizedView *cv = qobject_cast<KCategorizedView*>(lv);
* if (cv) {
* cv->setGridSizeOwn(mySize);
* } else {
* lv->setGridSize(mySize);
* }
* @endcode
*
* @note this method will call to QListView::setGridSize among other operations.
*
* @since 4.4
*/
void setGridSizeOwn(const QSize &size);
/**
* Reimplemented from QAbstractItemView.
*/
QRect visualRect(const QModelIndex &index) const Q_DECL_OVERRIDE;
/**
* Returns the current category drawer.
*/
KCategoryDrawer *categoryDrawer() const;
/**
* The category drawer that will be used for drawing categories.
*/
void setCategoryDrawer(KCategoryDrawer *categoryDrawer);
/**
* @return Category spacing. The spacing between categories.
*
* @since 4.4
*/
int categorySpacing() const;
/**
* Stablishes the category spacing. This is the spacing between categories.
*
* @since 4.4
*/
void setCategorySpacing(int categorySpacing);
/**
* @return Whether blocks should be drawn with alternating colors.
*
* @since 4.4
*/
bool alternatingBlockColors() const;
/**
* Sets whether blocks should be drawn with alternating colors.
*
* @since 4.4
*/
void setAlternatingBlockColors(bool enable);
/**
* @return Whether blocks can be collapsed or not.
*
* @since 4.4
*/
bool collapsibleBlocks() const;
/**
* Sets whether blocks can be collapsed or not.
*
* @since 4.4
*/
void setCollapsibleBlocks(bool enable);
/**
* @return Block of indexes that are into @p category.
*
* @since 4.5
*/
QModelIndexList block(const QString &category);
/**
* @return Block of indexes that are represented by @p representative.
*
* @since 4.5
*/
QModelIndexList block(const QModelIndex &representative);
/**
* Reimplemented from QAbstractItemView.
*/
QModelIndex indexAt(const QPoint &point) const Q_DECL_OVERRIDE;
/**
* Reimplemented from QAbstractItemView.
*/
void reset() Q_DECL_OVERRIDE;
protected:
/**
* Reimplemented from QWidget.
*/
void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;
/**
* Reimplemented from QWidget.
*/
void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE;
/**
* Reimplemented from QAbstractItemView.
*/
virtual void setSelection(const QRect &rect,
QItemSelectionModel::SelectionFlags flags) Q_DECL_OVERRIDE;
/**
* Reimplemented from QWidget.
*/
void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
/**
* Reimplemented from QWidget.
*/
void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
/**
* Reimplemented from QWidget.
*/
void mouseReleaseEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
/**
* Reimplemented from QWidget.
*/
void leaveEvent(QEvent *event) Q_DECL_OVERRIDE;
/**
* Reimplemented from QAbstractItemView.
*/
void startDrag(Qt::DropActions supportedActions) Q_DECL_OVERRIDE;
/**
* Reimplemented from QAbstractItemView.
*/
void dragMoveEvent(QDragMoveEvent *event) Q_DECL_OVERRIDE;
/**
* Reimplemented from QAbstractItemView.
*/
void dragEnterEvent(QDragEnterEvent *event) Q_DECL_OVERRIDE;
/**
* Reimplemented from QAbstractItemView.
*/
void dragLeaveEvent(QDragLeaveEvent *event) Q_DECL_OVERRIDE;
/**
* Reimplemented from QAbstractItemView.
*/
void dropEvent(QDropEvent *event) Q_DECL_OVERRIDE;
/**
* Reimplemented from QAbstractItemView.
*/
virtual QModelIndex moveCursor(CursorAction cursorAction,
Qt::KeyboardModifiers modifiers) Q_DECL_OVERRIDE;
/**
* Reimplemented from QAbstractItemView.
*/
virtual void rowsAboutToBeRemoved(const QModelIndex &parent,
int start,
int end) Q_DECL_OVERRIDE;
/**
* Reimplemented from QAbstractItemView.
*/
void updateGeometries() Q_DECL_OVERRIDE;
/**
* Reimplemented from QAbstractItemView.
*/
virtual void currentChanged(const QModelIndex &current,
const QModelIndex &previous) Q_DECL_OVERRIDE;
/**
* Reimplemented from QAbstractItemView.
*/
virtual void dataChanged(const QModelIndex &topLeft,
const QModelIndex &bottomRight,
const QVector<int> &roles = QVector<int>()) Q_DECL_OVERRIDE;
/**
* Reimplemented from QAbstractItemView.
*/
virtual void rowsInserted(const QModelIndex &parent,
int start,
int end) Q_DECL_OVERRIDE;
protected Q_SLOTS:
/**
* @internal
* @warning Deprecated since 4.4.
*/
/*
#ifndef KITEMVIEWS_NO_DEPRECATED
virtual KITEMVIEWS_DEPRECATED void rowsInsertedArtifficial(const QModelIndex &parent,
int start,
int end);
#endif
*/
/**
* @internal
* @warning Deprecated since 4.4.
*/
/*
#ifndef KITEMVIEWS_NO_DEPRECATED
virtual KITEMVIEWS_DEPRECATED void rowsRemoved(const QModelIndex &parent,
int start,
int end);
#endif
*/
/**
* @internal
* Reposition items as needed.
*/
virtual void slotLayoutChanged();
private:
class Private;
Private *const d;
Q_PRIVATE_SLOT(d, void _k_slotCollapseOrExpandClicked(QModelIndex))
};
#endif // KCATEGORIZEDVIEW_H

View File

@@ -0,0 +1,159 @@
/**
* This file is part of the KDE project
* Copyright (C) 2007, 2009 Rafael Fernández López <ereslibre@kde.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef KCATEGORIZEDVIEW_P_H
#define KCATEGORIZEDVIEW_P_H
#include "kcategorizedview.h"
class KCategorizedSortFilterProxyModel;
class KCategoryDrawer;
class KCategoryDrawerV2;
class KCategoryDrawerV3;
/**
* @internal
*/
class Q_DECL_HIDDEN KCategorizedView::Private
{
public:
struct Block;
struct Item;
Private(KCategorizedView *q);
~Private();
/**
* @return whether this view has all required elements to be categorized.
*/
bool isCategorized() const;
/**
* @return the block rect for the representative @p representative.
*/
QStyleOptionViewItem blockRect(const QModelIndex &representative);
/**
* Returns the first and last element that intersects with rect.
*
* @note see that here we cannot take out items between first and last (as we could
* do with the rubberband).
*
* Complexity: O(log(n)) where n is model()->rowCount().
*/
QPair<QModelIndex, QModelIndex> intersectingIndexesWithRect(const QRect &rect) const;
/**
* Returns the position of the block of @p category.
*
* Complexity: O(n) where n is the number of different categories when the block has been
* marked as in quarantine. O(1) the rest of the times (the vast majority).
*/
QPoint blockPosition(const QString &category);
/**
* Returns the height of the block determined by @p category.
*/
int blockHeight(const QString &category);
/**
* Returns the actual viewport width.
*/
int viewportWidth() const;
/**
* Marks all elements as in quarantine.
*
* Complexity: O(n) where n is model()->rowCount().
*
* @warning this is an expensive operation
*/
void regenerateAllElements();
/**
* Update internal information, and keep sync with the real information that the model contains.
*/
void rowsInserted(const QModelIndex &parent, int start, int end);
/**
* Returns @p rect in viewport terms, taking in count horizontal and vertical offsets.
*/
QRect mapToViewport(const QRect &rect) const;
/**
* Returns @p rect in absolute terms, converted from viewport position.
*/
QRect mapFromViewport(const QRect &rect) const;
/**
* Returns the height of the highest element in last row. This is only applicable if there is
* no grid set and uniformItemSizes is false.
*
* @param block in which block are we searching. Necessary to stop the search if we hit the
* first item in this block.
*/
int highestElementInLastRow(const Block &block) const;
/**
* Returns whether the view has a valid grid size.
*/
bool hasGrid() const;
/**
* Returns the category for the given index.
*/
QString categoryForIndex(const QModelIndex &index) const;
/**
* Updates the visual rect for item when flow is LeftToRight.
*/
void leftToRightVisualRect(const QModelIndex &index, Item &item,
const Block &block, const QPoint &blockPos) const;
/**
* Updates the visual rect for item when flow is TopToBottom.
* @note we only support viewMode == ListMode in this case.
*/
void topToBottomVisualRect(const QModelIndex &index, Item &item,
const Block &block, const QPoint &blockPos) const;
/**
* Called when expand or collapse has been clicked on the category drawer.
*/
void _k_slotCollapseOrExpandClicked(QModelIndex);
KCategorizedView *q;
KCategorizedSortFilterProxyModel *proxyModel;
KCategoryDrawer *categoryDrawer;
int categorySpacing;
bool alternatingBlockColors;
bool collapsibleBlocks;
Block *hoveredBlock;
QString hoveredCategory;
QModelIndex hoveredIndex;
QPoint pressedPosition;
QRect rubberBandRect;
QHash<QString, Block> blocks;
};
#endif // KCATEGORIZEDVIEW_P_H

View File

@@ -0,0 +1,205 @@
/**
* This file is part of the KDE project
* Copyright (C) 2007, 2009 Rafael Fernández López <ereslibre@kde.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#include "kcategorydrawer.h"
#include <QPainter>
#include <QStyleOption>
#include <QApplication>
#include <kcategorizedview.h>
#include <kcategorizedsortfilterproxymodel.h>
class KCategoryDrawerPrivate
{
public:
KCategoryDrawerPrivate(KCategorizedView *view)
: view(view)
{
}
~KCategoryDrawerPrivate()
{
}
KCategorizedView *view;
};
KCategoryDrawer::KCategoryDrawer(KCategorizedView *view)
: QObject(view)
, d(new KCategoryDrawerPrivate(view))
{
}
KCategoryDrawer::~KCategoryDrawer()
{
delete d;
}
void KCategoryDrawer::drawCategory(const QModelIndex &index,
int /*sortRole*/,
const QStyleOption &option,
QPainter *painter) const
{
painter->setRenderHint(QPainter::Antialiasing);
const QString category = index.model()->data(index, KCategorizedSortFilterProxyModel::CategoryDisplayRole).toString();
const QRect optRect = option.rect;
QFont font(QApplication::font());
font.setBold(true);
const QFontMetrics fontMetrics = QFontMetrics(font);
QColor outlineColor = option.palette.text().color();
outlineColor.setAlphaF(0.35);
//BEGIN: top left corner
{
painter->save();
painter->setPen(outlineColor);
const QPointF topLeft(optRect.topLeft());
QRectF arc(topLeft, QSizeF(4, 4));
arc.translate(0.5, 0.5);
painter->drawArc(arc, 1440, 1440);
painter->restore();
}
//END: top left corner
//BEGIN: left vertical line
{
QPoint start(optRect.topLeft());
start.ry() += 3;
QPoint verticalGradBottom(optRect.topLeft());
verticalGradBottom.ry() += fontMetrics.height() + 5;
QLinearGradient gradient(start, verticalGradBottom);
gradient.setColorAt(0, outlineColor);
gradient.setColorAt(1, Qt::transparent);
painter->fillRect(QRect(start, QSize(1, fontMetrics.height() + 5)), gradient);
}
//END: left vertical line
//BEGIN: horizontal line
{
QPoint start(optRect.topLeft());
start.rx() += 3;
QPoint horizontalGradTop(optRect.topLeft());
horizontalGradTop.rx() += optRect.width() - 6;
painter->fillRect(QRect(start, QSize(optRect.width() - 6, 1)), outlineColor);
}
//END: horizontal line
//BEGIN: top right corner
{
painter->save();
painter->setPen(outlineColor);
QPointF topRight(optRect.topRight());
topRight.rx() -= 4;
QRectF arc(topRight, QSizeF(4, 4));
arc.translate(0.5, 0.5);
painter->drawArc(arc, 0, 1440);
painter->restore();
}
//END: top right corner
//BEGIN: right vertical line
{
QPoint start(optRect.topRight());
start.ry() += 3;
QPoint verticalGradBottom(optRect.topRight());
verticalGradBottom.ry() += fontMetrics.height() + 5;
QLinearGradient gradient(start, verticalGradBottom);
gradient.setColorAt(0, outlineColor);
gradient.setColorAt(1, Qt::transparent);
painter->fillRect(QRect(start, QSize(1, fontMetrics.height() + 5)), gradient);
}
//END: right vertical line
//BEGIN: text
{
QRect textRect(option.rect);
textRect.setTop(textRect.top() + 7);
textRect.setLeft(textRect.left() + 7);
textRect.setHeight(fontMetrics.height());
textRect.setRight(textRect.right() - 7);
painter->save();
painter->setFont(font);
QColor penColor(option.palette.text().color());
penColor.setAlphaF(0.6);
painter->setPen(penColor);
painter->drawText(textRect, Qt::AlignLeft | Qt::AlignVCenter, category);
painter->restore();
}
//END: text
}
int KCategoryDrawer::categoryHeight(const QModelIndex &index, const QStyleOption &option) const
{
Q_UNUSED(index);
Q_UNUSED(option)
QFont font(QApplication::font());
font.setBold(true);
QFontMetrics fontMetrics(font);
const int height = fontMetrics.height() + 1 /* 1 pixel-width gradient */
+ 11 /* top and bottom separation */;
return height;
}
int KCategoryDrawer::leftMargin() const
{
return 0;
}
int KCategoryDrawer::rightMargin() const
{
return 0;
}
KCategorizedView *KCategoryDrawer::view() const
{
return d->view;
}
void KCategoryDrawer::mouseButtonPressed(const QModelIndex &, const QRect &, QMouseEvent *event)
{
event->ignore();
}
void KCategoryDrawer::mouseButtonReleased(const QModelIndex &, const QRect &, QMouseEvent *event)
{
event->ignore();
}
void KCategoryDrawer::mouseMoved(const QModelIndex &, const QRect &, QMouseEvent *event)
{
event->ignore();
}
void KCategoryDrawer::mouseButtonDoubleClicked(const QModelIndex &, const QRect &, QMouseEvent *event)
{
event->ignore();
}
void KCategoryDrawer::mouseLeft(const QModelIndex &, const QRect &)
{
}
#include "moc_kcategorydrawer.cpp"

View File

@@ -0,0 +1,186 @@
/**
* This file is part of the KDE project
* Copyright (C) 2007, 2009 Rafael Fernández López <ereslibre@kde.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef KCATEGORYDRAWER_H
#define KCATEGORYDRAWER_H
//#include <kitemviews_export.h>
#include <QtCore/QObject>
#include <QMouseEvent>
class KCategoryDrawerPrivate;
class QPainter;
class QModelIndex;
class QStyleOption;
class KCategorizedView;
/**
* @class KCategoryDrawer kcategorydrawer.h KCategoryDrawer
*
* The category drawing is performed by this class. It also gives information about the category
* height and margins.
*
*/
class /*KITEMVIEWS_EXPORT*/ KCategoryDrawer
: public QObject
{
Q_OBJECT
friend class KCategorizedView;
public:
/*
* Construct a category drawer for a given view
*
* @since 5.0
*/
KCategoryDrawer(KCategorizedView *view);
virtual ~KCategoryDrawer();
/**
* @return The view this category drawer is associated with.
*/
KCategorizedView *view() const;
/**
* This method purpose is to draw a category represented by the given
* @param index with the given @param sortRole sorting role
*
* @note This method will be called one time per category, always with the
* first element in that category
*/
virtual void drawCategory(const QModelIndex &index,
int sortRole,
const QStyleOption &option,
QPainter *painter) const;
/**
* @return The category height for the category representated by index @p index with
* style options @p option.
*/
virtual int categoryHeight(const QModelIndex &index, const QStyleOption &option) const;
/**
* @note 0 by default
*
* @since 4.4
*/
virtual int leftMargin() const;
/**
* @note 0 by default
*
* @since 4.4
*/
virtual int rightMargin() const;
Q_SIGNALS:
/**
* This signal becomes emitted when collapse or expand has been clicked.
*/
void collapseOrExpandClicked(const QModelIndex &index);
/**
* Emit this signal on your subclass implementation to notify that something happened. Usually
* this will be triggered when you have received an event, and its position matched some "hot spot".
*
* You give this action the integer you want, and having connected this signal to your code,
* the connected slot can perform the needed changes (view, model, selection model, delegate...)
*/
void actionRequested(int action, const QModelIndex &index);
protected:
/**
* Method called when the mouse button has been pressed.
*
* @param index The representative index of the block of items.
* @param blockRect The rect occupied by the block of items.
* @param event The mouse event.
*
* @warning You explicitly have to determine whether the event has been accepted or not. You
* have to call event->accept() or event->ignore() at all possible case branches in
* your code.
*/
virtual void mouseButtonPressed(const QModelIndex &index, const QRect &blockRect, QMouseEvent *event);
/**
* Method called when the mouse button has been released.
*
* @param index The representative index of the block of items.
* @param blockRect The rect occupied by the block of items.
* @param event The mouse event.
*
* @warning You explicitly have to determine whether the event has been accepted or not. You
* have to call event->accept() or event->ignore() at all possible case branches in
* your code.
*/
virtual void mouseButtonReleased(const QModelIndex &index, const QRect &blockRect, QMouseEvent *event);
/**
* Method called when the mouse has been moved.
*
* @param index The representative index of the block of items.
* @param blockRect The rect occupied by the block of items.
* @param event The mouse event.
*/
virtual void mouseMoved(const QModelIndex &index, const QRect &blockRect, QMouseEvent *event);
/**
* Method called when the mouse button has been double clicked.
*
* @param index The representative index of the block of items.
* @param blockRect The rect occupied by the block of items.
* @param event The mouse event.
*
* @warning You explicitly have to determine whether the event has been accepted or not. You
* have to call event->accept() or event->ignore() at all possible case branches in
* your code.
*/
virtual void mouseButtonDoubleClicked(const QModelIndex &index, const QRect &blockRect, QMouseEvent *event);
/**
* Method called when the mouse button has left this block.
*
* @param index The representative index of the block of items.
* @param blockRect The rect occupied by the block of items.
*/
virtual void mouseLeft(const QModelIndex &index, const QRect &blockRect);
private:
KCategoryDrawerPrivate *const d;
};
#ifndef KITEMVIEWS_NO_DEPRECATED
/**
* @class KCategoryDrawerV3 kcategorydrawer.h KCategoryDrawer
*
* @deprecated Use KCategoryDrawer instead
*/
/*
class KCategoryDrawerV3 : public KCategoryDrawer
{
public:
KITEMVIEWS_DEPRECATED KCategoryDrawerV3(KCategorizedView *view) : KCategoryDrawer(view) {}
};
*/
#endif
#endif // KCATEGORYDRAWER_H

View File

@@ -1,18 +1,4 @@
cmake_minimum_required(VERSION 2.6)
set(IOCOMPRESSOR-SOURCES
qtiocompressor.cpp
)
set(IOCOMPRESSOR-MOC-HEADERS
qtiocompressor.h
)
QT5_WRAP_CPP(IOCOMPRESSOR-SOURCES-MOC ${IOCOMPRESSOR-MOC-HEADERS})
include_directories(${QTINCLUDES} ${ZLIB_INCLUDE_DIRS})
ADD_LIBRARY(qtiocompressor STATIC
${IOCOMPRESSOR-SOURCES}
${IOCOMPRESSOR-SOURCES-MOC}
)
include_directories(${QTINCLUDES} ${ZLIB_INCLUDE_DIRS} ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
ADD_LIBRARY(qtiocompressor STATIC qtiocompressor.cpp)

View File

@@ -117,7 +117,7 @@ QtIOCompressorPrivate::~QtIOCompressorPrivate()
void QtIOCompressorPrivate::flushZlib(int flushMode)
{
// No input.
zlibStream.next_in = 0;
zlibStream.next_in = nullptr;
zlibStream.avail_in = 0;
int status;
do {
@@ -388,7 +388,7 @@ bool QtIOCompressor::open(OpenMode mode)
if (read) {
d->state = QtIOCompressorPrivate::NotReadFirstByte;
d->zlibStream.avail_in = 0;
d->zlibStream.next_in = 0;
d->zlibStream.next_in = nullptr;
if (d->streamFormat == QtIOCompressor::ZlibFormat) {
status = inflateInit(&d->zlibStream);
} else {
@@ -622,3 +622,5 @@ bool QtIOCompressor::checkGzipSupport(const char * const versionString)
return true;
}
#include "moc_qtiocompressor.cpp"

View File

@@ -72,18 +72,18 @@ class QT_QTIOCOMPRESSOR_EXPORT QtIOCompressor : public QIODevice
public:
enum StreamFormat { ZlibFormat, GzipFormat, RawZipFormat };
QtIOCompressor(QIODevice *device, int compressionLevel = 6, int bufferSize = 65500);
~QtIOCompressor();
~QtIOCompressor() override;
void setStreamFormat(StreamFormat format);
StreamFormat streamFormat() const;
static bool isGzipSupported();
bool isSequential() const;
bool open(OpenMode mode);
void close();
bool isSequential() const override;
bool open(OpenMode mode) override;
void close() override;
void flush();
qint64 bytesAvailable() const;
qint64 bytesAvailable() const override;
protected:
qint64 readData(char * data, qint64 maxSize);
qint64 writeData(const char * data, qint64 maxSize);
qint64 readData(char * data, qint64 maxSize) override;
qint64 writeData(const char * data, qint64 maxSize) override;
private:
static bool checkGzipSupport(const char * const versionString);
QtIOCompressorPrivate *d_ptr;

View File

@@ -7,12 +7,6 @@ set(SINGLEAPP-SOURCES
qtsinglecoreapplication.cpp
)
set(SINGLEAPP-MOC-HEADERS
qtlocalpeer.h
qtsingleapplication.h
qtsinglecoreapplication.h
)
include_directories( ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${QTINCLUDES} )
if(WIN32)
@@ -21,9 +15,6 @@ else()
set(SINGLEAPP-SOURCES ${SINGLEAPP-SOURCES} qtlockedfile_unix.cpp)
endif()
qt5_wrap_cpp(SINGLEAPP-SOURCES-MOC ${SINGLEAPP-MOC-HEADERS})
ADD_LIBRARY(qtsingleapplication STATIC
${SINGLEAPP-SOURCES}
${SINGLEAPP-SOURCES-MOC}
)

View File

@@ -210,3 +210,5 @@ void QtLocalPeer::receiveConnection()
emit messageReceived(uMsg); //### (might take a long time to return)
emit messageReceived(QString::fromUtf8(uMsg));
}
#include "moc_qtlocalpeer.cpp"

View File

@@ -44,6 +44,8 @@
**
****************************************************************************/
#ifndef QTLOCALPEER_H
#define QTLOCALPEER_H
#include <QLocalServer>
#include <QLocalSocket>
@@ -81,3 +83,6 @@ protected:
private:
static const char* ack;
};
#endif

View File

@@ -196,7 +196,7 @@ bool QtLockedFile::unlock()
rmutex = 0;
}
else {
foreach(Qt::HANDLE mutex, rmutexes) {
for (Qt::HANDLE mutex: rmutexes) {
ReleaseMutex(mutex);
CloseHandle(mutex);
}

View File

@@ -367,3 +367,5 @@ void QtSingleApplication::activateWindow()
\obsolete
*/
#include "moc_qtsingleapplication.cpp"

View File

@@ -44,6 +44,8 @@
**
****************************************************************************/
#ifndef QTSA_QTSINGLEAPLICATION_H
#define QTSA_QTSINGLEAPLICATION_H
#include <QApplication>
@@ -109,3 +111,6 @@ private:
QtLocalPeer *peer;
QWidget *actWin;
};
#endif

View File

@@ -167,3 +167,5 @@ QString QtSingleCoreApplication::id() const
\sa sendMessage()
*/
#include "moc_qtsinglecoreapplication.cpp"

View File

@@ -44,6 +44,8 @@
**
****************************************************************************/
#ifndef QTSINGLECOREAPLICATION_H
#define QTSINGLECOREAPLICATION_H
#include <QCoreApplication>
@@ -75,3 +77,6 @@ Q_SIGNALS:
private:
QtLocalPeer* peer;
};
#endif

View File

@@ -5,10 +5,6 @@ set(QXT-SOURCES
qxtglobalshortcut.cpp
)
set(QXT-MOC-HEADERS
qxtglobalshortcut.h
)
if (NOT WIN32 AND NOT APPLE)
find_package(X11)
include_directories(${X11_INCLUDE_DIR})
@@ -24,9 +20,6 @@ else()
set(QXT-SOURCES ${QXT-SOURCES} qxtglobalshortcut_x11.cpp)
endif()
QT5_WRAP_CPP(QXT-SOURCES-MOC ${QXT-MOC-HEADERS})
ADD_LIBRARY(qxt STATIC
${QXT-SOURCES}
${QXT-SOURCES-MOC}
)

View File

@@ -206,3 +206,5 @@ void QxtGlobalShortcut::setDisabled(bool disabled)
{
qxt_d().enabled = !disabled;
}
#include "moc_qxtglobalshortcut.cpp"

View File

@@ -45,25 +45,10 @@ set(solidlite_LIB_SRCS
backends/shared/rootdevice.cpp
)
set(solidlite_LIB_MOC_HDRS
block.h
deviceinterface.h
devicemanager_p.h
devicenotifier.h
device_p.h
genericinterface.h
portablemediaplayer.h
storageaccess.h
storagedrive.h
opticaldrive.h
storagevolume.h
opticaldisc.h
ifaces/device.h
ifaces/devicemanager.h
backends/shared/rootdevice.h
)
macro_optional_find_package( UDev )
macro_log_feature( UDEV_FOUND "UDev" "UDev support for Solid" "http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html" FALSE "" "Allows Solid to use UDev to provide information about devices on Linux" )
if (NOT WIN32 AND NOT APPLE AND WITH_SOLID_UDISKS2)
find_package( UDev REQUIRED)
macro_log_feature( UDEV_FOUND "UDev" "UDev support for Solid" "http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html" FALSE "" "Allows Solid to use UDev to provide information about devices on Linux" )
endif()
configure_file( config-solid.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-solid.h )
@@ -80,15 +65,6 @@ set(solidlite_LIB_MOC_HDRS
backends/shared/udevqtdevice.cpp
)
set(solidlite_LIB_MOC_HDRS ${solidlite_LIB_MOC_HDRS}
backends/udev/udevblock.h
backends/udev/udevdevice.h
backends/udev/udevdeviceinterface.h
backends/udev/udevgenericinterface.h
backends/udev/udevmanager.h
backends/udev/udevportablemediaplayer.h
backends/shared/udevqt.h
)
# check for media-player-info (runtime-only optional dependency)
set(XDG_DATA_DIRS_ENV $ENV{XDG_DATA_DIRS}) # if(ENV{..}) does not work for me
if(XDG_DATA_DIRS_ENV)
@@ -130,19 +106,6 @@ set(solidlite_LIB_MOC_HDRS
backends/hal/halstorageaccess.cpp
backends/hal/halstorage.cpp
backends/hal/halvolume.cpp
)
set(solidlite_LIB_MOC_HDRS ${solidlite_LIB_MOC_HDRS}
backends/hal/halblock.h
backends/hal/halcdrom.h
backends/hal/haldevice.h
backends/hal/haldeviceinterface.h
backends/hal/halgenericinterface.h
backends/hal/halmanager.h
backends/hal/halopticaldisc.h
backends/hal/halportablemediaplayer.h
backends/hal/halstorageaccess.h
backends/hal/halstorage.h
backends/hal/halvolume.h
)
# FIXME: this should work on more Unix systems
@@ -164,20 +127,6 @@ set(solidlite_LIB_MOC_HDRS
backends/udisks2/udisksgenericinterface.cpp
backends/udisks2/dbus/manager.cpp
)
set(solidlite_LIB_MOC_HDRS ${solidlite_LIB_MOC_HDRS}
backends/udisks2/udisksblock.h
backends/udisks2/udisksdevicebackend.h
backends/udisks2/udisksdevice.h
backends/udisks2/udisksdeviceinterface.h
backends/udisks2/udisksgenericinterface.h
backends/udisks2/udisksmanager.h
backends/udisks2/udisksopticaldisc.h
backends/udisks2/udisksopticaldrive.h
backends/udisks2/udisksstorageaccess.h
backends/udisks2/udisksstoragedrive.h
backends/udisks2/udisksstoragevolume.h
backends/udisks2/dbus/manager.h
)
else ( )
message(STATUS "Building Solid UDisks backend." )
set(solidlite_LIB_SRCS ${solidlite_LIB_SRCS}
@@ -192,18 +141,6 @@ set(solidlite_LIB_MOC_HDRS
backends/udisks/udisksstorageaccess.cpp
backends/udisks/udisksgenericinterface.cpp
)
set(solidlite_LIB_MOC_HDRS ${solidlite_LIB_MOC_HDRS}
backends/udisks/udisksblock.h
backends/udisks/udisksdevice.h
backends/udisks/udisksdeviceinterface.h
backends/udisks/udisksgenericinterface.h
backends/udisks/udisksopticaldisc.h
backends/udisks/udisksopticaldrive.h
backends/udisks/udisksmanager.h
backends/udisks/udisksstorageaccess.h
backends/udisks/udisksstoragedrive.h
backends/udisks/udisksstoragevolume.h
)
endif ( )
endif ()
@@ -218,12 +155,6 @@ if(APPLE)
backends/iokit/iokitdeviceinterface.cpp
backends/iokit/iokitgenericinterface.cpp
)
set(solidlite_LIB_MOC_HDRS ${solidlite_LIB_MOC_HDRS}
backends/iokit/iokitdevice.h
backends/iokit/iokitdeviceinterface.h
backends/iokit/iokitgenericinterface.h
backends/iokit/iokitmanager.h
)
endif(APPLE)
if(WIN32)
@@ -255,19 +186,6 @@ if(WIN32)
backends/wmi/wmivolume.cpp
)
set(solidlite_LIB_MOC_HDRS ${solidlite_LIB_MOC_HDRS}
backends/wmi/wmiblock.h
backends/wmi/wmicdrom.h
backends/wmi/wmidevice.h
backends/wmi/wmideviceinterface.h
backends/wmi/wmigenericinterface.h
backends/wmi/wmimanager.h
backends/wmi/wmiopticaldisc.h
backends/wmi/wmiportablemediaplayer.h
backends/wmi/wmistorageaccess.h
backends/wmi/wmistorage.h
backends/wmi/wmivolume.h
)
endif()
endif()
@@ -284,9 +202,7 @@ if(APPLE)
set(solidlite_OPTIONAL_LIBS ${IOKIT_LIBRARY})
endif()
QT5_WRAP_CPP(solidlite_LIB_MOC_SRCS ${solidlite_LIB_MOC_HDRS} )
add_library(solidlite ${solidlite_LIB_SRCS} ${solidlite_LIB_MOC_SRCS})
# set_target_properties(solidlite PROPERTIES AUTOMOC TRUE)
add_library(solidlite ${solidlite_LIB_SRCS})
if ( UDEV_FOUND )
set(solidlite_OPTIONAL_LIBS ${solidlite_OPTIONAL_LIBS} ${UDEV_LIBS})

View File

@@ -50,4 +50,4 @@ QString Block::device() const
return m_device->prop("block.device").toString();
}
//#include "backends/hal/halblock.moc"
#include "backends/hal/moc_halblock.cpp"

View File

@@ -37,11 +37,11 @@ class Block : public DeviceInterface, virtual public Solid::Ifaces::Block
public:
Block(HalDevice *device);
virtual ~Block();
~Block() override;
virtual int deviceMajor() const;
virtual int deviceMinor() const;
virtual QString device() const;
int deviceMajor() const override;
int deviceMinor() const override;
QString device() const override;
};
}
}

View File

@@ -174,7 +174,7 @@ bool Solid::Backends::Hal::Cdrom::callSystemEject()
m_process = FstabHandling::callSystemCommand("eject", device,
this, SLOT(slotProcessFinished(int,QProcess::ExitStatus)));
return m_process!=0;
return m_process!=nullptr;
}
void Cdrom::slotDBusReply(const QDBusMessage &/*reply*/)
@@ -215,4 +215,4 @@ void Cdrom::slotEjectDone(int error, const QString &errorString)
emit ejectDone(static_cast<Solid::ErrorType>(error), errorString, m_device->udi());
}
//#include "backends/hal/halcdrom.moc"
#include "backends/hal/moc_halcdrom.cpp"

View File

@@ -42,17 +42,17 @@ class Cdrom : public Storage, virtual public Solid::Ifaces::OpticalDrive
public:
Cdrom(HalDevice *device);
virtual ~Cdrom();
~Cdrom() override;
virtual Solid::OpticalDrive::MediumTypes supportedMedia() const;
virtual int readSpeed() const;
virtual int writeSpeed() const;
virtual QList<int> writeSpeeds() const;
virtual bool eject();
Solid::OpticalDrive::MediumTypes supportedMedia() const override;
int readSpeed() const override;
int writeSpeed() const override;
QList<int> writeSpeeds() const override;
bool eject() override;
Q_SIGNALS:
void ejectPressed(const QString &udi);
void ejectDone(Solid::ErrorType error, QVariant errorData, const QString &udi);
void ejectPressed(const QString &udi) override;
void ejectDone(Solid::ErrorType error, QVariant errorData, const QString &udi) override;
void ejectRequested(const QString &udi);
private Q_SLOTS:

View File

@@ -107,7 +107,7 @@ public:
udi,
"org.freedesktop.Hal.Device",
QDBusConnection::systemBus()),
cacheSynced(false), parent(0) { }
cacheSynced(false), parent(nullptr) { }
void checkCache(const QString &key = QString());
QDBusInterface device;
@@ -447,10 +447,10 @@ bool HalDevice::queryDeviceInterface(const Solid::DeviceInterface::Type &type) c
QObject *HalDevice::createDeviceInterface(const Solid::DeviceInterface::Type &type)
{
if (!queryDeviceInterface(type)) {
return 0;
return nullptr;
}
DeviceInterface *iface = 0;
DeviceInterface *iface = nullptr;
switch (type)
{
@@ -848,4 +848,4 @@ QString HalDevice::volumeDescription() const
return description;
}
//#include "backends/hal/haldevice.moc"
#include "backends/hal/moc_haldevice.cpp"

View File

@@ -47,19 +47,19 @@ class HalDevice : public Solid::Ifaces::Device
public:
HalDevice(const QString &udi);
virtual ~HalDevice();
~HalDevice() override;
virtual QString udi() const;
virtual QString parentUdi() const;
QString udi() const override;
QString parentUdi() const override;
virtual QString vendor() const;
virtual QString product() const;
virtual QString icon() const;
virtual QStringList emblems() const;
virtual QString description() const;
QString vendor() const override;
QString product() const override;
QString icon() const override;
QStringList emblems() const override;
QString description() const override;
virtual bool queryDeviceInterface(const Solid::DeviceInterface::Type &type) const;
virtual QObject *createDeviceInterface(const Solid::DeviceInterface::Type &type);
bool queryDeviceInterface(const Solid::DeviceInterface::Type &type) const override;
QObject *createDeviceInterface(const Solid::DeviceInterface::Type &type) override;
public:
QVariant prop(const QString &key) const;

View File

@@ -31,4 +31,4 @@ DeviceInterface::~DeviceInterface()
{
}
//#include "backends/hal/haldeviceinterface.moc"
#include "backends/hal/moc_haldeviceinterface.cpp"

View File

@@ -39,7 +39,7 @@ class DeviceInterface : public QObject, virtual public Solid::Ifaces::DeviceInte
Q_INTERFACES(Solid::Ifaces::DeviceInterface)
public:
DeviceInterface(HalDevice *device);
virtual ~DeviceInterface();
~DeviceInterface() override;
protected:
HalDevice *m_device;

View File

@@ -181,7 +181,7 @@ QProcess *Solid::Backends::Hal::FstabHandling::callSystemCommand(const QString &
return process;
} else {
delete process;
return 0;
return nullptr;
}
}

View File

@@ -53,4 +53,4 @@ bool GenericInterface::propertyExists(const QString &key) const
return m_device->propertyExists(key);
}
//#include "backends/hal/halgenericinterface.moc"
#include "backends/hal/moc_halgenericinterface.cpp"

View File

@@ -40,15 +40,15 @@ class GenericInterface : public DeviceInterface, virtual public Solid::Ifaces::G
public:
GenericInterface(HalDevice *device);
virtual ~GenericInterface();
~GenericInterface() override;
virtual QVariant property(const QString &key) const;
virtual QMap<QString, QVariant> allProperties() const;
virtual bool propertyExists(const QString &key) const;
QVariant property(const QString &key) const override;
QMap<QString, QVariant> allProperties() const override;
bool propertyExists(const QString &key) const override;
Q_SIGNALS:
void propertyChanged(const QMap<QString,int> &changes);
void conditionRaised(const QString &condition, const QString &reason);
void propertyChanged(const QMap<QString,int> &changes) override;
void conditionRaised(const QString &condition, const QString &reason) override;
};
}
}

View File

@@ -175,7 +175,7 @@ QObject *HalManager::createDevice(const QString &udi)
if (deviceExists(udi)) {
return new HalDevice(udi);
} else {
return 0;
return nullptr;
}
}
@@ -191,4 +191,4 @@ void HalManager::slotDeviceRemoved(const QString &udi)
emit deviceRemoved(udi);
}
//#include "backends/hal/halmanager.moc"
#include "backends/hal/moc_halmanager.cpp"

View File

@@ -41,18 +41,18 @@ class HalManager : public Solid::Ifaces::DeviceManager
public:
HalManager(QObject *parent);
virtual ~HalManager();
~HalManager() override;
virtual QString udiPrefix() const ;
virtual QSet<Solid::DeviceInterface::Type> supportedInterfaces() const;
QString udiPrefix() const override ;
QSet<Solid::DeviceInterface::Type> supportedInterfaces() const override;
bool deviceExists(const QString &udi);
virtual QStringList allDevices();
QStringList allDevices() override;
virtual QStringList devicesFromQuery(const QString &parentUdi,
Solid::DeviceInterface::Type type);
QStringList devicesFromQuery(const QString &parentUdi,
Solid::DeviceInterface::Type type) override;
virtual QObject *createDevice(const QString &udi);
QObject *createDevice(const QString &udi) override;
private Q_SLOTS:
void slotDeviceAdded(const QString &udi);

View File

@@ -155,4 +155,4 @@ qulonglong OpticalDisc::capacity() const
return m_device->prop("volume.disc.capacity").toULongLong();
}
//#include "backends/hal/halopticaldisc.moc"
#include "backends/hal/moc_halopticaldisc.cpp"

View File

@@ -37,14 +37,14 @@ class OpticalDisc : public Volume, virtual public Solid::Ifaces::OpticalDisc
public:
OpticalDisc(HalDevice *device);
virtual ~OpticalDisc();
~OpticalDisc() override;
virtual Solid::OpticalDisc::ContentTypes availableContent() const;
virtual Solid::OpticalDisc::DiscType discType() const;
virtual bool isAppendable() const;
virtual bool isBlank() const;
virtual bool isRewritable() const;
virtual qulonglong capacity() const;
Solid::OpticalDisc::ContentTypes availableContent() const override;
Solid::OpticalDisc::DiscType discType() const override;
bool isAppendable() const override;
bool isBlank() const override;
bool isRewritable() const override;
qulonglong capacity() const override;
};
}
}

View File

@@ -65,4 +65,4 @@ QVariant PortableMediaPlayer::driverHandle(const QString &driver) const
return QVariant();
}
//#include "backends/hal/halportablemediaplayer.moc"
#include "backends/hal/moc_halportablemediaplayer.cpp"

View File

@@ -42,11 +42,11 @@ class PortableMediaPlayer : public DeviceInterface, virtual public Solid::Ifaces
public:
PortableMediaPlayer(HalDevice *device);
virtual ~PortableMediaPlayer();
~PortableMediaPlayer() override;
virtual QStringList supportedProtocols() const;
virtual QStringList supportedDrivers(QString protocol = QString()) const;
virtual QVariant driverHandle(const QString &driver) const;
QStringList supportedProtocols() const override;
QStringList supportedDrivers(QString protocol = QString()) const override;
QVariant driverHandle(const QString &driver) const override;
};
}
}

View File

@@ -120,4 +120,4 @@ qulonglong Storage::size() const
return m_device->prop("storage.size").toULongLong();
}
//#include "backends/hal/halstorage.moc"
#include "backends/hal/moc_halstorage.cpp"

View File

@@ -37,14 +37,14 @@ class Storage : public Block, virtual public Solid::Ifaces::StorageDrive
public:
Storage(HalDevice *device);
virtual ~Storage();
~Storage() override;
virtual Solid::StorageDrive::Bus bus() const;
virtual Solid::StorageDrive::DriveType driveType() const;
Solid::StorageDrive::Bus bus() const override;
Solid::StorageDrive::DriveType driveType() const override;
virtual bool isRemovable() const;
virtual bool isHotpluggable() const;
virtual qulonglong size() const;
bool isRemovable() const override;
bool isHotpluggable() const override;
qulonglong size() const override;
};
}
}

View File

@@ -329,7 +329,7 @@ bool StorageAccess::requestPassphrase()
QWidget *activeWindow = QApplication::activeWindow();
uint wId = 0;
if (activeWindow!=0) {
if (activeWindow!=nullptr) {
wId = (uint)activeWindow->winId();
}
@@ -473,7 +473,7 @@ bool Solid::Backends::Hal::StorageAccess::callSystemMount()
m_process = FstabHandling::callSystemCommand("mount", device,
this, SLOT(slotProcessFinished(int,QProcess::ExitStatus)));
return m_process!=0;
return m_process!=nullptr;
}
bool Solid::Backends::Hal::StorageAccess::callSystemUnmount()
@@ -482,7 +482,7 @@ bool Solid::Backends::Hal::StorageAccess::callSystemUnmount()
m_process = FstabHandling::callSystemCommand("umount", device,
this, SLOT(slotProcessFinished(int,QProcess::ExitStatus)));
return m_process!=0;
return m_process!=nullptr;
}
void StorageAccess::callCryptoSetup(const QString &passphrase)
@@ -513,4 +513,4 @@ bool StorageAccess::callCryptoTeardown()
SLOT(slotDBusError(QDBusError)));
}
//#include "backends/hal/halstorageaccess.moc"
#include "backends/hal/moc_halstorageaccess.cpp"

View File

@@ -42,21 +42,21 @@ class StorageAccess : public DeviceInterface, virtual public Solid::Ifaces::Stor
public:
StorageAccess(HalDevice *device);
virtual ~StorageAccess();
~StorageAccess() override;
virtual bool isAccessible() const;
virtual QString filePath() const;
virtual bool isIgnored() const;
virtual bool setup();
virtual bool teardown();
bool isAccessible() const override;
QString filePath() const override;
bool isIgnored() const override;
bool setup() override;
bool teardown() override;
Q_SIGNALS:
void accessibilityChanged(bool accessible, const QString &udi);
void setupDone(Solid::ErrorType error, QVariant errorData, const QString &udi);
void teardownDone(Solid::ErrorType error, QVariant errorData, const QString &udi);
void accessibilityChanged(bool accessible, const QString &udi) override;
void setupDone(Solid::ErrorType error, QVariant errorData, const QString &udi) override;
void teardownDone(Solid::ErrorType error, QVariant errorData, const QString &udi) override;
void ejectDone(Solid::ErrorType error, QVariant errorData, const QString &udi);
void setupRequested(const QString &udi);
void teardownRequested(const QString &udi);
void setupRequested(const QString &udi) override;
void teardownRequested(const QString &udi) override;
private Q_SLOTS:
void connectDBusSignals();

View File

@@ -120,4 +120,4 @@ QString Solid::Backends::Hal::Volume::encryptedContainerUdi() const
return m_device->prop("volume.crypto_luks.clear.backing_volume").toString();
}
//#include "backends/hal/halvolume.moc"
#include "backends/hal/moc_halvolume.cpp"

View File

@@ -37,15 +37,15 @@ class Volume : public Block, virtual public Solid::Ifaces::StorageVolume
public:
Volume(HalDevice *device);
virtual ~Volume();
~Volume() override;
virtual bool isIgnored() const;
virtual Solid::StorageVolume::UsageType usage() const;
virtual QString fsType() const;
virtual QString label() const;
virtual QString uuid() const;
virtual qulonglong size() const;
virtual QString encryptedContainerUdi() const;
bool isIgnored() const override;
Solid::StorageVolume::UsageType usage() const override;
QString fsType() const override;
QString label() const override;
QString uuid() const override;
qulonglong size() const override;
QString encryptedContainerUdi() const override;
};
}
}

View File

@@ -31,4 +31,4 @@ DeviceInterface::~DeviceInterface()
{
}
//#include "backends/iokit/iokitdeviceinterface.moc"
#include "backends/iokit/moc_iokitdeviceinterface.cpp"

View File

@@ -49,4 +49,4 @@ bool GenericInterface::propertyExists(const QString &key) const
return m_device->propertyExists(key);
}
//#include "backends/iokit/iokitgenericinterface.moc"
#include "backends/iokit/moc_iokitgenericinterface.cpp"

View File

@@ -102,5 +102,5 @@ bool RootDevice::queryDeviceInterface(const Solid::DeviceInterface::Type&) const
QObject* RootDevice::createDeviceInterface(const Solid::DeviceInterface::Type&)
{
return 0;
return nullptr;
}

View File

@@ -39,29 +39,29 @@ class RootDevice : public Solid::Ifaces::Device
public:
explicit RootDevice(const QString &udi, const QString &parentUdi = QString());
virtual ~RootDevice();
~RootDevice() override;
virtual QString udi() const;
virtual QString parentUdi() const;
QString udi() const override;
QString parentUdi() const override;
virtual QString vendor() const;
QString vendor() const override;
void setVendor(const QString &vendor);
virtual QString product() const;
QString product() const override;
void setProduct(const QString &product);
virtual QString icon() const;
QString icon() const override;
void setIcon(const QString &icon);
virtual QStringList emblems() const;
QStringList emblems() const override;
void setEmblems(const QStringList &emblems);
virtual QString description() const;
QString description() const override;
void setDescription(const QString &description);
virtual bool queryDeviceInterface(const Solid::DeviceInterface::Type &type) const;
bool queryDeviceInterface(const Solid::DeviceInterface::Type &type) const override;
virtual QObject *createDeviceInterface(const Solid::DeviceInterface::Type &type);
QObject *createDeviceInterface(const Solid::DeviceInterface::Type &type) override;
private:
QString m_udi;
QString m_parentUdi;

View File

@@ -79,9 +79,9 @@ class Client : public QObject
Q_PROPERTY(QStringList watchedSubsystems READ watchedSubsystems WRITE setWatchedSubsystems)
public:
Client(QObject *parent = 0);
Client(const QStringList &subsystemList, QObject *parent = 0);
~Client();
Client(QObject *parent = nullptr);
Client(const QStringList &subsystemList, QObject *parent = nullptr);
~Client() override;
QStringList watchedSubsystems() const;
void setWatchedSubsystems(const QStringList &subsystemList);

View File

@@ -27,7 +27,7 @@
namespace UdevQt {
ClientPrivate::ClientPrivate(Client *q_)
: udev(0), monitor(0), q(q_), monitorNotifier(0)
: udev(nullptr), monitor(nullptr), q(q_), monitorNotifier(nullptr)
{
}
@@ -68,7 +68,7 @@ void ClientPrivate::setWatchedSubsystems(const QStringList &subsystemList)
QByteArray devType = subsysDevtype.mid(ix + 1).toLatin1();
udev_monitor_filter_add_match_subsystem_devtype(newM, subsystem.constData(), devType.constData());
} else {
udev_monitor_filter_add_match_subsystem_devtype(newM, subsysDevtype.toLatin1().constData(), NULL);
udev_monitor_filter_add_match_subsystem_devtype(newM, subsysDevtype.toLatin1().constData(), nullptr);
}
}
@@ -189,7 +189,7 @@ DeviceList Client::devicesByProperty(const QString &property, const QVariant &va
if (value.isValid()) {
udev_enumerate_add_match_property(en, property.toLatin1().constData(), value.toString().toLatin1().constData());
} else {
udev_enumerate_add_match_property(en, property.toLatin1().constData(), NULL);
udev_enumerate_add_match_property(en, property.toLatin1().constData(), nullptr);
}
return d->deviceListFromEnumerate(en);
@@ -216,7 +216,7 @@ Device Client::deviceByDeviceFile(const QString &deviceFile)
if (stat(deviceFile.toLatin1().constData(), &sb) != 0)
return Device();
struct udev_device *ud = 0;
struct udev_device *ud = nullptr;
if (S_ISBLK(sb.st_mode))
ud = udev_device_new_from_devnum(d->udev, 'b', sb.st_rdev);
@@ -253,4 +253,4 @@ Device Client::deviceBySubsystemAndName(const QString &subsystem, const QString
}
//#include "udevqt.moc"
#include "moc_udevqt.cpp"

View File

@@ -74,7 +74,7 @@ QString DevicePrivate::decodePropertyValue(const QByteArray &encoded) const
}
Device::Device()
: d(0)
: d(nullptr)
{
}
@@ -83,7 +83,7 @@ Device::Device(const Device &other)
if (other.d) {
d = new DevicePrivate(other.d->udev);
} else {
d = 0;
d = nullptr;
}
}
@@ -103,7 +103,7 @@ Device &Device::operator=(const Device &other)
return *this;
if (!other.d) {
delete d;
d = 0;
d = nullptr;
return *this;
}
if (!d) {
@@ -117,7 +117,7 @@ Device &Device::operator=(const Device &other)
bool Device::isValid() const
{
return (d != 0);
return (d != nullptr);
}
QString Device::subsystem() const

View File

@@ -46,4 +46,4 @@ QString Block::device() const
return m_device->property("DEVNAME").toString();
}
//#include "backends/udev/udevblock.moc"
#include "backends/udev/moc_udevblock.cpp"

View File

@@ -38,11 +38,11 @@ class Block : public DeviceInterface, virtual public Solid::Ifaces::Block
public:
Block(UDevDevice *device);
virtual ~Block();
~Block() override;
virtual int deviceMajor() const;
virtual int deviceMinor() const;
virtual QString device() const;
int deviceMajor() const override;
int deviceMinor() const override;
QString device() const override;
};
}
}

View File

@@ -242,7 +242,7 @@ bool UDevDevice::queryDeviceInterface(const Solid::DeviceInterface::Type &type)
QObject *UDevDevice::createDeviceInterface(const Solid::DeviceInterface::Type &type)
{
if (!queryDeviceInterface(type)) {
return 0;
return nullptr;
}
switch (type) {
@@ -278,7 +278,7 @@ QObject *UDevDevice::createDeviceInterface(const Solid::DeviceInterface::Type &t
*/
default:
// qFatal("Shouldn't happen");
return 0;
return nullptr;
}
}

View File

@@ -39,25 +39,25 @@ class UDevDevice : public Solid::Ifaces::Device
public:
UDevDevice(const UdevQt::Device device);
virtual ~UDevDevice();
~UDevDevice() override;
virtual QString udi() const;
QString udi() const override;
virtual QString parentUdi() const;
QString parentUdi() const override;
virtual QString vendor() const;
QString vendor() const override;
virtual QString product() const;
QString product() const override;
virtual QString icon() const;
QString icon() const override;
virtual QStringList emblems() const;
QStringList emblems() const override;
virtual QString description() const;
QString description() const override;
virtual bool queryDeviceInterface(const Solid::DeviceInterface::Type &type) const;
bool queryDeviceInterface(const Solid::DeviceInterface::Type &type) const override;
virtual QObject *createDeviceInterface(const Solid::DeviceInterface::Type &type);
QObject *createDeviceInterface(const Solid::DeviceInterface::Type &type) override;
QString device() const;

View File

@@ -31,4 +31,4 @@ DeviceInterface::~DeviceInterface()
{
}
//#include "backends/udev/udevdeviceinterface.moc"
#include "backends/udev/moc_udevdeviceinterface.cpp"

View File

@@ -39,7 +39,7 @@ class DeviceInterface : public QObject, virtual public Solid::Ifaces::DeviceInte
Q_INTERFACES(Solid::Ifaces::DeviceInterface)
public:
DeviceInterface(UDevDevice *device);
virtual ~DeviceInterface();
~DeviceInterface() override;
protected:
UDevDevice *m_device;

View File

@@ -55,4 +55,4 @@ bool GenericInterface::propertyExists(const QString &key) const
return m_device->propertyExists(key);
}
//#include "backends/udev/udevgenericinterface.moc"
#include "backends/udev/moc_udevgenericinterface.cpp"

View File

@@ -40,15 +40,15 @@ class GenericInterface : public DeviceInterface, virtual public Solid::Ifaces::G
public:
GenericInterface(UDevDevice *device);
virtual ~GenericInterface();
~GenericInterface() override;
virtual QVariant property(const QString &key) const;
virtual QMap<QString, QVariant> allProperties() const;
virtual bool propertyExists(const QString &key) const;
QVariant property(const QString &key) const override;
QMap<QString, QVariant> allProperties() const override;
bool propertyExists(const QString &key) const override;
Q_SIGNALS:
void propertyChanged(const QMap<QString,int> &changes);
void conditionRaised(const QString &condition, const QString &reason);
void propertyChanged(const QMap<QString,int> &changes) override;
void conditionRaised(const QString &condition, const QString &reason) override;
};
}
}

View File

@@ -196,7 +196,7 @@ QObject *UDevManager::createDevice(const QString &udi_)
if (d->isOfInterest(device) || QFile::exists(udi)) {
return new UDevDevice(device);
}
return 0;
return nullptr;
}
void UDevManager::slotDeviceAdded(const UdevQt::Device &device)

View File

@@ -37,17 +37,17 @@ class UDevManager : public Solid::Ifaces::DeviceManager
public:
UDevManager(QObject *parent);
virtual ~UDevManager();
~UDevManager() override;
virtual QString udiPrefix() const;
virtual QSet<Solid::DeviceInterface::Type> supportedInterfaces() const;
QString udiPrefix() const override;
QSet<Solid::DeviceInterface::Type> supportedInterfaces() const override;
virtual QStringList allDevices();
QStringList allDevices() override;
virtual QStringList devicesFromQuery(const QString &parentUdi,
Solid::DeviceInterface::Type type);
QStringList devicesFromQuery(const QString &parentUdi,
Solid::DeviceInterface::Type type) override;
virtual QObject *createDevice(const QString &udi);
QObject *createDevice(const QString &udi) override;
private Q_SLOTS:
void slotDeviceAdded(const UdevQt::Device &device);

View File

@@ -149,4 +149,4 @@ QString PortableMediaPlayer::mediaPlayerInfoFilePath() const
return filename;
}
//#include "backends/udev/udevportablemediaplayer.moc"
#include "backends/udev/moc_udevportablemediaplayer.cpp"

View File

@@ -41,11 +41,11 @@ class PortableMediaPlayer : public DeviceInterface, virtual public Solid::Ifaces
public:
PortableMediaPlayer(UDevDevice *device);
virtual ~PortableMediaPlayer();
~PortableMediaPlayer() override;
virtual QStringList supportedProtocols() const;
virtual QStringList supportedDrivers(QString protocol = QString()) const;
virtual QVariant driverHandle(const QString &driver) const;
QStringList supportedProtocols() const override;
QStringList supportedDrivers(QString protocol = QString()) const override;
QVariant driverHandle(const QString &driver) const override;
private:
/**

View File

@@ -54,4 +54,4 @@ bool GenericInterface::propertyExists(const QString &key) const
return m_device->propertyExists(key);
}
//#include "backends/udisks/udisksgenericinterface.moc"
#include "backends/udisks/moc_udisksgenericinterface.cpp"

View File

@@ -267,4 +267,4 @@ const QStringList &UDisksManager::deviceCache()
}
//#include "backends/udisks/udisksmanager.moc"
#include "backends/udisks/moc_udisksmanager.cpp"

View File

@@ -387,4 +387,4 @@ bool UDisksStorageAccess::callCryptoTeardown(bool actOnParent)
SLOT(slotDBusError(QDBusError)));
}
//#include "backends/udisks/udisksstorageaccess.moc"
#include "backends/udisks/moc_udisksstorageaccess.cpp"

View File

@@ -33,9 +33,9 @@ public:
{ return "org.freedesktop.DBus.ObjectManager"; }
public:
OrgFreedesktopDBusObjectManagerInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0);
OrgFreedesktopDBusObjectManagerInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = nullptr);
~OrgFreedesktopDBusObjectManagerInterface();
~OrgFreedesktopDBusObjectManagerInterface() override;
public Q_SLOTS: // METHODS
inline QDBusPendingReply<DBUSManagerStruct> GetManagedObjects()

View File

@@ -39,11 +39,11 @@ class Block: public DeviceInterface, virtual public Solid::Ifaces::Block
public:
Block(Device *dev);
virtual ~Block();
~Block() override;
virtual QString device() const;
virtual int deviceMinor() const;
virtual int deviceMajor() const;
QString device() const override;
int deviceMinor() const override;
int deviceMajor() const override;
private:
dev_t m_devNum;
QString m_devFile;

View File

@@ -163,10 +163,10 @@ QStringList Device::interfaces() const
QObject* Device::createDeviceInterface(const Solid::DeviceInterface::Type& type)
{
if (!queryDeviceInterface(type)) {
return 0;
return nullptr;
}
DeviceInterface *iface = 0;
DeviceInterface *iface = nullptr;
switch (type)
{
case Solid::DeviceInterface::GenericInterface:

View File

@@ -46,17 +46,17 @@ class Device: public Solid::Ifaces::Device
Q_OBJECT
public:
Device(const QString &udi);
virtual ~Device();
~Device() override;
virtual QObject* createDeviceInterface(const Solid::DeviceInterface::Type& type);
virtual bool queryDeviceInterface(const Solid::DeviceInterface::Type& type) const;
virtual QString description() const;
virtual QStringList emblems() const;
virtual QString icon() const;
virtual QString product() const;
virtual QString vendor() const;
virtual QString udi() const;
virtual QString parentUdi() const;
QObject* createDeviceInterface(const Solid::DeviceInterface::Type& type) override;
bool queryDeviceInterface(const Solid::DeviceInterface::Type& type) const override;
QString description() const override;
QStringList emblems() const override;
QString icon() const override;
QString product() const override;
QString vendor() const override;
QString udi() const override;
QString parentUdi() const override;
QVariant prop(const QString &key) const;
bool propertyExists(const QString &key) const;

View File

@@ -36,7 +36,7 @@ QMap<QString /* UDI */, DeviceBackend*> DeviceBackend::s_backends;
DeviceBackend* DeviceBackend::backendForUDI(const QString& udi, bool create)
{
DeviceBackend *backend = 0;
DeviceBackend *backend = nullptr;
if (udi.isEmpty()) {
return backend;
}

View File

@@ -44,7 +44,7 @@ class DeviceBackend: public QObject {
static void destroyBackend(const QString &udi);
DeviceBackend(const QString &udi);
~DeviceBackend();
~DeviceBackend() override;
QVariant prop(const QString &key) const;
bool propertyExists(const QString &key) const;

View File

@@ -40,7 +40,7 @@ class DeviceInterface : public QObject, virtual public Solid::Ifaces::DeviceInte
Q_INTERFACES(Solid::Ifaces::DeviceInterface)
public:
DeviceInterface(Device *device);
virtual ~DeviceInterface();
~DeviceInterface() override;
protected:
Device *m_device;

View File

@@ -40,15 +40,15 @@ class GenericInterface : public DeviceInterface, virtual public Solid::Ifaces::G
public:
GenericInterface(Device *device);
virtual ~GenericInterface();
~GenericInterface() override;
virtual QVariant property(const QString &key) const;
virtual QVariantMap allProperties() const;
virtual bool propertyExists(const QString &key) const;
QVariant property(const QString &key) const override;
QVariantMap allProperties() const override;
bool propertyExists(const QString &key) const override;
Q_SIGNALS:
void propertyChanged(const QMap<QString, int> &changes);
void conditionRaised(const QString &condition, const QString &reason);
void propertyChanged(const QMap<QString, int> &changes) override;
void conditionRaised(const QString &condition, const QString &reason) override;
};
}
}

View File

@@ -96,7 +96,7 @@ QObject* Manager::createDevice(const QString& udi)
} else if (deviceCache().contains(udi)) {
return new Device(udi);
} else {
return 0;
return nullptr;
}
}

View File

@@ -44,12 +44,12 @@ class Manager: public Solid::Ifaces::DeviceManager
public:
Manager(QObject *parent);
virtual QObject* createDevice(const QString& udi);
virtual QStringList devicesFromQuery(const QString& parentUdi, Solid::DeviceInterface::Type type);
virtual QStringList allDevices();
virtual QSet< Solid::DeviceInterface::Type > supportedInterfaces() const;
virtual QString udiPrefix() const;
virtual ~Manager();
QObject* createDevice(const QString& udi) override;
QStringList devicesFromQuery(const QString& parentUdi, Solid::DeviceInterface::Type type) override;
QStringList allDevices() override;
QSet< Solid::DeviceInterface::Type > supportedInterfaces() const override;
QString udiPrefix() const override;
~Manager() override;
private Q_SLOTS:
void slotInterfacesAdded(const QDBusObjectPath &object_path, const QVariantMapMap &interfaces_and_properties);

View File

@@ -32,6 +32,7 @@
#include "../shared/udevqt.h"
#include "udisks2.h"
#include "udisksdevice.h"
#include "udisksopticaldisc.h"
#include "soliddefs_p.h"

View File

@@ -43,14 +43,14 @@ class OpticalDisc: public StorageVolume, virtual public Solid::Ifaces::OpticalDi
public:
OpticalDisc(Device *dev);
virtual ~OpticalDisc();
~OpticalDisc() override;
virtual qulonglong capacity() const;
virtual bool isRewritable() const;
virtual bool isBlank() const;
virtual bool isAppendable() const;
virtual Solid::OpticalDisc::DiscType discType() const;
virtual Solid::OpticalDisc::ContentTypes availableContent() const;
qulonglong capacity() const override;
bool isRewritable() const override;
bool isBlank() const override;
bool isAppendable() const override;
Solid::OpticalDisc::DiscType discType() const override;
Solid::OpticalDisc::ContentTypes availableContent() const override;
private Q_SLOTS:
void slotDrivePropertiesChanged(const QString & ifaceName, const QVariantMap & changedProps, const QStringList & invalidatedProps);

View File

@@ -39,19 +39,19 @@ class OpticalDrive: public StorageDrive, virtual public Solid::Ifaces::OpticalDr
public:
OpticalDrive(Device *device);
virtual ~OpticalDrive();
~OpticalDrive() override;
Q_SIGNALS:
void ejectPressed(const QString &udi);
void ejectDone(Solid::ErrorType error, QVariant errorData, const QString &udi);
void ejectPressed(const QString &udi) override;
void ejectDone(Solid::ErrorType error, QVariant errorData, const QString &udi) override;
void ejectRequested(const QString &udi);
public:
virtual bool eject();
virtual QList<int> writeSpeeds() const;
virtual int writeSpeed() const;
virtual int readSpeed() const;
virtual Solid::OpticalDrive::MediumTypes supportedMedia() const;
bool eject() override;
QList<int> writeSpeeds() const override;
int writeSpeed() const override;
int readSpeed() const override;
Solid::OpticalDrive::MediumTypes supportedMedia() const override;
private Q_SLOTS:
void slotDBusReply(const QDBusMessage &reply);

View File

@@ -332,7 +332,7 @@ bool StorageAccess::requestPassphrase()
QWidget *activeWindow = QApplication::activeWindow();
uint wId = 0;
if (activeWindow!=0)
if (activeWindow!=nullptr)
wId = (uint)activeWindow->winId();
QString appId = QCoreApplication::applicationName();

View File

@@ -41,20 +41,20 @@ class StorageAccess : public DeviceInterface, virtual public Solid::Ifaces::Stor
public:
StorageAccess(Device *device);
virtual ~StorageAccess();
~StorageAccess() override;
virtual bool isAccessible() const;
virtual QString filePath() const;
virtual bool isIgnored() const;
virtual bool setup();
virtual bool teardown();
bool isAccessible() const override;
QString filePath() const override;
bool isIgnored() const override;
bool setup() override;
bool teardown() override;
Q_SIGNALS:
void accessibilityChanged(bool accessible, const QString &udi);
void setupDone(Solid::ErrorType error, QVariant errorData, const QString &udi);
void teardownDone(Solid::ErrorType error, QVariant errorData, const QString &udi);
void setupRequested(const QString &udi);
void teardownRequested(const QString &udi);
void accessibilityChanged(bool accessible, const QString &udi) override;
void setupDone(Solid::ErrorType error, QVariant errorData, const QString &udi) override;
void teardownDone(Solid::ErrorType error, QVariant errorData, const QString &udi) override;
void setupRequested(const QString &udi) override;
void teardownRequested(const QString &udi) override;
public Q_SLOTS:
Q_SCRIPTABLE Q_NOREPLY void passphraseReply(const QString & passphrase);

View File

@@ -42,13 +42,13 @@ class StorageDrive: public Block, virtual public Solid::Ifaces::StorageDrive
public:
StorageDrive(Device *dev);
virtual ~StorageDrive();
~StorageDrive() override;
virtual qulonglong size() const;
virtual bool isHotpluggable() const;
virtual bool isRemovable() const;
virtual Solid::StorageDrive::DriveType driveType() const;
virtual Solid::StorageDrive::Bus bus() const;
qulonglong size() const override;
bool isHotpluggable() const override;
bool isRemovable() const override;
Solid::StorageDrive::DriveType driveType() const override;
Solid::StorageDrive::Bus bus() const override;
private:
UdevQt::Device m_udevDevice;

View File

@@ -39,15 +39,15 @@ class StorageVolume: public Block, virtual public Solid::Ifaces::StorageVolume
public:
StorageVolume(Device *device);
virtual ~StorageVolume();
~StorageVolume() override;
virtual QString encryptedContainerUdi() const;
virtual qulonglong size() const;
virtual QString uuid() const;
virtual QString label() const;
virtual QString fsType() const;
virtual Solid::StorageVolume::UsageType usage() const;
virtual bool isIgnored() const;
QString encryptedContainerUdi() const override;
qulonglong size() const override;
QString uuid() const override;
QString label() const override;
QString fsType() const override;
Solid::StorageVolume::UsageType usage() const override;
bool isIgnored() const override;
};
}

View File

@@ -62,4 +62,4 @@ QString Block::device() const
return drive;
}
//#include "backends/wmi/wmiblock.moc"
#include "backends/wmi/moc_wmiblock.cpp"

View File

@@ -154,4 +154,4 @@ void Solid::Backends::Wmi::Cdrom::slotProcessFinished(int exitCode, QProcess::Ex
delete m_process;
}
#include "backends/wmi/wmicdrom.moc"
#include "backends/wmi/moc_wmicdrom.cpp"

View File

@@ -702,4 +702,4 @@ void WmiDevice::slotCondition(const QString &condition, const QString &reason)
emit conditionRaised(condition, reason);
}
//#include "backends/wmi/wmidevice.moc"
#include "backends/wmi/moc_wmidevice.cpp"

View File

@@ -31,4 +31,4 @@ DeviceInterface::~DeviceInterface()
{
}
//#include "backends/wmi/wmideviceinterface.moc"
#include "backends/wmi/moc_wmideviceinterface.cpp"

View File

@@ -53,4 +53,4 @@ bool GenericInterface::propertyExists(const QString &key) const
return m_device->propertyExists(key);
}
//#include "backends/wmi/wmigenericinterface.moc"
#include "backends/wmi/moc_wmigenericinterface.cpp"

View File

@@ -268,4 +268,4 @@ const QString& WmiManager::WmiEventSink::query() const {
}
//#include "backends/wmi/wmimanager.moc"
#include "backends/wmi/moc_wmimanager.cpp"

View File

@@ -110,4 +110,4 @@ bool OpticalDisc::isWriteable() const
return !val & 0x80001;//read only
}
#include "backends/wmi/wmiopticaldisc.moc"
#include "backends/wmi/moc_wmiopticaldisc.cpp"

View File

@@ -65,4 +65,4 @@ QVariant Solid::Backends::Wmi::PortableMediaPlayer::driverHandle(const QString &
return QVariant();
}
//#include "backends/wmi/wmiportablemediaplayer.moc"
#include "backends/wmi/moc_wmiportablemediaplayer.cpp"

View File

@@ -109,4 +109,4 @@ qulonglong Storage::size() const
return m_device->property("Size").toULongLong();
}
//#include "backends/wmi/wmistorage.moc"
#include "backends/wmi/moc_wmistorage.cpp"

Some files were not shown because too many files have changed in this diff Show More