|
2 | 2 | #include "ui_SettingsDialog.h"
|
3 | 3 |
|
4 | 4 | #include <QSpinBox>
|
| 5 | +#include <QUrl> |
5 | 6 |
|
6 | 7 | #include "Settings.h"
|
7 | 8 |
|
@@ -35,22 +36,27 @@ SettingsDialog::~SettingsDialog() {
|
35 | 36 | }
|
36 | 37 |
|
37 | 38 | void SettingsDialog::setupConfigTab() {
|
38 |
| - auto noteLink = QString("<html><a href='file:%1'>%1</a></html>").arg(Settings::notePath()); |
| 39 | + auto url = QUrl::fromLocalFile(Settings::notePath()); |
| 40 | + auto noteLink = |
| 41 | + QString("<html><a href='%1'>%2</a></html>").arg(url.toEncoded(), Settings::notePath()); |
39 | 42 | ui->noteLocationLabel->setText(noteLink);
|
40 | 43 | }
|
41 | 44 |
|
42 | 45 | void SettingsDialog::setupAboutTab() {
|
43 |
| - auto text = tr(R"(<h2>Nanonote %1</h2> |
44 |
| -<p>A minimalist note taking application.<br> |
45 |
| -<a href='%2'>%2</a></p>)", |
| 46 | + // Do not use C++ raw strings here, the lupdate shipped with Ubuntu 18.04 does not understand |
| 47 | + // them |
| 48 | + auto text = tr("<h2>Nanonote %1</h2>\n" |
| 49 | + "<p>A minimalist note taking application.<br>\n" |
| 50 | + "<a href='%2'>%2</a></p>", |
46 | 51 | "%1: version, %2: project url")
|
47 | 52 | .arg(qApp->applicationVersion(), PROJECT_URL);
|
48 | 53 | ui->aboutLabel->setText(text);
|
49 | 54 |
|
50 |
| - text = tr(R"(<p>Hi,</p> |
51 |
| -<p>I hope you enjoy Nanonote!</p> |
52 |
| -<p>If you do, it would be lovely if you could <a href='%1'>support my work</a> on free and open source software.</p> |
53 |
| -<p align="right">― Aurélien</p>)", |
| 55 | + text = tr("<p>Hi,</p>\n" |
| 56 | + "<p>I hope you enjoy Nanonote!</p>\n" |
| 57 | + "<p>If you do, it would be lovely if you could <a href='%1'>support my work</a> on " |
| 58 | + "free and open source software.</p>\n" |
| 59 | + "<p align=\"right\">― Aurélien</p>", |
54 | 60 | "%1: support url")
|
55 | 61 | .arg(SUPPORT_URL);
|
56 | 62 | auto font = ui->supportLabel->font();
|
|
0 commit comments