mirror of
https://github.com/fralx/LimeReport.git
synced 2024-12-24 08:34:38 +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();
|
||||
model->setQuery(query);
|
||||
m_lastError = model->lastError().text();
|
||||
putError(m_lastError);
|
||||
if (model->query().isActive())
|
||||
return QSharedPointer<QAbstractItemModel>(model);
|
||||
else
|
||||
return QSharedPointer<QAbstractItemModel>(0);
|
||||
}
|
||||
if (!db.isOpen())
|
||||
if (!db.isOpen()){
|
||||
m_lastError = tr("Connection \"%1\" is not open").arg(connectionName);
|
||||
putError(m_lastError);
|
||||
}
|
||||
return QSharedPointer<QAbstractItemModel>(0);
|
||||
}
|
||||
|
||||
@ -657,7 +660,7 @@ void DataSourceManager::putProxyDesc(ProxyDesc *proxyDesc)
|
||||
bool DataSourceManager::connectConnection(ConnectionDesc *connectionDesc)
|
||||
{
|
||||
bool connected = false;
|
||||
clearErrorsList();
|
||||
clearErrors();
|
||||
QString lastError ="";
|
||||
|
||||
foreach(QString datasourceName, dataSourceNames()){
|
||||
|
@ -178,7 +178,7 @@ public:
|
||||
QString lastError() const { return m_lastError;}
|
||||
|
||||
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;}
|
||||
bool designTime() const;
|
||||
void setDesignTime(bool designTime);
|
||||
|
Loading…
Reference in New Issue
Block a user