Example: migrate network-chat to use QRegularExpression

Update the network-chat example to use the new QRegularExpression class
in place of the deprecated QRegExp.

Change-Id: Idcd3dc5b3e9b520b2eeef9565d50195cc8dffd06
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
This commit is contained in:
Samuel Gaist 2017-01-21 00:51:19 +01:00
parent acacca859c
commit 00bbb4d273

View File

@ -68,7 +68,7 @@ PeerManager::PeerManager(Client *client)
QStringList environment = QProcess::systemEnvironment();
foreach (QString string, envVariables) {
int index = environment.indexOf(QRegExp(string));
int index = environment.indexOf(QRegularExpression(string));
if (index != -1) {
QStringList stringList = environment.at(index).split('=');
if (stringList.size() == 2) {