Commit Graph

18 Commits

Author SHA1 Message Date
Jim Broadus f04657e7e7 Replace qrand usage with QRandomGenerator
QRandomGenerator was introduced in 5.10 and qrand has since been
deprecated. QRandomGenerator::global() returns a global instance that
has been securely seeded. QRandomGenerator provides methods that
generate values within ranges, so taking a modulus of the result isn't
necessary.
2021-04-20 10:31:07 +01: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
John Maguire b2a532be62 Experiment with typesafe time units 2015-07-20 14:35:13 +01:00
John Maguire aa22a43f44 Add exponential back-off to Amazon requests. 2015-04-17 12:10:40 +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 d309d4ab27 Use c++11 instead of boost where possible. 2014-02-06 16:51:39 +01:00
John Maguire cc43e339c1 Use boost function for compatibility 2013-11-22 11:53:47 +00:00
John Maguire b17b075361 Compile fixes for 10.9 2013-11-21 17:59:31 +00:00
John Maguire c294098aef Use tr1 for mac compatibility 2012-11-26 10:10:20 +01:00
John Maguire 11f664083a Add support for standard function callbacks in NewClosure (including C++11 lambdas). 2012-11-26 09:41:26 +01:00
John Maguire 4e9231976e Unpack variadic arguments into QGenericArguments without boost::tuple. 2012-11-22 17:57:26 +01:00
John Maguire 8171192df5 Port Closure to variadic templates. 2012-11-22 17:19:04 +01:00
John Maguire 66c8d6d360 Tidy up a bit. 2012-04-13 15:53:17 +02:00
John Maguire 133c2e1640 Postpone the database check & backup to a little while after startup. 2012-04-13 15:49:56 +02:00
John Maguire a09165c392 Make it more obviously wrong to use the Closure internals. 2012-03-20 15:14:44 +01:00
John Maguire e1d77e0124 Add support for QSharedPointer in Closure. 2012-03-19 19:37:57 +01:00
David Sansome b9e08bbfe6 Update podcasts on a schedule and on demand. Update them immediately after subscribing, and make episodes appear in the tree. 2012-03-09 15:26:15 +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