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:
fralx 2019-02-06 00:30:24 +03:00 committed by GitHub
commit 505f1398e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View File

@ -1367,7 +1367,7 @@ QObject *BaseDesignIntf::createElement(const QString& /*collectionName*/, const
obj = LimeReport::DesignElementsFactory::instance().objectCreator(elementType)(this, this);
connect(obj,SIGNAL(propertyChanged(QString,QVariant,QVariant)),page(),SLOT(slotItemPropertyChanged(QString,QVariant,QVariant)));
}
} catch (ReportError error){
} catch (ReportError &error){
qDebug()<<error.what();
}
return obj;

View File

@ -308,7 +308,7 @@ void DataSourceManager::connectAllDatabases()
foreach(ConnectionDesc* conn,m_connections){
try{
connectConnection(conn);
} catch (ReportError e){
} catch (ReportError &e){
putError(e.what());
setLastError(e.what());
qDebug()<<e.what();
@ -324,7 +324,7 @@ bool DataSourceManager::addModel(const QString &name, QAbstractItemModel *model,
try{
putHolder(name, mh);
connect(mh, SIGNAL(modelStateChanged()), this, SIGNAL(datasourcesChanged()));
} catch (ReportError e){
} catch (ReportError &e){
putError(e.what());
setLastError(e.what());
return false;
@ -893,7 +893,7 @@ void DataSourceManager::connectAutoConnections()
if (conn->autoconnect()) {
try {
connectConnection(conn);
} catch(ReportError e){
} catch(ReportError &e){
setLastError(e.what());
putError(e.what());
qDebug()<<e.what();

View File

@ -384,7 +384,7 @@ QString ScriptEngineManager::expandUserVariables(QString context, RenderPass /*
}
pos=0;
} catch (ReportError e){
} catch (ReportError &e){
dataManager()->putError(e.what());
if (!dataManager()->reportSettings() || dataManager()->reportSettings()->suppressAbsentFieldsAndVarsWarnings())
context.replace(rx.cap(0),e.what());