QTest::addColumn: Use nullptr instead of 0
Fixes -Wzero-as-null-pointer-constant warning in user code Change-Id: I59492633d14947e90e91efa7c4fcd14c33fa413e Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
82a6f38873
commit
6ff4d8c61a
@ -309,7 +309,7 @@ namespace QTest
|
|||||||
Q_TESTLIB_EXPORT void addColumnInternal(int id, const char *name);
|
Q_TESTLIB_EXPORT void addColumnInternal(int id, const char *name);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
inline void addColumn(const char *name, T * = 0)
|
inline void addColumn(const char *name, T * = nullptr)
|
||||||
{
|
{
|
||||||
typedef std::is_same<T, const char*> QIsSameTConstChar;
|
typedef std::is_same<T, const char*> QIsSameTConstChar;
|
||||||
Q_STATIC_ASSERT_X(!QIsSameTConstChar::value, "const char* is not allowed as a test data format.");
|
Q_STATIC_ASSERT_X(!QIsSameTConstChar::value, "const char* is not allowed as a test data format.");
|
||||||
|
Loading…
Reference in New Issue
Block a user