| 868 | } |
| 869 | |
| 870 | bool WizIndexBase::createTagEx(const WIZTAGDATA& d) |
| 871 | { |
| 872 | qDebug() << "create tag, name: " << d.strName; |
| 873 | |
| 874 | Q_ASSERT(d.strKbGUID == m_strKbGUID); |
| 875 | |
| 876 | WIZTAGDATA data = d; |
| 877 | if (data.strGUID == data.strParentGUID) { |
| 878 | data.strParentGUID.clear(); |
| 879 | } |
| 880 | |
| 881 | CString strFormat = formatInsertSQLFormat(TABLE_NAME_WIZ_TAG, FIELD_LIST_WIZ_TAG, PARAM_LIST_WIZ_TAG); |
| 882 | |
| 883 | CString strSQL; |
| 884 | strSQL.format(strFormat, |
| 885 | STR2SQL(data.strGUID).utf16(), |
| 886 | STR2SQL(data.strParentGUID).utf16(), |
| 887 | STR2SQL(data.strName).utf16(), |
| 888 | STR2SQL(data.strDescription).utf16(), |
| 889 | TIME2SQL(data.tModified).utf16(), |
| 890 | WizInt64ToStr(data.nVersion).utf16(), |
| 891 | WizInt64ToStr(data.nPosition).utf16() |
| 892 | ); |
| 893 | |
| 894 | |
| 895 | if (!execSQL(strSQL)) |
| 896 | return false; |
| 897 | |
| 898 | if (!m_bUpdating) { |
| 899 | emit tagCreated(data); |
| 900 | } |
| 901 | |
| 902 | return true; |
| 903 | } |
| 904 | |
| 905 | bool WizIndexBase::modifyTagEx(const WIZTAGDATA& d) |
| 906 | { |
nothing calls this directly
no test coverage detected