Commit Graph

7615 Commits

Author SHA1 Message Date
John Maguire 969c158cee
Merge pull request #6533 from jbroadus/inotify-errors
Inotify errors
2020-01-18 13:04:55 +00:00
Jim Broadus 34a2e86b4b Handle FileSystemWatcherInterface::AddPath errors.
On Linux systems, failure to watch a path may be caused by the limit set in
/proc/sys/fs/inotify/max_user_watches. This can be demonstrated by creating
a directory with a large number of empty subdirectories and adding that test
directory as a library.

Check that a file is readable before adding a watch. If adding the watch fails,
report the error to the user only once. Only add the path to subdir_mapping_
if watch succeeds.
2020-01-17 16:26:09 -08:00
Jim Broadus 26e12f5006 Support newlines in error dialog.
Translate "\n" to "<br>" in error dialog HTML.
2020-01-16 21:06:11 -08:00
Jim Broadus fe84ad4e66 Return boolean from FileSystemWatcherInterface::AddPath to indicate success.
QFileSystemWatcher::addPath returns a boolean to indicate success. Modify
QtFSListener::AddPath to reflect that. For now, the MacFSListener version will
always return true.
2020-01-16 21:06:11 -08:00
John Maguire 0d1a976b62
Merge pull request #6532 from jbroadus/broken-mtp
Broken mtp
2020-01-16 23:06:38 +00:00
Jim Broadus 4bb7d41ec9 Fix mtp and gphoto2 device mounts from gvfs.
Using libmtp or libgphoto2 to access a device that gvfs has mounted causes the
connection to fail. libmtp is calling libusb_claim_interface which, according to
libusb documentation, will return LIBUSB_ERROR_BUSY if claimed by a different
program. For mtp and gphoto2 devices discovered by the GioLister, use the file
scheme and access the device through the gvfs mount.
2020-01-16 13:11:49 -08:00
Jim Broadus 5efba58f02 Decode gvfs uris.
The uri returned from g_file_get_uri is percent encoded. This causes the regex
in GioLister::MakeDeviceUrls to fail and causes the URL to be invalid. In this
case, it falls back to the file scheme. Newer versions of gvfs obtain the serial
id from udev instead of using the bus and device IDs.

Note that this bug covers a different issue where mtp is failing to connect. The
result is actually desired behavior. The follow-up change will address this.
2020-01-16 13:11:44 -08:00
John Maguire 9bf90bf95a
Merge pull request #6530 from jbroadus/fix-query-crash
Fix LibraryModel async query crash.
2020-01-15 09:48:45 +00:00
Jim Broadus 6a9276ec0a Fix LibraryModel async query crash.
A LibraryBackend may be deleted while an associated LibraryModel object is using
it. An example is an async query running while a connected device is removed.
To prevent this, use a share pointer for the LibraryBackend.

This fixes one case where LibraryBackend is used after deletion. However, the
raw pointer is still passed around in several other places. These should be
evaluated on a case-by-case basis to insure that circular depencencies aren't
introduced.
2020-01-14 21:47:31 -08:00
John Maguire 4563149482
Merge pull request #6528 from clementine-player/mac-style
Add mac style plugin
2020-01-13 17:54:29 +00:00
John Maguire acda1bc1db
Add mac style plugin 2020-01-13 17:02:13 +00:00
John Maguire fd64a5a807
Merge pull request #6527 from jbroadus/wait-for-query-thread
Prevent deletion of LibraryModel object while async query is running.
2020-01-13 10:00:55 +00:00
Jim Broadus f817e0de48 Prevent deletion of LibraryModel object while async query is running.
Create a thread pool for each LibraryModel object and block destruction until
all threads that are operating on this object are complete.

Note that this is not a complete solution. The async query also uses the library
backend which may still be deleted before the thread exits. This will be
addressed in a future change.
2020-01-12 12:24:21 -08:00
John Maguire 9a9cf08a63
Merge pull request #6525 from jbroadus/reenable-lastfm-bionic
Use qt5 version of liblastfm dev package for Debian and Ubuntu builds.
2020-01-12 13:58:27 +00:00
John Maguire 56a043a9ec
Merge pull request #6524 from jbroadus/closure-timing-hole
Fix closure timing hole.
2020-01-12 13:58:04 +00:00
Jim Broadus 2f41a969c2 Use qt5 version of liblastfm dev package for Debian and Ubuntu builds. 2020-01-11 13:18:50 -08:00
Jim Broadus dbe67bf32b Fix closure timing hole.
When a closure involves an ObjectHelper, a connection is made from the
receiver's destroyed signal and the helper object's deleteLater slot. Since
the signal between the sender and the helper object isn't disconnected until
either object is actually destroyed, this leaves a hole where the helper
holds a pointer to an invalid receiver object, but is still able to receive
the signal connected to its Invoke slot.

Instead of connecting the destroyed signal to deleteLater, connect it to a new
TearDown slot that immediately disconnects the signal then calls deleteLater.
2020-01-11 00:53:35 -08:00
Clementine Buildbot a97080a809 Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2020-01-08 10:45:49 +00:00
John Maguire 8cfbc5bad7
Merge pull request #6521 from jbroadus/handle-connect-error-from-dialog
Properly handle connect errors when initiated from properties dialog.
2020-01-08 10:42:55 +00:00
Jim Broadus 8a88a0a57e Properly handle connect errors when initiated from properties dialog.
If connection fails when initiated from the device properties dialog, the
connected page is shown after the update formats worker thread completes.
2020-01-07 23:20:04 -08:00
Jim Broadus 79b7e3fe13 Fix abort from Mtp loader thread.
A commit in qt 5.7 changes a qWarning to a qFatal if a QThread is still running
when it's deleted. When we get the LoadFinished signal in MtpDevice, stop
the loader thread's event loop to avoid this situation.

See qtbase commit c8277b6e532
2020-01-07 22:29:59 +00:00
Pavel Liavonau 3f4c788339 Fixed lastfm workflow with "now playing" and scrobbling feature
(Maybe Issue #2672)
2020-01-07 22:29:23 +00:00
Jim Broadus 39e75071bf Remove unhelpful debug message.
Message contains no context and appears to be a remnant of a debug session.
2020-01-05 16:51:11 -08:00
John Maguire 008c90ff29
Merge pull request #6516 from jonaski/sizeinbytes
Use QImage::sizeInBytes() with Qt 5.10 and above
2020-01-06 00:12:02 +00:00
John Maguire 57841cf947
Merge pull request #6515 from jonaski/child
Replace QModelIndex::child() with QAbstractItemModel::index()
2020-01-06 00:11:22 +00:00
John Maguire b45b6bace0
Merge pull request #6514 from jonaski/elapsedtimer
Replace QTime with QElapsedTimer
2020-01-05 18:40:36 +00:00
Jonas Kvinge e98c11fe64 Use QImage::sizeInBytes() with Qt 5.10 and above 2020-01-05 19:31:40 +01:00
Jonas Kvinge 6b50d5140d Fix formatting 2020-01-05 19:09:03 +01:00
Jonas Kvinge e63c1edbbf Fix formatting 2020-01-05 19:08:03 +01:00
Jonas Kvinge 341a4d1423 Replace QTime with QElapsedTimer 2020-01-05 19:01:54 +01:00
Jonas Kvinge 959a957a56 Replace QModelIndex::child() with QAbstractItemModel::index() 2020-01-05 18:37:27 +01:00
John Maguire 1bf40fee15
Merge pull request #6513 from clementine-player/revert-6497-gpodder-server
Revert "Add an option to specify a gpodder server."
2020-01-05 17:10:32 +00:00
John Maguire 0991209087
Revert "Add an option to specify a gpodder server." 2020-01-05 17:10:00 +00:00
John Maguire 41c103413c
Merge pull request #6497 from jbroadus/gpodder-server
Add an option to specify a gpodder server.
2020-01-05 15:27:08 +00:00
John Maguire 19389cace7
Merge pull request #6511 from jonaski/screen
Use QWidget::screen() to fix compile with Qt 5.14
2020-01-05 15:22:38 +00:00
John Maguire 400203cfa2
Merge pull request #6510 from jonaski/searchtermwidget
Fix layouts with duplicate name in SmartPlaylistSearchTermWidget
2020-01-05 15:22:15 +00:00
Clementine Buildbot 257e1be43d Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2020-01-05 15:16:39 +00:00
John Maguire 10e807dd7d
Merge pull request #6509 from jonaski/tolist
Replace QSet::toList() with QSet::values()
2020-01-05 15:13:33 +00:00
Jonas Kvinge 1b23417a93 Use QWidget::screen() to fix compile with Qt 5.14 2020-01-05 02:51:08 +01:00
John Maguire 63cd5d4918
Merge pull request #6508 from jonaski/qocoa
Replace use of QtMac::toCGImageRef with QImage::toCGImage
2020-01-05 01:14:57 +00:00
John Maguire 7d2c622d0f
Merge pull request #6507 from jonaski/sprintf
Replace use of QString::sprintf with QString::asprintf
2020-01-05 00:40:43 +00:00
John Maguire 2c960f12f7
Merge pull request #6504 from jonaski/seafile
Initialize QObject in constructor and add explicit
2020-01-05 00:39:28 +00:00
John Maguire a875c3b91f
Merge pull request #6506 from jonaski/styleoptionframe
Replace use of QStyleOptionFrameV3
2020-01-05 00:30:40 +00:00
John Maguire 5123d1dd37
Merge pull request #6505 from jonaski/fallthrough
Add fallthrough comment where fallthrough is intended
2020-01-05 00:30:24 +00:00
John Maguire cfa3ea0dca
Merge pull request #6503 from jonaski/darker
Replace use of QColor::dark and QPalette::background
2020-01-05 00:30:04 +00:00
John Maguire 94630bd58b
Merge pull request #6502 from jonaski/desktopwidget
Replace all uses of QDesktopWidget with QScreen
2020-01-05 00:29:33 +00:00
John Maguire a240818b6c
Merge pull request #6501 from jonaski/compilations
Fix songs stuck in various artists
2020-01-05 00:28:15 +00:00
John Maguire b10cc71c76
Merge pull request #6500 from jonaski/pixmapcache
Remove pixmap cache and pending art when removing parent nodes instead
2020-01-05 00:27:36 +00:00
John Maguire 98473157d9
Merge pull request #6499 from jonaski/macos-librarywatcher
Fix macOS filesystem listener (library watcher)
2020-01-05 00:26:57 +00:00
John Maguire b7dc883a13
Merge pull request #6498 from jonaski/cmake
Add project to CMakeLists
2020-01-05 00:26:09 +00:00