Changeset View
Changeset View
Standalone View
Standalone View
src/widgets/misc/accountsoverviewwidget.cpp
Show First 20 Lines • Show All 191 Lines • ▼ Show 20 Line(s) | 143 | private: | |||
---|---|---|---|---|---|
192 | void updateTooltip() | 192 | void updateTooltip() | ||
193 | { | 193 | { | ||
194 | setToolTip(currentLoginStatusText()); | 194 | setToolTip(currentLoginStatusText()); | ||
195 | } | 195 | } | ||
196 | 196 | | |||
197 | QPointer<RocketChatAccount> mAccount; | 197 | QPointer<RocketChatAccount> mAccount; | ||
198 | }; | 198 | }; | ||
199 | 199 | | |||
200 | AccountsOverviewWidget::AccountsOverviewWidget(QWidget *parent) | 200 | AccountsOverviewWidget::AccountsOverviewWidget(QWidget *parent) | ||
mlaurent: it's not the same commit as removing class no ?
=> 2 differents commit | |||||
olivierjg: Not about removing the class, about putting this widget in the TL | |||||
201 | : QWidget(parent) | 201 | : QWidget(parent) | ||
202 | { | 202 | { | ||
203 | setLayout(new QHBoxLayout); | 203 | setLayout(new QVBoxLayout); | ||
204 | const auto model = Ruqola::self()->accountManager()->rocketChatAccountModel(); | 204 | const auto model = Ruqola::self()->accountManager()->rocketChatAccountModel(); | ||
205 | connect(model, &RocketChatAccountModel::rowsInserted, this, &AccountsOverviewWidget::updateButtons); | ||||
206 | connect(model, &RocketChatAccountModel::rowsRemoved, this, &AccountsOverviewWidget::updateButtons); | ||||
207 | connect(model, &RocketChatAccountModel::modelReset, this, &AccountsOverviewWidget::updateButtons); | ||||
accountNumberChanged is not enough ? mlaurent: accountNumberChanged is not enough ?
it's called when we add/remove account.
I tested when I… | |||||
205 | connect(model, &RocketChatAccountModel::accountNumberChanged, this, &AccountsOverviewWidget::updateButtons); | 208 | connect(model, &RocketChatAccountModel::accountNumberChanged, this, &AccountsOverviewWidget::updateButtons); | ||
206 | updateButtons(); | 209 | updateButtons(); | ||
207 | } | 210 | } | ||
208 | 211 | | |||
209 | void AccountsOverviewWidget::updateButtons() | 212 | void AccountsOverviewWidget::updateButtons() | ||
210 | { | 213 | { | ||
211 | const auto model = Ruqola::self()->accountManager()->rocketChatAccountModel(); | 214 | const auto model = Ruqola::self()->accountManager()->rocketChatAccountModel(); | ||
212 | const auto count = model->rowCount(); | 215 | const auto count = model->rowCount(); | ||
Show All 15 Lines |
it's not the same commit as removing class no ?
> 2 differents commit