From c112e793cb95584ea2a6d2dd421c841136c21ae7 Mon Sep 17 00:00:00 2001 From: Chuushouka no Tatsujin Date: Sun, 12 May 2024 18:41:24 +0300 Subject: [PATCH] c++20 --- examples/auth/CMakeLists.txt | 4 ++-- src/CMakeLists.txt | 2 +- src/src/localfile.cpp | 4 ++-- tests/CMakeLists.txt | 2 +- tests/common/CMakeLists.txt | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/auth/CMakeLists.txt b/examples/auth/CMakeLists.txt index ff6e86a..7159866 100644 --- a/examples/auth/CMakeLists.txt +++ b/examples/auth/CMakeLists.txt @@ -2,7 +2,7 @@ add_executable(authclient client.cpp) target_link_libraries(authclient qhttpengine) set_target_properties(authclient PROPERTIES - CXX_STANDARD 11 + CXX_STANDARD 20 ) install(TARGETS authclient RUNTIME DESTINATION "${EXAMPLE_DIR}" @@ -13,7 +13,7 @@ install(TARGETS authclient add_executable(authserver server.cpp) target_link_libraries(authserver qhttpengine) set_target_properties(authserver PROPERTIES - CXX_STANDARD 11 + CXX_STANDARD 20 ) install(TARGETS authserver RUNTIME DESTINATION "${EXAMPLE_DIR}" diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0e10d01..9978c22 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -42,7 +42,7 @@ endif() add_library(qhttpengine STATIC ${HEADERS} ${SRC}) set_target_properties(qhttpengine PROPERTIES - CXX_STANDARD 11 + CXX_STANDARD 20 CXX_STANDARD_REQUIRED ON DEFINE_SYMBOL QT_NO_SIGNALS_SLOTS_KEYWORDS DEFINE_SYMBOL QHTTPENGINE_LIBRARY diff --git a/src/src/localfile.cpp b/src/src/localfile.cpp index cf1fa24..1ab398d 100644 --- a/src/src/localfile.cpp +++ b/src/src/localfile.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 Nathan Osman + * Copyright (c) 2017-2024 Nathan Osman * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -61,7 +61,7 @@ bool LocalFilePrivate::setPermission() ea.grfAccessMode = GRANT_ACCESS; ea.grfInheritance = SUB_CONTAINERS_AND_OBJECTS_INHERIT; ea.Trustee.TrusteeForm = TRUSTEE_IS_NAME; - ea.Trustee.ptstrName = L"CURRENT_USER"; + ea.Trustee.ptstrName = const_cast(L"CURRENT_USER"); // Create a new ACL with a single access control entry PACL pACL; diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 1d5133f..d448182 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -22,7 +22,7 @@ qt5_add_resources(QRC resource.qrc) foreach(TEST ${TESTS}) add_executable(${TEST} ${TEST}.cpp ${QRC}) set_target_properties(${TEST} PROPERTIES - CXX_STANDARD 11 + CXX_STANDARD 20 CXX_STANDARD_REQUIRED ON ) target_include_directories(${TEST} PUBLIC "${CMAKE_CURRENT_BINARY_DIR}") diff --git a/tests/common/CMakeLists.txt b/tests/common/CMakeLists.txt index 1af0b65..456491b 100644 --- a/tests/common/CMakeLists.txt +++ b/tests/common/CMakeLists.txt @@ -5,7 +5,7 @@ set(SRC add_library(common STATIC ${SRC}) set_target_properties(common PROPERTIES - CXX_STANDARD 11 + CXX_STANDARD 20 CXX_STANDARD_REQUIRED ON ) target_link_libraries(common Qt5::Network qhttpengine)