From 61a0b2b2b35e4b1a5dbf42484e8fc4f98e9fe0f6 Mon Sep 17 00:00:00 2001 From: hjk Date: Fri, 26 Feb 2021 10:50:03 +0100 Subject: Add some basic contact information in a new Help->Contact dialog Change-Id: I5a01c3d3c9fd467ed7b48869b66617adf2b11fed Reviewed-by: Leena Miettinen Reviewed-by: Eike Ziller --- src/plugins/coreplugin/mainwindow.cpp | 35 +++++++++++++++++++++++++++++++++++ src/plugins/coreplugin/mainwindow.h | 1 + 2 files changed, 36 insertions(+) diff --git a/src/plugins/coreplugin/mainwindow.cpp b/src/plugins/coreplugin/mainwindow.cpp index cac88d51be..9f7b9274e7 100644 --- a/src/plugins/coreplugin/mainwindow.cpp +++ b/src/plugins/coreplugin/mainwindow.cpp @@ -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("

Qt Creator developers can be reached at the Qt Creator mailing list:

" + "%1" + "

or the #qt-creator channel on FreeNode IRC:

" + "%2" + "

Our bug tracker is located at %3.

" + "

Please use %4 for bigger chunks of text.

") + .arg("

    " + "" + "mailto:qt-creator@qt-project.org" + "

") + .arg("

    " + "" + "irc://freenode.org/qt-creator" + "

") + .arg("" + "https://bugreports.qt.io" + "") + .arg("" + "https://pastebin.com" + ""), + QMessageBox::Ok, this); + dlg.exec(); +} + QPrinter *MainWindow::printer() const { if (!m_printer) diff --git a/src/plugins/coreplugin/mainwindow.h b/src/plugins/coreplugin/mainwindow.h index d9105ba93b..746dd93fc4 100644 --- a/src/plugins/coreplugin/mainwindow.h +++ b/src/plugins/coreplugin/mainwindow.h @@ -129,6 +129,7 @@ private: static void setFocusToEditor(); void aboutQtCreator(); void aboutPlugins(); + void contact(); void updateFocusWidget(QWidget *old, QWidget *now); NavigationWidget *navigationWidget(Side side) const; void setSidebarVisible(bool visible, Side side); -- cgit v1.2.1