Apply clang-tidy's modernize-use-auto

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5449 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
scorpio810
2018-07-19 16:27:20 +00:00
parent e4b1ba9797
commit b97b01d63c
98 changed files with 427 additions and 427 deletions

View File

@@ -55,7 +55,7 @@ int ModifyTitleBlockCellCommand::id() const {
@return true on success, false otherwise
*/
bool ModifyTitleBlockCellCommand::mergeWith(const QUndoCommand *command) {
const ModifyTitleBlockCellCommand *other = static_cast<const ModifyTitleBlockCellCommand *>(command);
const auto *other = static_cast<const ModifyTitleBlockCellCommand *>(command);
if (other) {
if (other -> modified_cell_ == modified_cell_) {
if (other -> new_values_.keys() == new_values_.keys()) {
@@ -226,7 +226,7 @@ ModifyTemplateGridCommand *ModifyTemplateGridCommand::addRow(TitleBlockTemplate
if (!tbtemplate) return(nullptr);
// create the command itself
ModifyTemplateGridCommand *add_row_command = new ModifyTemplateGridCommand(tbtemplate);
auto *add_row_command = new ModifyTemplateGridCommand(tbtemplate);
add_row_command -> setInsertion(true);
add_row_command -> setType(true);
add_row_command -> setCells(tbtemplate -> createRow());
@@ -247,7 +247,7 @@ ModifyTemplateGridCommand *ModifyTemplateGridCommand::addColumn(TitleBlockTempla
if (!tbtemplate) return(nullptr);
// create the command itself
ModifyTemplateGridCommand *add_column_command = new ModifyTemplateGridCommand(tbtemplate);
auto *add_column_command = new ModifyTemplateGridCommand(tbtemplate);
add_column_command -> setInsertion(true);
add_column_command -> setType(false);
add_column_command -> setCells(tbtemplate -> createColumn());
@@ -268,7 +268,7 @@ ModifyTemplateGridCommand *ModifyTemplateGridCommand::deleteRow(TitleBlockTempla
if (!tbtemplate) return(nullptr);
// create the command itself
ModifyTemplateGridCommand *del_row_command = new ModifyTemplateGridCommand(tbtemplate);
auto *del_row_command = new ModifyTemplateGridCommand(tbtemplate);
del_row_command -> setInsertion(false);
del_row_command -> setType(true);
del_row_command -> setIndex(index);
@@ -287,7 +287,7 @@ ModifyTemplateGridCommand *ModifyTemplateGridCommand::deleteColumn(TitleBlockTem
if (!tbtemplate) return(nullptr);
// create the command itself
ModifyTemplateGridCommand *del_column_command = new ModifyTemplateGridCommand(tbtemplate);
auto *del_column_command = new ModifyTemplateGridCommand(tbtemplate);
del_column_command -> setInsertion(false);
del_column_command -> setType(false);
del_column_command -> setIndex(index);