summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrius Štikonas <andrius@stikonas.eu>2016-09-01 12:57:14 (GMT)
committerAndrius Štikonas <andrius@stikonas.eu>2016-09-01 12:57:14 (GMT)
commit0d4a267538169b1fadb8f7918cabe2ae879dede5 (patch)
tree71635e31b041cfe33a5d8d37f19cc03ca665517a
parent9625e73bf4e3e6f54975ff90aee56f6456751e71 (diff)
Q_FOREACH -> C++11 for.
-rw-r--r--src/ExerciseFactorize.cpp4
-rw-r--r--src/PrimeFactorsLineEdit.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/ExerciseFactorize.cpp b/src/ExerciseFactorize.cpp
index c97074f..aef73df 100644
--- a/src/ExerciseFactorize.cpp
+++ b/src/ExerciseFactorize.cpp
@@ -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());
}
}
diff --git a/src/PrimeFactorsLineEdit.cpp b/src/PrimeFactorsLineEdit.cpp
index 5fa96b5..8d96688 100644
--- a/src/PrimeFactorsLineEdit.cpp
+++ b/src/PrimeFactorsLineEdit.cpp
@@ -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) {