diff --git a/src/app/valentina/dialogs/vabstractlayoutdialog.cpp b/src/app/valentina/dialogs/vabstractlayoutdialog.cpp index 81cb00f9d..89a555f02 100644 --- a/src/app/valentina/dialogs/vabstractlayoutdialog.cpp +++ b/src/app/valentina/dialogs/vabstractlayoutdialog.cpp @@ -31,11 +31,11 @@ //must be the same order as PaperSizeTemplate constants const VAbstractLayoutDialog::FormatsVector VAbstractLayoutDialog::pageFormatNames = - VAbstractLayoutDialog::FormatsVector () << QLatin1String("A0") - << QLatin1String("A1") - << QLatin1String("A2") - << QLatin1String("A3") - << QLatin1String("A4") + VAbstractLayoutDialog::FormatsVector () << QStringLiteral("A0") + << QStringLiteral("A1") + << QStringLiteral("A2") + << QStringLiteral("A3") + << QStringLiteral("A4") << QApplication::translate("VAbstractLayoutDialog", "Letter") << QApplication::translate("VAbstractLayoutDialog", "Legal") << QApplication::translate("VAbstractLayoutDialog", "Roll 24in") @@ -59,7 +59,7 @@ void VAbstractLayoutDialog::InitTemplates(QComboBox *comboBoxTemplates) SCASSERT(comboBoxTemplates != nullptr) const QIcon icoPaper("://icon/16x16/template.png"); const QIcon icoRoll("://icon/16x16/roll.png"); - const QString pdi = QString("(%1ppi)").arg(PrintDPI); + const QString pdi = QStringLiteral("(%1ppi)").arg(PrintDPI); auto cntr = static_cast(PaperSizeTemplate::A0); for(const auto& v : pageFormatNames) @@ -81,7 +81,7 @@ void VAbstractLayoutDialog::InitTemplates(QComboBox *comboBoxTemplates) } //--------------------------------------------------------------------------------------------------------------------- -QSizeF VAbstractLayoutDialog::GetTemplateSize(const PaperSizeTemplate &tmpl, const Unit &unit) const +QSizeF VAbstractLayoutDialog::GetTemplateSize(PaperSizeTemplate tmpl, Unit unit) const { qreal width = 0; qreal height = 0; diff --git a/src/app/valentina/dialogs/vabstractlayoutdialog.h b/src/app/valentina/dialogs/vabstractlayoutdialog.h index 287222420..d2f1f4712 100644 --- a/src/app/valentina/dialogs/vabstractlayoutdialog.h +++ b/src/app/valentina/dialogs/vabstractlayoutdialog.h @@ -55,13 +55,13 @@ public: Custom = 15}; explicit VAbstractLayoutDialog(QWidget *parent = nullptr); + QSizeF GetTemplateSize(PaperSizeTemplate tmpl, Unit unit) const; protected: typedef QStringList FormatsVector; const static FormatsVector pageFormatNames; typedef int VIndexType; - QSizeF GetTemplateSize(const PaperSizeTemplate &tmpl, const Unit &unit) const; QSizeF RoundTemplateSize(qreal width, qreal height, Unit unit) const; void InitTemplates(QComboBox *comboBoxTemplates); diff --git a/src/libs/vlayout/vposter.h b/src/libs/vlayout/vposter.h index 1316d9947..5107aecd5 100644 --- a/src/libs/vlayout/vposter.h +++ b/src/libs/vlayout/vposter.h @@ -57,6 +57,8 @@ struct PosterData QRect rect; // rect section }; +Q_DECLARE_TYPEINFO(PosterData, Q_MOVABLE_TYPE); + // cppcheck-suppress noConstructor class VPoster {