Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Qt5-DROP.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ These add `QT += core5compat` for Qt6 builds. Needed by third-party QtWebApp (QT
| `docker/Dockerfile` | Ubuntu x64 Qt6 — installs `libqt6core5compat6-dev` (build) and `libqt6core5compat6` (runtime) |
| `docker/Dockerfile.aarch64` | Ubuntu ARM64 Qt5-only build |

**Action**: Remove or convert `Dockerfile.aarch64` to Qt6. Keep core5compat packages in main Dockerfile (QtWebApp).
**Action**: Convert `Dockerfile.aarch64` to Qt6. Keep core5compat packages in main Dockerfile (QtWebApp). Make sure the conversion is good, there must be other images online that use the arm+qt6 combo, we can search online.

---

Expand Down
7 changes: 2 additions & 5 deletions YACReader/YACReader.pro
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,13 @@ macx {
CONFIG += objective_c
LIBS += -framework Foundation -framework ApplicationServices -framework AppKit

lessThan(QT_MAJOR_VERSION, 6): QT += macextras
}

QT += network widgets core multimedia svg

greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat
QT += core5compat

greaterThan(QT_MAJOR_VERSION, 5):greaterThan(QT_MINOR_VERSION, 6) {
QT += gui-private
}
greaterThan(QT_MINOR_VERSION, 6): QT += gui-private

#CONFIG += release
CONFIG -= flat
Expand Down
10 changes: 1 addition & 9 deletions YACReader/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,7 @@ int main(int argc, char *argv[])
QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
QApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);

#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
QImageReader::setAllocationLimit(0);
#endif

#if defined(_MSC_VER) && defined(_DEBUG)
_CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
Expand Down Expand Up @@ -131,16 +129,10 @@ int main(int argc, char *argv[])
QCommandLineOption comicId("comicId", "", "comicId");
QCommandLineOption libraryId("libraryId", "", "libraryId");
QCommandLineOption readingListId("readingListId", "", "readingListId");
// hide comicId and libraryId from help
#if QT_VERSION >= 0x050800
// hide comicId and libraryId from help
comicId.setFlags(QCommandLineOption::HiddenFromHelp);
libraryId.setFlags(QCommandLineOption::HiddenFromHelp);
readingListId.setFlags(QCommandLineOption::HiddenFromHelp);
#else
comicId.setHidden(true);
libraryId.setHidden(true);
readingListId.setHidden(true);
#endif

// process
parser.addOption(comicId);
Expand Down
4 changes: 1 addition & 3 deletions YACReader/main_window_viewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -480,9 +480,7 @@ void MainWindowViewer::createToolBars()
{
#ifdef Y_MAC_UI
comicToolBar = new YACReaderMacOSXToolbar(this);
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
comicToolBar->setIconSize(QSize(18, 18));
#endif
#else
comicToolBar = addToolBar(tr("&File"));
#endif
Expand Down Expand Up @@ -1354,7 +1352,7 @@ void MainWindowViewer::toggleFitToWidthSlider()
if (zoomSliderAction->isVisible()) {
zoomSliderAction->hide();
} else {
#if defined(Y_MAC_UI) && (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
#ifdef Y_MAC_UI
zoomSliderAction->move((this->width() - zoomSliderAction->width()) / 2, y);
#else
zoomSliderAction->move(250, y);
Expand Down
12 changes: 0 additions & 12 deletions YACReader/mouse_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,7 @@ void YACReader::MouseHandler::mousePressEvent(QMouseEvent *event)
{
if (event->button() == Qt::LeftButton) {
viewer->drag = true;
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
auto position = event->position();
#else
auto position = QPointF(event->x(), event->y());
#endif
dragOrigin = dragLatestPosition = position;
viewer->setCursor(Qt::ClosedHandCursor);
event->accept();
Expand Down Expand Up @@ -53,11 +49,7 @@ void YACReader::MouseHandler::mouseReleaseEvent(QMouseEvent *event)
event->accept();
}

#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
auto position = event->position();
#else
auto position = QPointF(event->x(), event->y());
#endif
auto dragDistance = QLineF(position, dragOrigin).length();

auto mouseMode = Configuration::getConfiguration().getMouseMode();
Expand Down Expand Up @@ -104,11 +96,7 @@ void YACReader::MouseHandler::mouseMoveEvent(QMouseEvent *event)
viewer->showCursor();
viewer->hideCursorTimer->start(2500);

#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
auto position = event->position();
#else
auto position = QPointF(event->x(), event->y());
#endif

if (viewer->magnifyingGlassShown)
viewer->mglass->move(static_cast<int>(position.x() - float(viewer->mglass->width()) / 2), static_cast<int>(position.y() - float(viewer->mglass->height()) / 2));
Expand Down
14 changes: 0 additions & 14 deletions YACReader/translator.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
#include <QUrl>

#if QT_VERSION >= 0x050000
#include <QMediaPlayer>
#else
#include <Phonon/MediaObject>
#include <Phonon/MediaSource>
#endif

#include <QPushButton>
#include <QPalette>
Expand Down Expand Up @@ -160,12 +155,7 @@ YACReaderTranslator::YACReaderTranslator(Viewer *parent)
connect(speakButton, &QAbstractButton::pressed, this, &YACReaderTranslator::play);
connect(clearButton, &QAbstractButton::pressed, this, &YACReaderTranslator::clear);

// multimedia/phonon
#if QT_VERSION >= 0x050000
player = new QMediaPlayer;
#else
music = createPlayer(MusicCategory);
#endif
}

void YACReaderTranslator::hideResults()
Expand Down Expand Up @@ -288,11 +278,7 @@ void YACReaderTranslator::populateCombos()
void YACReaderTranslator::play()
{

#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
player->setSource(ttsSource);
#else
player->setMedia(ttsSource);
#endif

player->play();
}
Expand Down
4 changes: 0 additions & 4 deletions YACReader/viewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -759,11 +759,7 @@ void Viewer::resizeEvent(QResizeEvent *event)

QPixmap Viewer::pixmap() const
{
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
return content->pixmap();
#else
return content->pixmap(Qt::ReturnByValue);
#endif
}

void Viewer::magnifyingGlassSwitch()
Expand Down
7 changes: 2 additions & 5 deletions YACReaderLibrary/YACReaderLibrary.pro
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,15 @@ macx {
LIBS += -framework Foundation -framework ApplicationServices -framework AppKit
CONFIG += objective_c
QT += gui-private
lessThan(QT_MAJOR_VERSION, 6): QT += macextras
}

#CONFIG += release
CONFIG -= flat
QT += sql network widgets svg quickcontrols2

greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat
QT += core5compat

greaterThan(QT_MAJOR_VERSION, 5):greaterThan(QT_MINOR_VERSION, 6) {
QT += gui-private
}
greaterThan(QT_MINOR_VERSION, 6): QT += gui-private

# Input
HEADERS += \
Expand Down
8 changes: 0 additions & 8 deletions YACReaderLibrary/comic_vine/comic_vine_dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,22 +146,14 @@ void ComicVineDialog::goNext()
QList<QPair<ComicDB, QString>> matchingInfo = sortVolumeComicsWidget->getMatchingInfo();
auto volumeInfo = selectVolumeWidget->getSelectedVolumeInfo();

#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
QtConcurrent::run(&ComicVineDialog::getComicsInfo, this, matchingInfo, volumeInfo);
#else
QtConcurrent::run(this, &ComicVineDialog::getComicsInfo, matchingInfo, volumeInfo);
#endif

} else if (content->currentWidget() == selectComicWidget) {
showLoading();
QString comicId = selectComicWidget->getSelectedComicId();
auto volumeInfo = selectVolumeWidget->getSelectedVolumeInfo();

#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
QtConcurrent::run(&ComicVineDialog::getComicInfo, this, comicId, volumeInfo);
#else
QtConcurrent::run(this, &ComicVineDialog::getComicInfo, comicId, volumeInfo);
#endif
}
}

Expand Down
12 changes: 0 additions & 12 deletions YACReaderLibrary/comic_vine/scraper_tableview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,13 @@ ScraperTableView::ScraperTableView(QWidget *parent)
: QTableView(parent)
{
setShowGrid(false);
#if QT_VERSION >= 0x050000
verticalHeader()->setSectionResizeMode(QHeaderView::Fixed);
#else
verticalHeader()->setResizeMode(QHeaderView::Fixed);
#endif

horizontalHeader()->setStretchLastSection(true);
#if QT_VERSION >= 0x050000
horizontalHeader()->setSectionsClickable(false);
#else
horizontalHeader()->setClickable(false);
#endif
// comicView->verticalHeader()->setResizeMode(QHeaderView::ResizeToContents);
verticalHeader()->setDefaultSectionSize(24);
#if QT_VERSION >= 0x050000
verticalHeader()->setSectionsClickable(false); // TODO comportamiento anómalo
#else
verticalHeader()->setClickable(false); // TODO comportamiento anómalo
#endif

setCornerButtonEnabled(false);

Expand Down
5 changes: 0 additions & 5 deletions YACReaderLibrary/initial_comic_info_extractor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,7 @@ void InitialComicInfoExtractor::extract()
return;
}
#else
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
auto pdfComic = Poppler::Document::load(_fileSource);
#else
auto _pdfComic = Poppler::Document::load(_fileSource);
auto pdfComic = std::unique_ptr<Poppler::Document>(_pdfComic);
#endif
#endif
if (!pdfComic) {
QLOG_WARN() << "Extracting cover: unable to open PDF file " << _fileSource;
Expand Down
6 changes: 0 additions & 6 deletions YACReaderLibrary/library_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,13 +169,11 @@ bool LibraryWindow::eventFilter(QObject *object, QEvent *event)
return QMainWindow::eventFilter(object, event);
}

#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
auto keyCombination = keySequence[0];

if (keyCombination.keyboardModifiers() != Qt::NoModifier) {
return QMainWindow::eventFilter(object, event);
}
#endif

auto string = keySequence.toString();

Expand Down Expand Up @@ -774,11 +772,7 @@ void LibraryWindow::createConnections()

// Search filter
#ifdef Y_MAC_UI
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
connect(libraryToolBar, &YACReaderMacOSXToolbar::filterChanged, searchDebouncer, &KDToolBox::KDStringSignalDebouncer::throttle);
#else
connect(searchEdit, &YACReaderMacOSXSearchLineEdit::filterChanged, searchDebouncer, &KDToolBox::KDStringSignalDebouncer::throttle);
#endif
connect(searchDebouncer, &KDToolBox::KDStringSignalDebouncer::triggered, this, [=](QString filter) {
setSearchFilter(filter);
});
Expand Down
2 changes: 0 additions & 2 deletions YACReaderLibrary/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,7 @@ int main(int argc, char **argv)
QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
QApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);

#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
QImageReader::setAllocationLimit(0);
#endif

QApplication app(argc, argv);

Expand Down
2 changes: 0 additions & 2 deletions YACReaderLibrary/trayhandler.mm
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@

#include <QtGlobal>
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
#undef __OBJC_BOOL_IS_BOOL
#endif

#import <AppKit/AppKit.h>
#include "trayhandler.h"
Expand Down
4 changes: 1 addition & 3 deletions YACReaderLibraryServer/YACReaderLibraryServer.pro
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ include(headless_config.pri)
include(../dependencies/pdf_backend.pri)
include(../third_party/QrCode/QrCode.pri)

greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat
QT += core5compat

win32 {
LIBS += -loleaut32 -lole32 -lshell32 -luser32
Expand All @@ -37,8 +37,6 @@ macx {
CONFIG -= flat
QT += core sql network

greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat

# Source files
HEADERS += ../YACReaderLibrary/library_creator.h \
../YACReaderLibrary/package_manager.h \
Expand Down
2 changes: 0 additions & 2 deletions YACReaderLibraryServer/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,7 @@ int main(int argc, char **argv)

QCoreApplication app(argc, argv);

#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
QImageReader::setAllocationLimit(0);
#endif

app.setApplicationName("YACReaderLibrary");
app.setOrganizationName("YACReader");
Expand Down
6 changes: 0 additions & 6 deletions build_scripts/ubuntu_22.04/README.md

This file was deleted.

Loading