summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qlibraryinfo.cpp
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@digia.com>2013-07-04 15:44:53 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-07-05 09:24:39 +0200
commit563c9445d4df8d38f776daf46a8132f90981e6d1 (patch)
treed9b4f53be30b3d8b4b8b2942b59e8fdbdfc34e1d /src/corelib/global/qlibraryinfo.cpp
parent1bd8db01c4d3bfe19b0452a7ecf90cec9360c58b (diff)
Clean up evaluation license logic
Instead of storing the application type as a uint, we use the enum provided by QCoreApplicationPrivate. The former resulted in a few cases of wrong logic where the values got mixed up, such as always printing the QtCore console warning, even for GUI applications. The qt_eval_is_supported function has been refactored to return enums instead of magic values, to make the logic easier to read. The same goes for qt_eval_days_left, which now only concerns itself with the number of days left. qt_eval_is_expired() has been added to use for easy checking of expiration date. Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Change-Id: Ia0e85b2103f790a7e02e0d6e567a477b3145fcb9 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Diffstat (limited to 'src/corelib/global/qlibraryinfo.cpp')
-rw-r--r--src/corelib/global/qlibraryinfo.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp
index 1eaebe5f90..53a3ebbc10 100644
--- a/src/corelib/global/qlibraryinfo.cpp
+++ b/src/corelib/global/qlibraryinfo.cpp
@@ -479,6 +479,8 @@ QT_END_NAMESPACE
# include <stdio.h>
# include <stdlib.h>
+#include "private/qcoreapplication_p.h"
+
extern const char qt_core_interpreter[] __attribute__((section(".interp")))
= ELF_INTERPRETER;
@@ -501,8 +503,8 @@ void qt_core_boilerplate()
QT_PREPEND_NAMESPACE(qDumpCPUFeatures)();
#ifdef QT_EVAL
- extern void qt_core_eval_init(uint);
- qt_core_eval_init(1);
+ extern void qt_core_eval_init(QCoreApplicationPrivate::Type);
+ qt_core_eval_init(QCoreApplicationPrivate::Tty);
#endif
exit(0);