fixed crash
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#include "singletons/ircmanager.hpp"
|
||||
#include "singletons/windowmanager.hpp"
|
||||
#include "util/networkmanager.hpp"
|
||||
#include "util/posttothread.hpp"
|
||||
#include "util/urlfetch.hpp"
|
||||
|
||||
#include <QBuffer>
|
||||
@@ -40,6 +41,7 @@ Image::Image(QPixmap *image, qreal scale, const QString &name, const QString &to
|
||||
, ishat(isHat)
|
||||
, scale(scale)
|
||||
, isLoading(true)
|
||||
, isLoaded(true)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -85,7 +87,7 @@ void Image::loadImage()
|
||||
|
||||
singletons::EmoteManager::getInstance().incGeneration();
|
||||
|
||||
singletons::WindowManager::getInstance().layoutVisibleChatWidgets();
|
||||
postToThread([] { singletons::WindowManager::getInstance().layoutVisibleChatWidgets(); });
|
||||
});
|
||||
|
||||
singletons::EmoteManager::getInstance().getGifUpdateSignal().connect([=]() {
|
||||
|
||||
@@ -375,8 +375,6 @@ int MessageLayoutContainer::getSelectionIndex(QPoint point)
|
||||
index += this->elements[i]->getSelectionIndexCount();
|
||||
}
|
||||
|
||||
qDebug() << index;
|
||||
|
||||
return index;
|
||||
}
|
||||
|
||||
|
||||
@@ -131,6 +131,8 @@ public:
|
||||
if (cachedFile.open(QIODevice::ReadOnly)) {
|
||||
QByteArray bytes = cachedFile.readAll();
|
||||
|
||||
qDebug() << "loaded cached resource" << this->data.request.url();
|
||||
|
||||
onFinished(bytes);
|
||||
|
||||
cachedFile.close();
|
||||
@@ -158,7 +160,7 @@ public:
|
||||
|
||||
QByteArray bytes = reply->readAll();
|
||||
data.writeToCache(bytes);
|
||||
// onFinished(bytes);
|
||||
onFinished(bytes);
|
||||
|
||||
reply->deleteLater();
|
||||
});
|
||||
@@ -191,7 +193,7 @@ public:
|
||||
if (data.caller == nullptr) {
|
||||
QByteArray bytes = reply->readAll();
|
||||
data.writeToCache(bytes);
|
||||
// onFinished(bytes);
|
||||
onFinished(bytes);
|
||||
|
||||
reply->deleteLater();
|
||||
} else {
|
||||
|
||||
@@ -113,14 +113,15 @@ ChannelView::~ChannelView()
|
||||
|
||||
void ChannelView::queueUpdate()
|
||||
{
|
||||
// if (this->updateTimer.isActive()) {
|
||||
// this->updateQueued = true;
|
||||
// return;
|
||||
// }
|
||||
if (this->updateTimer.isActive()) {
|
||||
this->updateQueued = true;
|
||||
return;
|
||||
}
|
||||
|
||||
this->repaint();
|
||||
// this->repaint();
|
||||
this->update();
|
||||
|
||||
// this->updateTimer.start();
|
||||
this->updateTimer.start();
|
||||
}
|
||||
|
||||
void ChannelView::layoutMessages()
|
||||
|
||||
Reference in New Issue
Block a user