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

Method contains

Src/Database/DatabaseFilter.cpp:23–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21}
22
23bool CDatabaseFilter::contains(const QString& szKey)
24{
25 bool bRet = false;
26 QSqlQuery query(GetDatabase());
27
28 // Check if it already exists
29 query.prepare("SELECT `key` FROM " + m_szTableName
30 + " WHERE `key` = :key "
31 );
32 query.bindValue(":key", szKey);
33 bRet = query.exec();
34 if(!bRet) {
35 qCritical(log) << "Failed to contains[" + szKey + "]:"
36 << query.lastError().text()
37 << "Sql:" << query.executedQuery();
38 return false;
39 }
40 return query.next();
41}
42
43int CDatabaseFilter::AddKey(const QString &szKey)
44{

Callers 15

StartMethod · 0.45
mousePressEventMethod · 0.45
AddFavoriteMethod · 0.45
AddNodeMethod · 0.45
GetTreeMethod · 0.45
foreachFunction · 0.45
SetCheckStateMethod · 0.45
isCheckableMethod · 0.45
mousePressEventMethod · 0.45
AddItemMethod · 0.45
SetFilterHeaderMethod · 0.45
AddCategoryMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected