mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 01:22:10 +01:00
Misc fixes
Correctly initialize QJsonParserError
This commit is contained in:
parent
dfa04388c7
commit
a66e179b40
|
@ -216,7 +216,6 @@ void BrowserWindow::postLaunch()
|
|||
if (m_startPage) {
|
||||
addTab = false;
|
||||
m_tabWidget->addView(QUrl());
|
||||
weView()->page()->deleteLater();
|
||||
weView()->setPage(m_startPage);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* ============================================================
|
||||
* QupZilla - WebKit based browser
|
||||
* Copyright (C) 2010-2014 David Rosca <nowrep@gmail.com>
|
||||
* Copyright (C) 2010-2016 David Rosca <nowrep@gmail.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -67,7 +67,7 @@ BookmarkItem* ChromeImporter::importBookmarks()
|
|||
m_file.close();
|
||||
|
||||
QJsonParseError err;
|
||||
QJsonDocument json = QJsonDocument::fromJson(data);
|
||||
QJsonDocument json = QJsonDocument::fromJson(data, &err);
|
||||
const QVariant res = json.toVariant();
|
||||
|
||||
if (err.error != QJsonParseError::NoError || res.type() != QVariant::Map) {
|
||||
|
|
|
@ -632,7 +632,7 @@ void OpenSearchEngine::suggestionsObtained()
|
|||
m_suggestionsReply = 0;
|
||||
|
||||
QJsonParseError err;
|
||||
QJsonDocument json = QJsonDocument::fromJson(response);
|
||||
QJsonDocument json = QJsonDocument::fromJson(response, &err);
|
||||
const QVariant res = json.toVariant();
|
||||
|
||||
if (err.error != QJsonParseError::NoError || res.type() != QVariant::List)
|
||||
|
|
|
@ -34,4 +34,3 @@ void GM_UrlInterceptor::interceptRequest(QWebEngineUrlRequestInfo &info)
|
|||
info.block(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -160,7 +160,7 @@ void RealTimeMouseGestureRecognizer::recognizeGesture()
|
|||
directions.setReadPointerTo(readIndex);
|
||||
}
|
||||
}
|
||||
catch (const std::exception &e) {
|
||||
catch (const std::exception &) {
|
||||
directions.setReadPointerTo(readIndex);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user