mirror of
https://github.com/python-LimeReport/LimeReport.git
synced 2024-12-25 04:54:40 +03:00
Merge pull request #149 from f3nix/gcc-warnings-2
Fix GCC 8 warning: catching polymorphic type by value [-Wcatch-value=]
This commit is contained in:
commit
505f1398e3
@ -1367,7 +1367,7 @@ QObject *BaseDesignIntf::createElement(const QString& /*collectionName*/, const
|
|||||||
obj = LimeReport::DesignElementsFactory::instance().objectCreator(elementType)(this, this);
|
obj = LimeReport::DesignElementsFactory::instance().objectCreator(elementType)(this, this);
|
||||||
connect(obj,SIGNAL(propertyChanged(QString,QVariant,QVariant)),page(),SLOT(slotItemPropertyChanged(QString,QVariant,QVariant)));
|
connect(obj,SIGNAL(propertyChanged(QString,QVariant,QVariant)),page(),SLOT(slotItemPropertyChanged(QString,QVariant,QVariant)));
|
||||||
}
|
}
|
||||||
} catch (ReportError error){
|
} catch (ReportError &error){
|
||||||
qDebug()<<error.what();
|
qDebug()<<error.what();
|
||||||
}
|
}
|
||||||
return obj;
|
return obj;
|
||||||
|
@ -308,7 +308,7 @@ void DataSourceManager::connectAllDatabases()
|
|||||||
foreach(ConnectionDesc* conn,m_connections){
|
foreach(ConnectionDesc* conn,m_connections){
|
||||||
try{
|
try{
|
||||||
connectConnection(conn);
|
connectConnection(conn);
|
||||||
} catch (ReportError e){
|
} catch (ReportError &e){
|
||||||
putError(e.what());
|
putError(e.what());
|
||||||
setLastError(e.what());
|
setLastError(e.what());
|
||||||
qDebug()<<e.what();
|
qDebug()<<e.what();
|
||||||
@ -324,7 +324,7 @@ bool DataSourceManager::addModel(const QString &name, QAbstractItemModel *model,
|
|||||||
try{
|
try{
|
||||||
putHolder(name, mh);
|
putHolder(name, mh);
|
||||||
connect(mh, SIGNAL(modelStateChanged()), this, SIGNAL(datasourcesChanged()));
|
connect(mh, SIGNAL(modelStateChanged()), this, SIGNAL(datasourcesChanged()));
|
||||||
} catch (ReportError e){
|
} catch (ReportError &e){
|
||||||
putError(e.what());
|
putError(e.what());
|
||||||
setLastError(e.what());
|
setLastError(e.what());
|
||||||
return false;
|
return false;
|
||||||
@ -893,7 +893,7 @@ void DataSourceManager::connectAutoConnections()
|
|||||||
if (conn->autoconnect()) {
|
if (conn->autoconnect()) {
|
||||||
try {
|
try {
|
||||||
connectConnection(conn);
|
connectConnection(conn);
|
||||||
} catch(ReportError e){
|
} catch(ReportError &e){
|
||||||
setLastError(e.what());
|
setLastError(e.what());
|
||||||
putError(e.what());
|
putError(e.what());
|
||||||
qDebug()<<e.what();
|
qDebug()<<e.what();
|
||||||
|
@ -384,7 +384,7 @@ QString ScriptEngineManager::expandUserVariables(QString context, RenderPass /*
|
|||||||
}
|
}
|
||||||
pos=0;
|
pos=0;
|
||||||
|
|
||||||
} catch (ReportError e){
|
} catch (ReportError &e){
|
||||||
dataManager()->putError(e.what());
|
dataManager()->putError(e.what());
|
||||||
if (!dataManager()->reportSettings() || dataManager()->reportSettings()->suppressAbsentFieldsAndVarsWarnings())
|
if (!dataManager()->reportSettings() || dataManager()->reportSettings()->suppressAbsentFieldsAndVarsWarnings())
|
||||||
context.replace(rx.cap(0),e.what());
|
context.replace(rx.cap(0),e.what());
|
||||||
|
Loading…
Reference in New Issue
Block a user