diff --git a/app/aboutdialog.cpp b/app/aboutdialog.cpp index 06c6ef1..83d4898 100644 --- a/app/aboutdialog.cpp +++ b/app/aboutdialog.cpp @@ -14,6 +14,8 @@ #include #include +using namespace Qt::Literals::StringLiterals; + AboutDialog::AboutDialog(QWidget *parent) : QDialog(parent) , m_tabWidget(new QTabWidget) @@ -27,60 +29,60 @@ AboutDialog::AboutDialog(QWidget *parent) this->setWindowTitle(tr("About")); const QStringList helpStr { - QStringLiteral("

%1

").arg(tr("Launch application with image file path as argument to load the file.")), - QStringLiteral("

%1

").arg(tr("Drag and drop image file onto the window is also supported.")), - QStringLiteral("

%1

").arg(tr("None of the operations in this application will alter the pictures on disk.")), - QStringLiteral("

%1

").arg(tr("Context menu option explanation:")), - QStringLiteral(""_s }; const QStringList aboutStr { - QStringLiteral("

"), + u"

"_s, qApp->applicationDisplayName(), - (QStringLiteral("
") + tr("Version: %1").arg( + (u"
"_s + tr("Version: %1").arg( #ifdef GIT_DESCRIBE_VERSION_STRING GIT_DESCRIBE_VERSION_STRING #else qApp->applicationVersion() #endif // GIT_DESCRIBE_VERSION_STRING )), - QStringLiteral("
"), + u"
"_s, tr("Copyright (c) %1 %2", "%1 is year, %2 is the name of copyright holder(s)") - .arg(QStringLiteral("2025"), QStringLiteral("@BLumia")), - QStringLiteral("
"), - tr("Logo designed by %1").arg(QStringLiteral("@Lovelyblack")), - QStringLiteral("
"), + .arg(u"2025"_s, u"@BLumia"_s), + u"
"_s, + tr("Logo designed by %1").arg(u"@Lovelyblack"_s), + u"
"_s, tr("Built with Qt %1 (%2)").arg(QT_VERSION_STR, QSysInfo::buildCpuArchitecture()), QStringLiteral("
%2").arg("https://github.com/BLumia/pineapple-pictures", tr("Source code")), - QStringLiteral("
") + u"
"_s }; - QFile translaterHtml(":/plain/translators.html"); + QFile translaterHtml(u":/plain/translators.html"_s); bool canOpenFile = translaterHtml.open(QIODevice::ReadOnly); const QByteArray & translatorList = canOpenFile ? translaterHtml.readAll() : QByteArrayLiteral(""); const QStringList specialThanksStr { - QStringLiteral("

%1

%3

%4

").arg( + u"

%1

%3

%4

"_s.arg( tr("Contributors"), - QStringLiteral("https://github.com/BLumia/pineapple-pictures/graphs/contributors"), + u"https://github.com/BLumia/pineapple-pictures/graphs/contributors"_s, tr("List of contributors on GitHub"), tr("Thanks to all people who contributed to this project.") ), - QStringLiteral("

%1

%2

%3").arg( + u"

%1

%2

%3"_s.arg( tr("Translators"), tr("I would like to thank the following people who volunteered to translate this application."), translatorList @@ -88,17 +90,17 @@ AboutDialog::AboutDialog(QWidget *parent) }; const QStringList licenseStr { - QStringLiteral("

%1

").arg(tr("Your Rights")), - QStringLiteral("

%1

%2

").arg( + u"

%1

"_s.arg(tr("Your Rights")), + u"

%1

%2

"_s.arg( tr("%1 is released under the MIT License."), // %1 tr("This license grants people a number of freedoms:"), // %2 tr("You are free to use %1, for any purpose"), // %3 tr("You are free to distribute %1"), // %4 tr("You can study how %1 works and change it"), // %5 tr("You can distribute changed versions of %1") // %6 - ).arg(QStringLiteral("%1")), - QStringLiteral("

%1

").arg(tr("The MIT license guarantees you this freedom. Nobody is ever permitted to take it away.")), - QStringLiteral("
%2
") + ).arg(u"%1"_s), + u"

%1

"_s.arg(tr("The MIT license guarantees you this freedom. Nobody is ever permitted to take it away.")), + u"
%2
"_s }; const QString mitLicense(QStringLiteral(R"(Expat/MIT License @@ -125,14 +127,14 @@ SOFTWARE. )")); const QStringList thirdPartyLibsStr { - QStringLiteral("

%1

").arg(tr("Third-party Libraries used by %1")), + u"

%1

"_s.arg(tr("Third-party Libraries used by %1")), tr("%1 is built on the following free software libraries:", "Free as in freedom"), - QStringLiteral(""_s }; m_helpTextEdit->setText(helpStr.join('\n')); @@ -145,7 +147,7 @@ SOFTWARE. m_licenseTextEdit->setText(licenseStr.join('\n').arg(qApp->applicationDisplayName(), mitLicense)); - m_3rdPartyLibsTextEdit->setText(thirdPartyLibsStr.join('\n').arg(QStringLiteral("%1").arg(qApp->applicationDisplayName()))); + m_3rdPartyLibsTextEdit->setText(thirdPartyLibsStr.join('\n').arg(u"%1"_s).arg(qApp->applicationDisplayName())); m_3rdPartyLibsTextEdit->setOpenExternalLinks(true); m_tabWidget->addTab(m_helpTextEdit, tr("&Help")); diff --git a/app/bottombuttongroup.cpp b/app/bottombuttongroup.cpp index 8d0234d..872cd6a 100644 --- a/app/bottombuttongroup.cpp +++ b/app/bottombuttongroup.cpp @@ -6,8 +6,6 @@ #include "opacityhelper.h" -#include - #include #include #include diff --git a/app/main.cpp b/app/main.cpp index 5c7554d..a9d8999 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -17,9 +17,11 @@ #include #include +using namespace Qt::Literals::StringLiterals; + int main(int argc, char *argv[]) { - QCoreApplication::setApplicationName("Pineapple Pictures"); + QCoreApplication::setApplicationName(u"Pineapple Pictures"_s); QCoreApplication::setApplicationVersion(PPIC_VERSION_STRING); QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Settings::instance()->hiDpiScaleFactorBehavior()); @@ -27,20 +29,20 @@ int main(int argc, char *argv[]) QTranslator translator; #if defined(TRANSLATION_RESOURCE_EMBEDDING) - const QString qmDir = QLatin1String(":/i18n/"); + const QString qmDir = u":/i18n/"_s; #elif defined(QM_FILE_INSTALL_ABSOLUTE_DIR) const QString qmDir = QT_STRINGIFY(QM_FILE_INSTALL_ABSOLUTE_DIR); #else const QString qmDir = QDir(QCoreApplication::applicationDirPath()).absoluteFilePath("translations"); #endif - if (translator.load(QLocale(), QLatin1String("PineapplePictures"), QLatin1String("_"), qmDir)) { + if (translator.load(QLocale(), u"PineapplePictures"_s, u"_"_s, qmDir)) { QCoreApplication::installTranslator(&translator); } QGuiApplication::setApplicationDisplayName(QCoreApplication::translate("main", "Pineapple Pictures")); // commandline options - QCommandLineOption supportedImageFormats(QStringLiteral("supported-image-formats"), QCoreApplication::translate("main", "List supported image format suffixes, and quit program.")); + QCommandLineOption supportedImageFormats(u"supported-image-formats"_s, QCoreApplication::translate("main", "List supported image format suffixes, and quit program.")); // parse commandline arguments QCommandLineParser parser; parser.addOption(supportedImageFormats); diff --git a/app/mainwindow.cpp b/app/mainwindow.cpp index cc0d6ac..dc57b89 100644 --- a/app/mainwindow.cpp +++ b/app/mainwindow.cpp @@ -44,6 +44,8 @@ #include #endif // HAVE_QTDBUS +using namespace Qt::Literals::StringLiterals; + MainWindow::MainWindow(QWidget *parent) : FramelessWindow(parent) , m_am(new ActionManager) @@ -56,17 +58,17 @@ MainWindow::MainWindow(QWidget *parent) this->setAttribute(Qt::WA_TranslucentBackground, true); this->setMinimumSize(350, 330); - this->setWindowIcon(QIcon(":/icons/app-icon.svg")); + this->setWindowIcon(QIcon(u":/icons/app-icon.svg"_s)); this->setMouseTracking(true); this->setAcceptDrops(true); m_pm->setAutoLoadFilterSuffixes(supportedImageFormats()); - m_fadeOutAnimation = new QPropertyAnimation(this, "windowOpacity"); + m_fadeOutAnimation = new QPropertyAnimation(this, "windowOpacity"_ba); m_fadeOutAnimation->setDuration(300); m_fadeOutAnimation->setStartValue(1); m_fadeOutAnimation->setEndValue(0); - m_floatUpAnimation = new QPropertyAnimation(this, "geometry"); + m_floatUpAnimation = new QPropertyAnimation(this, "geometry"_ba); m_floatUpAnimation->setDuration(300); m_floatUpAnimation->setEasingCurve(QEasingCurve::OutCirc); m_exitAnimationGroup = new QParallelAnimationGroup(this); @@ -92,7 +94,7 @@ MainWindow::MainWindow(QWidget *parent) m_gv->fitInView(m_gv->sceneRect(), Qt::KeepAspectRatio); connect(m_graphicsView, &GraphicsView::navigatorViewRequired, - this, [ = ](bool required, const QTransform & tf){ + this, [this](bool required, const QTransform & tf){ m_gv->setTransform(GraphicsView::resetScale(tf)); m_gv->fitInView(m_gv->sceneRect(), Qt::KeepAspectRatio); m_gv->setVisible(required); @@ -447,13 +449,11 @@ void MainWindow::contextMenuEvent(QContextMenuEvent *event) QMenu * menu = new QMenu; QMenu * copyMenu = new QMenu(tr("&Copy")); QUrl currentFileUrl = currentImageFileUrl(); - QImage clipboardImage; - QUrl clipboardFileUrl; QAction * copyPixmap = m_am->actionCopyPixmap; QAction * copyFilePath = m_am->actionCopyFilePath; - copyMenu->setIcon(QIcon::fromTheme(QLatin1String("edit-copy"))); + copyMenu->setIcon(QIcon::fromTheme(u"edit-copy"_s)); copyMenu->addAction(copyPixmap); if (currentFileUrl.isValid()) { copyMenu->addAction(copyFilePath); @@ -780,7 +780,7 @@ void MainWindow::on_actionTrash_triggered() if (result == QMessageBox::Yes) { bool succ = file.moveToTrash(); if (!succ) { - QMessageBox::warning(this, "Failed to move file to trash", + QMessageBox::warning(this, tr("Failed to move file to trash"), tr("Move to trash failed, it might caused by file permission issue, file system limitation, or platform limitation.")); } else { m_pm->removeAt(index); @@ -891,9 +891,9 @@ void MainWindow::on_actionLocateInFileManager_triggered() QDesktopServices::openUrl(folderUrl); return; } - QDBusInterface fm1Iface(QStringLiteral("org.freedesktop.FileManager1"), - QStringLiteral("/org/freedesktop/FileManager1"), - QStringLiteral("org.freedesktop.FileManager1")); + QDBusInterface fm1Iface(u"org.freedesktop.FileManager1"_s, + u"/org/freedesktop/FileManager1"_s, + u"org.freedesktop.FileManager1"_s); fm1Iface.setTimeout(1000); fm1Iface.callWithArgumentList(QDBus::Block, "ShowItems", { QStringList{currentFileUrl.toString()}, diff --git a/app/metadatamodel.cpp b/app/metadatamodel.cpp index 9350000..0f829ad 100644 --- a/app/metadatamodel.cpp +++ b/app/metadatamodel.cpp @@ -11,6 +11,8 @@ #include #include +using namespace Qt::Literals::StringLiterals; + MetadataModel::MetadataModel(QObject *parent) : QAbstractItemModel(parent) { @@ -37,131 +39,131 @@ void MetadataModel::setFile(const QString &imageFilePath) const QString & imageDimensionsString = imageSize(imgReader.size()); const QString & imageRatioString = imageSizeRatio(imgReader.size()); - appendSection(QStringLiteral("Description"), tr("Description", "Section name.")); - appendSection(QStringLiteral("Origin"), tr("Origin", "Section name.")); - appendSection(QStringLiteral("Image"), tr("Image", "Section name.")); - appendSection(QStringLiteral("Camera"), tr("Camera", "Section name.")); - appendSection(QStringLiteral("AdvancedPhoto"), tr("Advanced photo", "Section name.")); - appendSection(QStringLiteral("GPS"), tr("GPS", "Section name.")); - appendSection(QStringLiteral("File"), tr("File", "Section name.")); + appendSection(u"Description"_s, tr("Description", "Section name.")); + appendSection(u"Origin"_s, tr("Origin", "Section name.")); + appendSection(u"Image"_s, tr("Image", "Section name.")); + appendSection(u"Camera"_s, tr("Camera", "Section name.")); + appendSection(u"AdvancedPhoto"_s, tr("Advanced photo", "Section name.")); + appendSection(u"GPS"_s, tr("GPS", "Section name.")); + appendSection(u"File"_s, tr("File", "Section name.")); if (imgReader.supportsOption(QImageIOHandler::Size)) { - appendProperty(QStringLiteral("Image"), QStringLiteral("Image.Dimensions"), + appendProperty(u"Image"_s, u"Image.Dimensions"_s, tr("Dimensions"), imageDimensionsString); - appendProperty(QStringLiteral("Image"), QStringLiteral("Image.SizeRatio"), + appendProperty(u"Image"_s, u"Image.SizeRatio"_s, tr("Aspect ratio"), imageRatioString); } if (imgReader.supportsAnimation() && imgReader.imageCount() > 1) { - appendProperty(QStringLiteral("Image"), QStringLiteral("Image.FrameCount"), + appendProperty(u"Image"_s, u"Image.FrameCount"_s, tr("Frame count"), QString::number(imgReader.imageCount())); } - appendProperty(QStringLiteral("File"), QStringLiteral("File.Name"), + appendProperty(u"File"_s, u"File.Name"_s, tr("Name"), fileInfo.fileName()); - appendProperty(QStringLiteral("File"), QStringLiteral("File.ItemType"), + appendProperty(u"File"_s, u"File.ItemType"_s, tr("Item type"), itemTypeString); - appendProperty(QStringLiteral("File"), QStringLiteral("File.Path"), + appendProperty(u"File"_s, u"File.Path"_s, tr("Folder path"), QDir::toNativeSeparators(fileInfo.path())); - appendProperty(QStringLiteral("File"), QStringLiteral("File.Size"), + appendProperty(u"File"_s, u"File.Size"_s, tr("Size"), sizeString); - appendProperty(QStringLiteral("File"), QStringLiteral("File.CreatedTime"), + appendProperty(u"File"_s, u"File.CreatedTime"_s, tr("Date created"), birthTimeString); - appendProperty(QStringLiteral("File"), QStringLiteral("File.LastModified"), + appendProperty(u"File"_s, u"File.LastModified"_s, tr("Date modified"), lastModifiedTimeString); Exiv2Wrapper wrapper; if (wrapper.load(imageFilePath)) { wrapper.cacheSections(); - appendExivPropertyIfExist(wrapper, QStringLiteral("Description"), - QStringLiteral("Xmp.dc.title"), tr("Title"), true); - appendExivPropertyIfExist(wrapper, QStringLiteral("Description"), - QStringLiteral("Exif.Image.ImageDescription"), tr("Subject"), true); - appendExivPropertyIfExist(wrapper, QStringLiteral("Description"), - QStringLiteral("Exif.Image.Rating"), tr("Rating")); - appendExivPropertyIfExist(wrapper, QStringLiteral("Description"), - QStringLiteral("Xmp.dc.subject"), tr("Tags")); - appendPropertyIfNotEmpty(QStringLiteral("Description"), QStringLiteral("Description.Comments"), + appendExivPropertyIfExist(wrapper, u"Description"_s, + u"Xmp.dc.title"_s, tr("Title"), true); + appendExivPropertyIfExist(wrapper, u"Description"_s, + u"Exif.Image.ImageDescription"_s, tr("Subject"), true); + appendExivPropertyIfExist(wrapper, u"Description"_s, + u"Exif.Image.Rating"_s, tr("Rating")); + appendExivPropertyIfExist(wrapper, u"Description"_s, + u"Xmp.dc.subject"_s, tr("Tags")); + appendPropertyIfNotEmpty(u"Description"_s, u"Description.Comments"_s, tr("Comments"), wrapper.comment()); - appendExivPropertyIfExist(wrapper, QStringLiteral("Origin"), - QStringLiteral("Exif.Image.Artist"), tr("Authors")); - appendExivPropertyIfExist(wrapper, QStringLiteral("Origin"), - QStringLiteral("Exif.Photo.DateTimeOriginal"), tr("Date taken")); + appendExivPropertyIfExist(wrapper, u"Origin"_s, + u"Exif.Image.Artist"_s, tr("Authors")); + appendExivPropertyIfExist(wrapper, u"Origin"_s, + u"Exif.Photo.DateTimeOriginal"_s, tr("Date taken")); // FIXME: We may fetch the same type of metadata from different metadata collection. // Current implementation is not pretty and may need to do a rework... // appendExivPropertyIfExist(wrapper, QStringLiteral("Origin"), // QStringLiteral("Xmp.xmp.CreatorTool"), tr("Program name")); - appendExivPropertyIfExist(wrapper, QStringLiteral("Origin"), - QStringLiteral("Exif.Image.Software"), tr("Program name")); - appendExivPropertyIfExist(wrapper, QStringLiteral("Origin"), - QStringLiteral("Exif.Image.Copyright"), tr("Copyright")); + appendExivPropertyIfExist(wrapper, u"Origin"_s, + u"Exif.Image.Software"_s, tr("Program name")); + appendExivPropertyIfExist(wrapper, u"Origin"_s, + u"Exif.Image.Copyright"_s, tr("Copyright")); - appendExivPropertyIfExist(wrapper, QStringLiteral("Image"), - QStringLiteral("Exif.Image.XResolution"), tr("Horizontal resolution")); - appendExivPropertyIfExist(wrapper, QStringLiteral("Image"), - QStringLiteral("Exif.Image.YResolution"), tr("Vertical resolution")); - appendExivPropertyIfExist(wrapper, QStringLiteral("Image"), - QStringLiteral("Exif.Image.ResolutionUnit"), tr("Resolution unit")); - appendExivPropertyIfExist(wrapper, QStringLiteral("Image"), - QStringLiteral("Exif.Photo.ColorSpace"), tr("Colour representation")); + appendExivPropertyIfExist(wrapper, u"Image"_s, + u"Exif.Image.XResolution"_s, tr("Horizontal resolution")); + appendExivPropertyIfExist(wrapper, u"Image"_s, + u"Exif.Image.YResolution"_s, tr("Vertical resolution")); + appendExivPropertyIfExist(wrapper, u"Image"_s, + u"Exif.Image.ResolutionUnit"_s, tr("Resolution unit")); + appendExivPropertyIfExist(wrapper, u"Image"_s, + u"Exif.Photo.ColorSpace"_s, tr("Colour representation")); - appendExivPropertyIfExist(wrapper, QStringLiteral("Camera"), - QStringLiteral("Exif.Image.Make"), tr("Camera maker")); - appendExivPropertyIfExist(wrapper, QStringLiteral("Camera"), - QStringLiteral("Exif.Image.Model"), tr("Camera model")); - appendExivPropertyIfExist(wrapper, QStringLiteral("Camera"), - QStringLiteral("Exif.Photo.FNumber"), tr("F-stop")); - appendExivPropertyIfExist(wrapper, QStringLiteral("Camera"), - QStringLiteral("Exif.Photo.ExposureTime"), tr("Exposure time")); - appendExivPropertyIfExist(wrapper, QStringLiteral("Camera"), - QStringLiteral("Exif.Photo.ISOSpeedRatings"), tr("ISO speed")); - appendExivPropertyIfExist(wrapper, QStringLiteral("Camera"), - QStringLiteral("Exif.Photo.ExposureBiasValue"), tr("Exposure bias")); - appendExivPropertyIfExist(wrapper, QStringLiteral("Camera"), - QStringLiteral("Exif.Photo.FocalLength"), tr("Focal length")); - appendExivPropertyIfExist(wrapper, QStringLiteral("Camera"), - QStringLiteral("Exif.Photo.MaxApertureValue"), tr("Max aperture")); - appendExivPropertyIfExist(wrapper, QStringLiteral("Camera"), - QStringLiteral("Exif.Photo.MeteringMode"), tr("Metering mode")); - appendExivPropertyIfExist(wrapper, QStringLiteral("Camera"), - QStringLiteral("Exif.Photo.SubjectDistance"), tr("Subject distance")); - appendExivPropertyIfExist(wrapper, QStringLiteral("Camera"), - QStringLiteral("Exif.Photo.Flash"), tr("Flash mode")); - appendExivPropertyIfExist(wrapper, QStringLiteral("Camera"), - QStringLiteral("Exif.Photo.FocalLengthIn35mmFilm"), tr("35mm focal length")); + appendExivPropertyIfExist(wrapper, u"Camera"_s, + u"Exif.Image.Make"_s, tr("Camera maker")); + appendExivPropertyIfExist(wrapper, u"Camera"_s, + u"Exif.Image.Model"_s, tr("Camera model")); + appendExivPropertyIfExist(wrapper, u"Camera"_s, + u"Exif.Photo.FNumber"_s, tr("F-stop")); + appendExivPropertyIfExist(wrapper, u"Camera"_s, + u"Exif.Photo.ExposureTime"_s, tr("Exposure time")); + appendExivPropertyIfExist(wrapper, u"Camera"_s, + u"Exif.Photo.ISOSpeedRatings"_s, tr("ISO speed")); + appendExivPropertyIfExist(wrapper, u"Camera"_s, + u"Exif.Photo.ExposureBiasValue"_s, tr("Exposure bias")); + appendExivPropertyIfExist(wrapper, u"Camera"_s, + u"Exif.Photo.FocalLength"_s, tr("Focal length")); + appendExivPropertyIfExist(wrapper, u"Camera"_s, + u"Exif.Photo.MaxApertureValue"_s, tr("Max aperture")); + appendExivPropertyIfExist(wrapper, u"Camera"_s, + u"Exif.Photo.MeteringMode"_s, tr("Metering mode")); + appendExivPropertyIfExist(wrapper, u"Camera"_s, + u"Exif.Photo.SubjectDistance"_s, tr("Subject distance")); + appendExivPropertyIfExist(wrapper, u"Camera"_s, + u"Exif.Photo.Flash"_s, tr("Flash mode")); + appendExivPropertyIfExist(wrapper, u"Camera"_s, + u"Exif.Photo.FocalLengthIn35mmFilm"_s, tr("35mm focal length")); - appendExivPropertyIfExist(wrapper, QStringLiteral("AdvancedPhoto"), - QStringLiteral("Exif.Photo.LensModel"), tr("Lens model")); - appendExivPropertyIfExist(wrapper, QStringLiteral("AdvancedPhoto"), - QStringLiteral("Exif.Photo.Contrast"), tr("Contrast")); - appendExivPropertyIfExist(wrapper, QStringLiteral("AdvancedPhoto"), - QStringLiteral("Exif.Photo.BrightnessValue"), tr("Brightness")); - appendExivPropertyIfExist(wrapper, QStringLiteral("AdvancedPhoto"), - QStringLiteral("Exif.Photo.ExposureProgram"), tr("Exposure program")); - appendExivPropertyIfExist(wrapper, QStringLiteral("AdvancedPhoto"), - QStringLiteral("Exif.Photo.Saturation"), tr("Saturation")); - appendExivPropertyIfExist(wrapper, QStringLiteral("AdvancedPhoto"), - QStringLiteral("Exif.Photo.Sharpness"), tr("Sharpness")); - appendExivPropertyIfExist(wrapper, QStringLiteral("AdvancedPhoto"), - QStringLiteral("Exif.Photo.WhiteBalance"), tr("White balance")); - appendExivPropertyIfExist(wrapper, QStringLiteral("AdvancedPhoto"), - QStringLiteral("Exif.Photo.DigitalZoomRatio"), tr("Digital zoom")); - appendExivPropertyIfExist(wrapper, QStringLiteral("AdvancedPhoto"), - QStringLiteral("Exif.Photo.ExifVersion"), tr("EXIF version")); + appendExivPropertyIfExist(wrapper, u"AdvancedPhoto"_s, + u"Exif.Photo.LensModel"_s, tr("Lens model")); + appendExivPropertyIfExist(wrapper, u"AdvancedPhoto"_s, + u"Exif.Photo.Contrast"_s, tr("Contrast")); + appendExivPropertyIfExist(wrapper, u"AdvancedPhoto"_s, + u"Exif.Photo.BrightnessValue"_s, tr("Brightness")); + appendExivPropertyIfExist(wrapper, u"AdvancedPhoto"_s, + u"Exif.Photo.ExposureProgram"_s, tr("Exposure program")); + appendExivPropertyIfExist(wrapper, u"AdvancedPhoto"_s, + u"Exif.Photo.Saturation"_s, tr("Saturation")); + appendExivPropertyIfExist(wrapper, u"AdvancedPhoto"_s, + u"Exif.Photo.Sharpness"_s, tr("Sharpness")); + appendExivPropertyIfExist(wrapper, u"AdvancedPhoto"_s, + u"Exif.Photo.WhiteBalance"_s, tr("White balance")); + appendExivPropertyIfExist(wrapper, u"AdvancedPhoto"_s, + u"Exif.Photo.DigitalZoomRatio"_s, tr("Digital zoom")); + appendExivPropertyIfExist(wrapper, u"AdvancedPhoto"_s, + u"Exif.Photo.ExifVersion"_s, tr("EXIF version")); - appendExivPropertyIfExist(wrapper, QStringLiteral("GPS"), - QStringLiteral("Exif.GPSInfo.GPSLatitudeRef"), tr("Latitude reference")); - appendExivPropertyIfExist(wrapper, QStringLiteral("GPS"), - QStringLiteral("Exif.GPSInfo.GPSLatitude"), tr("Latitude")); - appendExivPropertyIfExist(wrapper, QStringLiteral("GPS"), - QStringLiteral("Exif.GPSInfo.GPSLongitudeRef"), tr("Longitude reference")); - appendExivPropertyIfExist(wrapper, QStringLiteral("GPS"), - QStringLiteral("Exif.GPSInfo.GPSLongitude"), tr("Longitude")); - appendExivPropertyIfExist(wrapper, QStringLiteral("GPS"), - QStringLiteral("Exif.GPSInfo.GPSAltitudeRef"), tr("Altitude reference")); - appendExivPropertyIfExist(wrapper, QStringLiteral("GPS"), - QStringLiteral("Exif.GPSInfo.GPSAltitude"), tr("Altitude")); + appendExivPropertyIfExist(wrapper, u"GPS"_s, + u"Exif.GPSInfo.GPSLatitudeRef"_s, tr("Latitude reference")); + appendExivPropertyIfExist(wrapper, u"GPS"_s, + u"Exif.GPSInfo.GPSLatitude"_s, tr("Latitude")); + appendExivPropertyIfExist(wrapper, u"GPS"_s, + u"Exif.GPSInfo.GPSLongitudeRef"_s, tr("Longitude reference")); + appendExivPropertyIfExist(wrapper, u"GPS"_s, + u"Exif.GPSInfo.GPSLongitude"_s, tr("Longitude")); + appendExivPropertyIfExist(wrapper, u"GPS"_s, + u"Exif.GPSInfo.GPSAltitudeRef"_s, tr("Altitude reference")); + appendExivPropertyIfExist(wrapper, u"GPS"_s, + u"Exif.GPSInfo.GPSAltitude"_s, tr("Altitude")); } }