[KPhotoAlbum] [PATCH 1/3] Cleanup: SettingsData: Super minor simplifications
Michael Witten
mfwitten at MIT.EDU
Tue Sep 23 17:45:44 BST 2008
On 23 Sep 2008, at 11:19 AM, Henner Zeller wrote:
> On Tue, Sep 23, 2008 at 4:30 PM, Michael Witten <mfwitten at mit.edu>
> wrote:
>>
>> On 23 Sep 2008, at 9:18 AM, Jan Kundrát wrote:
>>
>>> Michael Witten wrote:
>>>> bool SettingsData::ready()
>>>> {
>>>> - return _instance != 0;
>>>> + return _instance;
>>>> }
>>>
>>> While not remove this function altogether?
>>
>> It would be safest to remove this when we have better
>> guarantees on a "more obvious singleton". Currently,
>> ready() is being used here:
>>
>> void MainWindow::Window::resizeEvent( QResizeEvent* );
>> void MainWindow::Window::moveEvent( QMoveEvent * );
>
> I guess what Jan meant to say is if we already create the instance in
> main(), we don't have to check everywhere if it is ready.
It's not created in main() though, not yet anyway:
MainWindow/Window.cpp:
Settings::SettingsData::setup( QFileInfo( configFile ).absolutePath() );
More information about the Kphotoalbum
mailing list