1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 10:46:35 +01:00

Fixed executing order of queries by dbWriter()

-also added index tables bookmarksTitle and bookmarksUrl to
   default database.
-and removed a double check from saveBookmark()
This commit is contained in:
S. Razi Alavizadeh 2013-04-17 01:40:05 +04:30
parent 2fdce1ed81
commit ffdbb49444
3 changed files with 4 additions and 5 deletions

View File

@ -170,9 +170,8 @@ bool BookmarksModel::saveBookmark(const QUrl &url, const QString &title, const Q
image = qIconProvider->emptyWebImage();
}
if (!isFolder(folder)) {
createFolder(folder);
}
// createFolder() calls isFolder()
createFolder(folder);
QSqlQuery query;
query.prepare("INSERT INTO bookmarks (url, title, folder, icon) VALUES (?,?,?,?)");

Binary file not shown.

View File

@ -37,8 +37,8 @@ void DatabaseWriter::execute()
return;
}
QSqlQuery query = m_queries.last();
QSqlQuery query = m_queries.first();
query.exec();
m_queries.remove(m_queries.size() - 1);
m_queries.remove(0);
}