mirror of
https://github.com/python-LimeReport/LimeReport.git
synced 2024-12-24 20:44:39 +03:00
Errors messages have been modified
This commit is contained in:
parent
d07c44d6bb
commit
a8b193de05
@ -323,13 +323,16 @@ QSharedPointer<QAbstractItemModel>DataSourceManager::previewSQL(const QString &c
|
|||||||
query.exec();
|
query.exec();
|
||||||
model->setQuery(query);
|
model->setQuery(query);
|
||||||
m_lastError = model->lastError().text();
|
m_lastError = model->lastError().text();
|
||||||
|
putError(m_lastError);
|
||||||
if (model->query().isActive())
|
if (model->query().isActive())
|
||||||
return QSharedPointer<QAbstractItemModel>(model);
|
return QSharedPointer<QAbstractItemModel>(model);
|
||||||
else
|
else
|
||||||
return QSharedPointer<QAbstractItemModel>(0);
|
return QSharedPointer<QAbstractItemModel>(0);
|
||||||
}
|
}
|
||||||
if (!db.isOpen())
|
if (!db.isOpen()){
|
||||||
m_lastError = tr("Connection \"%1\" is not open").arg(connectionName);
|
m_lastError = tr("Connection \"%1\" is not open").arg(connectionName);
|
||||||
|
putError(m_lastError);
|
||||||
|
}
|
||||||
return QSharedPointer<QAbstractItemModel>(0);
|
return QSharedPointer<QAbstractItemModel>(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -657,7 +660,7 @@ void DataSourceManager::putProxyDesc(ProxyDesc *proxyDesc)
|
|||||||
bool DataSourceManager::connectConnection(ConnectionDesc *connectionDesc)
|
bool DataSourceManager::connectConnection(ConnectionDesc *connectionDesc)
|
||||||
{
|
{
|
||||||
bool connected = false;
|
bool connected = false;
|
||||||
clearErrorsList();
|
clearErrors();
|
||||||
QString lastError ="";
|
QString lastError ="";
|
||||||
|
|
||||||
foreach(QString datasourceName, dataSourceNames()){
|
foreach(QString datasourceName, dataSourceNames()){
|
||||||
|
@ -178,7 +178,7 @@ public:
|
|||||||
QString lastError() const { return m_lastError;}
|
QString lastError() const { return m_lastError;}
|
||||||
|
|
||||||
void putError(QString error){ if (!m_errorsList.contains(error)) m_errorsList.append(error);}
|
void putError(QString error){ if (!m_errorsList.contains(error)) m_errorsList.append(error);}
|
||||||
void clearErrorsList(){ m_errorsList.clear();}
|
void clearErrors(){ m_errorsList.clear(); m_lastError = "";}
|
||||||
QStringList errorsList(){ return m_errorsList;}
|
QStringList errorsList(){ return m_errorsList;}
|
||||||
bool designTime() const;
|
bool designTime() const;
|
||||||
void setDesignTime(bool designTime);
|
void setDesignTime(bool designTime);
|
||||||
|
Loading…
Reference in New Issue
Block a user