From 563c9445d4df8d38f776daf46a8132f90981e6d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Thu, 4 Jul 2013 15:44:53 +0200 Subject: Clean up evaluation license logic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Change-Id: Ia0e85b2103f790a7e02e0d6e567a477b3145fcb9 Reviewed-by: Tor Arne Vestbø --- src/corelib/kernel/qcoreapplication_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib/kernel/qcoreapplication_p.h') diff --git a/src/corelib/kernel/qcoreapplication_p.h b/src/corelib/kernel/qcoreapplication_p.h index 563a3b2093..6a3bea9c9e 100644 --- a/src/corelib/kernel/qcoreapplication_p.h +++ b/src/corelib/kernel/qcoreapplication_p.h @@ -135,7 +135,7 @@ public: static bool isTranslatorInstalled(QTranslator *translator); #endif - uint application_type; + QCoreApplicationPrivate::Type application_type; QString cachedApplicationDirPath; QString cachedApplicationFilePath; -- cgit v1.2.3