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

Method Move

Src/Database/DatabaseTree.cpp:801–816  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

799}
800
801bool CDatabaseTree::Move(int id, int newParent)
802{
803 QSqlQuery query(GetDatabase());
804 query.prepare(
805 "UPDATE `" + m_szTableName + "` SET "
806 "`parent_id` = :parent_id WHERE `id` = :id");
807 query.bindValue(":parent_id", newParent);
808 query.bindValue(":id", id);
809 bool bRet = query.exec();
810 if (!bRet) {
811 SetError("Failed to add tree item: " + query.lastError().text()
812 + "; Sql: " + query.executedQuery());
813 qCritical(log) << GetError();
814 }
815 return bRet;
816}
817
818TreeItem CDatabaseTree::GetLeaf(int id)
819{

Callers 1

moveBookmarkMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected