Fix Issue saving new assets in Asset Editor on Linux (#4537)

* Add helper function to apply a selected file filter from a file dialog to the result filename if needed
* Add platform traits to restrict the use of the helper function on platforms that need to apply it
* Fix building of file filters of multiple extensions for a file type

Signed-off-by: Steve Pham <spham@amazon.com>
This commit is contained in:
Steve Pham
2021-10-08 11:41:46 -07:00
committed by GitHub
parent 960edf857d
commit 73f8537030
15 changed files with 234 additions and 6 deletions
@@ -0,0 +1,10 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#pragma once
#include <AzQtComponents/AzQtComponents_Traits_Windows.h>
@@ -0,0 +1,11 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#pragma once
#define AZ_TRAIT_AZQTCOMPONENTS_FILE_DIALOG_APPLY_MISSING_EXTENSION 0
#define AZ_TRAIT_AZQTCOMPONENTS_FILE_DIALOG_FILTER_CASE_SENSITIVITY QRegularExpression::CaseInsensitiveOption