X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fuisupport%2Fnetworkmodelcontroller.cpp;h=69797bc20fac7ac56c762c5318bb4cd27a883a14;hb=e8a39b4c3c92e193ab861a3fea84a261bb6fbd24;hp=bb6482c04d7d9b6c16aa3188616ae88f15065b44;hpb=8e93326fd70af3c0accc599770796619ef3cee6e;p=quassel.git
diff --git a/src/uisupport/networkmodelcontroller.cpp b/src/uisupport/networkmodelcontroller.cpp
index bb6482c0..69797bc2 100644
--- a/src/uisupport/networkmodelcontroller.cpp
+++ b/src/uisupport/networkmodelcontroller.cpp
@@ -42,8 +42,8 @@
NetworkModelController::NetworkModelController(QObject *parent)
: QObject(parent),
_actionCollection(new ActionCollection(this)),
- _messageFilter(0),
- _receiver(0)
+ _messageFilter(nullptr),
+ _receiver(nullptr)
{
connect(_actionCollection, SIGNAL(actionTriggered(QAction *)), SLOT(actionTriggered(QAction *)));
}
@@ -175,7 +175,7 @@ void NetworkModelController::removeBuffers(const QModelIndexList &indexList)
}
QString msg;
if (inactive.count()) {
- msg = tr("Do you want to delete the following buffer(s) permanently?", 0, inactive.count());
+ msg = tr("Do you want to delete the following buffer(s) permanently?", "", inactive.count());
msg += "
";
int count = 0;
foreach(BufferInfo info, inactive) {
@@ -193,7 +193,7 @@ void NetworkModelController::removeBuffers(const QModelIndexList &indexList)
if (inactive.count() != indexList.count())
msg += tr("
Active channel buffers cannot be deleted, please part the channel first.");
- if (QMessageBox::question(0, tr("Remove buffers permanently?"), msg, QMessageBox::Yes|QMessageBox::No, QMessageBox::No) == QMessageBox::Yes) {
+ if (QMessageBox::question(nullptr, tr("Remove buffers permanently?"), msg, QMessageBox::Yes|QMessageBox::No, QMessageBox::No) == QMessageBox::Yes) {
foreach(BufferInfo info, inactive)
Client::removeBuffer(info.bufferId());
}
@@ -238,9 +238,9 @@ void NetworkModelController::actionTriggered(QAction *action)
void NetworkModelController::handleNetworkAction(ActionType type, QAction *)
{
if (type == NetworkConnectAllWithDropdown || type == NetworkDisconnectAllWithDropdown || type == NetworkConnectAll || type == NetworkDisconnectAll) {
- if (type == NetworkConnectAllWithDropdown && QMessageBox::question(0, tr("Question"), tr("Really Connect to all IRC Networks?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes) == QMessageBox::No)
+ 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(0, tr("Question"), tr("Really disconnect from all IRC Networks?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::No) == QMessageBox::No)
+ 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);
@@ -363,7 +363,7 @@ void NetworkModelController::handleHideAction(ActionType type, QAction *action)
return;
case HideApplyToAll:
BufferSettings().setMessageFilter(filter);
- [[clang::fallthrough]];
+ // fallthrough
case HideUseDefaults:
if (_messageFilter)
BufferSettings(_messageFilter->idString()).removeFilter();
@@ -412,8 +412,10 @@ void NetworkModelController::handleGeneralAction(ActionType type, QAction *actio
break;
}
case ShowChannelList:
- if (networkId.isValid())
- emit showChannelList(networkId, {});
+ if (networkId.isValid()) {
+ // Don't immediately list channels, allowing customization of filter first
+ emit showChannelList(networkId, {}, false);
+ }
break;
case ShowNetworkConfig:
if (networkId.isValid())