summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xconfigure22
-rw-r--r--src/corelib/eval.pri4
-rw-r--r--src/corelib/kernel/qtcore_eval.cpp14
3 files changed, 32 insertions, 8 deletions
diff --git a/configure b/configure
index 08ec524..e3022b7 100755
--- a/configure
+++ b/configure
@@ -431,6 +431,7 @@ elif [ $COMMERCIAL_USER = "yes" ]; then
;;
Z4M|R4M|Q4M)
LicenseType="Evaluation"
+ QMakeVar add DEFINES QT_EVAL
case $ProductCode in
B)
Edition="Evaluation"
@@ -4068,12 +4069,17 @@ SETTINGS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_I
EXAMPLES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
DEMOS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_demopath=$QT_INSTALL_DEMOS"`
+TODAY=`date +%Y-%m-%d`
cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
/* License Info */
static const char qt_configure_licensee_str [256 + 12] = "$LICENSE_USER_STR";
static const char qt_configure_licensed_products_str [256 + 12] = "$LICENSE_PRODUCTS_STR";
+
+/* Installation date */
+static const char qt_configure_installation [12+11] = "qt_instdate=$TODAY";
EOF
+
if [ ! -z "$QT_HOST_PREFIX" ]; then
HOSTPREFIX_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_HOST_PREFIX"`
HOSTDOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_HOST_PREFIX/doc"`
@@ -4155,6 +4161,22 @@ else
fi
# -----------------------------------------------------------------------------
+if [ "$LicenseType" = "Evaluation" ]; then
+ EVALKEY=`"$relpath/config.tests/unix/padstring" 524 "qt_qevalkey=$LicenseKeyExt"`
+elif echo "$D_FLAGS" | grep QT_EVAL >/dev/null 2>&1; then
+ EVALKEY=`"$relpath/config.tests/unix/padstring" 524 "qt_qevalkey="`
+fi
+
+if [ -n "$EVALKEY" ]; then
+ cat > "$outpath/src/corelib/global/qconfig_eval.cpp" <<EOF
+/* Evaluation license key */
+static const char qt_eval_key_data [512 + 12] = "$EVALKEY";
+EOF
+ chmod -w "$outpath/src/corelib/global/qconfig_eval.cpp"
+fi
+
+
+# -----------------------------------------------------------------------------
# build qmake
# -----------------------------------------------------------------------------
diff --git a/src/corelib/eval.pri b/src/corelib/eval.pri
index d50580b..efda56b 100644
--- a/src/corelib/eval.pri
+++ b/src/corelib/eval.pri
@@ -1,2 +1,4 @@
SOURCES += \
- $$QT_SOURCE_TREE/src/corelib/kernel/qtcore_eval.cpp \
+ $$QT_SOURCE_TREE/src/corelib/kernel/qtcore_eval.cpp
+INCLUDEPATH += \
+ $$QT_BUILD_TREE/src/corelib/global
diff --git a/src/corelib/kernel/qtcore_eval.cpp b/src/corelib/kernel/qtcore_eval.cpp
index 0e18691..fe47a30 100644
--- a/src/corelib/kernel/qtcore_eval.cpp
+++ b/src/corelib/kernel/qtcore_eval.cpp
@@ -50,6 +50,8 @@
QT_BEGIN_NAMESPACE
+#include "qconfig_eval.cpp"
+
static const char boilerplate_unsuported[] =
"\nQt %1 Evaluation License\n"
"Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).\n"
@@ -86,8 +88,6 @@ static const char will_shutdown_now[] =
"timeout and will shut down.\n"
"Contact http://qt.nokia.com/about/contact-us for pricing and purchasing information.\n";
-extern const char qt_eval_key_data[];
-
static int qt_eval_days_left()
{
const char *const license_key = qt_eval_key_data + 12;
@@ -451,7 +451,7 @@ class EvalMessageBox : public QDialog
public:
EvalMessageBox(bool expired)
{
- setWindowTitle(" ");
+ setWindowTitle(QLatin1String(" "));
QString str = qt_eval_string();
if (expired) {
@@ -481,7 +481,7 @@ public:
border_layout->addWidget(border);
if (expired) {
- QPushButton *cmd = new QPushButton("OK", border);
+ QPushButton *cmd = new QPushButton(QLatin1String("OK"), border);
cmd->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
cmd->setDefault(true);
@@ -508,11 +508,11 @@ public:
void timerEvent(QTimerEvent *e) {
if (e->timerId() == warn) {
killTimer(warn);
- QMessageBox::information(0, "Automatic Timeout", will_shutdown_1min);
+ QMessageBox::information(0, QLatin1String("Automatic Timeout"), QLatin1String(will_shutdown_1min));
kill = startTimer(KILL_DELAY);
} else if (e->timerId() == kill) {
killTimer(kill);
- QMessageBox::information(0, "Automatic Timeout", will_shutdown_now);
+ QMessageBox::information(0, QLatin1String("Automatic Timeout"), QLatin1String(will_shutdown_now));
qApp->quit();
}
}
@@ -558,7 +558,7 @@ void qt_eval_init_widget(QWidget *w)
if (w->isTopLevel()) {
QString windowTitle = w->windowTitle();
if (windowTitle.isEmpty()) {
- w->setWindowTitle(" ");
+ w->setWindowTitle(QLatin1String(" "));
} else if (!windowTitle.startsWith(qt_eval_title_prefix())) {
qt_eval_adapt_window_title(windowTitle);
}