Gui: use cbegin()/cend() for const_iterator
This commit is contained in:
@@ -577,8 +577,8 @@ Py::Object UiLoaderPy::load(const Py::Tuple& args)
|
||||
if (wrap.loadCoreModule()) {
|
||||
std::string fn;
|
||||
QFile file;
|
||||
QIODevice* device = 0;
|
||||
QWidget* parent = 0;
|
||||
QIODevice* device = nullptr;
|
||||
QWidget* parent = nullptr;
|
||||
if (wrap.toCString(args[0], fn)) {
|
||||
file.setFileName(QString::fromUtf8(fn.c_str()));
|
||||
if (!file.open(QFile::ReadOnly))
|
||||
|
||||
@@ -499,11 +499,11 @@ bool PyResource::connect(const char* sender, const char* signal, PyObject* cb)
|
||||
|
||||
QObject* objS=nullptr;
|
||||
QList<QWidget*> list = myDlg->findChildren<QWidget*>();
|
||||
QList<QWidget*>::const_iterator it = list.begin();
|
||||
QList<QWidget*>::const_iterator it = list.cbegin();
|
||||
QObject *obj;
|
||||
QString sigStr = QString::fromLatin1("2%1").arg(QString::fromLatin1(signal));
|
||||
|
||||
while ( it != list.end() ) {
|
||||
while ( it != list.cend() ) {
|
||||
obj = *it;
|
||||
++it;
|
||||
if (obj->objectName() == QLatin1String(sender)) {
|
||||
@@ -546,11 +546,11 @@ Py::Object PyResource::value(const Py::Tuple& args)
|
||||
QVariant v;
|
||||
if (myDlg) {
|
||||
QList<QWidget*> list = myDlg->findChildren<QWidget*>();
|
||||
QList<QWidget*>::const_iterator it = list.begin();
|
||||
QList<QWidget*>::const_iterator it = list.cbegin();
|
||||
QObject *obj;
|
||||
|
||||
bool fnd = false;
|
||||
while ( it != list.end() ) {
|
||||
while ( it != list.cend() ) {
|
||||
obj = *it;
|
||||
++it;
|
||||
if (obj->objectName() == QLatin1String(psName)) {
|
||||
@@ -646,11 +646,11 @@ Py::Object PyResource::setValue(const Py::Tuple& args)
|
||||
|
||||
if (myDlg) {
|
||||
QList<QWidget*> list = myDlg->findChildren<QWidget*>();
|
||||
QList<QWidget*>::const_iterator it = list.begin();
|
||||
QList<QWidget*>::const_iterator it = list.cbegin();
|
||||
QObject *obj;
|
||||
|
||||
bool fnd = false;
|
||||
while ( it != list.end() ) {
|
||||
while ( it != list.cend() ) {
|
||||
obj = *it;
|
||||
++it;
|
||||
if (obj->objectName() == QLatin1String(psName)) {
|
||||
|
||||
Reference in New Issue
Block a user