Fix the problem that the top and favorite state cannot be set to 0.
This commit is contained in:
parent
738f116b83
commit
7f2267d72a
|
@ -891,7 +891,7 @@ bool AppDBManager::handleFavoritesStateUpdate(const QString &desktopfp, int num)
|
||||||
qWarning() << "Fail to exec:" << cmd << "because:" << m_database.lastError();
|
qWarning() << "Fail to exec:" << cmd << "because:" << m_database.lastError();
|
||||||
} else {
|
} else {
|
||||||
while (sql.next()) {
|
while (sql.next()) {
|
||||||
if (sql.value("FAVORITES").toInt() == num) {
|
if (num && sql.value("FAVORITES").toInt() == num) {
|
||||||
res = false;
|
res = false;
|
||||||
if (sql.value("DESKTOP_FILE_PATH").toString() == desktopfp) {
|
if (sql.value("DESKTOP_FILE_PATH").toString() == desktopfp) {
|
||||||
qWarning() << "favorites state has no changes, I quit!";
|
qWarning() << "favorites state has no changes, I quit!";
|
||||||
|
@ -938,7 +938,7 @@ bool AppDBManager::handleTopStateUpdate(const QString &desktopfp, int num)
|
||||||
qWarning() << "Fail to exec:" << cmd << "because:" << m_database.lastError();
|
qWarning() << "Fail to exec:" << cmd << "because:" << m_database.lastError();
|
||||||
} else {
|
} else {
|
||||||
while (sql.next()) {
|
while (sql.next()) {
|
||||||
if (sql.value("TOP").toInt() == num) {
|
if (num && sql.value("TOP").toInt() == num) {
|
||||||
res = false;
|
res = false;
|
||||||
if (sql.value("DESKTOP_FILE_PATH").toString() == desktopfp) {
|
if (sql.value("DESKTOP_FILE_PATH").toString() == desktopfp) {
|
||||||
qWarning() << "top state has no changes, I quit!";
|
qWarning() << "top state has no changes, I quit!";
|
||||||
|
|
Loading…
Reference in New Issue