[KPhotoAlbum] [PATCH 1/3] Cleanup: SettingsData: Super minor simplifications
Michael Witten
mfwitten at MIT.EDU
Tue Sep 23 04:18:09 BST 2008
---
Settings/SettingsData.cpp | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/Settings/SettingsData.cpp b/Settings/SettingsData.cpp
index e6af3f0..2aa9fe2 100644
--- a/Settings/SettingsData.cpp
+++ b/Settings/SettingsData.cpp
@@ -120,17 +120,19 @@ SettingsData* SettingsData::instance()
{
if ( ! _instance )
qFatal("instance called before loading a setup!");
+
return _instance;
}
bool SettingsData::ready()
{
- return _instance != 0;
+ return _instance;
}
void SettingsData::setup( const QString& imageDirectory )
{
- _instance = new SettingsData( imageDirectory );
+ if ( !_instance )
+ _instance = new SettingsData( imageDirectory );
}
SettingsData::SettingsData( const QString& imageDirectory )
--
1.6.0.2.302.ge6cbd1
More information about the Kphotoalbum
mailing list