@@ -81,7 +81,7 @@ void customMessageHandler(QtMsgType type,
8181 switch (type) {
8282#if QT_VERSION >= 0x050500
8383 case QtInfoMsg:
84- text += QString (" {Info } %1" ).arg (message);
84+ text += QString (" {Log } %1" ).arg (message);
8585 break ;
8686#endif
8787 case QtDebugMsg:
@@ -127,6 +127,11 @@ int main(int argc, char **argv)
127127 application.setApplicationVersion (" 0.4.1" );
128128 bool startedAsRoot = false ;
129129
130+ // ==============================
131+ // PSEUDO-DOMAIN:
132+ // ==============================
133+ application.setProperty (" pseudoDomain" , QString (" local-pseudodomain" ));
134+
130135 // ==============================
131136 // UTF-8 ENCODING APPLICATION-WIDE:
132137 // ==============================
@@ -312,7 +317,7 @@ int main(int argc, char **argv)
312317 }
313318 }
314319
315- trustedDomainsList.append (PSEUDO_DOMAIN );
320+ trustedDomainsList.append (application. property ( " pseudoDomain " ). toString () );
316321 application.setProperty (" trustedDomains" , trustedDomainsList);
317322
318323 // ==============================
@@ -384,7 +389,7 @@ int main(int argc, char **argv)
384389
385390 mainWindow.webViewWidget ->setHtml (htmlErrorContents);
386391
387- qInfo () << " Using"
392+ qDebug () << " Using"
388393 << application.applicationName ().toLatin1 ().constData ()
389394 << application.applicationVersion ().toLatin1 ().constData ()
390395 << " with administrative privileges is not allowed." ;
@@ -406,47 +411,49 @@ int main(int argc, char **argv)
406411
407412 mainWindow.webViewWidget ->setHtml (htmlErrorContents);
408413
409- qInfo () << application.applicationName ().toLatin1 ().constData ()
414+ qDebug () << application.applicationName ().toLatin1 ().constData ()
410415 << application.applicationVersion ().toLatin1 ().constData ()
411416 << " started." ;
412- qInfo () << " Qt version:" << QT_VERSION_STR;
413- qInfo () << " Executable:" << application.applicationFilePath ();
414- qInfo () << " No Perl interpreter is found." ;
417+ qDebug () << " Qt version:" << QT_VERSION_STR;
418+ qDebug () << " Executable:" << application.applicationFilePath ();
419+ qDebug () << " No Perl interpreter is found." ;
415420 }
416421
417422 if (startedAsRoot == false and perlInterpreterFullPath.length () > 0 ) {
418423 // ==============================
419424 // LOG BASIC PROGRAM INFORMATION AND SETTINGS:
420425 // ==============================
421- qInfo () << application.applicationName ().toLatin1 ().constData ()
426+ qDebug () << application.applicationName ().toLatin1 ().constData ()
422427 << application.applicationVersion ().toLatin1 ().constData ()
423428 << " started." ;
424- qInfo () << " Qt version:" << QT_VERSION_STR;
425- qInfo () << " Executable:" << application.applicationFilePath ();
426- qInfo () << " PID:" << application.applicationPid ();
429+ qDebug () << " Qt version:" << QT_VERSION_STR;
430+ qDebug () << " Executable:" << application.applicationFilePath ();
431+ qDebug () << " PID:" << application.applicationPid ();
427432
428433#if ADMIN_PRIVILEGES_CHECK == 0
429- qInfo () << " Administrative privileges check is disabled." ;
434+ qDebug () << " Administrative privileges check is disabled." ;
430435#endif
431436
432437#if ADMIN_PRIVILEGES_CHECK == 1
433- qInfo () << " Administrative privileges check is enabled." ;
438+ qDebug () << " Administrative privileges check is enabled." ;
434439#endif
435440
436441#if PERL_DEBUGGER_GUI == 0
437- qInfo () << " Perl debugger GUI is disabled." ;
442+ qDebug () << " Perl debugger GUI is disabled." ;
438443#endif
439444
440445#if PERL_DEBUGGER_GUI == 1
441- qInfo () << " Perl debugger GUI is enabled." ;
446+ qDebug () << " Perl debugger GUI is enabled." ;
442447#endif
443448
444- qInfo () << " Perl interpreter:" << perlInterpreterFullPath;
445- qInfo () <<" Local pseudo-domain:" << PSEUDO_DOMAIN;
449+ qDebug () << " Perl interpreter:" << perlInterpreterFullPath;
450+ qDebug () <<" Local pseudo-domain:"
451+ << application.property (" pseudoDomain" ).toString ();
446452
447453 foreach (QString trustedDomain, trustedDomainsList) {
448- if (trustedDomain != PSEUDO_DOMAIN) {
449- qInfo () << " Trusted domain:" << trustedDomain;
454+ if (trustedDomain !=
455+ application.property (" pseudoDomain" ).toString ()) {
456+ qDebug () << " Trusted domain:" << trustedDomain;
450457 }
451458 }
452459
@@ -458,7 +465,10 @@ int main(int argc, char **argv)
458465 applicationDirName + QDir::separator () + " index.html" );
459466
460467 if (staticStartPageFile.exists ()) {
461- startPage = " http://" + QString (PSEUDO_DOMAIN) + " /index.html" ;
468+ startPage =
469+ " http://" +
470+ QString (application.property (" pseudoDomain" ).toString ()) +
471+ " /index.html" ;
462472
463473 application.setProperty (" startPage" , startPage);
464474
@@ -467,7 +477,11 @@ int main(int argc, char **argv)
467477 QFile dynamicStartPageFile (
468478 applicationDirName + QDir::separator () + " index.pl" );
469479 if (dynamicStartPageFile.exists ()) {
470- startPage = " http://" + QString (PSEUDO_DOMAIN) + " /index.pl" ;
480+ startPage =
481+ " http://" +
482+ QString (application.property (" pseudoDomain" )
483+ .toString ()) +
484+ " /index.pl" ;
471485
472486 application.setProperty (" startPage" , startPage);
473487
@@ -481,7 +495,7 @@ int main(int argc, char **argv)
481495 htmlErrorContents.replace (" ERROR_MESSAGE" , errorMessage);
482496 mainWindow.webViewWidget ->setHtml (htmlErrorContents);
483497
484- qInfo () << " No start page is found." ;
498+ qDebug () << " No start page is found." ;
485499 }
486500 }
487501 }
0 commit comments