diff options
author | Tomaz Canabrava <tcanabrava@kde.org> | 2018-09-15 08:26:35 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-09-15 15:51:26 -0700 |
commit | 9e6a3bee0d029205169896dc9d2b39f421a3039a (patch) | |
tree | 9f17b62aceca731dfd9014dcdaab559d4bf9d59e | |
parent | 2d6633eee04de7ce2315ecf141267e50babe1ffa (diff) | |
download | subsurface-9e6a3bee0d029205169896dc9d2b39f421a3039a.tar.gz |
code cleanup: remove allocations
Simply create the string in one go.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | desktop-widgets/mainwindow.cpp | 80 |
1 files changed, 39 insertions, 41 deletions
diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp index 72001ff4b..4e2365356 100644 --- a/desktop-widgets/mainwindow.cpp +++ b/desktop-widgets/mainwindow.cpp @@ -1342,26 +1342,25 @@ void MainWindow::on_actionHash_images_triggered() QString MainWindow::filter_open() { - QString f; - f += tr("Dive log files"); - f += " (*.ssrf"; - f += " *.xml"; - f += " *.can"; - f += " *.db" ; - f += " *.sql" ; - f += " *.dld"; - f += " *.jlb"; - f += " *.lvd"; - f += " *.sde"; - f += " *.udcf"; - f += " *.uddf"; - f += " *.dlf"; - f += " *.log"; - f += " *.txt"; - f += " *.apd"; - f += " *.dive"; - f += " *.zxu *.zxl"; - f += ");;"; + QString f = tr("Dive log files") + + " (*.ssrf" + " *.xml" + " *.can" + " *.db" + " *.sql" + " *.dld" + " *.jlb" + " *.lvd" + " *.sde" + " *.udcf" + " *.uddf" + " *.dlf" + " *.log" + " *.txt" + " *.apd" + " *.dive" + " *.zxu *.zxl" + ");;"; f += tr("Subsurface files") + " (*.ssrf *.xml);;"; f += tr("Cochran") + " (*.can);;"; @@ -1384,27 +1383,26 @@ QString MainWindow::filter_open() QString MainWindow::filter_import() { - QString f; - f += tr("Dive log files"); - f += " (*.ssrf"; - f += " *.xml"; - f += " *.can"; - f += " *.csv"; - f += " *.db" ; - f += " *.sql" ; - f += " *.dld"; - f += " *.jlb"; - f += " *.lvd"; - f += " *.sde"; - f += " *.udcf"; - f += " *.uddf"; - f += " *.dlf"; - f += " *.log"; - f += " *.txt"; - f += " *.apd"; - f += " *.dive"; - f += " *.zxu *.zxl"; - f += ");;"; + QString f = tr("Dive log files") + + " (*.ssrf" + " *.xml" + " *.can" + " *.csv" + " *.db" + " *.sql" + " *.dld" + " *.jlb" + " *.lvd" + " *.sde" + " *.udcf" + " *.uddf" + " *.dlf" + " *.log" + " *.txt" + " *.apd" + " *.dive" + " *.zxu *.zxl" + ");;"; f += tr("Subsurface files") + " (*.ssrf *.xml);;"; f += tr("Cochran") + " (*.can);;"; |