Huge refactor

- Remove some underscore-prefixes
 - Start using this-> more
 - Remove a few of the singletons (We pass references to managers to
         things that need it now. Might not be much better, but for now
         it works. It also shows what places might be slightly wrong
         designed)
This commit is contained in:
Rasmus Karlsson
2017-06-13 21:13:58 +02:00
parent 55b04ee7eb
commit 59d383c161
37 changed files with 630 additions and 523 deletions
+5 -1
View File
@@ -41,7 +41,11 @@ bool MessageRef::layout(int width, bool enableEmoteMargins)
int mediumTextLineHeight =
FontManager::getInstance().getFontMetrics(FontManager::Medium).height();
/* TODO(pajlada): Re-implement
bool recalculateImages = _emoteGeneration != EmoteManager::getInstance().getGeneration();
*/
bool recalculateImages = true;
bool recalculateText = _fontGeneration != FontManager::getInstance().getGeneration();
bool newWordTypes = _currentWordTypes != SettingsManager::getInstance().getWordTypeMask();
@@ -53,7 +57,7 @@ bool MessageRef::layout(int width, bool enableEmoteMargins)
return false;
}
_emoteGeneration = EmoteManager::getInstance().getGeneration();
// _emoteGeneration = EmoteManager::getInstance().getGeneration();
_fontGeneration = FontManager::getInstance().getGeneration();
for (auto &word : _message->getWords()) {