mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-12-12 15:25:34 -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");
|
QString strName=tr("Remove All");
|
||||||
QAction *pAction = new QAction( QIcon(), strName, trayMenu);
|
QAction *pAction = new QAction( QIcon(), strName, trayMenu);
|
||||||
ActionTag actionTag={0x0, "", true};
|
ActionTag actionTag={0x0, "", true};
|
||||||
pAction->setData(qVariantFromValue(actionTag));
|
pAction->setData(QVariant::fromValue(actionTag));
|
||||||
trayMenu->addAction(pAction);
|
trayMenu->addAction(pAction);
|
||||||
|
|
||||||
trayMenu->exec(QCursor::pos());
|
trayMenu->exec(QCursor::pos());
|
||||||
|
|
@ -268,14 +268,14 @@ void ChatLobbyUserNotify::makeSubMenu(QMenu* parentMenu, QIcon icoLobby, QString
|
||||||
QAction *pAction = new QAction( icoLobby, strName, lobbyMenu);
|
QAction *pAction = new QAction( icoLobby, strName, lobbyMenu);
|
||||||
pAction->setToolTip(doc.toPlainText());
|
pAction->setToolTip(doc.toPlainText());
|
||||||
ActionTag actionTag={itCL->first, itMsg->first, false};
|
ActionTag actionTag={itCL->first, itMsg->first, false};
|
||||||
pAction->setData(qVariantFromValue(actionTag));
|
pAction->setData(QVariant::fromValue(actionTag));
|
||||||
lobbyMenu->addAction(pAction);
|
lobbyMenu->addAction(pAction);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString strName=tr("Remove All");
|
QString strName=tr("Remove All");
|
||||||
QAction *pAction = new QAction( icoLobby, strName, lobbyMenu);
|
QAction *pAction = new QAction( icoLobby, strName, lobbyMenu);
|
||||||
ActionTag actionTag={itCL->first, "", true};
|
ActionTag actionTag={itCL->first, "", true};
|
||||||
pAction->setData(qVariantFromValue(actionTag));
|
pAction->setData(QVariant::fromValue(actionTag));
|
||||||
lobbyMenu->addAction(pAction);
|
lobbyMenu->addAction(pAction);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -295,7 +295,7 @@ void ImHistoryBrowser::fillItem(QListWidgetItem *itemWidget, HistoryMsg& msg)
|
||||||
QColor backgroundColor = ui.listWidget->palette().base().color();
|
QColor backgroundColor = ui.listWidget->palette().base().color();
|
||||||
QString formatMsg = style.formatMessage(type, name, DateTime::DateTimeFromTime_t(msg.sendTime), messageText, 0, backgroundColor);
|
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);
|
itemWidget->setData(ROLE_MSGID, msg.msgId);
|
||||||
|
|
||||||
/* calculate plain text */
|
/* calculate plain text */
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,7 @@ QString ChatPage::loadStyleInfo(ChatStyle::enumStyleType type, QComboBox *style_
|
||||||
{
|
{
|
||||||
whileBlocking(style_CB)->insertItem(n,style->styleName);
|
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) {
|
if (style->stylePath == stylePath) {
|
||||||
activeItem = n;
|
activeItem = n;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue