CopperSpice API  1.7.2
Migrating to CopperSpice

For a full list of migration information refer to the Migration Notes in the CopperSpice Overview Documentation.

QByteArray

Any method in QByteArray which accepted a parameter of a QString was removed. QByteArray was not designed to handle encodings beyond the basic ASCII character set. Affected methods like append(), insert(), and indexOf() already have overloads which accept a QByteArray.

If your application needs to pass a QString to a QByteArray simply convert the string using QString::toLatin1() or QString::toUtf8().

For more information refer to QByteArray Migration.

QString

Several methods for QString were removed since they were unsafe, do not work with all Unicode characters, or are unnecessary when using the QString8 class. Using QString8 is synonymous with using QString since there is a typedef from QString to QString8.

For more information refer to Removed or Unsupported Methods and Migrating QString Syntax.

QRegularExpression

Several examples are provided which show how to update code which used the now obsolete QRegExp class and must be updated to use QRegularExpression.

For more information refer to QRegularExpression Migration.

QUrl

Passing a QString where a QUrl is expected has been disallowed due to type safety. Simply modify your code to explicitly construct a QUrl.

request.setUrl(QUrl("https://www.copperspice.com"));
Networking Library

For improved readability several of the header file names were modified to include an underscore.

For more information refer to the Source code changes for Headers in the CopperSpice Overview Documentation.