diff --git a/src/providers/irc/ircconnection2.cpp b/src/providers/irc/ircconnection2.cpp index 5d3aefcb5..8469bed1c 100644 --- a/src/providers/irc/ircconnection2.cpp +++ b/src/providers/irc/ircconnection2.cpp @@ -7,7 +7,7 @@ namespace irc { IrcConnection::IrcConnection(QObject *parent) : Communi::IrcConnection(parent) { - this->pingTimer_.setInterval(10000); + this->pingTimer_.setInterval(5000); this->pingTimer_.start(); QObject::connect(&this->pingTimer_, &QTimer::timeout, [this] { if (!this->recentlyReceivedMessage_.load()) { @@ -17,23 +17,18 @@ IrcConnection::IrcConnection(QObject *parent) this->recentlyReceivedMessage_ = false; }); - this->reconnectTimer_.setInterval(10000); + this->reconnectTimer_.setInterval(5000); this->reconnectTimer_.setSingleShot(true); QObject::connect(&this->reconnectTimer_, &QTimer::timeout, [this] { reconnectRequested.invoke(); }); - QObject::connect(this, &Communi::IrcConnection::messageReceived, - [this](Communi::IrcMessage *message) { - if (message->command() == "PONG") { - qDebug() << "PONG"; - } - this->recentlyReceivedMessage_ = true; + QObject::connect(this, &Communi::IrcConnection::messageReceived, [this](Communi::IrcMessage *) { + this->recentlyReceivedMessage_ = true; - if (this->reconnectTimer_.isActive()) { - this->reconnectTimer_.stop(); - qDebug() << "reconnect stopped"; - } - }); + if (this->reconnectTimer_.isActive()) { + this->reconnectTimer_.stop(); + } + }); } } // namespace irc diff --git a/src/widgets/helper/channelview.cpp b/src/widgets/helper/channelview.cpp index 9d06843f6..75a9a886e 100644 --- a/src/widgets/helper/channelview.cpp +++ b/src/widgets/helper/channelview.cpp @@ -813,6 +813,8 @@ void ChannelView::mousePressEvent(QMouseEvent *event) { auto app = getApp(); + this->mouseDown.invoke(event); + std::shared_ptr layout; QPoint relativePos; int messageIndex; @@ -856,8 +858,6 @@ void ChannelView::mousePressEvent(QMouseEvent *event) auto selectionItem = SelectionItem(messageIndex, index); this->setSelection(selectionItem, selectionItem); - - this->mouseDown.invoke(event); } break; case Qt::RightButton: { diff --git a/src/widgets/split.cpp b/src/widgets/split.cpp index 52a408ee4..e9a14c641 100644 --- a/src/widgets/split.cpp +++ b/src/widgets/split.cpp @@ -95,7 +95,10 @@ Split::Split(QWidget *parent) this->input.ui.textEdit->installEventFilter(parent); - this->view.mouseDown.connect([this](QMouseEvent *) { this->giveFocus(Qt::MouseFocusReason); }); + this->view.mouseDown.connect([this](QMouseEvent *) { + // + this->giveFocus(Qt::MouseFocusReason); + }); this->view.selectionChanged.connect([this]() { if (view.hasSelection()) { this->input.clearSelection();