| 233 | } |
| 234 | |
| 235 | void LuaConsoleDock::writeErrorToOutput(const char *s) |
| 236 | { |
| 237 | typedef struct { |
| 238 | unsigned char c; |
| 239 | unsigned char style; |
| 240 | } cell; |
| 241 | |
| 242 | const int length = static_cast<int>(strlen(s)); |
| 243 | QVector<cell> cells(length + 1); |
| 244 | |
| 245 | for (auto i = 0; i < length; ++i) { |
| 246 | cells[i].c = s[i]; |
| 247 | cells[i].style = 39; |
| 248 | } |
| 249 | |
| 250 | cells[length].c = 0; |
| 251 | cells[length].style = 0; |
| 252 | |
| 253 | output->setReadOnly(false); |
| 254 | output->documentEnd(); |
| 255 | output->addStyledText(length * 2, (const char *) cells.constData()); |
| 256 | output->setReadOnly(true); |
| 257 | output->documentEnd(); |
| 258 | } |
| 259 | |
| 260 | void LuaConsoleDock::historyNext() |
| 261 | { |
nothing calls this directly
no outgoing calls
no test coverage detected