mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-12-12 15:25:34 -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
|
QT += widgets
|
||||||
}
|
}
|
||||||
|
|
||||||
|
greaterThan(QT_MAJOR_VERSION,5): QT += core5compat
|
||||||
|
|
||||||
target.files = lib/libFeedReader.so
|
target.files = lib/libFeedReader.so
|
||||||
|
|
||||||
SOURCES = FeedReaderPlugin.cpp \
|
SOURCES = FeedReaderPlugin.cpp \
|
||||||
|
|
|
||||||
|
|
@ -61,6 +61,7 @@
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include <QToolTip>
|
#include <QToolTip>
|
||||||
#include <QInputDialog>
|
#include <QInputDialog>
|
||||||
|
#include <QRegExp>
|
||||||
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,7 @@
|
||||||
#include <QPlainTextEdit>
|
#include <QPlainTextEdit>
|
||||||
#include <QTextDocumentFragment>
|
#include <QTextDocumentFragment>
|
||||||
#include <QScrollBar>
|
#include <QScrollBar>
|
||||||
|
#include <QRegExp>
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,8 @@ CONFIG += console
|
||||||
TARGET = retroshare
|
TARGET = retroshare
|
||||||
DEFINES += TARGET=\\\"$${TARGET}\\\"
|
DEFINES += TARGET=\\\"$${TARGET}\\\"
|
||||||
|
|
||||||
|
greaterThan(QT_MAJOR_VERSION,5): QT += core5compat
|
||||||
|
|
||||||
DEPENDPATH *= $${PWD} $${RS_INCLUDE_DIR}
|
DEPENDPATH *= $${PWD} $${RS_INCLUDE_DIR}
|
||||||
INCLUDEPATH *= $${PWD}
|
INCLUDEPATH *= $${PWD}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@
|
||||||
#include <qmath.h>
|
#include <qmath.h>
|
||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
#include <QRegularExpression>
|
#include <QRegularExpression>
|
||||||
|
#include <QRegExp>
|
||||||
|
|
||||||
#include "HandleRichText.h"
|
#include "HandleRichText.h"
|
||||||
#include "gui/RetroShareLink.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);
|
int index = rx.indexIn(text, pos);
|
||||||
if(index == -1 || embedInfos.myType != Img) return index;
|
if(index == -1 || embedInfos.myType != Img) return index;
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,7 @@ class QDomElement;
|
||||||
class EmbedInHtml;
|
class EmbedInHtml;
|
||||||
class RetroShareLink;
|
class RetroShareLink;
|
||||||
class QTextCursor;
|
class QTextCursor;
|
||||||
|
class QRegExp;
|
||||||
|
|
||||||
class RsHtml
|
class RsHtml
|
||||||
{
|
{
|
||||||
|
|
@ -89,7 +90,7 @@ protected:
|
||||||
virtual void anchorStylesheetForImg(QDomDocument &doc, QDomElement &element, const RetroShareLink &link, QString &styleSheet);
|
virtual void anchorStylesheetForImg(QDomDocument &doc, QDomElement &element, const RetroShareLink &link, QString &styleSheet);
|
||||||
|
|
||||||
private:
|
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_
|
#endif // HANDLE_RICH_TEXT_H_
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue