diff --git a/src/widget/friendlistlayout.cpp b/src/widget/friendlistlayout.cpp index 5b00d71c1..6901f7047 100644 --- a/src/widget/friendlistlayout.cpp +++ b/src/widget/friendlistlayout.cpp @@ -20,6 +20,18 @@ #include FriendListLayout::FriendListLayout() + : QVBoxLayout() +{ + init(); +} + +FriendListLayout::FriendListLayout(QWidget* parent) + : QVBoxLayout(parent) +{ + init(); +} + +void FriendListLayout::init() { setSpacing(0); setMargin(0); @@ -34,12 +46,6 @@ FriendListLayout::FriendListLayout() addLayout(friendOfflineLayout.getLayout()); } -FriendListLayout::FriendListLayout(QWidget* parent) - : QVBoxLayout(parent) -{ - FriendListLayout(); -} - void FriendListLayout::addFriendWidget(FriendWidget* w, Status s) { friendOfflineLayout.removeSortedWidget(w); diff --git a/src/widget/friendlistlayout.h b/src/widget/friendlistlayout.h index a0e9d6025..35d48016a 100644 --- a/src/widget/friendlistlayout.h +++ b/src/widget/friendlistlayout.h @@ -43,6 +43,7 @@ public: QLayout* getLayoutOffline() const; private: + void init(); QLayout* getFriendLayout(Status s) const; GenericChatItemLayout friendOnlineLayout;