MCPcopy Create free account
hub / github.com/IJHack/QtPass / showInTextBrowser

Method showInTextBrowser

src/qtpass.cpp:401–410  ·  view source on GitHub ↗

* @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 */

Source from the content-addressed store, hash-verified

399 * @param postfix Optional postfix to append to the output
400 */
401void 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.

Callers

nothing calls this directly

Calls 2

replaceMethod · 0.80
flashTextMethod · 0.80

Tested by

no test coverage detected