| 4251 | } |
| 4252 | |
| 4253 | void WizMainWindow::createNoteWithText(const QString& strText) |
| 4254 | { |
| 4255 | initVariableBeforCreateNote(); |
| 4256 | QString strHtml = strText.toHtmlEscaped(); |
| 4257 | QString strTitle = strHtml.left(strHtml.indexOf("\n")); |
| 4258 | if (strTitle.isEmpty()) |
| 4259 | { |
| 4260 | strTitle = "New note"; |
| 4261 | } |
| 4262 | else if (strTitle.length() > 200) |
| 4263 | { |
| 4264 | strTitle = strTitle.left(200); |
| 4265 | } |
| 4266 | strHtml = "<div>" + strHtml + "</div>"; |
| 4267 | strHtml.replace(" ", " "); |
| 4268 | strHtml.replace("\n", "<br />"); |
| 4269 | WIZDOCUMENTDATA data; |
| 4270 | if (!m_category->createDocument(data, strHtml, strTitle)) |
| 4271 | { |
| 4272 | return; |
| 4273 | } |
| 4274 | setFocusForNewNote(data); |
| 4275 | } |
| 4276 | |
| 4277 | void WizMainWindow::showNewFeatureGuide() |
| 4278 | { |
nothing calls this directly
no test coverage detected