summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2021-02-26 10:50:03 +0100
committerhjk <hjk@qt.io>2021-02-26 16:36:07 +0000
commit61a0b2b2b35e4b1a5dbf42484e8fc4f98e9fe0f6 (patch)
treeb60e52b497549aab0758d1bca6e322f3a2b86df1
parent4ebe717a7db6432b209a4a2307c0fd5a98782e1e (diff)
downloadqt-creator-61a0b2b2b35e4b1a5dbf42484e8fc4f98e9fe0f6.tar.gz
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>
-rw-r--r--src/plugins/coreplugin/mainwindow.cpp35
-rw-r--r--src/plugins/coreplugin/mainwindow.h1
2 files changed, 36 insertions, 0 deletions
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("<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)
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);