mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 18:23:54 +02:00
Coding standards
This commit is contained in:
parent
d3c62db65d
commit
d9c6f17e42
3 changed files with 5 additions and 4 deletions
|
@ -203,7 +203,7 @@
|
|||
#include "commerce/Wallet.h"
|
||||
#include "commerce/QmlCommerce.h"
|
||||
|
||||
#include "webbrowser/webbrowsersuggestionsengine.h"
|
||||
#include "webbrowser/WebBrowserSuggestionsEngine.h"
|
||||
|
||||
// On Windows PC, NVidia Optimus laptop, we want to enable NVIDIA GPU
|
||||
// FIXME seems to be broken.
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
#include "webbrowsersuggestionsengine.h"
|
||||
#include "WebBrowserSuggestionsEngine.h"
|
||||
#include "qregexp.h"
|
||||
|
||||
#include <qbuffer.h>
|
||||
|
@ -26,6 +26,7 @@
|
|||
#include <NetworkAccessManager.h>
|
||||
|
||||
const QString GoogleSuggestionsUrl = "https://suggestqueries.google.com/complete/search?output=firefox&q=%1";
|
||||
const int SUGGESTIONS_LIST_INDEX = 2;
|
||||
|
||||
WebBrowserSuggestionsEngine::WebBrowserSuggestionsEngine(QObject* parent)
|
||||
: QObject(parent)
|
||||
|
@ -72,12 +73,12 @@ void WebBrowserSuggestionsEngine::suggestionsFinished(QNetworkReply *reply) {
|
|||
|
||||
const QVariantList list = res.toList();
|
||||
|
||||
if (list.size() < 2) {
|
||||
if (list.size() <= SUGGESTIONS_LIST_INDEX) {
|
||||
return;
|
||||
}
|
||||
|
||||
QStringList out;
|
||||
const QVariantList& suggList = list.at(1).toList();
|
||||
const QVariantList& suggList = list.at(SUGGESTIONS_LIST_INDEX).toList();
|
||||
|
||||
foreach (const QVariant &v, suggList) {
|
||||
out.append(v.toString());
|
Loading…
Reference in a new issue