Add some basic contact information in a new Help->Contact dialog

Change-Id: I5a01c3d3c9fd467ed7b48869b66617adf2b11fed
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
hjk
2021-02-26 10:50:03 +01:00
parent 4ebe717a7d
commit 61a0b2b2b3
2 changed files with 36 additions and 0 deletions

View File

@@ -796,6 +796,14 @@ void MainWindow::registerDefaultActions()
// mhelp->addAction(cmd, Constants::G_HELP_ABOUT);
// tmpaction->setEnabled(true);
// connect(tmpaction, &QAction::triggered, qApp, &QApplication::aboutQt);
// Contact
tmpaction = new QAction(tr("Contact..."), this);
cmd = ActionManager::registerAction(tmpaction, "QtCreator.Contact");
mhelp->addAction(cmd, Constants::G_HELP_ABOUT);
tmpaction->setEnabled(true);
connect(tmpaction, &QAction::triggered, this, &MainWindow::contact);
// About sep
if (!HostOsInfo::isMacHost()) { // doesn't have the "About" actions in the Help menu
tmpaction = new QAction(this);
@@ -1237,6 +1245,33 @@ void MainWindow::aboutPlugins()
dialog.exec();
}
void MainWindow::contact()
{
QMessageBox dlg(QMessageBox::Information, tr("Contact"),
tr("<p>Qt Creator developers can be reached at the Qt Creator mailing list:</p>"
"%1"
"<p>or the #qt-creator channel on FreeNode IRC:</p>"
"%2"
"<p>Our bug tracker is located at %3.</p>"
"<p>Please use %4 for bigger chunks of text.</p>")
.arg("<p>&nbsp;&nbsp;&nbsp;&nbsp;"
"<a href=\"https://lists.qt-project.org/listinfo/qt-creator\">"
"mailto:qt-creator@qt-project.org"
"</a></p>")
.arg("<p>&nbsp;&nbsp;&nbsp;&nbsp;"
"<a href=\"https://irc.freenode.org\">"
"irc://freenode.org/qt-creator"
"</a></p>")
.arg("<a href=\"https://bugreports.qt.io/projects/QTCREATORBUG\">"
"https://bugreports.qt.io"
"</a>")
.arg("<a href=\"https://pastebin.com\">"
"https://pastebin.com"
"</a>"),
QMessageBox::Ok, this);
dlg.exec();
}
QPrinter *MainWindow::printer() const
{
if (!m_printer)