diff --git a/qucs/qucs/dialogs/sweepdialog.cpp b/qucs/qucs/dialogs/sweepdialog.cpp index 4e40f29d39..2174f69627 100644 --- a/qucs/qucs/dialogs/sweepdialog.cpp +++ b/qucs/qucs/dialogs/sweepdialog.cpp @@ -125,8 +125,9 @@ void SweepDialog::slotNewValue(int) { DataX *pD = pGraph->cPointsX.first(); int Factor = 1, Index = 0; - for(mySpinBox *pb = BoxList.first(); pb!=0; pb = BoxList.next()) { - Index += pb->value() * Factor; + QList::const_iterator it; + for(it = BoxList.constBegin(); it != BoxList.constEnd(); it++) { + Index += (*it)->value() * Factor; Factor *= pD->count; } Index *= 2; // because of complex values diff --git a/qucs/qucs/dialogs/sweepdialog.h b/qucs/qucs/dialogs/sweepdialog.h index 21db4648af..b512a8d54d 100644 --- a/qucs/qucs/dialogs/sweepdialog.h +++ b/qucs/qucs/dialogs/sweepdialog.h @@ -21,6 +21,7 @@ #include #include #include +#include #include #include @@ -61,7 +62,7 @@ private slots: Graph* setBiasPoints(); QGridLayout *all; // the mother of all widgets - Q3PtrList BoxList; + QList BoxList; Graph *pGraph; Schematic *Doc;