Skip to content

Commit

Permalink
Use auto for locals in export
Browse files Browse the repository at this point in the history
  • Loading branch information
GilesBathgate committed Nov 12, 2023
1 parent 270d47a commit e96a54b
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());

const QString& ext=QString(".%1").arg(type.toLower());
const QString& filter=tr("%1 Files (*%2);;All Files (*)").arg(type.toUpper(),ext);
const QString& suggestedName=fileInfo.completeBaseName().append(ext);
const QString& suggestedLocation=fileInfo.absoluteDir().filePath(suggestedName);
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 QString& fileName=MainWindow::getSaveFileName(this,tr("Export..."),suggestedLocation,filter,ext);
auto fileName=MainWindow::getSaveFileName(this,tr("Export..."),suggestedLocation,filter,ext);
if(fileName.isEmpty())
return;

Expand Down

0 comments on commit e96a54b

Please sign in to comment.