This change affects only Qt5 users, since Qt4 QUrl don’t forces lower case for urls. Also bitcoin-qt builds against Qt4 on linux.
PR for #11645
211@@ -212,11 +212,14 @@ bool parseBitcoinURI(QString uri, SendCoinsRecipient *out)
212 // Convert bitcoin:// to bitcoin:
213 //
214 // Cannot handle this later, because bitcoin:// will cause Qt to see the part after // as host,
215- // which will lower-case it (and thus invalidate the address).
216+ // which will lower-case it (and thus invalidate the address). Workaround only for Qt4 support.
217+
218+#if QT_VERSION < 0x050000
Concept ACK The URI tests need updating:
0FAIL! : URITests::uriTests() 'rv.address == QString("175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W")' returned FALSE. ()
1 Loc: [qt/test/uritests.cpp(55)]
403@@ -404,7 +404,12 @@ void PaymentServer::handleURIOrFile(const QString& s)
404 return;
405 }
406
407- if (s.startsWith(BITCOIN_IPC_PREFIX, Qt::CaseInsensitive)) // bitcoin: URI
408+ if (s.startsWith("bitcoin://", Qt::CaseInsensitive))
409+ {
410+ Q_EMIT message(tr("URI handling"), tr("'bitcoin://' it's not a correct URI. Use 'bitcoin:' instead."),
Tested on macOS 10.13.3 with Qt 5.10.1 All these used
0bitcoin:12A1MyfXbW6RhdRAZEqofac5jCQQjwEPBu?amount=1.337&message=Payment&label=Satoshi
with and without ‘//’ as the URI. Tested master(9b8b1079ddab64ac955766536c38d23dc57bc499) “bitcoin:” :
master(9b8b1079ddab64ac955766536c38d23dc57bc499) “bitcoin://” :
This PR: 7ddb674 “bitcoin:” :
7ddb674 “bitcoin://” :
My only nit would be to swap ‘correct’ for ‘valid’ in “‘bitcoin://’ is not a correct URI”. tACK 7ddb674b55b99ee645517699a4946cb841417cee