diff --git a/src/context.cpp b/src/context.cpp index 162d8199..2ff3afd4 100644 --- a/src/context.cpp +++ b/src/context.cpp @@ -133,7 +133,7 @@ QList Context::lookupChildren() const void Context::setVariablesFromArguments() { for(auto i=0; iisDefined()&&argName.isEmpty()) { @@ -266,7 +266,7 @@ Value* Context::matchArgumentIndex(bool allowChar,bool matchLast, int index, con if(index >= arguments.size()) return matchArgument(allowChar,matchLast,name); - auto arg = arguments.at(index); + const auto& arg = arguments.at(index); const QString& argName = arg.getName(); if(argName.isEmpty() || match(allowChar,matchLast,argName,name)) return arg.getValue(); diff --git a/src/ui/mainwindow.cpp b/src/ui/mainwindow.cpp index a23e0471..e8c482b0 100644 --- a/src/ui/mainwindow.cpp +++ b/src/ui/mainwindow.cpp @@ -353,12 +353,12 @@ void MainWindow::exportFile(const QString& type) const QFileInfo fileInfo(currentEditor()->getFileName()); - auto ext=QString(".%1").arg(type.toLower()); - auto filter=tr("%1 Files (*%2);;All Files (*)").arg(type.toUpper(),ext); - auto suggestedName=fileInfo.completeBaseName().append(ext); - auto suggestedLocation=fileInfo.absoluteDir().filePath(suggestedName); + const auto& ext=QString(".%1").arg(type.toLower()); + const auto& filter=tr("%1 Files (*%2);;All Files (*)").arg(type.toUpper(),ext); + const auto& suggestedName=fileInfo.completeBaseName().append(ext); + const auto& suggestedLocation=fileInfo.absoluteDir().filePath(suggestedName); - auto fileName=MainWindow::getSaveFileName(this,tr("Export..."),suggestedLocation,filter,ext); + const auto& fileName=MainWindow::getSaveFileName(this,tr("Export..."),suggestedLocation,filter,ext); if(fileName.isEmpty()) return;