summaryrefslogtreecommitdiffstats
path: root/src/corelib/global
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/global')
-rw-r--r--src/corelib/global/qassert.cpp8
-rw-r--r--src/corelib/global/qcheckedint_impl.h14
-rw-r--r--src/corelib/global/qforeach.qdoc2
-rw-r--r--src/corelib/global/qlibraryinfo.cpp1
-rw-r--r--src/corelib/global/qnumeric.cpp1
-rw-r--r--src/corelib/global/qnumeric.h1
-rw-r--r--src/corelib/global/qrandom.cpp1
-rw-r--r--src/corelib/global/qrandom.h1
8 files changed, 19 insertions, 10 deletions
diff --git a/src/corelib/global/qassert.cpp b/src/corelib/global/qassert.cpp
index 208619fd5cc..4da8a0cb037 100644
--- a/src/corelib/global/qassert.cpp
+++ b/src/corelib/global/qassert.cpp
@@ -63,7 +63,9 @@ Q_NORETURN void qAbort()
Example:
- \snippet code/src_corelib_global_qglobal.cpp 17
+ \snippet code/src_corelib_global_qglobal.cpp 17&19_include_open
+ \snippet code/src_corelib_global_qglobal.cpp 17assert
+ \snippet code/src_corelib_global_qglobal.cpp 17&19_return_close
If \c b is zero, the Q_ASSERT statement will output the following
message using the qFatal() function:
@@ -86,7 +88,9 @@ Q_NORETURN void qAbort()
Example:
- \snippet code/src_corelib_global_qglobal.cpp 19
+ \snippet code/src_corelib_global_qglobal.cpp 17&19_include_open
+ \snippet code/src_corelib_global_qglobal.cpp 19assert
+ \snippet code/src_corelib_global_qglobal.cpp 17&19_return_close
If \c b is zero, the Q_ASSERT_X statement will output the following
message using the qFatal() function:
diff --git a/src/corelib/global/qcheckedint_impl.h b/src/corelib/global/qcheckedint_impl.h
index 2b4d0ff0e0d..f4081da8bb0 100644
--- a/src/corelib/global/qcheckedint_impl.h
+++ b/src/corelib/global/qcheckedint_impl.h
@@ -302,14 +302,14 @@ public:
QCheckedInt,
AInt,
template <typename AInt, if_is_same_int<AInt> = true>)
-};
-template <typename Int, typename I, typename P>
-Q_DECL_CONST_FUNCTION size_t constexpr inline qHash(QCheckedInt<Int, I, P> key, size_t seed = 0) noexcept
-{
- using QT_PREPEND_NAMESPACE(qHash);
- return qHash(key.value(), seed);
-}
+private:
+ friend size_t constexpr qHash(QCheckedInt key, size_t seed = 0) noexcept
+ {
+ using QT_PREPEND_NAMESPACE(qHash); // ### needed?
+ return qHash(key.value(), seed);
+ }
+};
} // namespace QCheckedIntegers
} // namespace QtPrivate
diff --git a/src/corelib/global/qforeach.qdoc b/src/corelib/global/qforeach.qdoc
index e6abf0e29c8..bec01152c04 100644
--- a/src/corelib/global/qforeach.qdoc
+++ b/src/corelib/global/qforeach.qdoc
@@ -50,7 +50,7 @@
If you're worried about namespace pollution, you can disable this
macro by adding the following line to your \c .pro file:
- \snippet code/src_corelib_global_qglobal.cpp 33
+ \snippet code/src_corelib_global_qglobal.cpp 32
\note Since Qt 5.7, the use of this macro is discouraged.
Use C++11 range-based \c for, possibly with \c {std::as_const()},
diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp
index 1ecec63aed4..d1fc672564f 100644
--- a/src/corelib/global/qlibraryinfo.cpp
+++ b/src/corelib/global/qlibraryinfo.cpp
@@ -1,6 +1,7 @@
// Copyright (C) 2021 The Qt Company Ltd.
// Copyright (C) 2021 Intel Corporation.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:critical reason:execute-external-code
#include "qdir.h"
#include "qstringlist.h"
diff --git a/src/corelib/global/qnumeric.cpp b/src/corelib/global/qnumeric.cpp
index 16b2b7ca408..8b153bcdb84 100644
--- a/src/corelib/global/qnumeric.cpp
+++ b/src/corelib/global/qnumeric.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2019 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:critical reason:data-parser
#include "qnumeric.h"
#include "qnumeric_p.h"
diff --git a/src/corelib/global/qnumeric.h b/src/corelib/global/qnumeric.h
index 2c7110c97a6..bc2bbf9e53e 100644
--- a/src/corelib/global/qnumeric.h
+++ b/src/corelib/global/qnumeric.h
@@ -1,6 +1,7 @@
// Copyright (C) 2021 The Qt Company Ltd.
// Copyright (C) 2025 Klarälvdalens Datakonsult AB, a KDAB Group company, [email protected], author Giuseppe D'Angelo <[email protected]>
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:critical reason:data-parser
#ifndef QNUMERIC_H
#define QNUMERIC_H
diff --git a/src/corelib/global/qrandom.cpp b/src/corelib/global/qrandom.cpp
index fd742898f81..dab903f51fb 100644
--- a/src/corelib/global/qrandom.cpp
+++ b/src/corelib/global/qrandom.cpp
@@ -1,6 +1,7 @@
// Copyright (C) 2021 Intel Corporation.
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:critical reason:cryptography
// for rand_s
#define _CRT_RAND_S
diff --git a/src/corelib/global/qrandom.h b/src/corelib/global/qrandom.h
index 5ac864e79ef..30599413d75 100644
--- a/src/corelib/global/qrandom.h
+++ b/src/corelib/global/qrandom.h
@@ -1,5 +1,6 @@
// Copyright (C) 2020 Intel Corporation.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:critical reason:cryptography
#ifndef QRANDOM_H
#define QRANDOM_H