made channels shared_pointers

This commit is contained in:
fourtf
2017-01-30 19:14:25 +01:00
parent 23c2bf03d6
commit 1d1c98ecdb
9 changed files with 90 additions and 42 deletions
+2 -2
View File
@@ -42,7 +42,7 @@ MainWindow::layoutVisibleChatWidgets(Channel *channel)
for (auto it = widgets.begin(); it != widgets.end(); ++it) {
ChatWidget *widget = *it;
if (channel == NULL || channel == widget->getChannel()) {
if (channel == NULL || channel == widget->getChannel().get()) {
if (widget->getView().layoutMessages()) {
widget->update();
}
@@ -64,7 +64,7 @@ MainWindow::repaintVisibleChatWidgets(Channel *channel)
for (auto it = widgets.begin(); it != widgets.end(); ++it) {
ChatWidget *widget = *it;
if (channel == NULL || channel == widget->getChannel()) {
if (channel == NULL || channel == widget->getChannel().get()) {
widget->getView().layoutMessages();
widget->update();
}