Commit 0d4a2675 authored by Andrius Štikonas's avatar Andrius Štikonas
Browse files

Q_FOREACH -> C++11 for.

parent 9625e73b
......@@ -626,10 +626,10 @@ void ExerciseFactorize::showEvent(QShowEvent *)
void ExerciseFactorize::editContentChanged(bool correct)
{
if (correct) {
QStringList factors = m_factorsEnteredEdit->getFactors();
const QStringList factors = m_factorsEnteredEdit->getFactors();
m_factorsEntered.clear();
foreach(const QString & auxStr, factors) {
for (const QString & auxStr : factors) {
m_factorsEntered.append(auxStr.toUInt());
}
}
......
......@@ -72,7 +72,7 @@ bool PrimeFactorsLineEdit::checkCorrectness(const QString& theText)
bool PrimeFactorsLineEdit::areFactors(const QStringList& factors)
{
m_theFactors.clear();
foreach(const QString & str, factors) {
for (const QString & str : factors) {
bool found = false;
foreach(const QString & aux, m_usedFactors) {
if (str.compare(str, aux) == 0) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment