diff --git a/retroshare-gui/src/gui/chat/ChatLobbyUserNotify.cpp b/retroshare-gui/src/gui/chat/ChatLobbyUserNotify.cpp index 719ad7d2d..c15d6d0b4 100644 --- a/retroshare-gui/src/gui/chat/ChatLobbyUserNotify.cpp +++ b/retroshare-gui/src/gui/chat/ChatLobbyUserNotify.cpp @@ -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); } diff --git a/retroshare-gui/src/gui/im_history/ImHistoryBrowser.cpp b/retroshare-gui/src/gui/im_history/ImHistoryBrowser.cpp index f4c01ddf1..114071ae7 100644 --- a/retroshare-gui/src/gui/im_history/ImHistoryBrowser.cpp +++ b/retroshare-gui/src/gui/im_history/ImHistoryBrowser.cpp @@ -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 */ diff --git a/retroshare-gui/src/gui/settings/ChatPage.cpp b/retroshare-gui/src/gui/settings/ChatPage.cpp index 38cb81be0..2fc22a13d 100644 --- a/retroshare-gui/src/gui/settings/ChatPage.cpp +++ b/retroshare-gui/src/gui/settings/ChatPage.cpp @@ -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;