0
0
mirror of https://github.com/fralx/LimeReport.git synced 2025-09-26 17:59:08 +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

@@ -1304,7 +1304,7 @@ void PageDesignIntf::deleteSelected()
}
void PageDesignIntf::cut()
{
{
CommandIf::Ptr command = CutCommand::create(this);
saveCommand(command);
}
@@ -1727,8 +1727,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);
}
@@ -1845,7 +1845,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);