MCPcopy Create free account
hub / github.com/KangLin/RabbitRemoteControl / GetItem

Method GetItem

Plugins/WebBrowser/DatabaseUrl.cpp:254–272  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

252}
253
254CDatabaseUrl::UrlItem CDatabaseUrl::GetItem(int id)
255{
256 UrlItem item;
257 if (0 >= id) return item;
258
259 QSqlQuery query(GetDatabase());
260 query.prepare("SELECT url, title, icon, visit_time FROM " + m_szTableName +
261 " WHERE id = :id");
262 query.bindValue(":id", id);
263 if (query.exec() && query.next()) {
264 item.id = id;
265 item.szUrl = query.value(0).toString();
266 item.szTitle = query.value(1).toString();
267 item.iconId = query.value(2).toInt();
268 item.icon = m_iconDB.GetIcon(item.iconId);
269 item.visit_time = query.value(3).toDateTime();
270 }
271 return item;
272}
273
274CDatabaseUrl::UrlItem CDatabaseUrl::GetItem(const QString& url)
275{

Callers 6

getBookmarkByUrlMethod · 0.80
TreeToBookmarkMethod · 0.80
getAllHistoryMethod · 0.80
getHistoryByDateMethod · 0.80
getHistoryByUrlMethod · 0.80
getHistoryByIdMethod · 0.80

Calls 2

GetIconMethod · 0.45
isEmptyMethod · 0.45

Tested by

no test coverage detected