[Development] QStorageInfo
Thiago Macieira
thiago.macieira at intel.com
Thu Aug 28 16:03:06 CEST 2014
On Thursday 28 August 2014 06:57:30 Rutledge Shawn wrote:
> But isLocal is the wrong name for something that isn't a bool, and also
> implies that local drives are normal or preferred (which is a matter of
> current fashion, while the future is debatable). If we want an enum, maybe
> we'd better go back to calling it some sort of type flag, but only have 3
> possible values for now? It is more extensible: we can add new flags
> whenever we are sure that they can be set reliably on all platforms. And
> ORing them is more extensible than making them mutually exclusive, because
> we don't know what flags we will add later. So let's have zero be the
> "unknown", and the type of this property should be QFlags. What should its
> name be?
I don't want flags because this will lead people to assume that only local and
remote are mutually exclusive and then write code that assume it's always one
or the other.
I want an API that makes it clear that detection may fail or be ambiguous.
Call it "storage locality" or "storage remoteness" or, hopefully, some better
name.
The more types we start to add, the more difficult it becomes. We can provide an
extra attribute for those types that are determined to be local to report
whether they're fixed, removable, virtual or unknown.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
More information about the Development
mailing list