Fixes two problems in the current group chat:

- the parser fails to embed two links in the same sentence
- the parser can potentially put smileys in the middle of <a> tags

Solution:
Since the message is in HTML, it is parsed into a DOM tree, then that DOM tree
is traversed and only the text nodes are parsed (see HandleRichText.cpp for
details).

Bonus fixes:
- missing std:: for endl (which was falling back to its Qt counterpart)
- commenting useless code in PeersDialog::smileyWidgetgroupchat()
- replacing int by size_t
- RetroShare.pro now queries gpgme-config for its include path


git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2888 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
leander-256 2010-05-12 00:17:10 +00:00
parent 6b3f51c626
commit 988c6c31f5
5 changed files with 281 additions and 40 deletions

View file

@ -11,7 +11,7 @@ MOC_DIR = temp/moc
#CONFIG += debug
debug {
QMAKE_CXXFLAGS *= -g
QMAKE_CFLAGS += -g
}
################################# Linux ##########################################
@ -19,8 +19,15 @@ debug {
linux-* {
#CONFIG += version_detail_bash_script
QMAKE_CXXFLAGS *= -D_FILE_OFFSET_BITS=64
system(which gpgme-config >/dev/null 2>&1) {
INCLUDEPATH += $$system(gpgme-config --cflags | sed -e "s/-I//g")
} else {
message(Could not find gpgme-config on your system, assuming gpgme.h is in /usr/include)
}
LIBS += ../../libretroshare/src/lib/libretroshare.a
LIBS += -lssl -lgpgme -lupnp -lXss
LIBS += -lssl -lgpgme -lupnp -lXss
DEFINES *= HAVE_XSS # for idle time, libx screensaver extensions
}
@ -208,6 +215,7 @@ HEADERS += rshare.h \
gui/profile/ProfileWidget.h \
gui/profile/StatusMessage.h \
gui/chat/PopupChatDialog.h \
gui/chat/HandleRichText.h \
gui/channels/CreateChannel.h \
gui/channels/ChannelDetails.h \
gui/channels/CreateChannelMsg.h \
@ -418,6 +426,7 @@ SOURCES += main.cpp \
gui/channels/CreateChannelMsg.cpp \
gui/channels/ChannelDetails.cpp \
gui/chat/PopupChatDialog.cpp \
gui/chat/HandleRichText.cpp \
gui/connect/ConnectDialog.cpp \
gui/connect/ConfCertDialog.cpp \
gui/msgs/ChanMsgDialog.cpp \