Commit de2e003d authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix some qt6 compile errors

parent 3e9e5275
Pipeline #193708 passed with stage
in 3 minutes and 50 seconds
......@@ -83,7 +83,7 @@ public:
void addSeparator()
{
mLayout->addSpacing(QApplication::style()->pixelMetric(QStyle::PM_DefaultLayoutSpacing));
mLayout->addSpacing(QApplication::style()->pixelMetric(QStyle::PM_LayoutVerticalSpacing));
}
void addStretch()
......
......@@ -224,7 +224,12 @@ struct ThumbnailPagePrivate : public Ui_ThumbnailPage {
// Show more friendly text when the protocol is "camera" (which is the usual case)
const QString scheme(mSrcBaseUrl.scheme());
// Truncate long protocol name
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
const QString truncatedScheme(scheme.length() <= 10 ? scheme : scheme.leftRef(5) + QStringLiteral("…") + scheme.rightRef(5));
#else
const QString truncatedScheme(
scheme.length() <= 10 ? scheme : QStringView(scheme).left(5).toString() + QStringLiteral("…") + QStringView(scheme).right(5).toString());
#endif
// clang-format off
if (scheme == QLatin1String("camera")) {
mPlaceHolderLabel->setText(i18nc("@info above install button when Kamera is not installed", "Support for your camera is not installed."));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment