disable F5 key and data refresh
authorsheepluva
Fri, 26 Oct 2012 17:21:28 +0200
changeset 7824 3df73ec7fcf2
parent 7823 46f115569045
child 7825 1b96361a7ef4
disable F5 key and data refresh
QTfrontend/hwform.cpp
QTfrontend/ui/page/pagedata.cpp
QTfrontend/util/DataManager.cpp
--- a/QTfrontend/hwform.cpp	Fri Oct 26 17:05:12 2012 +0200
+++ b/QTfrontend/hwform.cpp	Fri Oct 26 17:21:28 2012 +0200
@@ -163,8 +163,8 @@
     // ctrl+q closes frontend for consistency
     QShortcut * closeFrontend = new QShortcut(QKeySequence("Ctrl+Q"), this);
     connect (closeFrontend, SIGNAL(activated()), this, SLOT(close()));
-    QShortcut * updateData = new QShortcut(QKeySequence("F5"), this);
-    connect (updateData, SIGNAL(activated()), &DataManager::instance(), SLOT(reload()));
+    //QShortcut * updateData = new QShortcut(QKeySequence("F5"), this);
+    //connect (updateData, SIGNAL(activated()), &DataManager::instance(), SLOT(reload()));
 #endif
 
     UpdateTeamsLists();
--- a/QTfrontend/ui/page/pagedata.cpp	Fri Oct 26 17:05:12 2012 +0200
+++ b/QTfrontend/ui/page/pagedata.cpp	Fri Oct 26 17:21:28 2012 +0200
@@ -245,6 +245,6 @@
     if (m_contentDownloaded)
     {
         m_contentDownloaded = false;
-        DataManager::instance().reload();
+        //DataManager::instance().reload();
     }
 }
--- a/QTfrontend/util/DataManager.cpp	Fri Oct 26 17:05:12 2012 +0200
+++ b/QTfrontend/util/DataManager.cpp	Fri Oct 26 17:21:28 2012 +0200
@@ -201,11 +201,9 @@
 
 void DataManager::reload()
 {
-    m_gameStyleModel->loadGameStyles();
-    m_hatModel->loadHats();
-    m_mapModel->loadMaps();
-    m_themeModel->loadThemes();
-    emit updated();
+    // removed for now (also code was a bit unclean, could lead to segfault if
+    // reload() is called before all members are initialized - because currently
+    // they are initialized in the getter methods rather than the constructor)
 }
 
 void DataManager::resetColors()