[patch] KProtocolManager (kio/kio) extensions for application-specific user agent string
David Faure
faure at kde.org
Fri Feb 8 09:34:52 GMT 2008
On Thursday 07 February 2008, Jaroslaw Staniek wrote:
> Thiago Macieira said the following, On 2008-02-07 00:45:
> > Jarosław Staniek wrote:
> >> - adds static bool getSystemNameVersionAndMachine(
> >> QString& systemName, QString& systemVersion, QString& machine );
> >> (returns nicely splitted system name, version and machine type, for
> >> example "Windows", "5.1", "i686"; also more useful for various sysinfo
> >> reporting)
> >
> > I don't like this function name and its arguments.
> >
> > Can't we have three functions instead, each returning a QString?
>
> We can.
> Even beter, alternatively I'd propose KProtocolManager::SystemInformation:
>
> <code>
> struct SystemInformation {
> QString name;
> QString version;
> QString machine;
> }
Yes, you could even make it a class with methods, and give it a d pointer for future extensions...
> static bool static SystemInformation getSystemInformation();
One static too many :)
> -avoid calling system-level function 3 times, and then checking the result 3
> times in the user's code
Yes.
--
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
More information about the kde-core-devel
mailing list