Commit 53158738 authored by Stefano Crocco's avatar Stefano Crocco Committed by David Faure
Browse files

Fix other incompatibilities with Qt 5.12 and Qt 5.13

parent c112e1fa
......@@ -71,7 +71,11 @@ SearchBarPlugin::SearchBarPlugin(QObject *parent,
{
m_searchCombo = new SearchBarCombo(nullptr);
m_searchCombo->lineEdit()->installEventFilter(this);
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
connect(m_searchCombo, QOverload<int>::of(&QComboBox::activated), this, [this](int n){startSearch(m_searchCombo->itemText(n));});
#else
connect(m_searchCombo, &QComboBox::textActivated, this, &SearchBarPlugin::startSearch);
#endif
connect(m_searchCombo, &SearchBarCombo::iconClicked, this, &SearchBarPlugin::showSelectionMenu);
m_searchCombo->setWhatsThis(i18n("Search Bar<p>"
"Enter a search term. Click on the icon to change search mode or provider.</p>"));
......
......@@ -148,7 +148,12 @@ void WebEnginePartDownloadManager::openBlob(QWebEngineDownloadItem* it, WebEngin
{
QMimeDatabase db;
QMimeType type = db.mimeTypeForName(it->mimeType());
QString fileName = generateBlobTempFileName(it->suggestedFileName(), type.preferredSuffix());
#ifdef WEBENGINEDOWNLOADITEM_USE_PATH
QString suggestedName = it->path();
#else
QString suggestedName = it->suggestedFileName();
#endif
QString fileName = generateBlobTempFileName(suggestedName, type.preferredSuffix());
#ifdef WEBENGINEDOWNLOADITEM_USE_PATH
it->setPath(m_tempDownloadDir.filePath(fileName));
#else
......@@ -253,9 +258,14 @@ void WebEngineBlobDownloadJob::startDownloading()
{
if (m_downloadItem) {
m_startTime = QDateTime::currentDateTime();
#ifdef WEBENGINEDOWNLOADITEM_USE_PATH
QString name = QFileInfo(m_downloadItem->path()).filePath();
#else
QString name = m_downloadItem->downloadFileName();
#endif
emit description(this, i18nc("Notification about downloading a file", "Downloading"),
QPair<QString, QString>(i18nc("Source of a file being downloaded", "Source"), m_downloadItem->url().toString()),
QPair<QString, QString>(i18nc("Destination of a file download", "Destination"), m_downloadItem->downloadFileName()));
QPair<QString, QString>(i18nc("Destination of a file download", "Destination"), name));
m_downloadItem->resume();
}
}
......
......@@ -182,7 +182,7 @@ void WebEngineWallet::WebEngineWalletPrivate::detectFormsInPage(WebEnginePage* p
WebFormList forms = parseFormDetectionResult(jsForms, url);
callback(forms);
};
page->runJavaScript(QL1S("findFormsInWindow(%1)").arg(findLabels ? "true" : ""), QWebEngineScript::ApplicationWorld, realCallBack);
page->runJavaScript(QStringLiteral("findFormsInWindow(%1)").arg(findLabels ? "true" : ""), QWebEngineScript::ApplicationWorld, realCallBack);
}
WebEngineWallet::WebFormList WebEngineWallet::WebEngineWalletPrivate::formsToFill(const WebFormList &allForms) const
......
Markdown is supported
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