X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fqtui%2Fmainwin.cpp;h=3ada47fddc0603d1c2c248c3b7d97305ea6e8f9e;hb=6fd69e84e6c395a108e6b2620c6428907b7d7efd;hp=a7e50d256c646c68ac5b8aac948375528b19b90b;hpb=b7447afe8e836376776dac26704e227a678d2913;p=quassel.git diff --git a/src/qtui/mainwin.cpp b/src/qtui/mainwin.cpp index a7e50d25..3ada47fd 100644 --- a/src/qtui/mainwin.cpp +++ b/src/qtui/mainwin.cpp @@ -206,12 +206,17 @@ void MainWin::init() connect(Client::instance(), SIGNAL(networkRemoved(NetworkId)), SLOT(clientNetworkRemoved(NetworkId))); connect(Client::messageModel(), SIGNAL(rowsInserted(const QModelIndex &, int, int)), SLOT(messagesInserted(const QModelIndex &, int, int))); - connect(GraphicalUi::contextMenuActionProvider(), SIGNAL(showChannelList(NetworkId)), SLOT(showChannelList(NetworkId))); - connect(Client::instance(), SIGNAL(showChannelList(NetworkId)), SLOT(showChannelList(NetworkId))); + connect(GraphicalUi::contextMenuActionProvider(), + SIGNAL(showChannelList(NetworkId,QString,bool)), + SLOT(showChannelList(NetworkId,QString,bool))); + connect(Client::instance(), + SIGNAL(showChannelList(NetworkId,QString,bool)), + SLOT(showChannelList(NetworkId,QString,bool))); connect(GraphicalUi::contextMenuActionProvider(), SIGNAL(showNetworkConfig(NetworkId)), SLOT(showNetworkConfig(NetworkId))); 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))); @@ -397,7 +402,7 @@ void MainWin::setupActions() // File coll->addAction("ConnectCore", new Action(icon::get("connect-quassel"), tr("&Connect to Core..."), coll, this, SLOT(showCoreConnectionDlg()))); - coll->addAction("DisconnectCore", new Action(icon::get("disconnect-quassel", ":/pics/quassel-eye.png"), tr("&Disconnect from Core"), coll, + coll->addAction("DisconnectCore", new Action(icon::get("disconnect-quassel"), tr("&Disconnect from Core"), coll, Client::instance(), SLOT(disconnectFromCore()))); coll->addAction("ChangePassword", new Action(icon::get("dialog-password"), tr("Change &Password..."), coll, this, SLOT(showPasswordChangeDlg()))); @@ -854,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()) {
@@ -1469,7 +1487,7 @@ void MainWin::showCoreConfigWizard(const QVariantList &backends, const QVariantL
}
-void MainWin::showChannelList(NetworkId netId)
+void MainWin::showChannelList(NetworkId netId, const QString &channelFilters, bool listImmediately)
{
ChannelListDlg *channelListDlg = new ChannelListDlg();
@@ -1477,10 +1495,27 @@ void MainWin::showChannelList(NetworkId netId)
QAction *action = qobject_cast