calendar: fix a build error in string concatenation

wilder-5.26
Fushan Wen 4 years ago
parent 601503eeed
commit 35b44bc015
No known key found for this signature in database
GPG Key ID: 2E48D1487C91DCAA
  1. 4
      components/calendar/eventpluginsmanager.cpp

@ -73,9 +73,9 @@ public:
case Qt::UserRole: { case Qt::UserRole: {
// The currentPlugin path contains the full path including // The currentPlugin path contains the full path including
// the plugin filename, so it needs to be cut off from the last '/' // the plugin filename, so it needs to be cut off from the last '/'
const QStringView prefix = QStringView(currentPlugin).left(currentPlugin.lastIndexOf(QLatin1Char('/'))); const QStringView prefix = QStringView(currentPlugin).left(currentPlugin.lastIndexOf(QDir::separator()));
const QString qmlFilePath = metadata.configUi; const QString qmlFilePath = metadata.configUi;
return QString(prefix % QLatin1Char('/') % qmlFilePath); return QStringLiteral("%1%2%3").arg(prefix, QDir::separator(), qmlFilePath);
} }
case Qt::UserRole + 1: case Qt::UserRole + 1:
return currentPlugin; return currentPlugin;

Loading…
Cancel
Save