X-Git-Url: https://gitweb.stoutner.com/?p=PrivacyBrowserPC.git;a=blobdiff_plain;f=src%2Fdatabases%2FCookiesDatabase.cpp;fp=src%2Fdatabases%2FCookiesDatabase.cpp;h=207f45b89795c3ead31d00313cb78654890056c7;hp=8464c0624a4f728c4532efa33eacb93f2bbda18e;hb=0d23ee5e9b43b247cdda0a4cbb73f8b1a70f4500;hpb=e28b208d6f953d24bd05927a16775d103714fd36 diff --git a/src/databases/CookiesDatabase.cpp b/src/databases/CookiesDatabase.cpp index 8464c06..207f45b 100644 --- a/src/databases/CookiesDatabase.cpp +++ b/src/databases/CookiesDatabase.cpp @@ -163,15 +163,15 @@ int CookiesDatabase::cookieCount() // Execute the query. countCookiesQuery.exec(); + // Move to the last row. + countCookiesQuery.last(); + // Initialize a number of cookies variable. int numberOfCookies = 0; // Check to see if the query is valid (there is at least one cookie). if (countCookiesQuery.isValid()) { - // Move to the last row. - countCookiesQuery.last(); - // Get the number of rows (which is zero based) and add one to calculate the number of cookies. numberOfCookies = countCookiesQuery.at() + 1; }