Make it compile against last qt5.15

wilder
Laurent Montel 6 years ago
parent e79cc53c4f
commit 81e2e80b56
  1. 4
      src/filter/filteractions/filteractionaddtoaddressbook.cpp
  2. 4
      src/snippets/snippetattachmentwidget.cpp

@ -249,7 +249,11 @@ QString FilterActionAddToAddressBook::argsAsString() const
void FilterActionAddToAddressBook::argsFromString(const QString &argsStr)
{
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
const QStringList parts = argsStr.split(QLatin1Char('\t'), QString::KeepEmptyParts);
#else
const QStringList parts = argsStr.split(QLatin1Char('\t'), Qt::KeepEmptyParts);
#endif
const QString firstElement = parts[ 0 ];
if (firstElement == QLatin1String("From")) {
mHeaderType = FromHeader;

@ -71,7 +71,11 @@ void SnippetAttachmentWidget::clear()
void SnippetAttachmentWidget::slotSelectAttachment()
{
QPointer<MailCommon::SnippetSelectAttachmentDialog> dlg = new MailCommon::SnippetSelectAttachmentDialog(this);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
dlg->setAttachments(mLineEdit->text().split(QLatin1Char(','), QString::SkipEmptyParts));
#else
dlg->setAttachments(mLineEdit->text().split(QLatin1Char(','), Qt::SkipEmptyParts));
#endif
if (dlg->exec()) {
mLineEdit->setText(dlg->attachments().join(QLatin1Char(',')));
Q_EMIT wasChanged();

Loading…
Cancel
Save