From 3ef1dc7d289319d69eaf21a67db54d32ce05f0f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Micha=C3=ABl=20Celerier?= Date: Tue, 8 Sep 2015 16:40:25 +0200 Subject: [PATCH] Merge --- API | 2 +- base/lib/core/presenter/Presenter.cpp | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/API b/API index eb69b83485..81abf0ba95 160000 --- a/API +++ b/API @@ -1 +1 @@ -Subproject commit eb69b83485605f6d3e6a11db58a4e6d6cabc893c +Subproject commit 81abf0ba95b47c411110fddc4fdadbd246a76489 diff --git a/base/lib/core/presenter/Presenter.cpp b/base/lib/core/presenter/Presenter.cpp index 577e176914..0aaa5eea22 100644 --- a/base/lib/core/presenter/Presenter.cpp +++ b/base/lib/core/presenter/Presenter.cpp @@ -193,8 +193,8 @@ bool Presenter::saveDocument(Document * doc) bool Presenter::saveDocumentAs(Document * doc) { QFileDialog d{m_view, tr("Save Document As")}; - auto binFilter{tr("Binary (*.scorebin)")}; - auto jsonFilter{tr("JSON (*.scorejson)")}; + QString binFilter{tr("Binary (*.scorebin)")}; + QString jsonFilter{tr("JSON (*.scorejson)")}; QStringList filters; filters << binFilter << jsonFilter; @@ -206,18 +206,20 @@ bool Presenter::saveDocumentAs(Document * doc) if(d.exec()) { - auto savename = d.selectedFiles().first(); + QString savename = d.selectedFiles().first(); auto suf = d.selectedNameFilter(); if(!savename.isEmpty()) { if(suf == binFilter) { - savename += ".scorebin"; + if(!savename.contains(".scorebin")) + savename += ".scorebin"; } else { - savename += ".scorejson"; + if(!savename.contains(".scorejson")) + savename += ".scorejson"; } QSaveFile f{savename};