- if (type == NetworkConnectAll || type == NetworkDisconnectAll) {
- foreach(NetworkId id, Client::networkIds()) {
- const Network *net = Client::network(id);
- if (type == NetworkConnectAll && net->connectionState() == Network::Disconnected)
+ if (type == NetworkConnectAllWithDropdown || type == NetworkDisconnectAllWithDropdown || type == NetworkConnectAll
+ || type == NetworkDisconnectAll) {
+ if (type == NetworkConnectAllWithDropdown
+ && QMessageBox::question(nullptr,
+ tr("Question"),
+ tr("Really Connect to all IRC Networks?"),
+ QMessageBox::Yes | QMessageBox::No,
+ QMessageBox::Yes)
+ == QMessageBox::No)
+ return;
+ if (type == NetworkDisconnectAllWithDropdown
+ && QMessageBox::question(nullptr,
+ tr("Question"),
+ tr("Really disconnect from all IRC Networks?"),
+ QMessageBox::Yes | QMessageBox::No,
+ QMessageBox::No)
+ == QMessageBox::No)
+ return;
+ foreach (NetworkId id, Client::networkIds()) {
+ const Network* net = Client::network(id);
+ if ((type == NetworkConnectAllWithDropdown || type == NetworkConnectAll) && net->connectionState() == Network::Disconnected)