13 if ( newLicense.size() == 0 )
18 if ( license.size() < 12 )
20 ErrorMessage = QString( qApp->translate(
"UltraScan",
21 "You have not yet registered your copy of UltraScan.\n"
22 "Click on 'Register' to register UltraScan\n"
23 "for the %1 platform and %2 Operating System." ) )
24 .arg( TITLE, OS_TITLE );
29 QString lastname = license.value( 0 );
30 QString firstname = license.value( 1 );
31 QString company = license.value( 2 );
32 QString address = license.value( 3 );
33 QString city = license.value( 4 );
34 QString state = license.value( 5 );
35 QString zip = license.value( 6 );
36 QString phone = license.value( 7 );
37 QString email = license.value( 8 );
38 QString platform = license.value( 9 );
39 QString opSys = license.value( 10 );
40 QString version = license.value( 11 );
42 QString validation =
"";
43 QString expiration =
"";
45 if ( license.size() > 13 )
47 validation = license.value( 12 );
48 expiration = license.value( 13 );
51 if ( platform != PLATFORM )
53 ErrorMessage = QString( qApp->translate(
"UltraScan",
54 "You are running UltraScan on a %1 platform,\n"
55 "but your registration is issued for the %2 platform\n\n"
56 "You will have to update your registration before\n"
57 "proceeding. Click on 'Register' to start the process\n"
58 "for the %3 platform." ) )
59 .arg( TITLE, platform, TITLE );
66 ErrorMessage = QString( qApp->translate(
"UltraScan",
67 "You are running UltraScan with a %1 operating system,\n"
68 "but your registration is issued for the %2 operating system\n\n"
69 "You will have to update your registration before\n"
70 "proceeding. Click on 'Register' to start the process\n"
71 "for a %3 operating system." ) )
72 .arg( OS_TITLE, opSys, OS_TITLE );
77 if ( license.size() == 12 )
79 ErrorMessage = QString( qApp->translate(
"UltraScan",
80 "Your UltraScan registration is pending.\n"
81 "Please respond to the email sent to complete the process." ) );
86 QString license_string = expiration + email;
87 QString calculation =
"";
89 for (
int i = 0; i < license_string.size(); i++ )
90 calculation += str.sprintf(
"%X", license_string[ i ].unicode() );
92 calculation.truncate(24);
94 if ( calculation != validation )
96 ErrorMessage = qApp->translate(
"UltraScan",
97 "The registration is invalid.\n"
98 "You will have to update your registration before\n"
99 "proceeding. Click on 'Register' to begin the registration\n" )
100 +
"\n" + validation +
"\n" + calculation;
105 if ( QDate::currentDate() > QDate::fromString( expiration ) )
107 ErrorMessage = qApp->translate(
"UltraScan",
108 "The registration is expired.\n"
109 "You will have to update your registration before\n"
110 "proceeding. Click on 'Update / Renew' to continue.\n" );