From 015fb6f55f7bc2f822e4b6d959490f23b21a5f74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Remko=20Tron=C3=A7on?= Date: Mon, 1 Jun 2009 13:42:04 +0200 Subject: Escape '\' in chats. diff --git a/UI/Qt/Makefile.inc b/UI/Qt/Makefile.inc index d1587ad..52cb3b3 100644 --- a/UI/Qt/Makefile.inc +++ b/UI/Qt/Makefile.inc @@ -10,7 +10,7 @@ qt: UI/Qt/Makefile $(MAKE) -C UI/Qt clean; \ fi -UI/Qt/Makefile: UI/Qt/Swift.pro +UI/Qt/Makefile: cd UI/Qt && $(QMAKE) Swift.pro UI/Qt/Swift.pro: UI/Qt/DefaultTheme.qrc diff --git a/UI/Qt/QtChatView.cpp b/UI/Qt/QtChatView.cpp index b6687d0..cdf0f4e 100644 --- a/UI/Qt/QtChatView.cpp +++ b/UI/Qt/QtChatView.cpp @@ -43,6 +43,7 @@ void QtChatView::addMessage(const ChatSnippet& snippet) { //bool wasScrolledToBottom = isScrolledToBottom(); QString content = snippet.getContent(); + content.replace("\\", "\\\\"); content.replace("\"", "\\\""); content.replace("\n", "\\n"); if (previousContinuationElementID_.isEmpty() || !snippet.getAppendToPrevious()) { diff --git a/UI/Qt/Swift.pro b/UI/Qt/Swift.pro index 83bbb45..83325b9 100644 --- a/UI/Qt/Swift.pro +++ b/UI/Qt/Swift.pro @@ -89,3 +89,5 @@ win32 { DefaultThemeQRC.commands = ..\..\..\tools\ThemeQRC.py ../../../resources/themes/Default > DefaultTheme.qrc QMAKE_EXTRA_TARGETS = DefaultThemeQRC } + +LIBS += -fprofile-arcs -ftest-coverage diff --git a/tools/coverage/GenerateCoverageResults.sh b/tools/coverage/GenerateCoverageResults.sh index 9e32da4..9c8a3d7 100755 --- a/tools/coverage/GenerateCoverageResults.sh +++ b/tools/coverage/GenerateCoverageResults.sh @@ -3,8 +3,9 @@ # This script assumes that it is run from the toplevel directory, that # the 'configure' script has been called with '--enable-coverage' -SOURCE_DIR=src/Swift +SOURCE_DIR=. SCRIPT_DIR=tools/coverage +LCOVDIR=3rdParty/LCov RESULTS_DIR=tools/coverage/results OUTPUT_DIR=$RESULTS_DIR/coverage-`git log --pretty=format:%ct-%h | head -n 1` @@ -15,16 +16,16 @@ if [ ! -f $OUTPUT_DIR ]; then fi # Reset counters -lcov --zerocounters --directory $SOURCE_DIR +$LCOVDIR/lcov --zerocounters --directory $SOURCE_DIR # All tests make -C $SOURCE_DIR test -lcov --capture --directory $SOURCE_DIR -b $SOURCE_DIR --output-file $OUTPUT_DIR/all.info --test-name all +$LCOVDIR/lcov --capture --directory $SOURCE_DIR -b $SOURCE_DIR --output-file $OUTPUT_DIR/all.info --test-name all $SCRIPT_DIR/FilterLCovData.py $OUTPUT_DIR/all.info # Generate HTML -gendesc -o $OUTPUT_DIR/descriptions $SCRIPT_DIR/descriptions.txt -genhtml --title "Swift Coverage" --output-directory $OUTPUT_DIR $OUTPUT_DIR/all.info +$LCOVDIR/gendesc -o $OUTPUT_DIR/descriptions $SCRIPT_DIR/descriptions.txt +$LCOVDIR/genhtml --title "Swift Coverage" --output-directory $OUTPUT_DIR $OUTPUT_DIR/all.info # Generate summary $SCRIPT_DIR/GenerateSummary.py $OUTPUT_DIR/all.info $OUTPUT_DIR/summary -- cgit v0.10.2-6-g49f6