mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-12-01 12:54:50 -05:00
Added Qt 5 Core Compat module for QRegExp for Qt 6
This commit is contained in:
parent
96c02d94c3
commit
15684bf8d3
6 changed files with 10 additions and 2 deletions
|
|
@ -28,6 +28,8 @@ greaterThan(QT_MAJOR_VERSION, 4) {
|
|||
QT += widgets
|
||||
}
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION,5): QT += core5compat
|
||||
|
||||
target.files = lib/libFeedReader.so
|
||||
|
||||
SOURCES = FeedReaderPlugin.cpp \
|
||||
|
|
|
|||
|
|
@ -61,6 +61,7 @@
|
|||
#include <QTimer>
|
||||
#include <QToolTip>
|
||||
#include <QInputDialog>
|
||||
#include <QRegExp>
|
||||
|
||||
#include <time.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@
|
|||
#include <QPlainTextEdit>
|
||||
#include <QTextDocumentFragment>
|
||||
#include <QScrollBar>
|
||||
#include <QRegExp>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,8 @@ CONFIG += console
|
|||
TARGET = retroshare
|
||||
DEFINES += TARGET=\\\"$${TARGET}\\\"
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION,5): QT += core5compat
|
||||
|
||||
DEPENDPATH *= $${PWD} $${RS_INCLUDE_DIR}
|
||||
INCLUDEPATH *= $${PWD}
|
||||
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
#include <qmath.h>
|
||||
#include <QUrl>
|
||||
#include <QRegularExpression>
|
||||
#include <QRegExp>
|
||||
|
||||
#include "HandleRichText.h"
|
||||
#include "gui/RetroShareLink.h"
|
||||
|
|
@ -359,7 +360,7 @@ void RsHtml::filterEmbeddedImages(QDomDocument &doc, QDomElement ¤tElement
|
|||
}
|
||||
}
|
||||
|
||||
int RsHtml::indexInWithValidation(QRegExp &rx, const QString &text, EmbedInHtml &embedInfos, int pos)
|
||||
int RsHtml::indexInWithValidation(const QRegExp &rx, const QString &text, EmbedInHtml &embedInfos, int pos)
|
||||
{
|
||||
int index = rx.indexIn(text, pos);
|
||||
if(index == -1 || embedInfos.myType != Img) return index;
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ class QDomElement;
|
|||
class EmbedInHtml;
|
||||
class RetroShareLink;
|
||||
class QTextCursor;
|
||||
class QRegExp;
|
||||
|
||||
class RsHtml
|
||||
{
|
||||
|
|
@ -89,7 +90,7 @@ protected:
|
|||
virtual void anchorStylesheetForImg(QDomDocument &doc, QDomElement &element, const RetroShareLink &link, QString &styleSheet);
|
||||
|
||||
private:
|
||||
int indexInWithValidation(QRegExp &rx, const QString &text, EmbedInHtml &embedInfos, int pos = 0);
|
||||
int indexInWithValidation(const QRegExp &rx, const QString &text, EmbedInHtml &embedInfos, int pos = 0);
|
||||
};
|
||||
|
||||
#endif // HANDLE_RICH_TEXT_H_
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue