minor bugfixes

This commit is contained in:
Blue 2020-04-15 20:27:38 +03:00
parent b50ce146b8
commit a8698cc94f
5 changed files with 21 additions and 21 deletions

View file

@ -54,6 +54,7 @@ Squawk::Squawk(QWidget *parent) :
connect(m_ui->actionAccounts, &QAction::triggered, this, &Squawk::onAccounts);
connect(m_ui->actionAddContact, &QAction::triggered, this, &Squawk::onNewContact);
connect(m_ui->actionAddConference, &QAction::triggered, this, &Squawk::onNewConference);
connect(m_ui->actionQuit, &QAction::triggered, this, &Squawk::close);
connect(m_ui->comboBox, qOverload<int>(&QComboBox::activated), this, &Squawk::onComboboxActivated);
//connect(m_ui->roster, &QTreeView::doubleClicked, this, &Squawk::onRosterItemDoubleClicked);
connect(m_ui->roster, &QTreeView::customContextMenuRequested, this, &Squawk::onRosterContextMenu);
@ -64,7 +65,6 @@ Squawk::Squawk(QWidget *parent) :
connect(contextMenu, &QMenu::aboutToHide, this, &Squawk::onContextAboutToHide);
//m_ui->mainToolBar->addWidget(m_ui->comboBox);
setWindowTitle(tr("Contact list"));
if (testAttribute(Qt::WA_TranslucentBackground)) {
m_ui->roster->viewport()->setAutoFillBackground(false);
}

View file

@ -369,16 +369,12 @@ void MessageLine::responseLocalFile(const QString& messageId, const QString& pat
if (muItr != uploadPaths.end()) {
uploadPaths.erase(muItr);
}
if (room) {
removeMessage(messageId);
} else {
Shared::Message msg = itr->second->getMessage();
removeMessage(messageId);
msg.setCurrentTime();
message(msg);
itr = messageIndex.find(messageId);
itr->second->showFile(path);
}
Shared::Message msg = itr->second->getMessage();
removeMessage(messageId);
msg.setCurrentTime();
message(msg);
itr = messageIndex.find(messageId);
itr->second->showFile(path);
} else {
itr->second->showFile(path); //then it is already cached file
}
@ -387,7 +383,7 @@ void MessageLine::responseLocalFile(const QString& messageId, const QString& pat
if (uItr == uploading.end()) {
const Shared::Message& msg = itr->second->getMessage();
itr->second->addButton(QIcon::fromTheme("download"), tr("Download"), "<a href=\"" + msg.getOutOfBandUrl() + "\">" + msg.getOutOfBandUrl() + "</a>");
itr->second->showComment(tr("Push the button to daownload the file"));
itr->second->showComment(tr("Push the button to download the file"));
} else {
qDebug() << "An unhandled state for file uploading - empty path";
}