diff --git a/retroshare-gui/src/retroshare-gui.pro b/retroshare-gui/src/retroshare-gui.pro index b51139ea4..8899de337 100644 --- a/retroshare-gui/src/retroshare-gui.pro +++ b/retroshare-gui/src/retroshare-gui.pro @@ -2,7 +2,7 @@ TEMPLATE = app QT += network xml -CONFIG += qt gui uic qrc resources idle cmark +CONFIG += qt gui uic qrc resources idle CONFIG += console TARGET = retroshare DEFINES += TARGET=\\\"$${TARGET}\\\" @@ -1371,6 +1371,7 @@ gxsgui { } cmark { + DEFINES *= USE_CMARK HEADERS += \ ../../supportlibs/cmark/src/buffer.h \ diff --git a/retroshare-gui/src/util/HandleRichText.cpp b/retroshare-gui/src/util/HandleRichText.cpp index 046ea47a6..8f7f158ab 100644 --- a/retroshare-gui/src/util/HandleRichText.cpp +++ b/retroshare-gui/src/util/HandleRichText.cpp @@ -38,9 +38,14 @@ #include "util/imageutil.h" #include "util/rstime.h" +// #define USE_CMARK + +#ifdef USE_CMARK //Include for CMark +// This needs to be fixed: use system library if available, etc. #include #include +#endif #include @@ -586,6 +591,7 @@ QString RsHtml::formatText(QTextDocument *textDocument, const QString &text, ulo // Save Space and Tab because doc loose it. formattedText=saveSpace(formattedText); +#ifdef USE_CMARK if (flag & RSHTML_FORMATTEXT_USE_CMARK) { // Transform html to plain text QTextBrowser textBrowser; @@ -608,6 +614,7 @@ QString RsHtml::formatText(QTextDocument *textDocument, const QString &text, ulo textBrowser.setHtml(formattedText); formattedText=textBrowser.toHtml(); } +#endif QString errorMsg; int errorLine; int errorColumn; diff --git a/retroshare.pri b/retroshare.pri index 34f6dfee6..b448f6b24 100644 --- a/retroshare.pri +++ b/retroshare.pri @@ -30,11 +30,19 @@ no_retroshare_gui:CONFIG -= retroshare_gui CONFIG *= gxsdistsync +# disabled by the time we fix compilation +CONFIG *= no_cmark + # To disable RetroShare-nogui append the following # assignation to qmake command line "CONFIG+=no_retroshare_nogui" CONFIG *= retroshare_nogui no_retroshare_nogui:CONFIG -= retroshare_nogui +# To disable cmark append the following +# assignation to qmake command line "CONFIG+=no_cmark" +CONFIG *= cmark +no_cmark:CONFIG -= cmark + # To enable RetroShare plugins append the following # assignation to qmake command line "CONFIG+=retroshare_plugins" CONFIG *= no_retroshare_plugins