From efca03ec7f1f077e0655b370c599d3e792341778 Mon Sep 17 00:00:00 2001 From: Konrad Rosenbaum Date: Fri, 29 Jun 2012 19:24:57 +0200 Subject: [PATCH] make version dlg more readable --- src/main.cpp | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 72b66af..a453d94 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -109,6 +109,7 @@ void MApplication::versionDlg() mb.setIconPixmap(QPixmap(":/icon.png")); mb.setWindowTitle(tr("MagicSmoke Version Information")); TimeZoneLib::TZFile tzf=TimeStamp::defaultZoneFile(); + auto unknown=[](const QString&s)->QString{if(s.isEmpty())return "(unknown)";else return "'"+s+"'";}; mb.setText(tr( "

MagicSmoke Version %3

" "" "" @@ -122,7 +123,7 @@ void MApplication::versionDlg() "" "" "" - "" + "" "" "
Repository:%1
PACK Library:%9
%10
Qt:%11
ELAM:%12
Time Zone Default:%13 in %14
version %15
Time Zone Default:%13 in directory %14
version %15
Time Zone Built-In:%16
" ) @@ -138,9 +139,9 @@ void MApplication::versionDlg() .arg(htmlize(WInterface::staticLibraryVersionInfo(WOb::VersionNumber))) .arg(htmlize(QT_VERSION_STR)) //%11 .arg(htmlize(ELAM::versionInfo())) //%12 - .arg(tzf.name()) //%13 - .arg(tzf.dirName()) - .arg(tzf.version()) + .arg(unknown(tzf.name())) //%13 + .arg(unknown(tzf.dirName())) + .arg(unknown(tzf.version())) .arg(TimeZoneLib::TZFile::builtinVersion()) //%16 ); mb.setStandardButtons(QMessageBox::Ok); -- 1.7.2.5