Compile fix with recent Qt dev

The reasoning in 1b4766e26c did not take into account that the scope
of QT_NO_JAVA_STYLE_ITERATORS may change over time, as done with
f70905448f6 in Qt base.

Change-Id: Ib1966ff26c4d36d5f62e149d6b45baa4aecf825d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
hjk
2019-07-24 13:43:54 +02:00
parent 02e224fcfa
commit e3b1106afa
70 changed files with 238 additions and 491 deletions

View File

@@ -390,9 +390,8 @@ QSet<PluginSpec *> PluginManager::pluginsRequiredByPlugin(PluginSpec *spec)
while (!queue.empty()) {
PluginSpec *checkSpec = queue.front();
queue.pop();
QHashIterator<PluginDependency, PluginSpec *> depIt(checkSpec->dependencySpecs());
while (depIt.hasNext()) {
depIt.next();
const QHash<PluginDependency, PluginSpec *> deps = checkSpec->dependencySpecs();
for (auto depIt = deps.cbegin(), end = deps.cend(); depIt != end; ++depIt) {
if (depIt.key().type != PluginDependency::Required)
continue;
PluginSpec *depSpec = depIt.value();
@@ -933,7 +932,6 @@ void PluginManagerPrivate::deleteAll()
#ifdef WITH_TESTS
using TestPlan = QMap<QObject *, QStringList>; // Object -> selected test functions
using TestPlanIterator = QMapIterator<QObject *, QStringList>;
static bool isTestFunction(const QMetaMethod &metaMethod)
{
@@ -1019,9 +1017,7 @@ static int executeTestPlan(const TestPlan &testPlan)
{
int failedTests = 0;
TestPlanIterator it(testPlan);
while (it.hasNext()) {
it.next();
for (auto it = testPlan.cbegin(), end = testPlan.cend(); it != end; ++it) {
QObject *testObject = it.key();
QStringList functions = it.value();
@@ -1326,9 +1322,8 @@ bool PluginManagerPrivate::loadQueue(PluginSpec *spec,
}
// add dependencies
QHashIterator<PluginDependency, PluginSpec *> it(spec->dependencySpecs());
while (it.hasNext()) {
it.next();
const QHash<PluginDependency, PluginSpec *> deps = spec->dependencySpecs();
for (auto it = deps.cbegin(), end = deps.cend(); it != end; ++it) {
// Skip test dependencies since they are not real dependencies but just force-loaded
// plugins when running tests
if (it.key().type == PluginDependency::Test)
@@ -1374,9 +1369,8 @@ void PluginManagerPrivate::loadPlugin(PluginSpec *spec, PluginSpec::State destSt
break;
}
// check if dependencies have loaded without error
QHashIterator<PluginDependency, PluginSpec *> it(spec->dependencySpecs());
while (it.hasNext()) {
it.next();
const QHash<PluginDependency, PluginSpec *> deps = spec->dependencySpecs();
for (auto it = deps.cbegin(), end = deps.cend(); it != end; ++it) {
if (it.key().type != PluginDependency::Required)
continue;
PluginSpec *depSpec = it.value();