Imho isValid is fine, but generally I would suggest a more context specific 
name, i.e. locationKnown for example.

Think about how much sense "valid" makes in the context of the caller code and 
see of you can find a better name perhaps.

Simon

Fra: Tony Van Eerd
Sendt: 20:16 fredag 29. november 2013
Til: development@qt-project.org
Emne: [Development] isValid() as a property


Is it common/uncommon/unheard-of to have a 'valid' property:

Q_PROPERTY( bool valid READ isValid NOTIFY validChanged )


I'm thinking about classes like 'DeviceLocation' which would update with GPS 
changes, but at some point might just become invalid (or start invalid, until 
GPS turns on, etc).


So should isValid() only be used for 'typical' cases of, like 
default-constructed value-types, or is it fine as a property?

Thoughts?
---------------------------------------------------------------------
This transmission (including any attachments) may contain confidential 
information, privileged material (including material protected by the 
solicitor-client or other applicable privileges), or constitute non-public 
information. Any use of this information by anyone other than the intended 
recipient is prohibited. If you have received this transmission in error, 
please immediately reply to the sender and delete this information from your 
system. Use, dissemination, distribution, or reproduction of this transmission 
by unintended recipients is not authorized and may be unlawful.

_______________________________________________
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development
_______________________________________________
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to