Improve File Dialog
* QFileDialog returns UNIX paths, even on Windows. This patch converts what QFileDialog returns to the native path format. * Improve const correctness * Avoid imposing file extension on Linux * This patch improves things like unneeded passes by values, missing const qualifiers, ugly copies because of variable reuse and consistency in variable names.
This commit is contained in:
committed by
Jonathan White
parent
c12fd369d9
commit
fccbb98b8e
@@ -394,8 +394,8 @@ void DatabaseTabWidget::exportToCsv()
|
||||
return;
|
||||
}
|
||||
|
||||
QString fileName = fileDialog()->getSaveFileName(
|
||||
this, tr("Export database to CSV file"), QString(), tr("CSV file").append(" (*.csv)"), nullptr, nullptr, "csv");
|
||||
const QString fileName = fileDialog()->getSaveFileName(
|
||||
this, tr("Export database to CSV file"), QString(), tr("CSV file").append(" (*.csv)"), nullptr, nullptr);
|
||||
if (fileName.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
@@ -419,13 +419,8 @@ void DatabaseTabWidget::exportToHtml()
|
||||
return;
|
||||
}
|
||||
|
||||
QString fileName = fileDialog()->getSaveFileName(this,
|
||||
tr("Export database to HTML file"),
|
||||
QString(),
|
||||
tr("HTML file").append(" (*.html)"),
|
||||
nullptr,
|
||||
nullptr,
|
||||
"html");
|
||||
const QString fileName = fileDialog()->getSaveFileName(
|
||||
this, tr("Export database to HTML file"), QString(), tr("HTML file").append(" (*.html)"), nullptr, nullptr);
|
||||
if (fileName.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user