MCPcopy Create free account
hub / github.com/CE-Programming/CEmu / console

Method console

gui/qt/mainwindow.cpp:1420–1437  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1418}
1419
1420void MainWindow::console(const QString &str, int type) {
1421 if (m_nativeConsole) {
1422 fputs(str.toStdString().c_str(), type == EmuThread::ConsoleErr ? stderr : stdout);
1423 } else {
1424 QTextCharFormat format = ui->console->currentCharFormat();
1425 if (type == EmuThread::ConsoleNorm) {
1426 format.setFontWeight(QFont::Normal);
1427 } else {
1428 format.setFontWeight(QFont::Black);
1429 }
1430 QTextCursor cur(ui->console->document());
1431 cur.movePosition(QTextCursor::End);
1432 cur.insertText(str, format);
1433 if (ui->checkAutoScroll->isChecked()) {
1434 ui->console->setTextCursor(cur);
1435 }
1436 }
1437}
1438
1439void MainWindow::console(int type, const char *str, int size) {
1440 if (size == -1) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected