| 90 | using namespace Gui::FileDialogInternal; |
| 91 | |
| 92 | static std::unique_ptr<wchar_t[]> qStringToWCharArray(const QString& s, size_t reserveSize = 0) |
| 93 | { |
| 94 | const size_t stringSize = s.size(); |
| 95 | wchar_t* result = new wchar_t[qMax(stringSize + 1, reserveSize)]; |
| 96 | s.toWCharArray(result); |
| 97 | result[stringSize] = 0; |
| 98 | return std::unique_ptr<wchar_t[]>(result); |
| 99 | } |
| 100 | |
| 101 | /* The legacy Get{Open,Save}FileNameW() functions never change how the file filters are |
| 102 | * displayed, inherently avoiding the problem in issue #23139. |
no test coverage detected