Deprecate QLibraryInfo::licensee()/licensedProducts()

This info wasn't really very helpful, and would anyway always
contain either Preview, OpenSource or an empty string for
commercial users.

Change-Id: I311b991834fa83cf1a183083acd5112cda3d2e41
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
bb10
Lars Knoll 2016-05-11 14:36:13 +02:00
parent 9fd407fc6a
commit aa2a310267
4 changed files with 15 additions and 28 deletions

8
configure vendored
View File

@ -3122,10 +3122,6 @@ addConfStr "$shortspec"
[ -d "$outpath/src/corelib/global" ] || mkdir -p "$outpath/src/corelib/global"
cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
/* License Info */
static const char qt_configure_licensee_str [256 + 12] = "qt_lcnsuser=$Licensee";
static const char qt_configure_licensed_products_str [256 + 12] = "qt_lcnsprod=$Edition";
/* Installation date */
static const char qt_configure_installation [12+11] = "qt_instdate=2012-12-20";
@ -3153,10 +3149,6 @@ $QT_CONFIGURE_STRS#endif
# define QT_CONFIGURE_SYSROOTIFY_PREFIX $QMAKE_SYSROOTIFY
#endif
/* strlen( "qt_lcnsxxxx" ) == 12 */
#define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12
#define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12
#define QT_CONFIGURE_PREFIX_PATH qt_configure_prefix_path_str + 12
#ifdef QT_BUILD_QMAKE
# define QT_CONFIGURE_EXT_PREFIX_PATH qt_configure_ext_prefix_path_str + 12

View File

@ -229,30 +229,30 @@ QLibraryInfo::QLibraryInfo()
{ }
/*!
Returns the person to whom this build of Qt is licensed.
\sa licensedProducts()
\deprecated
This function used to return the person to whom this build of Qt is licensed, now returns an empty string.
*/
#if QT_DEPRECATED_SINCE(5, 8)
QString
QLibraryInfo::licensee()
{
const char * volatile str = QT_CONFIGURE_LICENSEE;
return QString::fromLocal8Bit(str);
return QString();
}
#endif
/*!
Returns the products that the license for this build of Qt has access to.
\sa licensee()
\deprecated
This function used to return the products that the license for this build of Qt has access to, now returns an empty string.
*/
#if QT_DEPRECATED_SINCE(5, 8)
QString
QLibraryInfo::licensedProducts()
{
const char * volatile str = QT_CONFIGURE_LICENSED_PRODUCTS;
return QString::fromLatin1(str);
return QString();
}
#endif
/*!
\since 4.6

View File

@ -51,8 +51,10 @@ class QStringList;
class Q_CORE_EXPORT QLibraryInfo
{
public:
static QString licensee();
static QString licensedProducts();
#if QT_DEPRECATED_SINCE(5, 8)
static QT_DEPRECATED QString licensee();
static QT_DEPRECATED QString licensedProducts();
#endif
#ifndef QT_NO_DATESTRING
#if QT_DEPRECATED_SINCE(5, 5)

View File

@ -3951,11 +3951,7 @@ void Configure::generateQConfigCpp()
// Generate the new qconfig.cpp file
{
FileWriter tmpStream(buildPath + "/src/corelib/global/qconfig.cpp");
tmpStream << "/* Licensed */" << endl
<< "static const char qt_configure_licensee_str [512 + 12] = \"qt_lcnsuser=" << dictionary["LICENSEE"] << "\";" << endl
<< "static const char qt_configure_licensed_products_str [512 + 12] = \"qt_lcnsprod=" << dictionary["EDITION"] << "\";" << endl
<< endl
<< "/* Build date */" << endl
tmpStream << "/* Build date */" << endl
<< "static const char qt_configure_installation [11 + 12] = \"qt_instdate=2012-12-20\";" << endl
<< endl
<< "/* Installation Info */" << endl
@ -3983,9 +3979,6 @@ void Configure::generateQConfigCpp()
<< "#ifdef QT_BUILD_QMAKE\n"
<< "# define QT_CONFIGURE_SYSROOTIFY_PREFIX " << (sysrootifyPrefix ? "true" : "false") << endl
<< "#endif\n\n"
<< "/* strlen( \"qt_lcnsxxxx\") == 12 */" << endl
<< "#define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12" << endl
<< "#define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12" << endl
<< endl
<< "#define QT_CONFIGURE_PREFIX_PATH qt_configure_prefix_path_str + 12\n"
<< "#ifdef QT_BUILD_QMAKE\n"