QHBoxLayout* layout = new QHBoxLayout(this);
layout->addWidget(m_preview);
- layout->addSpacing(layout->margin());
+ layout->addSpacing(layout->contentsMargins().left());
layout->addLayout(textLayout);
}
QPixmap DolphinFileMetaDataWidget::preview() const
{
+#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
if (m_preview->pixmap()) {
return *m_preview->pixmap();
}
+#else
+ if (!m_preview->pixmap(Qt::ReturnByValue).isNull()) {
+ return m_preview->pixmap(Qt::ReturnByValue);
+ }
+#endif
+
return QPixmap();
}
QTextLine line = textLayout.createLine();
while (line.isValid()) {
line.setLineWidth(m_name->maximumWidth());
- wrappedText += processedName.midRef(line.textStart(), line.textLength());
+ wrappedText += QStringView(processedName).mid(line.textStart(), line.textLength());
line = textLayout.createLine();
if (line.isValid()) {