0
0
mirror of https://github.com/fralx/LimeReport.git synced 2025-10-09 05:57:14 +03:00

Field list for CallbackDatasource in TextItem has been fixed

This commit is contained in:
Arin Alexander
2016-04-14 00:04:56 +04:00
parent 93393186b3
commit 6a25ac752f
3 changed files with 14 additions and 2 deletions

View File

@@ -211,7 +211,7 @@ void DataSourceModel::updateModel()
}
DataSourceManager::DataSourceManager(QObject *parent) :
QObject(parent), m_lastError(""), m_designTime(true)
QObject(parent), m_lastError(""), m_designTime(true), m_needUpdate(false)
{
m_groupFunctionFactory.registerFunctionCreator(QLatin1String("COUNT"),new ConstructorGroupFunctionCreator<CountGroupFunction>);
m_groupFunctionFactory.registerFunctionCreator(QLatin1String("SUM"),new ConstructorGroupFunctionCreator<SumGroupFunction>);
@@ -281,6 +281,7 @@ ICallbackDatasource *DataSourceManager::createCallbackDatasouce(const QString& n
IDataSourceHolder* holder = new CallbackDatasourceHolder(dynamic_cast<IDataSource*>(ds),true);
putHolder(name,holder);
emit datasourcesChanged();
m_needUpdate = true;
return ds;
}
@@ -333,6 +334,12 @@ QSharedPointer<QAbstractItemModel>DataSourceManager::previewSQL(const QString &c
return QSharedPointer<QAbstractItemModel>(0);
}
void DataSourceManager::updateDatasourceModel()
{
m_datasourcesModel.updateModel();
m_needUpdate = false;
}
QString DataSourceManager::extractField(QString source)
{
if (source.contains('.')) {