Skip to content

Commit dd99a94

Browse files
committed
replaced emit with Q_EMIT
added std::endl
1 parent 797c4d1 commit dd99a94

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

src/PythonQt.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ void PythonQt::init(int flags, const QByteArray& pythonQtModuleName)
142142
Py_INCREF(obj);
143143
PyModule_AddObject(pack2, names[i], obj);
144144
} else {
145-
std::cerr << "method not found " << names[i];
145+
std::cerr << "method not found " << names[i] << std::endl;
146146
}
147147
}
148148
}
@@ -1324,7 +1324,7 @@ bool PythonQt::handleError()
13241324
if (_p->_systemExitExceptionHandlerEnabled &&
13251325
PyErr_ExceptionMatches(PyExc_SystemExit)) {
13261326
int exitcode = custom_system_exit_exception_handler();
1327-
emit PythonQt::self()->systemExitExceptionRaised(exitcode);
1327+
Q_EMIT PythonQt::self()->systemExitExceptionRaised(exitcode);
13281328
}
13291329
else
13301330
{
@@ -1396,7 +1396,7 @@ void PythonQt::stdOutRedirectCB(const QString& str)
13961396
std::cout << str.toLatin1().data() << std::endl;
13971397
return;
13981398
}
1399-
emit PythonQt::self()->pythonStdOut(str);
1399+
Q_EMIT PythonQt::self()->pythonStdOut(str);
14001400
}
14011401

14021402
void PythonQt::stdErrRedirectCB(const QString& str)
@@ -1405,7 +1405,7 @@ void PythonQt::stdErrRedirectCB(const QString& str)
14051405
std::cerr << str.toLatin1().data() << std::endl;
14061406
return;
14071407
}
1408-
emit PythonQt::self()->pythonStdErr(str);
1408+
Q_EMIT PythonQt::self()->pythonStdErr(str);
14091409
}
14101410

14111411
void PythonQt::setQObjectWrappedCallback(PythonQtQObjectWrappedCB* cb)
@@ -1641,7 +1641,7 @@ void PythonQtPrivate::handleVirtualOverloadReturnError(const char* signature, co
16411641
PyObject* PythonQt::helpCalled(PythonQtClassInfo* info)
16421642
{
16431643
if (_p->_initFlags & ExternalHelp) {
1644-
emit pythonHelpRequest(QByteArray(info->className()));
1644+
Q_EMIT pythonHelpRequest(QByteArray(info->className()));
16451645
return Py_BuildValue("");
16461646
} else {
16471647
return PyString_FromString(info->help().toLatin1().data());

src/PythonQtMethodInfo.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,7 @@ void PythonQtMethodInfo::cleanupCachedMethodInfos()
288288
while (i.hasNext()) {
289289
delete i.next().value();
290290
}
291+
_cachedSignatures.clear();
291292
}
292293

293294
void PythonQtMethodInfo::addParameterTypeAlias(const QByteArray& alias, const QByteArray& name)

0 commit comments

Comments
 (0)