fixed compile with Qt 5 (modified patch from Phenom)

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8040 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
electron128 2015-03-17 16:21:23 +00:00
parent c4b1b3dfbc
commit 13b964d0f5

View File

@ -194,9 +194,8 @@ void PostedItem::fill()
// Use QUrl to check/parse our URL
// The only combination that seems to work: load as EncodedUrl, extract toEncoded().
QUrl url;
QByteArray urlarray(mPost.mLink.c_str());
url.setEncodedUrl(urlarray.trimmed());
QUrl url = QUrl::fromEncoded(urlarray.trimmed());
QString urlstr = "Invalid Link";
QString sitestr = "Invalid Link";
bool urlOkay = url.isValid();