1st qt6 port

This commit is contained in:
Jean-Francois Dockes
2022-05-15 23:02:47 -07:00
parent c8362269f4
commit 638450c8d4
14 changed files with 52 additions and 38 deletions
-1
View File
@@ -28,7 +28,6 @@
#include <QRadioButton>
#include <QButtonGroup>
#include <QMessageBox>
#include <QXmlDefaultHandler>
#include "fragbuts.h"
#include "pathut.h"
+1
View File
@@ -18,6 +18,7 @@
#include <algorithm>
#include <cstdio>
#include <sstream>
// Programs built with gcc 4.8.4 (e.g.: Ubuntu Trusty), crash at startup while initializing stdc++
// regular expression objects (and also crash if we make them non-static).
+1 -2
View File
@@ -22,7 +22,6 @@
#include <qapplication.h>
#include <qtranslator.h>
#include <qtextcodec.h>
#include <qtimer.h>
#include <qthread.h>
#include <qmessagebox.h>
@@ -345,7 +344,7 @@ int main(int argc, char **argv)
}
QTranslator qt_trans(0);
qt_trans.load(QString("qt_%1").arg(slang),
QLibraryInfo::location(QLibraryInfo::TranslationsPath));
QLibraryInfo::path(QLibraryInfo::TranslationsPath));
app.installTranslator(&qt_trans);
// Translations for Recoll
+1
View File
@@ -23,6 +23,7 @@
#include <QMenu>
#include <QPushButton>
#include <QMessageBox>
#include <QActionGroup>
void RclMain::buildMenus()
{
+4 -3
View File
@@ -248,13 +248,14 @@ void RclMain::startNativeViewer(Rcl::Doc doc, int pagenum, QString qterm)
.arg(mt).arg(path2qs(lcmd.front()));
switch(QMessageBox::warning(0, "Recoll", message,
"Yes", "No", 0, 0, 1)) {
case 0:
QMessageBox::Yes|QMessageBox::No, QMessageBox::No)) {
case QMessageBox::Yes:
showUIPrefs();
if (uiprefs)
uiprefs->showViewAction(mt);
break;
case 1:
case QMessageBox::No:
default:
break;
}
// The user will have to click on the link again to try the
+2 -1
View File
@@ -44,6 +44,7 @@
#include <QSettings>
#include <QToolTip>
#include <QStandardItemModel>
#include <QActionGroup>
#include "recoll.h"
#include "log.h"
@@ -1089,7 +1090,7 @@ void RclMain::eraseSearchHistory()
int rep = QMessageBox::warning(
0, tr("Confirm"),
tr("Erasing simple and advanced search history lists, please click Ok to confirm"),
QMessageBox::Ok, QMessageBox::Cancel, QMessageBox::NoButton);
QMessageBox::Ok|QMessageBox::Cancel, QMessageBox::NoButton);
if (rep == QMessageBox::Ok) {
prefs.ssearchHistory.clear();
if (sSearch)
+3 -2
View File
@@ -157,6 +157,7 @@ windows {
}
mac {
QMAKE_APPLE_DEVICE_ARCHS = x86_64 arm64
QMAKE_CXXFLAGS += -std=c++11 -pthread -Wno-unused-parameter
HEADERS += \
@@ -176,8 +177,8 @@ mac {
rtitool.ui
LIBS += \
../windows/build-librecoll-Desktop_Qt_5_14_2_clang_64bit-Release/liblibrecoll.a \
../../../xapian-core-1.4.18/.libs/libxapian.a \
../windows/build-librecoll-Qt_6_2_4_for_macOS-Release/liblibrecoll.a \
../windows/build-libxapian-Qt_6_2_4_for_macOS-Release/liblibxapian.a \
-lxslt -lxml2 -liconv -lz
ICON = images/recoll.icns
+3 -3
View File
@@ -153,10 +153,10 @@ void SearchClauseW::setFromClause(SearchDataClauseSimple *cl)
case SCLT_PHRASE: case SCLT_NEAR:
if (!field.isEmpty()) {
int idx = fldCMB->findText(field);
if (field >= 0) {
fldCMB->setCurrentIndex(idx);
if (idx >= 0) {
fldCMB->setCurrentIndex(idx);
} else {
fldCMB->setEditText(field);
fldCMB->setEditText(field);
}
}
/* FALLTHROUGH */
+9 -8
View File
@@ -170,14 +170,15 @@ void ViewAction::editActions()
except0 = except;
} else {
if ((action != action0 || except != except0) && dowarnmultiple) {
switch (QMessageBox::warning(0, "Recoll",
tr("Changing entries with "
"different current values"),
"Continue",
"Cancel",
0, 0, 1)) {
case 0: dowarnmultiple = false; break;
case 1: return;
switch (QMessageBox::warning(
0, "Recoll", tr("Changing entries with different current values"),
QMessageBox::Ignore | QMessageBox::Cancel, QMessageBox::Cancel)) {
case QMessageBox::Ignore:
dowarnmultiple = false;
break;
case QMessageBox::Cancel:
default:
return;
}
}
}
+1
View File
@@ -176,6 +176,7 @@ unix:!mac {
mac {
CONFIG += staticlib
QMAKE_APPLE_DEVICE_ARCHS = x86_64 arm64
# This is necessary to avoid an undefined impl__xmlFree.
# See comment in libxml/xmlexports.h
DEFINES += LIBXML_STATIC
+10 -3
View File
@@ -3,11 +3,18 @@ QT -= core gui
TARGET = libxapian
TEMPLATE = lib
DEFINES += __WIN32__
DEFINES += UNICODE
DEFINES += HAVE_CONFIG_H
XAPIANDIR = ../../../../recolldeps/msvc/xapian-core/
windows {
XAPIANDIR = ../../../../recolldeps/msvc/xapian-core/
DEFINES += __WIN32__
DEFINES += UNICODE
}
mac {
XAPIANDIR = ../../../../xapian-core-1.4.18/
CONFIG += staticlib
QMAKE_APPLE_DEVICE_ARCHS = x86_64 arm64
}
SOURCES += \
$$XAPIANDIR/api/compactor.cc \
+3 -2
View File
@@ -58,6 +58,7 @@ windows {
}
mac {
QMAKE_APPLE_DEVICE_ARCHS = x86_64 arm64
QMAKE_CXXFLAGS += -std=c++11 -pthread -Wno-unused-parameter
SOURCES += \
../../utils/closefrom.cpp \
@@ -66,7 +67,7 @@ mac {
../../utils/rclionice.cpp
LIBS += \
../build-librecoll-Desktop_Qt_5_14_2_clang_64bit-Release/liblibrecoll.a \
../../../../xapian-core-1.4.18/.libs/libxapian.a \
../build-librecoll-Qt_6_2_4_for_macOS-Release/liblibrecoll.a \
../build-libxapian-Qt_6_2_4_for_macOS-Release/liblibxapian.a \
-lxslt -lxml2 -liconv -lz
}
+3 -2
View File
@@ -45,6 +45,7 @@ windows {
}
mac {
QMAKE_APPLE_DEVICE_ARCHS = x86_64 arm64
QMAKE_CXXFLAGS += -std=c++11 -pthread -Wno-unused-parameter
SOURCES += \
../../utils/closefrom.cpp \
@@ -52,7 +53,7 @@ mac {
../../utils/netcon.cpp \
../../utils/rclionice.cpp
LIBS += \
../build-librecoll-Desktop_Qt_5_14_2_clang_64bit-Release/liblibrecoll.a \
../../../../xapian-core-1.4.18/.libs/libxapian.a \
../build-librecoll-Qt_6_2_4_for_macOS-Release/liblibrecoll.a \
../build-libxapian-Qt_6_2_4_for_macOS-Release/liblibxapian.a \
-lxslt -lxml2 -liconv -lz
}