mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
feat(CI): Disallow implicit casting of QByteArray to char* or void*
QByteArray usually holds arbitrary binary data, which can have null characters or invalid characters when converted to ASCII or UTF8. Disallow implicit casting for safety, forcing an explicit decision if the conversion is wanted.
This commit is contained in:
parent
1e4eed76b5
commit
f1b401166a
@ -102,6 +102,8 @@ if (UNIX AND NOT APPLE)
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-z,relro")
|
||||
endif()
|
||||
|
||||
add_definitions(-DQT_NO_CAST_FROM_BYTEARRAY)
|
||||
|
||||
include(CheckAtomic)
|
||||
|
||||
# Use ccache when available to speed up builds.
|
||||
|
@ -57,7 +57,7 @@ QVector<VideoMode> avfoundation::getDeviceModes(QString devName)
|
||||
return result;
|
||||
}
|
||||
else {
|
||||
NSString* deviceName = [NSString stringWithCString:devName.toUtf8() encoding:NSUTF8StringEncoding];
|
||||
NSString* deviceName = [NSString stringWithCString:devName.toUtf8().constData() encoding:NSUTF8StringEncoding];
|
||||
AVCaptureDevice* device = [AVCaptureDevice deviceWithUniqueID:deviceName];
|
||||
|
||||
if (device == nil) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user