From 500d11cf6ffc01754051903a0badb2eb5c9c9752 Mon Sep 17 00:00:00 2001 From: nowrep Date: Sat, 10 Mar 2012 15:25:54 +0100 Subject: [PATCH] Showing build configuration in qupzilla:config page. - see #202 --- BUILDING | 2 +- src/defines.pri | 2 + src/lib/data/html/config.html | 5 +++ src/lib/network/qupzillaschemehandler.cpp | 51 +++++++++++++++++------ 4 files changed, 47 insertions(+), 13 deletions(-) diff --git a/BUILDING b/BUILDING index 0379859a1..8fa215b2e 100644 --- a/BUILDING +++ b/BUILDING @@ -86,7 +86,7 @@ Available Defines (disabled by default) example: - $ export NONBLOCK_JS_DIALOGS="true" + $ export NONBLOCK_JS_DIALOGS="true" Windows specific defines: diff --git a/src/defines.pri b/src/defines.pri index 3c45ef374..569933848 100644 --- a/src/defines.pri +++ b/src/defines.pri @@ -27,12 +27,14 @@ d_use_webgl = $$(USE_WEBGL) d_w7api = $$(W7API) d_kde = $$(KDE) d_portable = $$(PORTABLE_BUILD) +d_nonblock_dialogs = $$(NONBLOCK_JS_DIALOGS) equals(d_no_system_datapath, "true") { DEFINES += NO_SYSTEM_DATAPATH } equals(d_use_webgl, "true") { DEFINES += USE_WEBGL } equals(d_w7api, "true") { DEFINES += W7API } equals(d_kde, "true") { DEFINES += KDE } equals(d_portable, "true") { DEFINES += PORTABLE_BUILD } +equals(d_nonblock_dialogs, "true") { DEFINES += NONBLOCK_JS_DIALOGS } !mac:unix { d_prefix = $$(QUPZILLA_PREFIX) diff --git a/src/lib/data/html/config.html b/src/lib/data/html/config.html index dfa799da5..953524495 100644 --- a/src/lib/data/html/config.html +++ b/src/lib/data/html/config.html @@ -39,6 +39,11 @@ table.tbl {width: 100%;margin: 15px 0;border-radius: 4px;padding: 0px;border: 2p %PATHS-TEXT% +

%BUILD-CONFIG%

+
+ %BUILD-CONFIG-TEXT% +
+

%PLUGINS%

diff --git a/src/lib/network/qupzillaschemehandler.cpp b/src/lib/network/qupzillaschemehandler.cpp index c67b410a3..471cd13c6 100644 --- a/src/lib/network/qupzillaschemehandler.cpp +++ b/src/lib/network/qupzillaschemehandler.cpp @@ -304,6 +304,7 @@ QString QupZillaSchemeReply::configPage() cPage.replace("%CONFIG-ABOUT%", tr("This page contains information about QupZilla's current configuration, plugins, etc, all relevant information for troubleshooting. Please include these information when sending bug reports.")); cPage.replace("%BROWSER-IDENTIFICATION%", tr("Browser Identification")); cPage.replace("%PATHS%", tr("Paths")); + cPage.replace("%BUILD-CONFIG%", tr("Build Configuration")); cPage.replace("%PREFS%", tr("Preferences")); cPage.replace("%OPTION%", tr("Option")); cPage.replace("%VALUE%", tr("Value")); @@ -313,15 +314,6 @@ QString QupZillaSchemeReply::configPage() cPage.replace("%PL-AUTH%", tr("Author")); cPage.replace("%PL-DESC%", tr("Description")); - cPage.replace("%PATHS-TEXT%", - QString("
%1
%2
").arg(tr("Profile"), mApp->getActiveProfilPath()) + - QString("
%1
%2
").arg(tr("Settings"), mApp->getActiveProfilPath() + "settings.ini") + - QString("
%1
%2
").arg(tr("Saved session"), mApp->getActiveProfilPath() + "session.dat") + - QString("
%1
%2
").arg(tr("Pinned tabs"), mApp->getActiveProfilPath() + "pinnedtabs.dat") + - QString("
%1
%2
").arg(tr("Data"), mApp->DATADIR) + - QString("
%1
%2
").arg(tr("Themes"), mApp->THEMESDIR) + - QString("
%1
%2
").arg(tr("Translations"), mApp->TRANSLATIONSDIR)); - cPage.replace("%VERSION-INFO%", QString("
%1
%2
").arg(tr("Application version"), QupZilla::VERSION #ifdef GIT_REVISION @@ -331,10 +323,45 @@ QString QupZillaSchemeReply::configPage() QString("
%1
%2
").arg(tr("Qt version"), QT_VERSION_STR) + QString("
%1
%2
").arg(tr("WebKit version"), QupZilla::WEBKITVERSION) + QString("
%1
%2
").arg(tr("Build time"), QupZilla::BUILDTIME) + -#ifdef QUPZILLA_DEBUG_BUILD - QString("
%1
%2
").arg(tr("Debugging symbols"), tr("Yes")) + -#endif QString("
%1
%2
").arg(tr("Platform"), qz_buildSystem())); + + cPage.replace("%PATHS-TEXT%", + QString("
%1
%2
").arg(tr("Profile"), mApp->getActiveProfilPath()) + + QString("
%1
%2
").arg(tr("Settings"), mApp->getActiveProfilPath() + "settings.ini") + + QString("
%1
%2
").arg(tr("Saved session"), mApp->getActiveProfilPath() + "session.dat") + + QString("
%1
%2
").arg(tr("Pinned tabs"), mApp->getActiveProfilPath() + "pinnedtabs.dat") + + QString("
%1
%2
").arg(tr("Data"), mApp->DATADIR) + + QString("
%1
%2
").arg(tr("Themes"), mApp->THEMESDIR) + + QString("
%1
%2
").arg(tr("Translations"), mApp->TRANSLATIONSDIR)); + + QString debugBuild = tr("Disabled"); + QString webGLEnabled = tr("Disabled"); + QString w7APIEnabled = tr("Disabled"); + QString KDEIntegration = tr("Disabled"); + QString portableBuild = tr("Disabled"); + +#ifdef QUPZILLA_DEBUG_BUILD + debugBuild = tr("Enabled"); +#endif +#ifdef USE_WEBGL + webGLEnabled = tr("Enabled"); +#endif +#if defined(Q_WS_WIN) && defined(W7API) + w7APIEnabled = tr("Enabled"); +#endif +#if defined(Q_WS_X11) && defined(KDE) + KDEIntegration = tr("Enabled"); +#endif +#ifdef PORTABLE_BUILD + portableBuild = tr("Enabled"); +#endif + + cPage.replace("%BUILD-CONFIG-TEXT%", + QString("
%1
%2
").arg(tr("Debug build"), debugBuild) + + QString("
%1
%2
").arg(tr("WebGL support"), webGLEnabled) + + QString("
%1
%2
").arg(tr("Windows 7 API"), w7APIEnabled) + + QString("
%1
%2
").arg(tr("KDE integration"), KDEIntegration) + + QString("
%1
%2
").arg(tr("Portable build"), portableBuild)); } QString page = cPage;