X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fmainwin.cpp;h=d87026c330a2ae431927bab70508fda8e0c14a75;hp=80879a24e3750a120fb7c692fb7662b0cc344eb3;hb=bfeb38f1572e44bdfbfb7f4d47d6dc6ecc20439f;hpb=70955828d6ffab8c39435fe48a923d0c7dbbb678 diff --git a/src/qtui/mainwin.cpp b/src/qtui/mainwin.cpp index 80879a24..d87026c3 100644 --- a/src/qtui/mainwin.cpp +++ b/src/qtui/mainwin.cpp @@ -216,6 +216,7 @@ void MainWin::init() connect(GraphicalUi::contextMenuActionProvider(), SIGNAL(showIgnoreList(QString)), SLOT(showIgnoreList(QString))); connect(Client::instance(), SIGNAL(showIgnoreList(QString)), SLOT(showIgnoreList(QString))); connect(Client::instance(), SIGNAL(dbUpgradeInProgress(bool)), SLOT(showMigrationWarning(bool))); + connect(Client::instance(), SIGNAL(exitRequested(QString)), SLOT(onExitRequested(QString))); connect(Client::coreConnection(), SIGNAL(startCoreSetup(QVariantList, QVariantList)), SLOT(showCoreConfigWizard(QVariantList, QVariantList))); connect(Client::coreConnection(), SIGNAL(connectionErrorPopup(QString)), SLOT(handleCoreConnectionError(QString))); @@ -858,6 +859,19 @@ void MainWin::showMigrationWarning(bool show) } +void MainWin::onExitRequested(const QString &reason) +{ + if (!reason.isEmpty()) { + QMessageBox box(QMessageBox::Critical, + tr("Fatal error"), + "" + tr("Quassel encountered a fatal error and is terminated.") + "", + QMessageBox::Ok, this); + box.setInformativeText("
" + tr("Reason:") + " " + reason + "");
+ box.exec();
+ }
+}
+
+
void MainWin::changeActiveBufferView(bool backwards)
{
if (_activeBufferViewIndex >= 0 && _activeBufferViewIndex < _bufferViews.count()) {
@@ -1475,8 +1489,6 @@ void MainWin::showCoreConfigWizard(const QVariantList &backends, const QVariantL
void MainWin::showChannelList(NetworkId netId, const QString &channelFilters, bool listImmediately)
{
- ChannelListDlg *channelListDlg = new ChannelListDlg();
-
if (!netId.isValid()) {
QAction *action = qobject_cast