upgrade to 6.2,linux compile

This commit is contained in:
yifang 2022-02-27 22:42:40 +08:00 committed by xiaoyifang
parent 6b01cba709
commit fb2eac9b5e
19 changed files with 51 additions and 27 deletions

View file

@ -32,7 +32,7 @@
#include <QWebEngineContextMenuData> #include <QWebEngineContextMenuData>
#endif #endif
#if (QT_VERSION >= QT_VERSION_CHECK(6,0,0)) #if (QT_VERSION >= QT_VERSION_CHECK(6,0,0))
#include <QtCore5Compat> #include <QtCore5Compat/QRegExp>
#include <QWebEngineContextMenuRequest> #include <QWebEngineContextMenuRequest>
#include <QWebEngineFindTextResult> #include <QWebEngineFindTextResult>
#endif #endif

View file

@ -17,7 +17,7 @@
#include "globalbroadcaster.h" #include "globalbroadcaster.h"
#include "article_inspect.h" #include "article_inspect.h"
#if (QT_VERSION >= QT_VERSION_CHECK(6,0,0)) #if (QT_VERSION >= QT_VERSION_CHECK(6,0,0))
#include <QtCore5Compat> #include <QtCore5Compat/QRegExp>
#endif #endif
class ResourceToSaveHandler; class ResourceToSaveHandler;

5
bgl.cc
View file

@ -31,9 +31,10 @@
#include <QAtomicInt> #include <QAtomicInt>
#include <QDebug> #include <QDebug>
#include <QRegExp>
#if (QT_VERSION >= QT_VERSION_CHECK(6,0,0)) #if (QT_VERSION >= QT_VERSION_CHECK(6,0,0))
#include <QtCore5Compat> #include <QtCore5Compat/QRegExp>
#else
#include <QRegExp>
#endif #endif
#include <QRegularExpression> #include <QRegularExpression>

View file

@ -8,8 +8,12 @@
#ifdef HAVE_X11 #ifdef HAVE_X11
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <X11/extensions/record.h> #include <X11/extensions/record.h>
#if (QT_VERSION >= QT_VERSION_CHECK(6,0,0))
#include <QtGui/private/qtx11extras_p.h>
#else
#include <QX11Info> #include <QX11Info>
#endif #endif
#endif
bool isRECORDBroken() bool isRECORDBroken()
{ {

View file

@ -10,7 +10,11 @@
#include <zlib.h> #include <zlib.h>
#include "dictionary.hh" #include "dictionary.hh"
#include "iconv.hh" #include "iconv.hh"
#if (QT_VERSION >= QT_VERSION_CHECK(6,0,0))
#include <QtCore5Compat/QTextCodec>
#else
#include <QTextCodec> #include <QTextCodec>
#endif
#include <QByteArray> #include <QByteArray>
#include "utf8.hh" #include "utf8.hh"

View file

@ -12,7 +12,11 @@
#include "mutex.hh" #include "mutex.hh"
#include <QString> #include <QString>
#if (QT_VERSION >= QT_VERSION_CHECK(6,0,0))
#include <QtCore5Compat/QTextCodec>
#else
#include <QTextCodec> #include <QTextCodec>
#endif
#include <QMap> #include <QMap>
#include <QVector> #include <QVector>
#include <vector> #include <vector>

View file

@ -2,9 +2,10 @@
#define __FTSHELPERS_HH_INCLUDED__ #define __FTSHELPERS_HH_INCLUDED__
#include <QString> #include <QString>
#include <QRegExp>
#if (QT_VERSION >= QT_VERSION_CHECK(6,0,0)) #if (QT_VERSION >= QT_VERSION_CHECK(6,0,0))
#include <QtCore5Compat> #include <QtCore5Compat/QRegExp>
#else
#include <QRegExp>
#endif #endif
#include <QRunnable> #include <QRunnable>
#include <QSemaphore> #include <QSemaphore>

View file

@ -3,9 +3,10 @@
#include <QSemaphore> #include <QSemaphore>
#include <QStringList> #include <QStringList>
#include <QRegExp>
#if (QT_VERSION >= QT_VERSION_CHECK(6,0,0)) #if (QT_VERSION >= QT_VERSION_CHECK(6,0,0))
#include <QtCore5Compat> #include <QtCore5Compat/QRegExp>
#else
#include <QRegExp>
#endif #endif
#include <QAbstractListModel> #include <QAbstractListModel>
#include <QList> #include <QList>

6
gls.cc
View file

@ -32,7 +32,11 @@
#include <QBuffer> #include <QBuffer>
#include <QRegularExpression> #include <QRegularExpression>
#if (QT_VERSION >= QT_VERSION_CHECK(6,0,0))
#include <QtCore5Compat/QTextCodec>
#else
#include <QTextCodec>
#endif
#include <string> #include <string>
#include <list> #include <list>
#include <map> #include <map>

View file

@ -28,7 +28,7 @@ QT += core \
printsupport \ printsupport \
help help
greaterThan(QT_MAJOR_VERSION, 6): QT += webenginecore core5compat greaterThan(QT_MAJOR_VERSION, 5): QT += webenginecore core5compat
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x050F00 DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x050F00
@ -122,7 +122,8 @@ unix:!mac {
QMAKE_CXXFLAGS += -rdynamic QMAKE_CXXFLAGS += -rdynamic
QMAKE_LFLAGS += -rdynamic QMAKE_LFLAGS += -rdynamic
QT += x11extras lessThan(QT_MAJOR_VERSION, 6): QT += x11extras
greaterThan(QT_MAJOR_VERSION, 5): QT += gui-private
CONFIG += link_pkgconfig CONFIG += link_pkgconfig
PKGCONFIG += vorbisfile \ PKGCONFIG += vorbisfile \

View file

@ -9,7 +9,11 @@
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <X11/extensions/record.h> #include <X11/extensions/record.h>
#if (QT_VERSION >= QT_VERSION_CHECK(6,0,0))
#include <QtGui/private/qtx11extras_p.h>
#else
#include <QX11Info> #include <QX11Info>
#endif
#include <X11/Xlibint.h> #include <X11/Xlibint.h>
#undef Bool #undef Bool

View file

@ -13,9 +13,10 @@
#include <QRunnable> #include <QRunnable>
#include <QThreadPool> #include <QThreadPool>
#include <QSemaphore> #include <QSemaphore>
#include <QRegExp>
#if (QT_VERSION >= QT_VERSION_CHECK(6,0,0)) #if (QT_VERSION >= QT_VERSION_CHECK(6,0,0))
#include <QtCore5Compat> #include <QtCore5Compat/QRegExp>
#else
#include <QRegExp>
#endif #endif
#include <QDir> #include <QDir>
#include <QCoreApplication> #include <QCoreApplication>

View file

@ -7,7 +7,11 @@
#ifdef Q_OS_WIN32 #ifdef Q_OS_WIN32
#include <windows.h> #include <windows.h>
#elif defined(HAVE_X11) #elif defined(HAVE_X11)
#if (QT_VERSION >= QT_VERSION_CHECK(6,0,0))
#include <QtGui/private/qtx11extras_p.h>
#else
#include <QX11Info> #include <QX11Info>
#endif
#include <X11/X.h> #include <X11/X.h>
#include <X11/XKBlib.h> #include <X11/XKBlib.h>
#elif defined Q_OS_MAC #elif defined Q_OS_MAC

View file

@ -10,7 +10,7 @@
#include <stub_msvc.h> #include <stub_msvc.h>
#endif #endif
#if (QT_VERSION >= QT_VERSION_CHECK(6,0,0)) #if (QT_VERSION >= QT_VERSION_CHECK(6,0,0))
#include <QtCore5Compat> #include <QtCore5Compat/QRegExp>
#endif #endif
#include <cctype> #include <cctype>
#include <QLocale> #include <QLocale>

View file

@ -62,7 +62,11 @@
#endif #endif
#ifdef HAVE_X11 #ifdef HAVE_X11
#if (QT_VERSION >= QT_VERSION_CHECK(6,0,0))
#include <QtGui/private/qtx11extras_p.h>
#else
#include <QX11Info> #include <QX11Info>
#endif
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <fixx11h.h> #include <fixx11h.h>
#endif #endif

View file

@ -1,5 +1,4 @@
#include <QCursor> #include <QCursor>
#include <QDesktopWidget>
#include "scanflag.hh" #include "scanflag.hh"
#include "ui_scanflag.h" #include "ui_scanflag.h"

View file

@ -8,9 +8,7 @@
#include <QBitmap> #include <QBitmap>
#include <QMenu> #include <QMenu>
#include <QMouseEvent> #include <QMouseEvent>
#if (QT_VERSION >= QT_VERSION_CHECK(6,0,0)) #if (QT_VERSION < QT_VERSION_CHECK(6,0,0))
#include <QtCore5Compat>
#else
#include <QDesktopWidget> #include <QDesktopWidget>
#endif #endif
#include "gddebug.hh" #include "gddebug.hh"

View file

@ -39,9 +39,10 @@
#include <QThreadPool> #include <QThreadPool>
#include <QAtomicInt> #include <QAtomicInt>
#include <QDebug> #include <QDebug>
#include <QRegExp>
#if (QT_VERSION >= QT_VERSION_CHECK(6,0,0)) #if (QT_VERSION >= QT_VERSION_CHECK(6,0,0))
#include <QtCore5Compat> #include <QtCore5Compat/QRegExp>
#else
#include <QRegExp>
#endif #endif
#include <QStringList> #include <QStringList>
#include <QDomDocument> #include <QDomDocument>

View file

@ -56,9 +56,6 @@ static PProcessIdToSessionId pProcessIdToSessionId = 0;
#include <unistd.h> #include <unistd.h>
#endif #endif
#if (QT_VERSION >= QT_VERSION_CHECK(6,0,0))
#include <QtCore5Compat>
#endif
#include <QRegularExpression> #include <QRegularExpression>
namespace QtLP_Private { namespace QtLP_Private {
@ -113,8 +110,6 @@ QtLocalPeer::QtLocalPeer(QObject* parent, const QString &appId)
lockFile.open(QIODevice::ReadWrite); lockFile.open(QIODevice::ReadWrite);
} }
bool QtLocalPeer::isClient() bool QtLocalPeer::isClient()
{ {
if (lockFile.isLocked()) if (lockFile.isLocked())
@ -137,7 +132,6 @@ bool QtLocalPeer::isClient()
return false; return false;
} }
bool QtLocalPeer::sendMessage(const QString &message, int timeout) bool QtLocalPeer::sendMessage(const QString &message, int timeout)
{ {
if (!isClient()) if (!isClient())
@ -174,7 +168,6 @@ bool QtLocalPeer::sendMessage(const QString &message, int timeout)
return res; return res;
} }
void QtLocalPeer::receiveConnection() void QtLocalPeer::receiveConnection()
{ {
QLocalSocket* socket = server->nextPendingConnection(); QLocalSocket* socket = server->nextPendingConnection();