0
0
mirror of https://github.com/RetroShare/RetroShare synced 2025-10-06 00:32:42 +02:00

Added Qt 5 Core Compat module for QRegExp for Qt 6

This commit is contained in:
thunder2
2025-07-18 16:58:27 +02:00
parent 96c02d94c3
commit 15684bf8d3
6 changed files with 10 additions and 2 deletions

View File

@@ -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 \

View File

@@ -61,6 +61,7 @@
#include <QTimer>
#include <QToolTip>
#include <QInputDialog>
#include <QRegExp>
#include <time.h>

View File

@@ -35,6 +35,7 @@
#include <QPlainTextEdit>
#include <QTextDocumentFragment>
#include <QScrollBar>
#include <QRegExp>
#include <iostream>

View File

@@ -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}

View File

@@ -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 &currentElement
}
}
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;

View File

@@ -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_