Commit Graph

320 Commits

Author SHA1 Message Date
Matthieu Bruel 9714b0632d All changes for ClemRemote v1.0 (in one go) 2020-12-17 12:23:30 +00:00
Robert-André Mauchin cfcd0a956e Drop -std=c++0x and -U__STRICT_ANSI__
This was causing compilation failures, static assertion failed, with GCC 11.

Fix #6865

Signed-off-by: Robert-André Mauchin <zebob.m@gmail.com>
2020-12-17 11:28:09 +00:00
John Maguire 341dc7326f Reformat all C++ 2020-09-22 14:56:06 +01:00
dmdmdm 834b1d4514 Changed local variable names to be like_this 2020-07-08 18:01:59 +01:00
dmdmdm 0ff11ee2e0 Autoformated code 2020-07-08 18:01:59 +01:00
dmdmdm d3a28a40ed Shortened a line 2020-07-08 18:01:59 +01:00
dmdmdm 2c5c30de15 Guess album name from folder name 2020-07-08 18:01:59 +01:00
dmdmdm 40575e854e Fixed one indent 2020-05-24 15:54:08 +01:00
dmdmdm 0f2e8946d6 Made parameter const 2020-05-24 15:54:08 +01:00
dmdmdm 86b48c22ae Minor fixes 2020-05-24 15:54:08 +01:00
dmdmdm c8eaafb0a8 Switch from std::string to QString 2020-05-24 15:54:08 +01:00
dmdmdm fb262022f4 Switch from std::string to QString 2020-05-24 15:54:08 +01:00
dmdmdm be60c12438 Guess artist and title (fourth attempt) 2020-05-24 15:54:08 +01:00
dmdmdm 9b580e4a5c Guess artist and title from filename (third attempt) 2020-05-24 15:54:08 +01:00
dmdmdm ddbde91889 Guess artist and title from filename (second attempt) 2020-05-24 15:54:08 +01:00
Jim Broadus 5b918a70aa Add an optional delete function for Lazy pointers.
This allows a delete function to be provided with the prototype: void d(T*)
This function is passed to the unique_ptr constructor to be used when the object
is released. The default function simply deletes the object, where the default
behavior for unique_ptr would have a specialization for arrays. If Lazy is ever
used with arrays, a delete function should be provided.
2020-05-19 10:39:06 +01:00
Jim Broadus 0ecb773355 Handle lyrics tag for mp4
Translation table in mp4tag.cpp for reference.
2020-04-19 14:01:25 +01:00
Jim Broadus 509c65ced7 tagreader: Add debug handler for taglib
Pass taglib debug messages through qLog instead of printing directly to stderr.
2020-04-19 14:00:35 +01:00
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