diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2022-02-15 15:17:43 +0100 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2022-03-14 20:16:35 +0100 |
commit | b15e01ff4e004fc89bcec205f0ee26e2e628b041 (patch) | |
tree | 9ea0ac95a1f1a1c1d6a72337793287efcb8b2630 /src/testlib/qtestcoreelement_p.h | |
parent | d8545347899512ec0f57707d15545c561ff57eff (diff) |
Use LogElementType rather than int as test-element type
All callers do in fact pass members of the enum, so just making the
defualt value be LET_Undefined rather than -1 eliminates any need for
it to be an int.
Change-Id: Ic1c9ae1522363666d1208aba60d4b4df5eff6ce0
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/testlib/qtestcoreelement_p.h')
-rw-r--r-- | src/testlib/qtestcoreelement_p.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/testlib/qtestcoreelement_p.h b/src/testlib/qtestcoreelement_p.h index a6a09aab52..a3d054349c 100644 --- a/src/testlib/qtestcoreelement_p.h +++ b/src/testlib/qtestcoreelement_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2022 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the QtTest module of the Qt Toolkit. @@ -63,7 +63,7 @@ template <class ElementType> class QTestCoreElement { public: - QTestCoreElement( int type = -1 ); + QTestCoreElement(QTest::LogElementType type = QTest::LET_Undefined); virtual ~QTestCoreElement(); void addAttribute(const QTest::AttributeIndex index, const char *value); @@ -81,8 +81,8 @@ class QTestCoreElement }; template<class ElementType> -QTestCoreElement<ElementType>::QTestCoreElement(int t) - : type(QTest::LogElementType(t)) +QTestCoreElement<ElementType>::QTestCoreElement(QTest::LogElementType t) + : type(t) { } |