Skip to content

Commit

Permalink
Fix use of auto that causes a copy
Browse files Browse the repository at this point in the history
  • Loading branch information
GilesBathgate committed Jul 26, 2024
1 parent 0ae6ae1 commit cae0139
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/ui/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit cae0139

Please sign in to comment.