move initialization of UI at the top in NewsFeed

This commit is contained in:
csoler 2021-03-31 22:31:00 +02:00
parent 9617ee5135
commit cd61ec8635

View File

@ -83,6 +83,9 @@ NewsFeed::NewsFeed(QWidget *parent) : MainPage(parent), ui(new Ui::NewsFeed),
RsEventType::MAIL_STATUS RsEventType::MAIL_STATUS
}) })
{ {
/* Invoke the Qt Designer generated object setup routine */
ui->setupUi(this);
for(uint32_t i=0;i<mEventTypes.size();++i) for(uint32_t i=0;i<mEventTypes.size();++i)
{ {
mEventHandlerIds.push_back(0); // needed to force intialization by registerEventsHandler() mEventHandlerIds.push_back(0); // needed to force intialization by registerEventsHandler()
@ -91,9 +94,6 @@ NewsFeed::NewsFeed(QWidget *parent) : MainPage(parent), ui(new Ui::NewsFeed),
mEventHandlerIds.back(), mEventTypes[i] ); mEventHandlerIds.back(), mEventTypes[i] );
} }
/* Invoke the Qt Designer generated object setup routine */
ui->setupUi(this);
if (!instance) { if (!instance) {
instance = this; instance = this;
} }