1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Screen grabber: Hide the flyout when the chat form is hidden.

This commit is contained in:
Stefan Merettig 2015-04-04 23:06:06 +02:00 committed by tux3
parent ffa1628f38
commit f982938919
3 changed files with 10 additions and 1 deletions

View File

@ -985,10 +985,12 @@ void ChatForm::show(Ui::MainWindow &ui)
callConfirm->show(); callConfirm->show();
} }
void ChatForm::hideEvent(QHideEvent*) void ChatForm::hideEvent(QHideEvent* event)
{ {
if (callConfirm) if (callConfirm)
callConfirm->hide(); callConfirm->hide();
GenericChatForm::hideEvent(event);
} }
OfflineMsgEngine *ChatForm::getOfflineMsgEngine() OfflineMsgEngine *ChatForm::getOfflineMsgEngine()

View File

@ -410,6 +410,12 @@ void GenericChatForm::insertChatMessage(ChatMessage::Ptr msg)
chatWidget->insertChatlineAtBottom(std::dynamic_pointer_cast<ChatLine>(msg)); chatWidget->insertChatlineAtBottom(std::dynamic_pointer_cast<ChatLine>(msg));
} }
void GenericChatForm::hideEvent(QHideEvent* event)
{
hideFileMenu();
QWidget::hideEvent(event);
}
bool GenericChatForm::eventFilter(QObject* object, QEvent* event) bool GenericChatForm::eventFilter(QObject* object, QEvent* event)
{ {
if (object != this->fileButton && object != this->fileFlyout) if (object != this->fileButton && object != this->fileFlyout)

View File

@ -84,6 +84,7 @@ protected slots:
protected: protected:
QString resolveToxID(const ToxID &id); QString resolveToxID(const ToxID &id);
void insertChatMessage(ChatMessage::Ptr msg); void insertChatMessage(ChatMessage::Ptr msg);
void hideEvent(QHideEvent* event);
ToxID previousId; ToxID previousId;
QDateTime prevMsgDateTime; QDateTime prevMsgDateTime;