From d7d5bffa181b5e8d5e07f5c38a3f0ccbb70955e5 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 5 Jun 2019 16:05:34 -0400 Subject: [PATCH] yuzu/CMakeLists: Disable implicit QString->QUrl conversions Enforces the use of the proper URL resolution functions. e.g. url = some_local_path_string; should actually be: url = QUrl::fromLocalPath(some_local_path_string); etc. This makes it harder to cause bugs when operating with both strings and URLs at the same time. --- src/yuzu/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/yuzu/CMakeLists.txt b/src/yuzu/CMakeLists.txt index 37394be377..3dc0e47d06 100644 --- a/src/yuzu/CMakeLists.txt +++ b/src/yuzu/CMakeLists.txt @@ -165,6 +165,9 @@ target_compile_definitions(yuzu PRIVATE # Disable unsafe overloads of QProcess' start() function. -DQT_NO_PROCESS_COMBINED_ARGUMENT_START + + # Disable implicit QString->QUrl conversions to enforce use of proper resolving functions. + -DQT_NO_URL_CAST_FROM_STRING ) if (YUZU_ENABLE_COMPATIBILITY_REPORTING)