Skip to content

Commit da40492

Browse files
committed
REF: Replace qAsConst with std::as_const for C++17 compatibility
1 parent 8ab4791 commit da40492

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/PythonQtMethodInfo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ PythonQtMethodInfo::PythonQtMethodInfo(const QByteArray& typeName, const QList<Q
8585
void PythonQtMethodInfo::setupAllowThreads()
8686
{
8787
bool allowThreads = true;
88-
for (const ParameterInfo& info : qAsConst(_parameters)) {
88+
for (const ParameterInfo& info : std::as_const(_parameters)) {
8989
if (info.name == "PyObject" || info.name == "PythonQtObjectPtr" ||
9090
info.innerName == "PyObject" || info.innerName == "PythonQtObjectPtr") {
9191
allowThreads = false;

src/PythonQtSignalReceiver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ int PythonQtSignalReceiver::qt_metacall(QMetaObject::Call c, int id, void **argu
266266
}
267267

268268
bool shouldDelete = false;
269-
for(const PythonQtSignalTarget& t : qAsConst(_targets)) {
269+
for(const PythonQtSignalTarget& t : std::as_const(_targets)) {
270270
if (t.slotId() == id) {
271271
const int sigId = t.signalId();
272272
t.call(arguments);

0 commit comments

Comments
 (0)