Commit Graph

23 Commits

Author SHA1 Message Date
Jim Broadus 1a3828e2c1 protobuf: Fix namespace conflict
Protobuf 3.15 adds a namespace alias for "pb" that conflicts with
Clementine's. Modify Clementine to use "cpb".

Patch provided by @ahesford

Reference: 5c028d6cf4/src/google/protobuf/port.h (L44)
2021-02-21 14:17:26 +00:00
John Maguire 341dc7326f Reformat all C++ 2020-09-22 14:56:06 +01:00
Jim Broadus 84099f2491 Name all threads created by Application
In Application::MoveToNewThread, name the new thread after the object being
moved. Give those objects names as well.

The thread names display in gdb with "info threads".
2020-05-27 10:22:00 +01:00
Andrew Reading c76697b42c Introduce limit for number of tag client processes.
Previously, the number of processes spawned was always
QThread::idealThreadCount() (returning the number of logical CPU
cores). On new systems with many cores, however, this can result
in 12, 16, 24, or ... processes being spawned, which is a bit
excessive.

This establishes a new config variable,
'max_numprocs_tagclients' within the Settings group, in order
to limit the maximum number of tag client processes that get
spawned. It also adds a means of setting this via the Behavior
page in Settings. It can be set to any integer in the interval
[1, QThread::idealThreadCount()]; it defaults to the maximal value
so as to emulate the old behavior.
2019-07-21 10:53:13 -07:00
Krzysztof Sobiecki d775d72345 More copyright info fixes 2014-11-05 17:48:04 +01:00
Krzysztof Sobiecki 39a3b46ead More copyright info fixes 2014-11-05 17:48:04 +01:00
John Maguire 3323c2d094 Convert all instances of foreach() to a C++11 for
find ext src -name '*.cpp' -exec \
    sed -i -e 's/foreach(\([^,]\+\),/for (\1 :/' {} \;
2014-02-10 14:43:32 +01:00
John Maguire bebd781fdf Reformat all non-3rd-party C/C++/Objective-C++.
Command line:
find src ext -regex '.*\.\(h\|cpp\|mm\)' -exec clang-format -i
 -style='{BasedOnStyle: Google, DerivePointerBinding: false}' {} \;
2014-02-07 16:34:20 +01:00
John Maguire 71893e4847 Use nullptr instead of NULL everywhere. 2014-02-06 17:29:59 +01:00
Arnaud Bienner 88918d45c5 Update issue 1175:
Save rating and statistics in two distinct ways, and let users activate them separately in preferences.
2013-03-30 23:42:29 +01:00
Arnaud Bienner db5fbe2059 Update issue 1175:
Add an option in preferences to save all ratings/statistics into files, for all songs
2013-03-26 23:56:46 +01:00
Arnaud Bienner b5b371ef6f Use Qt's foreach instead of C++11 foreach, as it doesn't work with older versions of gcc 2013-02-24 19:16:52 +01:00
Arnaud Bienner 08d40f5fca Handle statistics tags apart, and write them to file when they change.
Next step: add a preference to activate this (should be deactivated by default IMO).
2013-02-24 17:45:25 +01:00
John Maguire 7058d238fb Be more aggressive about tagging by having as many tag clients as cores. 2012-11-30 16:43:44 +01:00
John Maguire 9c7a3ab105 Rename google drive tagging methods to more appropriate generic names. 2012-11-28 16:34:10 +01:00
John Maguire db586ca00e Read tags from Ubuntu One files and add to local database. 2012-11-28 14:43:03 +01:00
John Maguire e06ae8a282 Support reading OGG & FLAC files from Google Drive. 2012-07-31 15:18:14 +02:00
David Sansome 9653a45f66 Read Google Drive metadata in the tagreader worker process 2012-07-28 19:35:12 +01:00
David Sansome 58c0f464cd Queue messages in WorkerPool instead of in each individual handler, so the entire queue isn't lost if a worker crashes. 2012-01-22 18:53:17 +00:00
David Sansome ccb3a0aa3a Show a detailed error when the tagreader executable couldn't be started. 2012-01-07 22:58:30 +00:00
David Sansome 9be641ee87 The external tagreader mostly works now:
* Make TagReaderClient a singleton until it's easier to pass dependencies around
 * Add a WaitForSignal() that uses a local event loop to wait for a signal to be emitted
 * Add a WaitForFinished() to _MessageReplyBase that blocks using a semaphore
 * Add blocking versions of all TagReaderClient methods
 * Use the TagReaderClient everywhere that Song::InitFromFile and friends were used before
2012-01-07 00:26:07 +00:00
David Sansome 9041117867 Move everything around in the source tree - static libraries and external binaries now go in "ext/". Add a generic worker pool. 2012-01-05 23:25:13 +00:00
David Sansome 85f2f087cb Start work on moving everything that uses taglib out into an external process. 2012-01-05 23:24:48 +00:00