| 192 | } |
| 193 | |
| 194 | inline void findString(const QString &s, QPlainTextEdit *textEdit, QWidget *managerWidget) |
| 195 | { |
| 196 | if (!s.isEmpty()) |
| 197 | { |
| 198 | QTextCursor cursor = textEdit->textCursor(); |
| 199 | QTextCursor cursorSaved = cursor; |
| 200 | |
| 201 | if (!textEdit->find(s)) |
| 202 | { |
| 203 | cursor.movePosition(QTextCursor::Start); |
| 204 | textEdit->setTextCursor(cursor); |
| 205 | |
| 206 | if (!textEdit->find(s)) |
| 207 | { |
| 208 | textEdit->setTextCursor(cursorSaved); |
| 209 | |
| 210 | QMessageBox::information(managerWidget, QObject::tr("Text not found"), QObject::tr("Text not found.")); |
| 211 | } |
| 212 | } |
| 213 | } |
| 214 | } |
| 215 | |
| 216 | } |
no test coverage detected