From d97189f055798b5b2051c1c5770a3def62747461 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 23 Jul 2012 00:10:43 +0300 Subject: Improve perfomance in some object constructors. --- src/gui/widgets/avatarlistbox.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/gui/widgets/avatarlistbox.cpp') diff --git a/src/gui/widgets/avatarlistbox.cpp b/src/gui/widgets/avatarlistbox.cpp index c648c56dd..914437281 100644 --- a/src/gui/widgets/avatarlistbox.cpp +++ b/src/gui/widgets/avatarlistbox.cpp @@ -50,8 +50,9 @@ Image *AvatarListBox::offlineIcon = nullptr; AvatarListBox::AvatarListBox(AvatarListModel *model): ListBox(model), - mShowGender(false), - mShowLevel(false) + mShowGender(config.getBoolValue("showgender")), + mShowLevel(config.getBoolValue("showlevel")), + mHighlightColor(Theme::getThemeColor(Theme::HIGHLIGHT)) { instances++; @@ -63,13 +64,9 @@ AvatarListBox::AvatarListBox(AvatarListModel *model): setWidth(200); - mShowGender = config.getBoolValue("showgender"); - mShowLevel = config.getBoolValue("showlevel"); - config.addListener("showgender", this); config.addListener("showlevel", this); - mHighlightColor = Theme::getThemeColor(Theme::HIGHLIGHT); setForegroundColor(Theme::getThemeColor(Theme::TEXT)); } -- cgit v1.2.3-60-g2f50