]> gitweb.stoutner.com Git - PrivacyBrowserPC.git/blobdiff - src/databases/CookiesDatabase.cpp
Implement tabbed browsing.
[PrivacyBrowserPC.git] / src / databases / CookiesDatabase.cpp
index 8464c0624a4f728c4532efa33eacb93f2bbda18e..207f45b89795c3ead31d00313cb78654890056c7 100644 (file)
@@ -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;
     }