From 2c1e631aed4c14c39c7e9b588eabba08930b49bc Mon Sep 17 00:00:00 2001 From: Simon Brunel Date: Tue, 11 Feb 2020 21:21:18 +0100 Subject: [PATCH] Include Qt classes by module and remove unnecessary comments --- src/qtpromise/qpromise.h | 6 ++---- src/qtpromise/qpromise.inl | 7 +++---- src/qtpromise/qpromise_p.h | 17 ++++++++--------- src/qtpromise/qpromiseconnections.h | 3 +-- src/qtpromise/qpromiseexceptions.h | 3 +-- src/qtpromise/qpromisefuture.h | 5 ++--- src/qtpromise/qpromiseglobal.h | 4 +--- src/qtpromise/qpromiseresolver.h | 3 +-- .../auto/qtpromise/benchmark/tst_benchmark.cpp | 3 --- .../deprecations/tst_helpers_qpromise.cpp | 6 +----- .../deprecations/tst_helpers_qpromiseall.cpp | 3 --- .../qtpromise/deprecations/tst_qpromise_all.cpp | 3 --- .../qtpromise/exceptions/tst_exceptions.cpp | 5 +---- tests/auto/qtpromise/future/tst_future.cpp | 5 +---- tests/auto/qtpromise/helpers/tst_all.cpp | 3 --- tests/auto/qtpromise/helpers/tst_attempt.cpp | 6 +----- tests/auto/qtpromise/helpers/tst_connect.cpp | 3 --- tests/auto/qtpromise/helpers/tst_each.cpp | 3 --- tests/auto/qtpromise/helpers/tst_filter.cpp | 5 +---- tests/auto/qtpromise/helpers/tst_map.cpp | 3 --- tests/auto/qtpromise/helpers/tst_reduce.cpp | 3 --- tests/auto/qtpromise/helpers/tst_reject.cpp | 4 ---- tests/auto/qtpromise/helpers/tst_resolve.cpp | 4 ---- tests/auto/qtpromise/internals/tst_argsof.cpp | 3 --- tests/auto/qtpromise/qpromise/tst_construct.cpp | 4 ---- tests/auto/qtpromise/qpromise/tst_delay.cpp | 4 ---- tests/auto/qtpromise/qpromise/tst_each.cpp | 3 --- tests/auto/qtpromise/qpromise/tst_fail.cpp | 3 --- tests/auto/qtpromise/qpromise/tst_filter.cpp | 5 +---- tests/auto/qtpromise/qpromise/tst_finally.cpp | 3 --- tests/auto/qtpromise/qpromise/tst_map.cpp | 3 --- tests/auto/qtpromise/qpromise/tst_operators.cpp | 3 --- tests/auto/qtpromise/qpromise/tst_reduce.cpp | 3 --- tests/auto/qtpromise/qpromise/tst_resolve.cpp | 4 ---- tests/auto/qtpromise/qpromise/tst_tap.cpp | 3 --- tests/auto/qtpromise/qpromise/tst_tapfail.cpp | 3 --- tests/auto/qtpromise/qpromise/tst_then.cpp | 7 ++----- tests/auto/qtpromise/qpromise/tst_timeout.cpp | 4 ---- .../tst_qpromiseconnections.cpp | 3 --- .../qtpromise/requirements/tst_requirements.cpp | 3 --- tests/auto/qtpromise/shared/data.h | 1 - tests/auto/qtpromise/shared/object.h | 3 +-- tests/auto/qtpromise/thread/tst_thread.cpp | 5 +---- 43 files changed, 29 insertions(+), 148 deletions(-) diff --git a/src/qtpromise/qpromise.h b/src/qtpromise/qpromise.h index 5fb50eb..163fc9c 100644 --- a/src/qtpromise/qpromise.h +++ b/src/qtpromise/qpromise.h @@ -13,10 +13,8 @@ #include "qpromiseglobal.h" #include "qpromiseresolver.h" -// Qt -#include +#include -// C++ Standard Library #include namespace QtPromise { @@ -79,7 +77,7 @@ public: template inline QPromise timeout(std::chrono::milliseconds msec, E&& error = E()) const; - inline QPromise delay(int msec) const; + inline QPromise delay(int msec) const; inline QPromise delay(std::chrono::milliseconds msec) const; inline QPromise wait() const; diff --git a/src/qtpromise/qpromise.inl b/src/qtpromise/qpromise.inl index 7e0d167..dc94d5f 100644 --- a/src/qtpromise/qpromise.inl +++ b/src/qtpromise/qpromise.inl @@ -8,10 +8,9 @@ #include "qpromise.h" #include "qpromisehelpers.h" -// Qt -#include -#include -#include +#include +#include +#include namespace QtPromise { diff --git a/src/qtpromise/qpromise_p.h b/src/qtpromise/qpromise_p.h index 1f223bd..71aa894 100644 --- a/src/qtpromise/qpromise_p.h +++ b/src/qtpromise/qpromise_p.h @@ -10,15 +10,14 @@ #include "qpromiseglobal.h" -// Qt -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include namespace QtPromise { diff --git a/src/qtpromise/qpromiseconnections.h b/src/qtpromise/qpromiseconnections.h index 6e061a8..b9ceab6 100644 --- a/src/qtpromise/qpromiseconnections.h +++ b/src/qtpromise/qpromiseconnections.h @@ -8,8 +8,7 @@ #ifndef QTPROMISE_QPROMISECONNECTIONS_H #define QTPROMISE_QPROMISECONNECTIONS_H -// Qt -#include +#include namespace QtPromise { diff --git a/src/qtpromise/qpromiseexceptions.h b/src/qtpromise/qpromiseexceptions.h index 6747dde..dfd3557 100644 --- a/src/qtpromise/qpromiseexceptions.h +++ b/src/qtpromise/qpromiseexceptions.h @@ -11,8 +11,7 @@ #include "qpromise_p.h" #include "qpromiseglobal.h" -// Qt -#include +#include namespace QtPromise { diff --git a/src/qtpromise/qpromisefuture.h b/src/qtpromise/qpromisefuture.h index 1a5b307..5d779dd 100644 --- a/src/qtpromise/qpromisefuture.h +++ b/src/qtpromise/qpromisefuture.h @@ -10,9 +10,8 @@ #include "qpromiseexceptions.h" -// Qt -#include -#include +#include +#include namespace QtPromisePrivate { diff --git a/src/qtpromise/qpromiseglobal.h b/src/qtpromise/qpromiseglobal.h index b3af3c7..d7cc074 100644 --- a/src/qtpromise/qpromiseglobal.h +++ b/src/qtpromise/qpromiseglobal.h @@ -8,12 +8,10 @@ #ifndef QTPROMISE_QPROMISEGLOBAL_H #define QTPROMISE_QPROMISEGLOBAL_H -// QtCore #include -// STL -#include #include +#include namespace QtPromisePrivate { diff --git a/src/qtpromise/qpromiseresolver.h b/src/qtpromise/qpromiseresolver.h index 1253fc5..5d58f73 100644 --- a/src/qtpromise/qpromiseresolver.h +++ b/src/qtpromise/qpromiseresolver.h @@ -10,8 +10,7 @@ #include "qpromiseexceptions.h" -// Qt -#include +#include namespace QtPromise { diff --git a/tests/auto/qtpromise/benchmark/tst_benchmark.cpp b/tests/auto/qtpromise/benchmark/tst_benchmark.cpp index 500aa26..05feee2 100644 --- a/tests/auto/qtpromise/benchmark/tst_benchmark.cpp +++ b/tests/auto/qtpromise/benchmark/tst_benchmark.cpp @@ -7,10 +7,7 @@ #include "../shared/data.h" -// QtPromise #include - -// Qt #include #ifdef Q_CC_MSVC diff --git a/tests/auto/qtpromise/deprecations/tst_helpers_qpromise.cpp b/tests/auto/qtpromise/deprecations/tst_helpers_qpromise.cpp index b2b58c4..e5a7123 100644 --- a/tests/auto/qtpromise/deprecations/tst_helpers_qpromise.cpp +++ b/tests/auto/qtpromise/deprecations/tst_helpers_qpromise.cpp @@ -8,14 +8,10 @@ #include "../shared/data.h" #include "../shared/utils.h" -// QtPromise -#include - -// Qt #include +#include #include -// STL #include using namespace QtPromise; diff --git a/tests/auto/qtpromise/deprecations/tst_helpers_qpromiseall.cpp b/tests/auto/qtpromise/deprecations/tst_helpers_qpromiseall.cpp index 8980ee1..4a5fee7 100644 --- a/tests/auto/qtpromise/deprecations/tst_helpers_qpromiseall.cpp +++ b/tests/auto/qtpromise/deprecations/tst_helpers_qpromiseall.cpp @@ -7,10 +7,7 @@ #include "../shared/utils.h" -// QtPromise #include - -// Qt #include using namespace QtPromise; diff --git a/tests/auto/qtpromise/deprecations/tst_qpromise_all.cpp b/tests/auto/qtpromise/deprecations/tst_qpromise_all.cpp index 1d8bf9c..9b157ca 100644 --- a/tests/auto/qtpromise/deprecations/tst_qpromise_all.cpp +++ b/tests/auto/qtpromise/deprecations/tst_qpromise_all.cpp @@ -7,10 +7,7 @@ #include "../shared/utils.h" -// QtPromise #include - -// Qt #include using namespace QtPromise; diff --git a/tests/auto/qtpromise/exceptions/tst_exceptions.cpp b/tests/auto/qtpromise/exceptions/tst_exceptions.cpp index 486764e..03300e9 100644 --- a/tests/auto/qtpromise/exceptions/tst_exceptions.cpp +++ b/tests/auto/qtpromise/exceptions/tst_exceptions.cpp @@ -7,11 +7,8 @@ #include "../shared/utils.h" -// QtPromise -#include - -// Qt #include +#include #include using namespace QtPromise; diff --git a/tests/auto/qtpromise/future/tst_future.cpp b/tests/auto/qtpromise/future/tst_future.cpp index cec27bb..aadde44 100644 --- a/tests/auto/qtpromise/future/tst_future.cpp +++ b/tests/auto/qtpromise/future/tst_future.cpp @@ -5,11 +5,8 @@ * the LICENSE file in the root directory of this source tree. */ -// QtPromise -#include - -// Qt #include +#include #include using namespace QtPromise; diff --git a/tests/auto/qtpromise/helpers/tst_all.cpp b/tests/auto/qtpromise/helpers/tst_all.cpp index d09f759..a90f46e 100644 --- a/tests/auto/qtpromise/helpers/tst_all.cpp +++ b/tests/auto/qtpromise/helpers/tst_all.cpp @@ -7,10 +7,7 @@ #include "../shared/utils.h" -// QtPromise #include - -// Qt #include using namespace QtPromise; diff --git a/tests/auto/qtpromise/helpers/tst_attempt.cpp b/tests/auto/qtpromise/helpers/tst_attempt.cpp index 7915bf8..fbda565 100644 --- a/tests/auto/qtpromise/helpers/tst_attempt.cpp +++ b/tests/auto/qtpromise/helpers/tst_attempt.cpp @@ -7,14 +7,10 @@ #include "../shared/utils.h" -// QtPromise -#include - -// Qt #include +#include #include -// STL #include using namespace QtPromise; diff --git a/tests/auto/qtpromise/helpers/tst_connect.cpp b/tests/auto/qtpromise/helpers/tst_connect.cpp index 654e584..6aececf 100644 --- a/tests/auto/qtpromise/helpers/tst_connect.cpp +++ b/tests/auto/qtpromise/helpers/tst_connect.cpp @@ -8,10 +8,7 @@ #include "../shared/object.h" #include "../shared/utils.h" -// QtPromise #include - -// Qt #include using namespace QtPromise; diff --git a/tests/auto/qtpromise/helpers/tst_each.cpp b/tests/auto/qtpromise/helpers/tst_each.cpp index db9f540..daa5336 100644 --- a/tests/auto/qtpromise/helpers/tst_each.cpp +++ b/tests/auto/qtpromise/helpers/tst_each.cpp @@ -7,10 +7,7 @@ #include "../shared/utils.h" -// QtPromise #include - -// Qt #include using namespace QtPromise; diff --git a/tests/auto/qtpromise/helpers/tst_filter.cpp b/tests/auto/qtpromise/helpers/tst_filter.cpp index 79dc83c..8eac554 100644 --- a/tests/auto/qtpromise/helpers/tst_filter.cpp +++ b/tests/auto/qtpromise/helpers/tst_filter.cpp @@ -7,11 +7,8 @@ #include "../shared/utils.h" -// QtPromise -#include - -// Qt #include +#include #include using namespace QtPromise; diff --git a/tests/auto/qtpromise/helpers/tst_map.cpp b/tests/auto/qtpromise/helpers/tst_map.cpp index b8e9b14..c393e7e 100644 --- a/tests/auto/qtpromise/helpers/tst_map.cpp +++ b/tests/auto/qtpromise/helpers/tst_map.cpp @@ -7,10 +7,7 @@ #include "../shared/utils.h" -// QtPromise #include - -// Qt #include using namespace QtPromise; diff --git a/tests/auto/qtpromise/helpers/tst_reduce.cpp b/tests/auto/qtpromise/helpers/tst_reduce.cpp index 31c72f5..a09e140 100644 --- a/tests/auto/qtpromise/helpers/tst_reduce.cpp +++ b/tests/auto/qtpromise/helpers/tst_reduce.cpp @@ -8,10 +8,7 @@ #include "../shared/data.h" #include "../shared/utils.h" -// QtPromise #include - -// Qt #include using namespace QtPromise; diff --git a/tests/auto/qtpromise/helpers/tst_reject.cpp b/tests/auto/qtpromise/helpers/tst_reject.cpp index 63a2e69..dd9e3a7 100644 --- a/tests/auto/qtpromise/helpers/tst_reject.cpp +++ b/tests/auto/qtpromise/helpers/tst_reject.cpp @@ -7,13 +7,9 @@ #include "../shared/utils.h" -// QtPromise #include - -// Qt #include -// STL #include using namespace QtPromise; diff --git a/tests/auto/qtpromise/helpers/tst_resolve.cpp b/tests/auto/qtpromise/helpers/tst_resolve.cpp index 18fbb15..52cbb86 100644 --- a/tests/auto/qtpromise/helpers/tst_resolve.cpp +++ b/tests/auto/qtpromise/helpers/tst_resolve.cpp @@ -8,14 +8,10 @@ #include "../shared/data.h" #include "../shared/utils.h" -// QtPromise #include - -// Qt #include #include -// STL #include using namespace QtPromise; diff --git a/tests/auto/qtpromise/internals/tst_argsof.cpp b/tests/auto/qtpromise/internals/tst_argsof.cpp index 41c084c..d87a538 100644 --- a/tests/auto/qtpromise/internals/tst_argsof.cpp +++ b/tests/auto/qtpromise/internals/tst_argsof.cpp @@ -5,10 +5,7 @@ * the LICENSE file in the root directory of this source tree. */ -// QtPromise #include - -// Qt #include using namespace QtPromisePrivate; diff --git a/tests/auto/qtpromise/qpromise/tst_construct.cpp b/tests/auto/qtpromise/qpromise/tst_construct.cpp index 34d1380..c108aab 100644 --- a/tests/auto/qtpromise/qpromise/tst_construct.cpp +++ b/tests/auto/qtpromise/qpromise/tst_construct.cpp @@ -7,13 +7,9 @@ #include "../shared/utils.h" -// QtPromise #include - -// Qt #include -// STL #include using namespace QtPromise; diff --git a/tests/auto/qtpromise/qpromise/tst_delay.cpp b/tests/auto/qtpromise/qpromise/tst_delay.cpp index 2b2abe7..6fd1891 100644 --- a/tests/auto/qtpromise/qpromise/tst_delay.cpp +++ b/tests/auto/qtpromise/qpromise/tst_delay.cpp @@ -7,13 +7,9 @@ #include "../shared/utils.h" -// QtPromise #include - -// Qt #include -// C++ Standard Library #include using namespace QtPromise; diff --git a/tests/auto/qtpromise/qpromise/tst_each.cpp b/tests/auto/qtpromise/qpromise/tst_each.cpp index 50de043..fc7d38e 100644 --- a/tests/auto/qtpromise/qpromise/tst_each.cpp +++ b/tests/auto/qtpromise/qpromise/tst_each.cpp @@ -7,10 +7,7 @@ #include "../shared/utils.h" -// QtPromise #include - -// Qt #include using namespace QtPromise; diff --git a/tests/auto/qtpromise/qpromise/tst_fail.cpp b/tests/auto/qtpromise/qpromise/tst_fail.cpp index e0d852b..4b16ab5 100644 --- a/tests/auto/qtpromise/qpromise/tst_fail.cpp +++ b/tests/auto/qtpromise/qpromise/tst_fail.cpp @@ -7,10 +7,7 @@ #include "../shared/utils.h" -// QtPromise #include - -// Qt #include using namespace QtPromise; diff --git a/tests/auto/qtpromise/qpromise/tst_filter.cpp b/tests/auto/qtpromise/qpromise/tst_filter.cpp index 76bbd6f..b1a66d5 100644 --- a/tests/auto/qtpromise/qpromise/tst_filter.cpp +++ b/tests/auto/qtpromise/qpromise/tst_filter.cpp @@ -7,11 +7,8 @@ #include "../shared/utils.h" -// QtPromise -#include - -// Qt #include +#include #include using namespace QtPromise; diff --git a/tests/auto/qtpromise/qpromise/tst_finally.cpp b/tests/auto/qtpromise/qpromise/tst_finally.cpp index 0837412..0299265 100644 --- a/tests/auto/qtpromise/qpromise/tst_finally.cpp +++ b/tests/auto/qtpromise/qpromise/tst_finally.cpp @@ -7,10 +7,7 @@ #include "../shared/utils.h" -// QtPromise #include - -// Qt #include using namespace QtPromise; diff --git a/tests/auto/qtpromise/qpromise/tst_map.cpp b/tests/auto/qtpromise/qpromise/tst_map.cpp index 55a8eb9..acb3187 100644 --- a/tests/auto/qtpromise/qpromise/tst_map.cpp +++ b/tests/auto/qtpromise/qpromise/tst_map.cpp @@ -7,10 +7,7 @@ #include "../shared/utils.h" -// QtPromise #include - -// Qt #include using namespace QtPromise; diff --git a/tests/auto/qtpromise/qpromise/tst_operators.cpp b/tests/auto/qtpromise/qpromise/tst_operators.cpp index 20d21fa..7980b5a 100644 --- a/tests/auto/qtpromise/qpromise/tst_operators.cpp +++ b/tests/auto/qtpromise/qpromise/tst_operators.cpp @@ -7,10 +7,7 @@ #include "../shared/utils.h" -// QtPromise #include - -// Qt #include using namespace QtPromise; diff --git a/tests/auto/qtpromise/qpromise/tst_reduce.cpp b/tests/auto/qtpromise/qpromise/tst_reduce.cpp index cfe954e..49c6fc9 100644 --- a/tests/auto/qtpromise/qpromise/tst_reduce.cpp +++ b/tests/auto/qtpromise/qpromise/tst_reduce.cpp @@ -8,10 +8,7 @@ #include "../shared/data.h" #include "../shared/utils.h" -// QtPromise #include - -// Qt #include using namespace QtPromise; diff --git a/tests/auto/qtpromise/qpromise/tst_resolve.cpp b/tests/auto/qtpromise/qpromise/tst_resolve.cpp index f400cb5..362e8b2 100644 --- a/tests/auto/qtpromise/qpromise/tst_resolve.cpp +++ b/tests/auto/qtpromise/qpromise/tst_resolve.cpp @@ -8,13 +8,9 @@ #include "../shared/data.h" #include "../shared/utils.h" -// QtPromise #include - -// Qt #include -// STL #include using namespace QtPromise; diff --git a/tests/auto/qtpromise/qpromise/tst_tap.cpp b/tests/auto/qtpromise/qpromise/tst_tap.cpp index 6b73c64..bbee497 100644 --- a/tests/auto/qtpromise/qpromise/tst_tap.cpp +++ b/tests/auto/qtpromise/qpromise/tst_tap.cpp @@ -7,10 +7,7 @@ #include "../shared/utils.h" -// QtPromise #include - -// Qt #include using namespace QtPromise; diff --git a/tests/auto/qtpromise/qpromise/tst_tapfail.cpp b/tests/auto/qtpromise/qpromise/tst_tapfail.cpp index d1dce91..dbfafe0 100644 --- a/tests/auto/qtpromise/qpromise/tst_tapfail.cpp +++ b/tests/auto/qtpromise/qpromise/tst_tapfail.cpp @@ -7,10 +7,7 @@ #include "../shared/utils.h" -// QtPromise #include - -// Qt #include using namespace QtPromise; diff --git a/tests/auto/qtpromise/qpromise/tst_then.cpp b/tests/auto/qtpromise/qpromise/tst_then.cpp index 4fc2703..def4be7 100644 --- a/tests/auto/qtpromise/qpromise/tst_then.cpp +++ b/tests/auto/qtpromise/qpromise/tst_then.cpp @@ -7,14 +7,11 @@ #include "../shared/utils.h" -#include - -// QtPromise #include - -// Qt #include +#include + using namespace QtPromise; class tst_qpromise_then : public QObject diff --git a/tests/auto/qtpromise/qpromise/tst_timeout.cpp b/tests/auto/qtpromise/qpromise/tst_timeout.cpp index 34d3c79..0371bb1 100644 --- a/tests/auto/qtpromise/qpromise/tst_timeout.cpp +++ b/tests/auto/qtpromise/qpromise/tst_timeout.cpp @@ -7,13 +7,9 @@ #include "../shared/utils.h" -// QtPromise #include - -// Qt #include -// C++ Standard Library #include using namespace QtPromise; diff --git a/tests/auto/qtpromise/qpromiseconnections/tst_qpromiseconnections.cpp b/tests/auto/qtpromise/qpromiseconnections/tst_qpromiseconnections.cpp index e39f022..339b1e3 100644 --- a/tests/auto/qtpromise/qpromiseconnections/tst_qpromiseconnections.cpp +++ b/tests/auto/qtpromise/qpromiseconnections/tst_qpromiseconnections.cpp @@ -8,10 +8,7 @@ #include "../shared/object.h" #include "../shared/utils.h" -// QtPromise #include - -// Qt #include using namespace QtPromise; diff --git a/tests/auto/qtpromise/requirements/tst_requirements.cpp b/tests/auto/qtpromise/requirements/tst_requirements.cpp index c697dd1..dadc10a 100644 --- a/tests/auto/qtpromise/requirements/tst_requirements.cpp +++ b/tests/auto/qtpromise/requirements/tst_requirements.cpp @@ -5,10 +5,7 @@ * the LICENSE file in the root directory of this source tree. */ -// QtPromise #include - -// Qt #include using namespace QtPromise; diff --git a/tests/auto/qtpromise/shared/data.h b/tests/auto/qtpromise/shared/data.h index bc39969..7dcff79 100644 --- a/tests/auto/qtpromise/shared/data.h +++ b/tests/auto/qtpromise/shared/data.h @@ -8,7 +8,6 @@ #ifndef QTPROMISE_TESTS_AUTO_SHARED_DATA_H #define QTPROMISE_TESTS_AUTO_SHARED_DATA_H -// STL #include struct Logs { diff --git a/tests/auto/qtpromise/shared/object.h b/tests/auto/qtpromise/shared/object.h index 4d83ebc..11d5db1 100644 --- a/tests/auto/qtpromise/shared/object.h +++ b/tests/auto/qtpromise/shared/object.h @@ -8,8 +8,7 @@ #ifndef QTPROMISE_TESTS_AUTO_SHARED_SENDER_H #define QTPROMISE_TESTS_AUTO_SHARED_SENDER_H -// Qt -#include +#include class Object : public QObject { diff --git a/tests/auto/qtpromise/thread/tst_thread.cpp b/tests/auto/qtpromise/thread/tst_thread.cpp index d50d158..f2e56b7 100644 --- a/tests/auto/qtpromise/thread/tst_thread.cpp +++ b/tests/auto/qtpromise/thread/tst_thread.cpp @@ -5,11 +5,8 @@ * the LICENSE file in the root directory of this source tree. */ -// QtPromise -#include - -// Qt #include +#include #include using namespace QtPromise;