QTfrontend/chatwidget.cpp
branch0.9.16
changeset 5953 57af6f3abf4a
parent 5772 c09c50efe8b5
child 5990 578978418fe5
equal deleted inserted replaced
5951:dc36638a6b7c 5953:57af6f3abf4a
   201         // decode nick
   201         // decode nick
   202         const QString& nick = QString::fromUtf8(QByteArray::fromBase64(link.encodedQuery()));
   202         const QString& nick = QString::fromUtf8(QByteArray::fromBase64(link.encodedQuery()));
   203         QList<QListWidgetItem *> items = chatNicks->findItems(nick, Qt::MatchExactly);
   203         QList<QListWidgetItem *> items = chatNicks->findItems(nick, Qt::MatchExactly);
   204         if (items.size() < 1)
   204         if (items.size() < 1)
   205             return;
   205             return;
   206         QMenu * popup = new QMenu();
   206         QMenu * popup = new QMenu(this);
   207         // selecting an item will automatically scroll there, so let's save old position
   207         // selecting an item will automatically scroll there, so let's save old position
   208         QScrollBar * scrollBar = chatNicks->verticalScrollBar();
   208         QScrollBar * scrollBar = chatNicks->verticalScrollBar();
   209         int oldScrollPos = scrollBar->sliderPosition();
   209         int oldScrollPos = scrollBar->sliderPosition();
   210         // select the nick which we want to see the actions for
   210         // select the nick which we want to see the actions for
   211         chatNicks->setCurrentItem(items[0], QItemSelectionModel::Clear);
   211         chatNicks->setCurrentItem(items[0], QItemSelectionModel::Clear);