Merge remote-tracking branch 'origin/7.0'

Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri

Change-Id: Ic02df53b880d0861d9d9ea0df3e0d381ae99f350
This commit is contained in:
Eike Ziller
2022-03-11 09:50:48 +01:00
184 changed files with 3566 additions and 908 deletions

View File

@@ -111,7 +111,7 @@ Core::IDocument::OpenResult ImageViewerFile::openImpl(QString *errorString,
if (format.startsWith("svg")) {
m_tempSvgItem = new QGraphicsSvgItem(fileName);
QRectF bound = m_tempSvgItem->boundingRect();
if (qFuzzyIsNull(bound.width()) && qFuzzyIsNull(bound.height())) {
if (!bound.isValid() || (qFuzzyIsNull(bound.width()) && qFuzzyIsNull(bound.height()))) {
delete m_tempSvgItem;
m_tempSvgItem = nullptr;
if (errorString)
@@ -123,8 +123,17 @@ Core::IDocument::OpenResult ImageViewerFile::openImpl(QString *errorString,
} else
#endif
if (QMovie::supportedFormats().contains(format)) {
m_type = TypeMovie;
m_movie = new QMovie(fileName, QByteArray(), this);
// force reading movie/image data, so we can catch completely invalid movies/images early:
m_movie->jumpToNextFrame();
if (!m_movie->isValid()) {
if (errorString)
*errorString = tr("Failed to read image.");
delete m_movie;
m_movie = nullptr;
return OpenResult::CannotHandle;
}
m_type = TypeMovie;
m_movie->setCacheMode(QMovie::CacheAll);
connect(
m_movie,