forked from blue/squawk
some further thinking of info widget
This commit is contained in:
parent
e4a2728ef8
commit
ec362cef55
5 changed files with 64 additions and 48 deletions
|
@ -422,7 +422,7 @@ void Squawk::responseInfo(const Shared::Info& info) {
|
|||
void Squawk::onInfoClosed() {
|
||||
UI::Info* info = static_cast<UI::Info*>(sender());
|
||||
|
||||
std::map<QString, UI::Info*>::const_iterator itr = infoWidgets.find(info->jid);
|
||||
std::map<QString, UI::Info*>::const_iterator itr = infoWidgets.find(info->getJid());
|
||||
if (itr == infoWidgets.end()) {
|
||||
qDebug() << "Info widget has been closed but can not be found among other opened vCards, application is most probably going to crash";
|
||||
return;
|
||||
|
@ -437,12 +437,7 @@ void Squawk::onActivateInfo(const QString& account, const QString& jid) {
|
|||
info = itr->second;
|
||||
} else {
|
||||
info = new UI::Info(jid);
|
||||
// TODO need to handle it somewhere else
|
||||
// if (edition) {
|
||||
// card->setWindowTitle(tr("%1 account card").arg(account));
|
||||
// } else {
|
||||
// card->setWindowTitle(tr("%1 contact card").arg(jid));
|
||||
// }
|
||||
info->setWindowTitle(tr("Information about %1").arg(jid));
|
||||
info->setAttribute(Qt::WA_DeleteOnClose);
|
||||
infoWidgets.insert(std::make_pair(jid, info));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue