mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-12-10 14:25:50 -05:00
Replaced deprecated qVariantFromValue by QVariant::fromValue
This commit is contained in:
parent
395a0b05d0
commit
f4960a8903
3 changed files with 5 additions and 5 deletions
|
|
@ -229,7 +229,7 @@ void ChatLobbyUserNotify::iconClicked()
|
|||
QString strName=tr("Remove All");
|
||||
QAction *pAction = new QAction( QIcon(), strName, trayMenu);
|
||||
ActionTag actionTag={0x0, "", true};
|
||||
pAction->setData(qVariantFromValue(actionTag));
|
||||
pAction->setData(QVariant::fromValue(actionTag));
|
||||
trayMenu->addAction(pAction);
|
||||
|
||||
trayMenu->exec(QCursor::pos());
|
||||
|
|
@ -268,14 +268,14 @@ void ChatLobbyUserNotify::makeSubMenu(QMenu* parentMenu, QIcon icoLobby, QString
|
|||
QAction *pAction = new QAction( icoLobby, strName, lobbyMenu);
|
||||
pAction->setToolTip(doc.toPlainText());
|
||||
ActionTag actionTag={itCL->first, itMsg->first, false};
|
||||
pAction->setData(qVariantFromValue(actionTag));
|
||||
pAction->setData(QVariant::fromValue(actionTag));
|
||||
lobbyMenu->addAction(pAction);
|
||||
}
|
||||
|
||||
QString strName=tr("Remove All");
|
||||
QAction *pAction = new QAction( icoLobby, strName, lobbyMenu);
|
||||
ActionTag actionTag={itCL->first, "", true};
|
||||
pAction->setData(qVariantFromValue(actionTag));
|
||||
pAction->setData(QVariant::fromValue(actionTag));
|
||||
lobbyMenu->addAction(pAction);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -295,7 +295,7 @@ void ImHistoryBrowser::fillItem(QListWidgetItem *itemWidget, HistoryMsg& msg)
|
|||
QColor backgroundColor = ui.listWidget->palette().base().color();
|
||||
QString formatMsg = style.formatMessage(type, name, DateTime::DateTimeFromTime_t(msg.sendTime), messageText, 0, backgroundColor);
|
||||
|
||||
itemWidget->setData(Qt::DisplayRole, qVariantFromValue(IMHistoryItemPainter(formatMsg)));
|
||||
itemWidget->setData(Qt::DisplayRole, QVariant::fromValue(IMHistoryItemPainter(formatMsg)));
|
||||
itemWidget->setData(ROLE_MSGID, msg.msgId);
|
||||
|
||||
/* calculate plain text */
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ QString ChatPage::loadStyleInfo(ChatStyle::enumStyleType type, QComboBox *style_
|
|||
{
|
||||
whileBlocking(style_CB)->insertItem(n,style->styleName);
|
||||
|
||||
style_CB->setItemData(n, qVariantFromValue(*style),Qt::UserRole);
|
||||
style_CB->setItemData(n, QVariant::fromValue(*style),Qt::UserRole);
|
||||
|
||||
if (style->stylePath == stylePath) {
|
||||
activeItem = n;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue