compile without foreach
Details
Details
Diff Detail
Diff Detail
- Repository
- R283 KAuth
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
src/backends/polkit-1/Polkit1Backend.cpp | ||
---|---|---|
203–204 | (pre-existing) bad, very slow, creates a temp container just to iterate. for (auto it = m_cachedResults.begin(); it != m_cachedResults.end(); ++it) { const QString action = it.key(); if (it.value() != ....) { *it = ....; ... } } |
Comment Actions
FYI, this breaks mac building since there's a foreach in src/backends/mac/kauth-policy-gen-mac.cpp; also a few under src/backends/fake
Comment Actions
On Mac, this change gives this error (after removing -DQT_NO_FOREACH) - the recent changes did not fix the error below - f9b835c66a1facfcd6257fe84d3c7e8ead508353 builds fine.
Undefined symbols for architecture x86_64:
"output(QList<Action> const&, QMap<QString, QString> const&)", referenced from: _main in policy-gen.cpp.o
ld: symbol(s) not found for architecture x86_64