0
0
mirror of https://github.com/fralx/LimeReport.git synced 2024-12-26 01:24:39 +03:00
This commit is contained in:
Arin Alexander 2017-03-03 00:31:18 +03:00
commit 727b6c9436
2 changed files with 47 additions and 22 deletions

View File

@ -1086,24 +1086,49 @@ void DataSourceManager::collectionLoadFinished(const QString &collectionName)
}
if (collectionName.compare("queries",Qt::CaseInsensitive) == 0){
foreach(QueryDesc* query,m_queries){
connect(query, SIGNAL(queryTextChanged(QString,QString)),
QMutableListIterator<QueryDesc*> it(m_queries);
while (it.hasNext()){
it.next();
if (!m_datasources.contains(it.value()->queryName().toLower())){
connect(it.value(), SIGNAL(queryTextChanged(QString,QString)),
this, SLOT(slotQueryTextChanged(QString,QString)));
putHolder(query->queryName(),new QueryHolder(query->queryText(), query->connectionName(), this));
putHolder(it.value()->queryName(),new QueryHolder(it.value()->queryText(), it.value()->connectionName(), this));
} else {
delete it.value();
it.remove();
}
}
}
if (collectionName.compare("subqueries",Qt::CaseInsensitive) == 0){
foreach(SubQueryDesc* query,m_subqueries){
connect(query, SIGNAL(queryTextChanged(QString,QString)),
QMutableListIterator<SubQueryDesc*> it(m_subqueries);
while (it.hasNext()){
it.next();
if (!m_datasources.contains(it.value()->queryName().toLower())){
connect(it.value(), SIGNAL(queryTextChanged(QString,QString)),
this, SLOT(slotQueryTextChanged(QString,QString)));
putHolder(query->queryName(),new SubQueryHolder(query->queryText(), query->connectionName(), query->master(), this));
putHolder(it.value()->queryName(),new QueryHolder(it.value()->queryText(), it.value()->connectionName(), this));
} else {
delete it.value();
it.remove();
}
}
}
if (collectionName.compare("subproxies",Qt::CaseInsensitive) == 0){
foreach(ProxyDesc* proxy,m_proxies){
putHolder(proxy->name(),new ProxyHolder(proxy, this));
QMutableListIterator<ProxyDesc*> it(m_proxies);
while (it.hasNext()){
it.next();
if (!m_datasources.contains(it.value()->name().toLower())){
putHolder(it.value()->name(),new ProxyHolder(it.value(), this));
} else {
delete it.value();
it.remove();
}
}
}