Refactoring - Moved instance() to the top of the file
authorLuciano Montanaro <mikelima@cirulla.net>
Sat, 30 Jul 2011 23:27:57 +0000 (01:27 +0200)
committerLuciano Montanaro <mikelima@cirulla.net>
Tue, 27 Dec 2011 22:16:48 +0000 (23:16 +0100)
application/settings.cpp

index 8e56595..a80ac08 100644 (file)
@@ -25,6 +25,15 @@ Boston, MA 02110-1301, USA.
 #include <QSettings>
 #include <QStringList>
 
+Settings *Settings::instance()
+{
+    static Settings *settings = 0;
+
+    if (!settings)
+        settings = new Settings();
+    return settings;
+}
+
 Settings::Settings(QObject *parent) :
     QObject(parent)
 {
@@ -112,15 +121,6 @@ void Settings::setStationViewPreferred(bool preference)
     emit stationViewPreferredChanged(m_stationViewPreferred);
 }
 
-Settings *Settings::instance()
-{
-    static Settings *settings = 0;
-
-    if (!settings)
-        settings = new Settings();
-    return settings;
-}
-
 bool Settings::showArrivalsPreferred()
 {
     return m_showArrivalsPreferred;