diff options
author | Miikka Heikkinen <miikka.heikkinen@qt.io> | 2018-02-08 12:45:31 +0200 |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@qt.io> | 2018-02-08 10:49:45 +0000 |
commit | bd4925e4ea3236362e743c64e48fa974fae0e6f8 (patch) | |
tree | f74c92248d976e68345e0e6d05384a5c6c9722e3 | |
parent | 4bba6b9df5c8d606548b17980e876e4dfe0fdcec (diff) |
Fix handling of projects with dots in the name
Task-number: QT3DS-989
Change-Id: I807ca66925f0772ee9588ed381a5b485f49ddbb7
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
-rw-r--r-- | src/Authoring/Studio/_Win/Workspace/Dialogs.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/Authoring/Studio/_Win/Workspace/Dialogs.cpp b/src/Authoring/Studio/_Win/Workspace/Dialogs.cpp index ccd34bd7..7761387c 100644 --- a/src/Authoring/Studio/_Win/Workspace/Dialogs.cpp +++ b/src/Authoring/Studio/_Win/Workspace/Dialogs.cpp @@ -861,7 +861,13 @@ std::pair<Qt3DSFile, bool> CDialogs::GetSaveAsChoice(const QString &inDialogTitl while (theShowDialog && theFileDlg.exec()) { theShowDialog = false; - theFile = Qt3DSFile(Q3DStudio::CString::fromQString(theFileDlg.selectedFiles().front())); + QString selectedName = theFileDlg.selectedFiles().front(); + + // Make sure file name has correct extension + if (!selectedName.endsWith(theFileExt)) + selectedName.append(theFileExt); + + theFile = Qt3DSFile(Q3DStudio::CString::fromQString(selectedName)); m_LastSaveFile = theFile.GetAbsolutePath(); // customising a dialog box will force us to use non-native. |