[Code] Fixed cppcheck issues

remotes/origin/falkon
nowrep 12 years ago
parent 5cf7d0b9a9
commit 7d98a162d6
  1. 3
      src/lib/app/mainapplication.cpp
  2. 4
      src/lib/navigation/completer/locationcompletermodel.cpp

@ -320,11 +320,12 @@ MainApplication::MainApplication(int &argc, char** argv)
if (!m_isPrivateSession) {
Settings settings;
m_startingAfterCrash = settings.value("SessionRestore/isRunning", false).toBool();
bool checkUpdates = settings.value("Web-Browser-Settings/CheckUpdates", DEFAULT_CHECK_UPDATES).toBool();
int afterLaunch = settings.value("Web-URL-Settings/afterLaunch", 3).toInt();
settings.setValue("SessionRestore/isRunning", true);
#ifndef DISABLE_UPDATES_CHECK
bool checkUpdates = settings.value("Web-Browser-Settings/CheckUpdates", DEFAULT_CHECK_UPDATES).toBool();
if (checkUpdates) {
new Updater(qupzilla);
}

@ -61,13 +61,12 @@ void LocationCompleterModel::refreshCompletions(const QString &string)
clear();
const int bookmarksLimit = 10;
const int historyLimit = 20;
QList<QUrl> urlList;
QList<QStandardItem*> itemList;
Type showType = (Type) qzSettings->showLocationSuggestions;
if (showType == HistoryAndBookmarks || showType == Bookmarks) {
const int bookmarksLimit = 10;
QList<BookmarkItem*> bookmarks = mApp->bookmarks()->searchBookmarks(string, bookmarksLimit);
foreach (BookmarkItem* bookmark, bookmarks) {
@ -92,6 +91,7 @@ void LocationCompleterModel::refreshCompletions(const QString &string)
}
if (showType == HistoryAndBookmarks || showType == History) {
const int historyLimit = 20;
QSqlQuery query = createQuery(string, historyLimit);
query.exec();

Loading…
Cancel
Save