mirror of
https://github.com/fralx/LimeReport.git
synced 2024-12-24 00:33:02 +03:00
"Designer crash when open, close and open database connection" issue has been fixed
This commit is contained in:
parent
e534695d14
commit
475c8635a2
@ -84,7 +84,7 @@ RCC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/rcc
|
|||||||
|
|
||||||
LIMEREPORT_VERSION_MAJOR = 1
|
LIMEREPORT_VERSION_MAJOR = 1
|
||||||
LIMEREPORT_VERSION_MINOR = 4
|
LIMEREPORT_VERSION_MINOR = 4
|
||||||
LIMEREPORT_VERSION_RELEASE = 136
|
LIMEREPORT_VERSION_RELEASE = 137
|
||||||
|
|
||||||
LIMEREPORT_VERSION = '\\"$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}\\"'
|
LIMEREPORT_VERSION = '\\"$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}\\"'
|
||||||
DEFINES += LIMEREPORT_VERSION_STR=\"$${LIMEREPORT_VERSION}\"
|
DEFINES += LIMEREPORT_VERSION_STR=\"$${LIMEREPORT_VERSION}\"
|
||||||
|
@ -941,14 +941,15 @@ void DataSourceManager::disconnectConnection(const QString& connectionName)
|
|||||||
foreach(QString datasourceName, dataSourceNames()){
|
foreach(QString datasourceName, dataSourceNames()){
|
||||||
if (isQuery(datasourceName) || isSubQuery(datasourceName)){
|
if (isQuery(datasourceName) || isSubQuery(datasourceName)){
|
||||||
QueryHolder* qh = dynamic_cast<QueryHolder*>(dataSourceHolder(datasourceName));
|
QueryHolder* qh = dynamic_cast<QueryHolder*>(dataSourceHolder(datasourceName));
|
||||||
if (qh && qh->connectionName().compare(connectionName,Qt::CaseInsensitive)==0){
|
if (qh && qh->connectionName().compare(connectionName,Qt::CaseInsensitive) == 0){
|
||||||
qh->invalidate(designTime()?IDataSource::DESIGN_MODE:IDataSource::RENDER_MODE);
|
qh->invalidate(designTime() ? IDataSource::DESIGN_MODE : IDataSource::RENDER_MODE, true);
|
||||||
qh->setLastError(tr("invalid connection"));
|
qh->setLastError(tr("invalid connection"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ConnectionDesc* connectionDesc = connectionByName(connectionName);
|
ConnectionDesc* connectionDesc = connectionByName(connectionName);
|
||||||
|
|
||||||
if (connectionDesc->isInternal()){
|
if (connectionDesc->isInternal()){
|
||||||
{
|
{
|
||||||
QSqlDatabase db = QSqlDatabase::database(connectionName);
|
QSqlDatabase db = QSqlDatabase::database(connectionName);
|
||||||
|
Loading…
Reference in New Issue
Block a user