From ca2d4117fbfe0288d6f98b0c1b5818a881531a6c Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Thu, 3 Dec 2015 11:57:07 +0100 Subject: [PATCH] Standard account now loads only its own feeds/cats. --- src/services/standard/standardserviceroot.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/services/standard/standardserviceroot.cpp b/src/services/standard/standardserviceroot.cpp index 9ffd1b723..6dfa10890 100755 --- a/src/services/standard/standardserviceroot.cpp +++ b/src/services/standard/standardserviceroot.cpp @@ -363,7 +363,7 @@ void StandardServiceRoot::loadFromDatabase(){ QSqlQuery query_categories(database); query_categories.setForwardOnly(true); - if (!query_categories.exec(QSL("SELECT * FROM Categories;")) || query_categories.lastError().isValid()) { + if (!query_categories.exec(QString("SELECT * FROM Categories WHERE account_id = %1;").arg(accountId())) || query_categories.lastError().isValid()) { qFatal("Query for obtaining categories failed. Error message: '%s'.", qPrintable(query_categories.lastError().text())); } @@ -380,7 +380,7 @@ void StandardServiceRoot::loadFromDatabase(){ QSqlQuery query_feeds(database); query_feeds.setForwardOnly(true); - if (!query_feeds.exec(QSL("SELECT * FROM Feeds;")) || query_feeds.lastError().isValid()) { + if (!query_feeds.exec(QSL("SELECT * FROM Feeds WHERE account_id = %1;").arg(accountId())) || query_feeds.lastError().isValid()) { qFatal("Query for obtaining feeds failed. Error message: '%s'.", qPrintable(query_feeds.lastError().text())); }