0
0
mirror of https://github.com/fralx/LimeReport.git synced 2025-09-26 17:59:08 +03:00

Merge pull request #70 from asmaloney/fix-shadows

Fixes some shadowed vars & avoids string copies using const refs
This commit is contained in:
fralx
2017-04-10 11:17:38 +03:00
committed by GitHub
7 changed files with 19 additions and 21 deletions

View File

@@ -1306,7 +1306,7 @@ void PageDesignIntf::deleteSelected()
}
void PageDesignIntf::cut()
{
{
CommandIf::Ptr command = CutCommand::create(this);
saveCommand(command);
}
@@ -1729,8 +1729,8 @@ CommandIf::Ptr DeleteLayoutCommand::create(PageDesignIntf *page, LayoutDesignInt
DeleteLayoutCommand* command = new DeleteLayoutCommand();
command->setPage(page);
command->setItem(item);
foreach (BaseDesignIntf* item, item->childBaseItems()){
command->m_childItems.append(item->objectName());
foreach (BaseDesignIntf* childItem, item->childBaseItems()){
command->m_childItems.append(childItem->objectName());
}
return CommandIf::Ptr(command);
}
@@ -1847,7 +1847,7 @@ CommandIf::Ptr CutCommand::create(PageDesignIntf *page)
foreach(QGraphicsItem * item, page->selectedItems()) {
if (!dynamic_cast<PageItemDesignIntf*>(item)){
BaseDesignIntf *reportItem = dynamic_cast<BaseDesignIntf *>(item);
if (reportItem) {
command->m_itemNames.push_back(reportItem->objectName());
writer->putItem(reportItem);