mirror of
https://github.com/simonbrunel/qtpromise.git
synced 2025-07-05 16:55:23 +08:00
Fix deprecations and compile warnings (#34)
- Use std::invoke_result, fallback to std::result_of on C++11/14. - Use RVO instead of std::move (GCC warning: redundant-move). - Replace QSharedPointer with std::shared_ptr (GCC warning: unititialized value). - QLinkedList is deprecated in Qt 5.15.
This commit is contained in:
@ -290,7 +290,10 @@ void tst_helpers_reduce::functorThrows()
|
||||
|
||||
void tst_helpers_reduce::sequenceTypes()
|
||||
{
|
||||
#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 0))
|
||||
// QLinkedList is deprecated since Qt 5.15.
|
||||
SequenceTester<QLinkedList<QPromise<int>>>::exec();
|
||||
#endif
|
||||
SequenceTester<QList<QPromise<int>>>::exec();
|
||||
SequenceTester<QVector<QPromise<int>>>::exec();
|
||||
SequenceTester<std::list<QPromise<int>>>::exec();
|
||||
|
@ -283,7 +283,10 @@ void tst_qpromise_reduce::functorThrows()
|
||||
|
||||
void tst_qpromise_reduce::sequenceTypes()
|
||||
{
|
||||
#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 0))
|
||||
// QLinkedList is deprecated since Qt 5.15.
|
||||
SequenceTester<QLinkedList<QPromise<int>>>::exec();
|
||||
#endif
|
||||
SequenceTester<QList<QPromise<int>>>::exec();
|
||||
SequenceTester<QVector<QPromise<int>>>::exec();
|
||||
SequenceTester<std::list<QPromise<int>>>::exec();
|
||||
|
Reference in New Issue
Block a user