Some fixes in layout.
This commit is contained in:
@@ -21,9 +21,6 @@ ThumbnailResponse::ThumbnailResponse(Quotient::Connection* c,
|
||||
QString::number(requestedSize.width()),
|
||||
QString::number(requestedSize.height()))),
|
||||
errorStr("Image request hasn't started") {
|
||||
if (!c) {
|
||||
return;
|
||||
}
|
||||
if (requestedSize.isEmpty()) {
|
||||
errorStr.clear();
|
||||
emit finished();
|
||||
@@ -44,6 +41,11 @@ ThumbnailResponse::ThumbnailResponse(Quotient::Connection* c,
|
||||
return;
|
||||
}
|
||||
|
||||
if (!c) {
|
||||
qWarning() << "Current connection is null";
|
||||
return;
|
||||
}
|
||||
|
||||
// Execute a request on the main thread asynchronously
|
||||
moveToThread(c->thread());
|
||||
QMetaObject::invokeMethod(this, &ThumbnailResponse::startRequest,
|
||||
@@ -114,5 +116,5 @@ void ThumbnailResponse::cancel() {
|
||||
QQuickImageResponse* MatrixImageProvider::requestImageResponse(
|
||||
const QString& id,
|
||||
const QSize& requestedSize) {
|
||||
return new ThumbnailResponse(m_connection.load(), id, requestedSize);
|
||||
return new ThumbnailResponse(m_connection.loadRelaxed(), id, requestedSize);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user