Changeset View
Changeset View
Standalone View
Standalone View
src/widgets/ruqolamainwindow.cpp
Show All 20 Lines | |||||
21 | #include "ruqola.h" | 21 | #include "ruqola.h" | ||
22 | #include "rocketchataccount.h" | 22 | #include "rocketchataccount.h" | ||
23 | #include "accountmanager.h" | 23 | #include "accountmanager.h" | ||
24 | #include "roomwrapper.h" | 24 | #include "roomwrapper.h" | ||
25 | #include "receivetypingnotificationmanager.h" | 25 | #include "receivetypingnotificationmanager.h" | ||
26 | #include "ruqolamainwindow.h" | 26 | #include "ruqolamainwindow.h" | ||
27 | #include "ruqolacentralwidget.h" | 27 | #include "ruqolacentralwidget.h" | ||
28 | #include "misc/accountmenu.h" | 28 | #include "misc/accountmenu.h" | ||
29 | #include "misc/accountsoverviewwidget.h" | | |||
30 | #include "dialogs/serverinfodialog.h" | 29 | #include "dialogs/serverinfodialog.h" | ||
31 | #include "dialogs/searchchanneldialog.h" | 30 | #include "dialogs/searchchanneldialog.h" | ||
32 | #include "dialogs/createnewchanneldialog.h" | 31 | #include "dialogs/createnewchanneldialog.h" | ||
33 | #include "dialogs/createnewaccountdialog.h" | 32 | #include "dialogs/createnewaccountdialog.h" | ||
34 | #include "dialogs/showpinnedmessagesdialog.h" | 33 | #include "dialogs/showpinnedmessagesdialog.h" | ||
35 | #include "dialogs/showstarredmessagesdialog.h" | 34 | #include "dialogs/showstarredmessagesdialog.h" | ||
36 | #include "dialogs/showmentionsmessagesdialog.h" | 35 | #include "dialogs/showmentionsmessagesdialog.h" | ||
37 | #include "dialogs/showsnipperedmessagesdialog.h" | 36 | #include "dialogs/showsnipperedmessagesdialog.h" | ||
▲ Show 20 Lines • Show All 46 Lines • ▼ Show 20 Line(s) | 78 | { | |||
84 | Ruqola::destroy(); | 83 | Ruqola::destroy(); | ||
85 | } | 84 | } | ||
86 | 85 | | |||
87 | void RuqolaMainWindow::setupStatusBar() | 86 | void RuqolaMainWindow::setupStatusBar() | ||
88 | { | 87 | { | ||
89 | mStatusBarTypingMessage = new QLabel(this); | 88 | mStatusBarTypingMessage = new QLabel(this); | ||
90 | mStatusBarTypingMessage->setTextFormat(Qt::RichText); | 89 | mStatusBarTypingMessage->setTextFormat(Qt::RichText); | ||
91 | mStatusBarTypingMessage->setObjectName(QStringLiteral("mStatusBarTypingMessage")); | 90 | mStatusBarTypingMessage->setObjectName(QStringLiteral("mStatusBarTypingMessage")); | ||
92 | statusBar()->addPermanentWidget(mStatusBarTypingMessage); | 91 | statusBar()->addPermanentWidget(mStatusBarTypingMessage); | ||
mlaurent: So now that you removed mAccountOverviewWidget which class will use it ?
| |||||
olivierjg: The central widget. | |||||
93 | mAccountOverviewWidget = new AccountsOverviewWidget(this); | | |||
94 | statusBar()->addPermanentWidget(mAccountOverviewWidget); | | |||
95 | } | 92 | } | ||
96 | 93 | | |||
97 | void RuqolaMainWindow::slotAccountChanged() | 94 | void RuqolaMainWindow::slotAccountChanged() | ||
98 | { | 95 | { | ||
99 | if (mCurrentRocketChatAccount) { | 96 | if (mCurrentRocketChatAccount) { | ||
100 | disconnect(mCurrentRocketChatAccount, nullptr, this, nullptr); | 97 | disconnect(mCurrentRocketChatAccount, nullptr, this, nullptr); | ||
101 | } | 98 | } | ||
102 | mCurrentRocketChatAccount = Ruqola::self()->rocketChatAccount(); | 99 | mCurrentRocketChatAccount = Ruqola::self()->rocketChatAccount(); | ||
▲ Show 20 Lines • Show All 281 Lines • ▼ Show 20 Line(s) | 380 | if (dlg->exec()) { | |||
384 | const CreateNewChannelDialog::NewChannelInfo info = dlg->channelInfo(); | 381 | const CreateNewChannelDialog::NewChannelInfo info = dlg->channelInfo(); | ||
385 | mCurrentRocketChatAccount->createNewChannel(info.channelName, info.readOnly, info.privateChannel, info.usersName, info.encryptedRoom, info.password, info.broadCast); | 382 | mCurrentRocketChatAccount->createNewChannel(info.channelName, info.readOnly, info.privateChannel, info.usersName, info.encryptedRoom, info.password, info.broadCast); | ||
386 | } | 383 | } | ||
387 | delete dlg; | 384 | delete dlg; | ||
388 | } | 385 | } | ||
389 | 386 | | |||
390 | void RuqolaMainWindow::slotConfigure() | 387 | void RuqolaMainWindow::slotConfigure() | ||
391 | { | 388 | { | ||
392 | QPointer<ConfigureSettingsDialog> dlg = new ConfigureSettingsDialog(this); | 389 | QScopedPointer<ConfigureSettingsDialog> dlg(new ConfigureSettingsDialog(this)); | ||
mlaurent: Another commit ? | |||||
Ok, sounds like a job for WA_DeleteOnClose but I'll just minimize changes olivierjg: Ok, sounds like a job for WA_DeleteOnClose but I'll just minimize changes | |||||
Well, the removal applies to the accounts overview widget, but I changed too much indeed. olivierjg: Well, the removal applies to the accounts overview widget, but I changed too much indeed. | |||||
I think the idea here (using QPointer) was to fix https://blogs.kde.org/node/3919 dfaure: I think the idea here (using QPointer) was to fix https://blogs.kde.org/node/3919
With… | |||||
393 | if (dlg->exec()) { | 390 | dlg->exec(); | ||
394 | mAccountOverviewWidget->updateButtons(); | | |||
395 | } | | |||
396 | delete dlg; | | |||
397 | } | 391 | } | ||
398 | 392 | | |||
399 | void RuqolaMainWindow::slotAddAccount() | 393 | void RuqolaMainWindow::slotAddAccount() | ||
400 | { | 394 | { | ||
401 | QPointer<CreateNewAccountDialog> dlg = new CreateNewAccountDialog(this); | 395 | QPointer<CreateNewAccountDialog> dlg = new CreateNewAccountDialog(this); | ||
402 | if (dlg->exec()) { | 396 | if (dlg->exec()) { | ||
403 | const CreateNewAccountDialog::AccountInfo info = dlg->accountInfo(); | 397 | const CreateNewAccountDialog::AccountInfo info = dlg->accountInfo(); | ||
404 | Ruqola::self()->accountManager()->addAccount(info.accountName, info.userName, info.serverName); | 398 | Ruqola::self()->accountManager()->addAccount(info.accountName, info.userName, info.serverName); | ||
Show All 39 Lines |
So now that you removed mAccountOverviewWidget which class will use it ?