diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2009-10-29 12:01:28 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2009-10-29 13:13:56 (GMT) |
commit | ab7b164f60b0819d24d5b57d70988c4f5751329f (patch) | |
tree | 6e042436e889197d662988d3ba79c1e5ef42128d /src | |
parent | 4df10827546faafc3558bbe3c255e5cdab1984e5 (diff) | |
download | Qt-ab7b164f60b0819d24d5b57d70988c4f5751329f.zip Qt-ab7b164f60b0819d24d5b57d70988c4f5751329f.tar.gz Qt-ab7b164f60b0819d24d5b57d70988c4f5751329f.tar.bz2 |
Part 2 of the Evaluation notice feature, now for QtGui.
Reviewed-by: Daniel Molkentin
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/eval.pri | 4 | ||||
-rw-r--r-- | src/corelib/kernel/qtcore_eval.cpp | 14 |
2 files changed, 10 insertions, 8 deletions
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); } |