mirror of
https://github.com/netbirdio/FreeBSD-ports.git
synced 2026-05-22 18:42:42 -07:00
deskutils/fbreader: take maintainership and flavorize
- add QT6 flavour PR: 283455, 254444 Approved by: johannes@perceivon.net (maintainer timeout) Reported by: Olga Smirnova <mistresssilvara@hotmail.com> Co-authored-by: Olga Smirnova <mistresssilvara@hotmail.com>
This commit is contained in:
committed by
Robert Clausecker
parent
badc63c592
commit
fb351bf34a
+33
-10
@@ -1,12 +1,12 @@
|
||||
PORTNAME= fbreader
|
||||
PORTVERSION= 0.99.6
|
||||
DISTVERSIONSUFFIX= -freebsdport
|
||||
PORTREVISION= 7
|
||||
PORTREVISION= 8
|
||||
CATEGORIES= deskutils
|
||||
|
||||
MAINTAINER= johannes@perceivon.net
|
||||
MAINTAINER= mew14930xvi@inbox.lv
|
||||
COMMENT= Powerful e-book reader
|
||||
WWW= https://www.fbreader.org/
|
||||
WWW= https://fbreader.org/
|
||||
|
||||
LICENSE= GPLv2+
|
||||
|
||||
@@ -15,9 +15,15 @@ LIB_DEPENDS= libcurl.so:ftp/curl \
|
||||
libfribidi.so:converters/fribidi \
|
||||
libunibreak.so:textproc/libunibreak
|
||||
|
||||
FLAVORS= gtk2 qt6
|
||||
FLAVOR?= ${FLAVORS:[1]}
|
||||
|
||||
USES= compiler gmake iconv localbase pkgconfig sqlite
|
||||
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= geometer
|
||||
GH_PROJECT= FBReader
|
||||
USE_LDCONFIG= yes
|
||||
|
||||
.if defined(WITH_DEBUG)
|
||||
STATUS= debug
|
||||
@@ -25,16 +31,31 @@ STATUS= debug
|
||||
STATUS= release
|
||||
.endif
|
||||
|
||||
USES= compiler gmake gnome iconv localbase pkgconfig sqlite
|
||||
USE_GNOME= gtk20
|
||||
USE_LDCONFIG= yes
|
||||
MAKE_ARGS+= MAKE=${MAKE_CMD} LIBDIR=${PREFIX}/lib
|
||||
MAKE_ENV+= TARGET_ARCH=desktop TARGET_STATUS=${STATUS} ROOTDIR=${WRKSRC} \
|
||||
INSTALLDIR=${PREFIX} LIBDIR=${PREFIX}/lib LD="${CXX}"
|
||||
|
||||
INSTALL_TARGET= do_install
|
||||
|
||||
MAKE_ENV+= TARGET_ARCH=desktop TARGET_STATUS=${STATUS} \
|
||||
ROOTDIR=${WRKSRC} INSTALLDIR=${PREFIX} LIBDIR=${PREFIX}/lib \
|
||||
LD="${CXX}" UI_TYPE=gtk
|
||||
MAKE_ARGS+= MAKE=${MAKE_CMD} LIBDIR=${PREFIX}/lib
|
||||
PORTSCOUT= ignore:1
|
||||
|
||||
.if ${FLAVOR} == gtk2
|
||||
LIB_DEPENDS+= libfontconfig.so:x11-fonts/fontconfig \
|
||||
libfreetype.so:print/freetype2 \
|
||||
libpng16.so:graphics/png
|
||||
USES+= gnome jpeg
|
||||
USE_GNOME= cairo gdkpixbuf2 gtk20
|
||||
MAKE_ENV+= UI_TYPE=gtk
|
||||
CONFLICTS= ${PORTNAME}-qt6
|
||||
PLIST_SUB= UITYPE=gtk
|
||||
.else
|
||||
PKGNAMESUFFIX= -qt6
|
||||
USES+= qt:6
|
||||
USE_QT= base tools:build
|
||||
MAKE_ENV+= UI_TYPE=qt4
|
||||
CONFLICTS= ${PORTNAME}
|
||||
PLIST_SUB= UITYPE=qt4
|
||||
.endif
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e '/^CC/d;/^LD/d;/QTINCLUDE/s,-I.*$$,-I${QT_INCDIR},' \
|
||||
@@ -46,6 +67,8 @@ post-patch:
|
||||
@${REINPLACE_CMD} -e 's,/usr,${PREFIX},' ${WRKSRC}/fbreader/desktop/Makefile
|
||||
@${FIND} ${WRKSRC} -name Makefile | ${XARGS} ${REINPLACE_CMD} \
|
||||
-e 's,make ,$$(MAKE) ,' -e '/$$(LDFLAGS)/s/$$/ $$(LIBS)/'
|
||||
@${REINPLACE_CMD} -e '/libexec/s,libexec,${PREFIX}/libexec,' \
|
||||
${WRKSRC}/makefiles/arch/desktop.mk
|
||||
|
||||
pre-configure:
|
||||
# This cannot be done in post-patch because build dependencies are installed
|
||||
|
||||
@@ -15,7 +15,7 @@ BooksDB.cpp:148:10: error: no viable conversion from returned value of type 'boo
|
||||
--- fbreader/src/database/booksdb/BooksDB.cpp.orig 2014-01-11 12:45:25 UTC
|
||||
+++ fbreader/src/database/booksdb/BooksDB.cpp
|
||||
@@ -145,7 +145,7 @@ shared_ptr<Book> BooksDB::loadBook(const std::string &
|
||||
|
||||
|
||||
myFindFileId->setFileName(fileName);
|
||||
if (!myFindFileId->run()) {
|
||||
- return false;
|
||||
|
||||
@@ -1,11 +1,22 @@
|
||||
--- makefiles/arch/desktop.mk.orig 2017-01-18 21:42:48 UTC
|
||||
--- makefiles/arch/desktop.mk.orig 2014-01-11 12:45:25 UTC
|
||||
+++ makefiles/arch/desktop.mk
|
||||
@@ -17,7 +17,7 @@ ifeq "$(UI_TYPE)" "qt"
|
||||
@@ -17,8 +17,8 @@ else
|
||||
MOC = moc-qt3
|
||||
QTINCLUDE = -I /usr/include/qt3
|
||||
else
|
||||
- MOC = moc-qt4
|
||||
+ MOC = moc
|
||||
QTINCLUDE = -I /usr/include/qt4
|
||||
- QTINCLUDE = -I /usr/include/qt4
|
||||
+ MOC = libexec/qt6/moc
|
||||
+ QTINCLUDE = -I /usr/include/qt6
|
||||
endif
|
||||
|
||||
GTKINCLUDE = $(shell pkg-config --cflags gtk+-2.0 libpng xft)
|
||||
@@ -28,7 +28,7 @@ ifeq "$(UI_TYPE)" "qt4"
|
||||
endif
|
||||
|
||||
ifeq "$(UI_TYPE)" "qt4"
|
||||
- UILIBS = -lQtGui
|
||||
+ UILIBS = $(shell pkg-config --libs Qt6Widgets)
|
||||
endif
|
||||
|
||||
ifeq "$(UI_TYPE)" "gtk"
|
||||
|
||||
@@ -0,0 +1,351 @@
|
||||
--- zlibrary/ui/src/qt4/application/LineEditParameter.cpp.orig 2014-01-11 12:45:25 UTC
|
||||
+++ zlibrary/ui/src/qt4/application/LineEditParameter.cpp
|
||||
@@ -17,9 +17,10 @@
|
||||
* 02110-1301, USA.
|
||||
*/
|
||||
|
||||
-#include <QtGui/QBoxLayout>
|
||||
-#include <QtGui/QLineEdit>
|
||||
-#include <QtGui/QToolBar>
|
||||
+#include <QtCore/QtGlobal>
|
||||
+#include <QtWidgets/QBoxLayout>
|
||||
+#include <QtWidgets/QLineEdit>
|
||||
+#include <QtWidgets/QToolBar>
|
||||
#include <QtGui/QKeyEvent>
|
||||
|
||||
#include "ZLQtApplicationWindow.h"
|
||||
--- zlibrary/ui/src/qt4/application/ZLQtApplicationWindow.cpp.orig 2014-01-11 12:45:25 UTC
|
||||
+++ zlibrary/ui/src/qt4/application/ZLQtApplicationWindow.cpp
|
||||
@@ -17,17 +17,18 @@
|
||||
* 02110-1301, USA.
|
||||
*/
|
||||
|
||||
-#include <QtGui/QApplication>
|
||||
+#include <QtCore/QtGlobal>
|
||||
+#include <QtWidgets/QApplication>
|
||||
+#include <QtWidgets/QToolBar>
|
||||
+#include <QtWidgets/QMenuBar>
|
||||
+#include <QtWidgets/QMenu>
|
||||
+#include <QtWidgets/QToolButton>
|
||||
+#include <QtWidgets/QLayout>
|
||||
+#include <QtWidgets/QDockWidget>
|
||||
#include <QtGui/QPixmap>
|
||||
#include <QtGui/QImage>
|
||||
#include <QtGui/QIcon>
|
||||
-#include <QtGui/QToolBar>
|
||||
-#include <QtGui/QMenuBar>
|
||||
-#include <QtGui/QMenu>
|
||||
-#include <QtGui/QToolButton>
|
||||
-#include <QtGui/QLayout>
|
||||
#include <QtGui/QWheelEvent>
|
||||
-#include <QtGui/QDockWidget>
|
||||
#include <QtCore/QObjectList>
|
||||
|
||||
#include <ZLibrary.h>
|
||||
@@ -177,12 +178,11 @@ void ZLQtApplicationWindow::wheelEvent(QWheelEvent *ev
|
||||
}
|
||||
|
||||
void ZLQtApplicationWindow::wheelEvent(QWheelEvent *event) {
|
||||
- if (event->orientation() == Qt::Vertical) {
|
||||
- if (event->delta() > 0) {
|
||||
- application().doActionByKey(ZLApplication::MouseScrollUpKey);
|
||||
- } else {
|
||||
- application().doActionByKey(ZLApplication::MouseScrollDownKey);
|
||||
- }
|
||||
+ int y = event->angleDelta().y();
|
||||
+ if (y > 0) {
|
||||
+ application().doActionByKey(ZLApplication::MouseScrollUpKey);
|
||||
+ } else if (y < 0) {
|
||||
+ application().doActionByKey(ZLApplication::MouseScrollDownKey);
|
||||
}
|
||||
}
|
||||
|
||||
--- zlibrary/ui/src/qt4/application/ZLQtApplicationWindow.h.orig 2014-01-11 12:45:25 UTC
|
||||
+++ zlibrary/ui/src/qt4/application/ZLQtApplicationWindow.h
|
||||
@@ -22,8 +22,8 @@
|
||||
|
||||
#include <map>
|
||||
|
||||
-#include <QtGui/QMainWindow>
|
||||
-#include <QtGui/QAction>
|
||||
+#include <QtCore/QtGlobal>
|
||||
+#include <QtWidgets/QMainWindow>
|
||||
#include <QtGui/QCursor>
|
||||
|
||||
class QDockWidget;
|
||||
--- zlibrary/ui/src/qt4/dialogs/ZLQtDialog.cpp.orig 2014-01-11 12:45:25 UTC
|
||||
+++ zlibrary/ui/src/qt4/dialogs/ZLQtDialog.cpp
|
||||
@@ -17,8 +17,9 @@
|
||||
* 02110-1301, USA.
|
||||
*/
|
||||
|
||||
-#include <QtGui/QApplication>
|
||||
-#include <QtGui/QPushButton>
|
||||
+#include <QtCore/QtGlobal>
|
||||
+#include <QtWidgets/QApplication>
|
||||
+#include <QtWidgets/QPushButton>
|
||||
|
||||
#include <ZLDialogManager.h>
|
||||
|
||||
--- zlibrary/ui/src/qt4/dialogs/ZLQtDialog.h.orig 2014-01-11 12:45:25 UTC
|
||||
+++ zlibrary/ui/src/qt4/dialogs/ZLQtDialog.h
|
||||
@@ -20,8 +20,9 @@
|
||||
#ifndef __ZLQTDIALOG_H__
|
||||
#define __ZLQTDIALOG_H__
|
||||
|
||||
-#include <QtGui/QDialog>
|
||||
-#include <QtGui/QLayout>
|
||||
+#include <QtCore/QtGlobal>
|
||||
+#include <QtWidgets/QDialog>
|
||||
+#include <QtWidgets/QLayout>
|
||||
|
||||
#include <ZLDialog.h>
|
||||
|
||||
--- zlibrary/ui/src/qt4/dialogs/ZLQtDialogContent.cpp.orig 2014-01-11 12:45:25 UTC
|
||||
+++ zlibrary/ui/src/qt4/dialogs/ZLQtDialogContent.cpp
|
||||
@@ -17,10 +17,10 @@
|
||||
* 02110-1301, USA.
|
||||
*/
|
||||
|
||||
-#include <QtGui/QApplication>
|
||||
-#include <QtGui/QDesktopWidget>
|
||||
-#include <QtGui/QWidget>
|
||||
-#include <QtGui/QLayout>
|
||||
+#include <QtCore/QtGlobal>
|
||||
+#include <QtWidgets/QApplication>
|
||||
+#include <QtWidgets/QWidget>
|
||||
+#include <QtWidgets/QLayout>
|
||||
|
||||
#include "ZLQtDialogContent.h"
|
||||
#include "ZLQtOptionView.h"
|
||||
--- zlibrary/ui/src/qt4/dialogs/ZLQtDialogManager.cpp.orig 2014-01-11 12:45:25 UTC
|
||||
+++ zlibrary/ui/src/qt4/dialogs/ZLQtDialogManager.cpp
|
||||
@@ -17,11 +17,11 @@
|
||||
* 02110-1301, USA.
|
||||
*/
|
||||
|
||||
-#include <QtGui/QApplication>
|
||||
-#include <QtGui/QMessageBox>
|
||||
-#include <QtGui/QFileDialog>
|
||||
+#include <QtCore/QtGlobal>
|
||||
+#include <QtWidgets/QApplication>
|
||||
+#include <QtWidgets/QMessageBox>
|
||||
+#include <QtWidgets/QFileDialog>
|
||||
#include <QtGui/QClipboard>
|
||||
-#include <QtGui/QDesktopWidget>
|
||||
|
||||
#include "ZLQtDialogManager.h"
|
||||
#include "ZLQtDialog.h"
|
||||
--- zlibrary/ui/src/qt4/dialogs/ZLQtOpenFileDialog.cpp.orig 2014-01-11 12:45:25 UTC
|
||||
+++ zlibrary/ui/src/qt4/dialogs/ZLQtOpenFileDialog.cpp
|
||||
@@ -17,7 +17,8 @@
|
||||
* 02110-1301, USA.
|
||||
*/
|
||||
|
||||
-#include <QtGui/QFileDialog>
|
||||
+#include <QtCore/QtGlobal>
|
||||
+#include <QtWidgets/QFileDialog>
|
||||
|
||||
#include "ZLQtOpenFileDialog.h"
|
||||
|
||||
--- zlibrary/ui/src/qt4/dialogs/ZLQtOptionView.cpp.orig 2014-01-11 12:45:25 UTC
|
||||
+++ zlibrary/ui/src/qt4/dialogs/ZLQtOptionView.cpp
|
||||
@@ -19,16 +19,17 @@
|
||||
|
||||
#include <cctype>
|
||||
|
||||
-#include <QtGui/QCheckBox>
|
||||
-#include <QtGui/QComboBox>
|
||||
-#include <QtGui/QLabel>
|
||||
-#include <QtGui/QGroupBox>
|
||||
-#include <QtGui/QRadioButton>
|
||||
-#include <QtGui/QPushButton>
|
||||
-#include <QtGui/QSpinBox>
|
||||
-#include <QtGui/QLineEdit>
|
||||
-#include <QtGui/QSlider>
|
||||
-#include <QtGui/QLayout>
|
||||
+#include <QtCore/QtGlobal>
|
||||
+#include <QtWidgets/QCheckBox>
|
||||
+#include <QtWidgets/QComboBox>
|
||||
+#include <QtWidgets/QLabel>
|
||||
+#include <QtWidgets/QGroupBox>
|
||||
+#include <QtWidgets/QRadioButton>
|
||||
+#include <QtWidgets/QPushButton>
|
||||
+#include <QtWidgets/QSpinBox>
|
||||
+#include <QtWidgets/QLineEdit>
|
||||
+#include <QtWidgets/QSlider>
|
||||
+#include <QtWidgets/QLayout>
|
||||
|
||||
#include <ZLStringUtil.h>
|
||||
#include <ZLDialogManager.h>
|
||||
--- zlibrary/ui/src/qt4/dialogs/ZLQtOptionsDialog.cpp.orig 2014-01-11 12:45:25 UTC
|
||||
+++ zlibrary/ui/src/qt4/dialogs/ZLQtOptionsDialog.cpp
|
||||
@@ -17,11 +17,11 @@
|
||||
* 02110-1301, USA.
|
||||
*/
|
||||
|
||||
-#include <QtGui/QApplication>
|
||||
-#include <QtGui/QDesktopWidget>
|
||||
-#include <QtGui/QLayout>
|
||||
-#include <QtGui/QPushButton>
|
||||
-#include <QtGui/QButtonGroup>
|
||||
+#include <QtCore/QtGlobal>
|
||||
+#include <QtWidgets/QApplication>
|
||||
+#include <QtWidgets/QLayout>
|
||||
+#include <QtWidgets/QPushButton>
|
||||
+#include <QtWidgets/QButtonGroup>
|
||||
#include <QtGui/QResizeEvent>
|
||||
|
||||
#include <ZLDialogManager.h>
|
||||
@@ -61,7 +61,7 @@ ZLQtOptionsDialog::ZLQtOptionsDialog(const ZLResource
|
||||
}
|
||||
|
||||
if (parent() == 0) {
|
||||
- QDesktopWidget *desktop = qApp->desktop();
|
||||
+ QWidget *desktop = qApp->activeWindow();
|
||||
if (desktop != 0) {
|
||||
move((desktop->width() - width()) / 2, (desktop->height() - height()) / 2);
|
||||
}
|
||||
--- zlibrary/ui/src/qt4/dialogs/ZLQtOptionsDialog.h.orig 2014-01-11 12:45:25 UTC
|
||||
+++ zlibrary/ui/src/qt4/dialogs/ZLQtOptionsDialog.h
|
||||
@@ -20,9 +20,10 @@
|
||||
#ifndef __ZLQTOPTIONSDIALOG_H__
|
||||
#define __ZLQTOPTIONSDIALOG_H__
|
||||
|
||||
-#include <QtGui/QWidget>
|
||||
-#include <QtGui/QTabWidget>
|
||||
-#include <QtGui/QDialog>
|
||||
+#include <QtCore/QtGlobal>
|
||||
+#include <QtWidgets/QWidget>
|
||||
+#include <QtWidgets/QTabWidget>
|
||||
+#include <QtWidgets/QDialog>
|
||||
|
||||
#include "../../../../core/src/desktop/dialogs/ZLDesktopOptionsDialog.h"
|
||||
|
||||
--- zlibrary/ui/src/qt4/dialogs/ZLQtProgressDialog.cpp.orig 2014-01-11 12:45:25 UTC
|
||||
+++ zlibrary/ui/src/qt4/dialogs/ZLQtProgressDialog.cpp
|
||||
@@ -19,12 +19,12 @@
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
-#include <QtGui/QApplication>
|
||||
+#include <QtCore/QtGlobal>
|
||||
+#include <QtWidgets/QApplication>
|
||||
+#include <QtWidgets/QWidget>
|
||||
+#include <QtWidgets/QLabel>
|
||||
+#include <QtWidgets/QLayout>
|
||||
#include <QtGui/QCursor>
|
||||
-#include <QtGui/QDesktopWidget>
|
||||
-#include <QtGui/QWidget>
|
||||
-#include <QtGui/QLabel>
|
||||
-#include <QtGui/QLayout>
|
||||
|
||||
#include "ZLQtProgressDialog.h"
|
||||
#include "ZLQtUtil.h"
|
||||
@@ -69,7 +69,7 @@ ZLQtWaitMessage::ZLQtWaitMessage(const std::string &me
|
||||
myLayout->addWidget(myLabel);
|
||||
|
||||
if (main == 0) {
|
||||
- main = QApplication::desktop();
|
||||
+ main = qApp->activeWindow();
|
||||
}
|
||||
move(
|
||||
main->x() + main->width() / 2 - myLabel->width() / 2 - 10,
|
||||
--- zlibrary/ui/src/qt4/dialogs/ZLQtProgressDialog.h.orig 2014-01-11 12:45:25 UTC
|
||||
+++ zlibrary/ui/src/qt4/dialogs/ZLQtProgressDialog.h
|
||||
@@ -22,7 +22,8 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
-#include <QtGui/QWidget>
|
||||
+#include <QtCore/QtGlobal>
|
||||
+#include <QtWidgets/QWidget>
|
||||
#include <QtGui/QCursor>
|
||||
|
||||
#include <ZLProgressDialog.h>
|
||||
--- zlibrary/ui/src/qt4/library/ZLibrary.cpp.orig 2014-01-11 12:45:25 UTC
|
||||
+++ zlibrary/ui/src/qt4/library/ZLibrary.cpp
|
||||
@@ -17,7 +17,8 @@
|
||||
* 02110-1301, USA.
|
||||
*/
|
||||
|
||||
-#include <QtGui/QApplication>
|
||||
+#include <QtCore/QtGlobal>
|
||||
+#include <QtWidgets/QApplication>
|
||||
|
||||
#include <ZLApplication.h>
|
||||
#include <ZLibrary.h>
|
||||
--- zlibrary/ui/src/qt4/view/ZLQtViewWidget.cpp.orig 2014-01-11 12:45:25 UTC
|
||||
+++ zlibrary/ui/src/qt4/view/ZLQtViewWidget.cpp
|
||||
@@ -19,8 +19,9 @@
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
-#include <QtGui/QLayout>
|
||||
-#include <QtGui/QScrollBar>
|
||||
+#include <QtCore/QtGlobal>
|
||||
+#include <QtWidgets/QLayout>
|
||||
+#include <QtWidgets/QScrollBar>
|
||||
#include <QtGui/QPainter>
|
||||
#include <QtGui/QPixmap>
|
||||
#include <QtGui/QMouseEvent>
|
||||
@@ -75,7 +76,6 @@ ZLQtViewWidget::ZLQtViewWidget(QWidget *parent, ZLAppl
|
||||
ZLQtViewWidget::ZLQtViewWidget(QWidget *parent, ZLApplication *application) : ZLViewWidget((ZLView::Angle)application->AngleStateOption.value()), myApplication(application) {
|
||||
myFrame = new QWidget(parent);
|
||||
QGridLayout *layout = new QGridLayout();
|
||||
- layout->setMargin(0);
|
||||
layout->setSpacing(0);
|
||||
myFrame->setLayout(layout);
|
||||
myQWidget = new Widget(myFrame, *this);
|
||||
@@ -184,11 +184,35 @@ void ZLQtViewWidget::setScrollbarEnabled(ZLView::Direc
|
||||
|
||||
void ZLQtViewWidget::setScrollbarEnabled(ZLView::Direction direction, bool enabled) {
|
||||
if (direction == ZLView::VERTICAL) {
|
||||
- myRightScrollBar->setShown(enabled && myShowScrollBarAtRight);
|
||||
- myLeftScrollBar->setShown(enabled && !myShowScrollBarAtRight);
|
||||
+ myRightScrollBar->
|
||||
+#if QT_VERSION >= 0x050000
|
||||
+ setVisible
|
||||
+#else
|
||||
+ setShown
|
||||
+#endif
|
||||
+ (enabled && myShowScrollBarAtRight);
|
||||
+ myLeftScrollBar->
|
||||
+#if QT_VERSION >= 0x050000
|
||||
+ setVisible
|
||||
+#else
|
||||
+ setShown
|
||||
+#endif
|
||||
+ (enabled && !myShowScrollBarAtRight);
|
||||
} else {
|
||||
- myBottomScrollBar->setShown(enabled && myShowScrollBarAtBottom);
|
||||
- myTopScrollBar->setShown(enabled && !myShowScrollBarAtBottom);
|
||||
+ myBottomScrollBar->
|
||||
+#if QT_VERSION >= 0x050000
|
||||
+ setVisible
|
||||
+#else
|
||||
+ setShown
|
||||
+#endif
|
||||
+ (enabled && myShowScrollBarAtBottom);
|
||||
+ myTopScrollBar->
|
||||
+#if QT_VERSION >= 0x050000
|
||||
+ setVisible
|
||||
+#else
|
||||
+ setShown
|
||||
+#endif
|
||||
+ (enabled && !myShowScrollBarAtBottom);
|
||||
}
|
||||
}
|
||||
|
||||
--- zlibrary/ui/src/qt4/view/ZLQtViewWidget.h.orig 2014-01-11 12:45:25 UTC
|
||||
+++ zlibrary/ui/src/qt4/view/ZLQtViewWidget.h
|
||||
@@ -20,7 +20,8 @@
|
||||
#ifndef __ZLQTVIEWWIDGET_H__
|
||||
#define __ZLQTVIEWWIDGET_H__
|
||||
|
||||
-#include <QtGui/QWidget>
|
||||
+#include <QtCore/QtGlobal>
|
||||
+#include <QtWidgets/QWidget>
|
||||
|
||||
#include "../../../../core/src/view/ZLViewWidget.h"
|
||||
#include <ZLApplication.h>
|
||||
@@ -1,6 +1,6 @@
|
||||
--- zlibrary/core/src/unix/curl/ZLCurlNetworkManager.cpp.orig 2014-01-11 12:45:25 UTC
|
||||
+++ zlibrary/core/src/unix/curl/ZLCurlNetworkManager.cpp
|
||||
@@ -285,9 +285,11 @@ std::string ZLCurlNetworkManager::perfor
|
||||
@@ -285,9 +285,11 @@ std::string ZLCurlNetworkManager::perform(const ZLExec
|
||||
#endif
|
||||
errors.insert(ZLStringUtil::printf(errorResource["peerFailedVerificationMessage"].value(), ZLNetworkUtil::hostFromUrl(url)));
|
||||
break;
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--- zlibrary/ui/src/qt4/dialogs/ZLQtUtil.cpp.orig 2024-12-20 19:20:14 UTC
|
||||
+++ zlibrary/ui/src/qt4/dialogs/ZLQtUtil.cpp
|
||||
@@ -27,7 +27,7 @@ QString qtButtonName(const ZLResourceKey &key) {
|
||||
|
||||
QString qtButtonName(const ZLResourceKey &key) {
|
||||
if (key.Name.empty()) {
|
||||
- return QString::null;
|
||||
+ return QString();
|
||||
}
|
||||
return ::qtString(ZLDialogManager::buttonName(key));
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
--- zlibrary/ui/src/qt4/filesystem/ZLQtFSManager.cpp.orig 2024-12-20 19:24:04 UTC
|
||||
+++ zlibrary/ui/src/qt4/filesystem/ZLQtFSManager.cpp
|
||||
@@ -27,7 +27,7 @@ std::string ZLQtFSManager::convertFilenameToUtf8(const
|
||||
}
|
||||
|
||||
QString qString = QString::fromLocal8Bit(name.c_str());
|
||||
- return (qString == QString::null) ? "" : (const char*)qString.toUtf8();
|
||||
+ return (qString == QString()) ? "" : (const char*)qString.toUtf8();
|
||||
}
|
||||
|
||||
std::string ZLQtFSManager::mimeType(const std::string &path) const {
|
||||
@@ -0,0 +1,17 @@
|
||||
--- zlibrary/ui/src/qt4/view/ZLQtPaintContext.cpp.orig 2024-12-20 19:22:52 UTC
|
||||
+++ zlibrary/ui/src/qt4/view/ZLQtPaintContext.cpp
|
||||
@@ -144,12 +144,12 @@ int ZLQtPaintContext::stringWidth(const char *str, int
|
||||
}
|
||||
|
||||
int ZLQtPaintContext::stringWidth(const char *str, int len, bool) const {
|
||||
- return myPainter->fontMetrics().width(QString::fromUtf8(str, len));
|
||||
+ return myPainter->fontMetrics().horizontalAdvance(QString::fromUtf8(str, len));
|
||||
}
|
||||
|
||||
int ZLQtPaintContext::spaceWidth() const {
|
||||
if (mySpaceWidth == -1) {
|
||||
- mySpaceWidth = myPainter->fontMetrics().width(' ');
|
||||
+ mySpaceWidth = myPainter->fontMetrics().horizontalAdvance(' ');
|
||||
}
|
||||
return mySpaceWidth;
|
||||
}
|
||||
@@ -98,7 +98,7 @@ share/pixmaps/FBReader/unknown.png
|
||||
share/pixmaps/FBReader/upfolder.png
|
||||
share/pixmaps/FBReader/weasel.png
|
||||
share/pixmaps/FBReader/zipfolder.png
|
||||
lib/zlibrary/ui/zlui-gtk.so
|
||||
lib/zlibrary/ui/zlui-%%UITYPE%%.so
|
||||
share/zlibrary/default/config.xml
|
||||
share/zlibrary/encodings/Big5
|
||||
share/zlibrary/encodings/Encodings.xml
|
||||
@@ -123,7 +123,7 @@ share/zlibrary/encodings/KOI8-R
|
||||
share/zlibrary/encodings/windows-1251
|
||||
share/zlibrary/encodings/windows-1252
|
||||
share/zlibrary/hyphenationPatterns.zip
|
||||
share/zlibrary/keynames-gtk.xml
|
||||
share/zlibrary/keynames-%%UITYPE%%.xml
|
||||
share/zlibrary/languagePatterns.zip
|
||||
share/zlibrary/resources/ar.xml
|
||||
share/zlibrary/resources/bg.xml
|
||||
|
||||
Reference in New Issue
Block a user