aboutsummaryrefslogtreecommitdiffstats
path: root/desktop-widgets/printoptions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'desktop-widgets/printoptions.cpp')
-rw-r--r--desktop-widgets/printoptions.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/desktop-widgets/printoptions.cpp b/desktop-widgets/printoptions.cpp
index 10d6d9c25..4b1deabca 100644
--- a/desktop-widgets/printoptions.cpp
+++ b/desktop-widgets/printoptions.cpp
@@ -163,6 +163,11 @@ void PrintOptions::on_exportButton_clicked()
tr("HTML files") + " (*.html)");
if (filename.isEmpty())
return;
+ const QString ext(".html");
+ if (filename.endsWith(".htm", Qt::CaseInsensitive))
+ filename += "l";
+ else if (!filename.endsWith(ext, Qt::CaseInsensitive))
+ filename += ext;
QFile::copy(pathUser + QDir::separator() + getSelectedTemplate(), filename);
QFile f(filename);
if (!f.open(QFile::ReadWrite | QFile::Text))