forked from qt-creator/qt-creator
Android: since jpg is allowd, add jpeg to icon/splash file dialog
Change-Id: I018650a33d681f4ea75c9333eb875a197ce96e3d Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -166,7 +166,7 @@ void AndroidManifestEditorIconWidget::selectIcon()
|
||||
{
|
||||
FilePath file = FileUtils::getOpenFilePath(this, m_iconSelectionText,
|
||||
FileUtils::homePath(),
|
||||
tr("Images (*.png *.jpg *.webp *.svg)"));
|
||||
tr("Images (*.png *.jpg *.jpeg *.webp *.svg)"));
|
||||
if (file.isEmpty())
|
||||
return;
|
||||
setIconFromPath(file);
|
||||
|
||||
@@ -62,7 +62,7 @@ const char splashscreenFileName[] = "logo";
|
||||
const char splashscreenPortraitFileName[] = "logo_port";
|
||||
const char splashscreenLandscapeFileName[] = "logo_land";
|
||||
const char imageSuffix[] = ".png";
|
||||
const QString fileDialogImageFiles = QString(QWidget::tr("Images (*.png *.jpg)"));
|
||||
const QString fileDialogImageFiles = QString(QWidget::tr("Images (*.png *.jpg *.jpeg)"));
|
||||
const QSize lowDpiImageSize{200, 320};
|
||||
const QSize mediumDpiImageSize{320, 480};
|
||||
const QSize highDpiImageSize{480, 800};
|
||||
@@ -608,8 +608,8 @@ void SplashScreenContainerWidget::checkSplashscreenImage(const QString &name)
|
||||
|
||||
for (const QString &path : paths) {
|
||||
const FilePath filePath = baseDir.pathAppended(path + name);
|
||||
if (filePath.stringAppended(".png").exists()
|
||||
|| filePath.stringAppended(".jpg").exists()) {
|
||||
if (filePath.stringAppended(".png").exists() || filePath.stringAppended(".jpg").exists()
|
||||
|| filePath.stringAppended(".jpeg").exists()) {
|
||||
setCurrentIndex(1);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -189,7 +189,8 @@ void SplashScreenWidget::selectImage()
|
||||
{
|
||||
const FilePath file = FileUtils::getOpenFilePath(this, m_imageSelectionText,
|
||||
FileUtils::homePath(),
|
||||
QStringLiteral("%1 (*.png *.jpg)").arg(tr("Images")));
|
||||
QStringLiteral("%1 (*.png *.jpg *.jpeg)")
|
||||
.arg(tr("Images")));
|
||||
if (file.isEmpty())
|
||||
return;
|
||||
setImageFromPath(file, false);
|
||||
|
||||
Reference in New Issue
Block a user