From 35d7359403d9554bda77356380a36b45fae8c4e9 Mon Sep 17 00:00:00 2001 From: l_maliakal_d Date: Tue, 6 Aug 2013 07:22:50 +0000 Subject: [PATCH] qdefs message changed everything from \n to
, helps for gray source as html git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@217 af1100a4-978c-4157-bff7-07162d2ba061 --- slsDetectorGui/include/qDefs.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/slsDetectorGui/include/qDefs.h b/slsDetectorGui/include/qDefs.h index 84801f912..02710c710 100644 --- a/slsDetectorGui/include/qDefs.h +++ b/slsDetectorGui/include/qDefs.h @@ -145,7 +145,14 @@ static const int64_t GUI_VERSION=0x20121213; static int Message(MessageIndex index, string message,string source) { static QMessageBox* msgBox; + size_t pos; + //replace all \n with
+ pos = 0; + while((pos = message.find("\n", pos)) != string::npos){ + message.replace(pos, 1, "
"); + pos += 1; + } message.append(string("

Source:   ") + source + string("

")); switch(index){