Commit Graph

302 Commits

Author SHA1 Message Date
Jim Broadus 902522f4d3 Fix Qt generated log messages.
To avoid infinite recursion, Qt prevents a log generated from an installed
message handler from being handled by that same handler. So when a Qt message
is handled, the logging magic (__logging_message__) that is added by
CreateLogger, and is expected to be detected and stripped by the handler, is
instead dumped to the log.

Instead of sending the Qt messages back through the logging system, use a new
BufferedDebug to build the log message in a buffer, then immeiately print the
buffer to stderr.
2020-03-07 02:41:56 +00:00
Jim Broadus 09723d516c Use a template for CreateLogger to allow different QDebug derivatives. 2020-03-07 02:41:56 +00:00
Jim Broadus 79ac16afeb Move unneeded declarations and macros from logging header.
Some functions and macros aren't used outside of logging.cpp and don't need be
declared in header. Functions can be static.
2020-03-06 11:09:20 +00:00
Jim Broadus 52fd6ffadc Add a logging category to log all network requests.
New logging class NetworkRequests disabled by default, but can be enabled with
the command line option.
2020-02-13 11:09:51 +00:00
Jim Broadus d45a9f5c53 Enable debug logging for GstEnginePipeline by default.
Use qLogCat to put verbose GStreamer callback messages into a new
GstEnginePipelineCallbacks category. Filter that category instead of
the entire class by default.
2020-01-31 10:24:53 +00:00
Jim Broadus 4b37e0c577 Use qLogCat for GLog handler.
Provide the domain string from the GLog callback as the category.
2020-01-30 11:20:03 -08:00
Jim Broadus a2d2850884 Add a new qLogCat macro to specify category.
In some cases, such as message handling callback functions, the line and function
macros don't provide a lot of useful information. In other cases, we may want more
granularity of control withing a class. For these cases, add a qLogCat that takes
a category string. Print this string in the message and use it as the filter
category.
2020-01-30 11:19:58 -08:00
Jim Broadus 203d6425fd Fix nomenclature in logging functions.
The qLog macro passes the result of the __PRETTY_FUNCTION__ macro to the
CreateLogger* functions, but these all take an argument called class_name.
2020-01-30 08:50:06 -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
Jonas Kvinge 79e7c2a1fa Add check for valid birthTime() 2019-11-13 19:10:39 +01:00
Jonas Kvinge c23a251ec3 Fix setting mtime/btime in tagreader 2019-11-13 18:47:27 +01:00
John Maguire 04c85c2bb7
Merge pull request #6433 from clementine-player/qt5
Qt5
2019-11-07 12:27:25 +00:00
Ulrich Spörlein 6e2506e94a Fix Clementine on FreeBSD/NFS files, where birthtime is always -1
As of Qt 5.10 the badly named created() which would fall back to POSIX
ctime if birthtime wasn't supported (as was the case on basically every
Unix filesystem up to some decades ago) is deprecated and replaced by
the better named birthTime or metadataChangeTime (yay!).

As of some years now, created() returns birthtime under FreeBSD, but
either due to the protocol or lack of implementation, this returns -1
under FreeBSD mounting a ZFS pool from a FreeBSD server with NFSv3.

This would render Clementine completely useless. Local filesystems are
not affected though. The fix is to catch the -1 birthtime and use mtime
instead, which is a more meaningful value anyway.

This closes issue #6423.
2019-10-27 22:52:36 +01:00
John Maguire cb6cd7c485 Merge remote-tracking branch 'origin/master' into qt5 2019-10-04 16:51:43 +01:00
luz.paz fb93ae4b02 Fix misc. source comment typos
Typos found via `codespell`
2019-08-21 23:43:16 -04:00
Ronan Jouchet 483be6ef7c Fix ratings not saved to file tag (Fix #6385)
Commit 96a7e18a8d by @smithjd15 from
2019-04-03 fixed a number of potential zero-value field values, but it
also flipped the early exit condition skipping saving a rating to file.

It seems out of place with the rest of the commit, so considering it a
mistake and reverting to the original condition.

Manually tested; works and saves again ratings to file.
2019-08-09 03:09:17 +02:00
Jonas Kvinge 546078c317 Fix memory leaks (#6376) 2019-08-02 16:24:26 +01:00
Jonas Kvinge 66fdc935ac Fix formatting 2019-07-21 14:38:15 +02:00
Jonas Kvinge 1a2274bd2b Merge branch 'master' into qt5-update 2019-07-21 14:20:59 +02:00
Jonas Kvinge 5bb35bf08a Fix crash in messagereply (#6372)
* Fix crash in messagereply

* Fix formatting
2019-07-20 18:52:37 +01:00
James D. Smith 32e867a84b clang-formatter changes. 2019-05-31 11:25:38 -06:00
James D. Smith 96a7e18a8d Fix a number of potential zero-value field values. 2019-05-31 11:25:38 -06:00
James D. Smith bd89a1d2de Fixes for APE filetype. 2019-04-01 22:56:50 -06:00
John Maguire 5171150e4f
Fix spotify blob detection on win32 2019-03-18 17:57:57 +00:00
smithjd15 8dd5750efa Improved support for APEv2 tags. (#6280) 2019-02-14 17:37:44 +11:00
Jonas Kvinge c277cc5f6c Merge remote-tracking branch 'upstream/master' into qt5-update 2019-01-27 19:44:28 +01:00
Jonas Kvinge 956df42caa Add syntax to proto files 2019-01-27 14:56:07 +00:00
Jonas Kvinge 1d17bee44a Merge with master and fix conflicts 2019-01-18 01:38:12 +01:00
Martin Delille 6d50e0b041 Specify cpp11 compatibility Fix #6199 (#6237) 2019-01-15 17:54:08 +00:00
John Maguire 453270c8b5 Fixes for compiling against qt5 on mac 2018-12-05 18:16:34 +01:00
Jonas Kvinge 2d1f6cd239 Replace Q_OS_MACOS with Q_OS_MAC (#6223) 2018-11-29 22:11:55 +00:00
Jonas Kvinge 9f946a2898 Improvements to makefiles and make components optional (#6221) 2018-11-29 21:32:12 +00:00
Jonas Kvinge 8c198a99a5 Qt 5 fixes 2018-11-21 10:31:17 +00:00
Jonas Kvinge 159d3c6ba6 Merge remote-tracking branch 'upstream/master' into qt5-update 2018-10-01 22:54:05 +02:00
Jonas Kvinge c264725e78 Save tags for WavPack files (#6152) 2018-10-01 01:38:29 -07:00
Jonas Kvinge c29c2e95cc Fixed merge conflicts 2018-09-30 15:11:06 +02:00
raphj 292fd0b009 Use QString fromLatin1 instead of fromAscii
Methods QString::fromAscii and QString::toAscii have been deprecated in Qt 5 (https://doc.qt.io/qt-5/qstring-obsolete.html).
This commit replaces calls to QString::fromAscii by calls to QString::fromLatin1 and calls to QString::toAscii by calls to QString::toLatin1.
This allows successful build when merging branch master into branch qt5.
2018-07-11 13:40:01 +01:00
Mattias Andersson 31002ca534 Resolve an ambiguous function call 2018-07-08 23:09:41 +01:00
Jonas Kvinge 0de964954d Replace toAscii/fromAscii with toLatin1/fromLatin1 2018-06-29 02:48:53 +02:00
Jonas Kvinge a5e8eba91c Merge remote-tracking branch 'upstream/master' into qt5-update 2018-06-29 02:38:19 +02:00
Eoin O'Neill 4733185d08 Added basic VGM format playback and tag reading. (#6089)
Current VGM format implementation in GStreamer (gstgme) only supports Sega Geneses (Mega Drive) and Sega Master System emulation.
GStreamer also cannot handle the VGZ format (a shorthand for vgm.gz, a gzipped archive that contains a song) which means
that users will currently have to extract the contents of their VGZ files to individual vgm files.
2018-06-18 14:26:11 +01:00
Eoin O'Neill e2f63e3945 Implemented SPC playback functionality.
Would like to add more playback support for additional GME supported file types. GME is already supported by the GStreamer backend.
2018-06-16 10:06:37 +01:00
Chocobozzz 16b4f9a991
Merge remote-tracking branch 'upstream/master' into qt5 2018-05-14 08:25:27 +02:00
Jonas Kvinge 37912a87b8 Fix WavPack playback (#6048) 2018-05-01 18:29:47 +01:00
Andreas Sturmlechner a4e362b9f7
Fix cmake with Qt 5.11_beta3 (dropping qt5_use_modules)
One usage of the macro remains in the bundled libmygpo-qt5. This should
be updated once the pending upstream fix was merged. qtsingleapplication
is already fixed upstream.
2018-04-16 01:33:15 +02:00
Andreas Sturmlechner d5e5f8246f Remove "-qt5" suffix from ApplicationName and OrganizationName
Renaming the application does not really make sense, but keeping it in
qLog info to identify it in debug output.
2018-02-19 16:22:04 +00:00
Chocobozzz 70f68b1926
Merge remote-tracking branch 'upstream/master' into qt5 2018-02-01 09:50:42 +01:00
John Maguire 7599b5771f Explicitly link qt to libclementine-common 2017-11-21 13:25:33 +01:00
Chocobozzz fc517ce7a5 Merge remote-tracking branch 'upstream/master' into qt5 2017-06-05 21:28:05 +02:00
Andreas 07f1ab6311 Change license for network remote protocol buffer meassages to Apache 2017-02-09 15:46:05 +01:00