Re: [Development] Using '#pragma once' instead of include guards?

2022-10-11 Thread Henry Skoglund
On 2022-10-11 22:04, Thiago Macieira wrote: ... // This macro can be used to calculate member offsets for types with a non standard layout. // It uses the fact that offsetof() is allowed to support those types since C++17 as an optional // feature. All our compilers do support this, but some

Re: [Development] Using '#pragma once' instead of include guards?

2022-10-11 Thread Thiago Macieira
On Tuesday, 11 October 2022 12:25:13 PDT Kyle Edwards via Development wrote: > Speaking as co-maintainer of CMake, we have effectively required #pragma > once to build CMake itself since August 2017, we officially codified > this as policy in September 2020, and we will soon be writing a >

Re: [Development] Using '#pragma once' instead of include guards?

2022-10-11 Thread Thiago Macieira
On Monday, 10 October 2022 13:14:19 PDT Scott Bloom wrote: > The main issue I have, is we build a tool with tons of sub libraries and > modules, with a pretty poor build environment. We have 800+ developers > using it, so any change is done by a committee and takes years ☹ > > Our Qt gets places

Re: [Development] Using '#pragma once' instead of include guards?

2022-10-11 Thread Thiago Macieira
On Tuesday, 11 October 2022 12:31:36 PDT Alejandro Exojo wrote: > I suggest that you don't look at the implementation of things like > Q_OFFSETOF, then. ;-) > > // This macro can be used to calculate member offsets for types with a non > standard layout. // It uses the fact that offsetof() is

Re: [Development] Using '#pragma once' instead of include guards?

2022-10-11 Thread Alejandro Exojo
On Mon, Oct 10, 2022, at 12:11 PM, Hasselmann Mathias wrote: > I am surprised by the question: "It's non-standard and it's behavior is > undefined" actually should be enough to avoid such feature. I suggest that you don't look at the implementation of things like Q_OFFSETOF, then. ;-) // This

Re: [Development] Using '#pragma once' instead of include guards?

2022-10-11 Thread Kyle Edwards via Development
On 10/10/22 05:55, Volker Hilsheimer via Development wrote: Hi, We are using `#pragma once` in a number of examples and tests in the Qt source tree, but I don’t think we have officially endorsed it in favour of explicit include guards. #pragma once is “non-standard but widely supported”

Re: [Development] Using '#pragma once' instead of include guards?

2022-10-11 Thread Kevin Kofler via Development
Paul Colby wrote: > Also worth considering > https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rs-guards > > SF.8: > >> Note Some implementations offer vendor extensions like #pragma once >> as alternative to include guards. It is not standard and it is not >> portable. It injects the

Re: [Development] QTranslator - line feed character

2022-10-11 Thread Giuseppe D'Angelo via Development
On 11/10/2022 11:19, EXT Panajotis Daras via Development wrote: I wanted to ask whether the current behavior in the translation module is correct. In short, the question is about the line feed character in the translation file: // hellotr_la.ts file    

[Development] QTranslator - line feed character

2022-10-11 Thread EXT Panajotis Daras via Development
Hello everyone, I wanted to ask whether the current behavior in the translation module is correct. In short, the question is about the line feed character in the translation file: // hellotr_la.ts file QPushButton Hello Hello\nworld! The customer expects

Re: [Development] Nominating Szabolcs David as Approver

2022-10-11 Thread Alex Blasche via Development
Congratulations. OG Approver rights have been set. -- Alex From: Development on behalf of Allan Sandfeld Jensen Sent: Monday, 19 September 2022 16:51 To: development@qt-project.org Subject: [Development] Nominating Szabolcs David as Approver Hi, I'd