[KPhotoAlbum] [PATCH 1/3] Cleanup: SettingsData: Super minor simplifications

Jan Kundrát jkt at gentoo.org
Tue Sep 23 15:18:33 BST 2008


Michael Witten wrote:
>  bool SettingsData::ready()
>  {
> -    return _instance != 0;
> +    return _instance;
>  }

While not remove this function altogether?

>  void SettingsData::setup( const QString& imageDirectory )
>  {
> -    _instance = new SettingsData( imageDirectory );
> +    if ( !_instance )
> +        _instance = new SettingsData( imageDirectory );
>  }

You've already spoken about that on irc, perhaps turning these to "more 
obvious singletons" won't harm...

-- 
cd /local/pub && more beer > /dev/mouth

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
URL: <http://mail.kde.org/pipermail/kphotoalbum/attachments/20080923/6cc5bdd6/attachment.sig>


More information about the Kphotoalbum mailing list