0
0
mirror of https://github.com/fralx/LimeReport.git synced 2025-09-23 08:29:07 +03:00

Fixes some shadowed vars & avoids string copies using const refs

This commit is contained in:
Andy Maloney
2017-04-08 18:41:42 -04:00
parent 010db431b1
commit 6789b01e79
7 changed files with 19 additions and 21 deletions

View File

@@ -390,8 +390,8 @@ void HorizontalLayout::slotOnChildDestroy(QObject* child)
BaseDesignIntf* HorizontalLayout::findNext(BaseDesignIntf* item){
if (m_children.count()<childItems().size()-1){
m_children.clear();
foreach (BaseDesignIntf* item, childBaseItems()) {
m_children.append(item);
foreach (BaseDesignIntf* childItem, childBaseItems()) {
m_children.append(childItem);
}
}
qSort(m_children.begin(),m_children.end(),lessThen);
@@ -404,8 +404,8 @@ BaseDesignIntf* HorizontalLayout::findNext(BaseDesignIntf* item){
BaseDesignIntf* HorizontalLayout::findPrior(BaseDesignIntf* item){
if (m_children.count()<childItems().size()-1){
m_children.clear();
foreach (BaseDesignIntf* item, childBaseItems()) {
m_children.append(item);
foreach (BaseDesignIntf* childItem, childBaseItems()) {
m_children.append(childItem);
}
}
qSort(m_children.begin(),m_children.end(),lessThen);

View File

@@ -63,7 +63,7 @@ QString HtmlContext::parseTag(QVector<Tag *> &storage, QString text, int &curPos
tagName.remove('>');
while (buff.contains(rx)){
int pos=rx.indexIn(buff);
pos=rx.indexIn(buff);
buff=buff.right(buff.length()-pos);
curPos+=pos;
if (extractWord(rx.cap(0),1).compare(extractWord(tagName,1),Qt::CaseInsensitive)==0){

View File

@@ -124,8 +124,8 @@ void TextItemEditor::initUI()
ui->twData->setModel(dm->datasourcesModel());
ui->twScriptEngine->setModel(se.model());
foreach(QString dsName,dm->dataSourceNames()){
foreach(QString field, dm->fieldNames(dsName)){
foreach(const QString &dsName,dm->dataSourceNames()){
foreach(const QString &field, dm->fieldNames(dsName)){
dataWords<<dsName+"."+field;
}
}