* @brief Displays output text in the main window's text browser. * @param output The text to display * @param prefix Optional prefix to prepend to the output * @param postfix Optional postfix to append to the output */
| 399 | * @param postfix Optional postfix to append to the output |
| 400 | */ |
| 401 | void QtPass::showInTextBrowser(QString output, const QString &prefix, |
| 402 | const QString &postfix) { |
| 403 | output = output.toHtmlEscaped(); |
| 404 | |
| 405 | output.replace(Util::protocolRegex(), R"(<a href="\1">\1</a>)"); |
| 406 | output.replace(QStringLiteral("\n"), "<br />"); |
| 407 | output = prefix + output + postfix; |
| 408 | |
| 409 | m_mainWindow->flashText(output, false, true); |
| 410 | } |
| 411 | |
| 412 | /** |
| 413 | * @brief Performs automatic git push if enabled in settings. |