fix: Mark Bad or Invalid Images as Empty (#4151)
This commit is contained in:
@@ -116,6 +116,7 @@
|
|||||||
- Bugfix: Fixed channel-based popups from rewriting messages to file log (#4060)
|
- Bugfix: Fixed channel-based popups from rewriting messages to file log (#4060)
|
||||||
- Bugfix: Fixed invalid/dangling completion when cycling through previous messages or replying (#4072)
|
- Bugfix: Fixed invalid/dangling completion when cycling through previous messages or replying (#4072)
|
||||||
- Bugfix: Fixed incorrect .desktop icon path. (#4078)
|
- Bugfix: Fixed incorrect .desktop icon path. (#4078)
|
||||||
|
- Bugfix: Mark bad or invalid images as empty. (#4151)
|
||||||
- Dev: Got rid of BaseTheme (#4132)
|
- Dev: Got rid of BaseTheme (#4132)
|
||||||
- Dev: Removed official support for QMake. (#3839, #3883)
|
- Dev: Removed official support for QMake. (#3839, #3883)
|
||||||
- Dev: Rewrote LimitedQueue (#3798)
|
- Dev: Rewrote LimitedQueue (#3798)
|
||||||
|
|||||||
@@ -479,12 +479,14 @@ void Image::actuallyLoad()
|
|||||||
{
|
{
|
||||||
qCDebug(chatterinoImage)
|
qCDebug(chatterinoImage)
|
||||||
<< "Error: image cant be read " << shared->url().string;
|
<< "Error: image cant be read " << shared->url().string;
|
||||||
|
shared->empty_ = true;
|
||||||
return Failure;
|
return Failure;
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto size = reader.size();
|
const auto size = reader.size();
|
||||||
if (size.isEmpty())
|
if (size.isEmpty())
|
||||||
{
|
{
|
||||||
|
shared->empty_ = true;
|
||||||
return Failure;
|
return Failure;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -494,6 +496,7 @@ void Image::actuallyLoad()
|
|||||||
qCDebug(chatterinoImage)
|
qCDebug(chatterinoImage)
|
||||||
<< "Error: image has less than 1 frame "
|
<< "Error: image has less than 1 frame "
|
||||||
<< shared->url().string << ": " << reader.errorString();
|
<< shared->url().string << ": " << reader.errorString();
|
||||||
|
shared->empty_ = true;
|
||||||
return Failure;
|
return Failure;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -504,6 +507,7 @@ void Image::actuallyLoad()
|
|||||||
{
|
{
|
||||||
qCDebug(chatterinoImage) << "image too large in RAM";
|
qCDebug(chatterinoImage) << "image too large in RAM";
|
||||||
|
|
||||||
|
shared->empty_ = true;
|
||||||
return Failure;
|
return Failure;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user