From 931dca1514b4ad5453b82f3df47f8675434408a1 Mon Sep 17 00:00:00 2001 From: Yuri Chornoivan Date: Sat, 27 Mar 2021 16:24:02 +0000 Subject: [PATCH 1/4] If FB has multiple authors, show them all --- generators/fictionbook/converter.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/generators/fictionbook/converter.cpp b/generators/fictionbook/converter.cpp index 3c0b7a03f..f32aeb3b9 100644 --- a/generators/fictionbook/converter.cpp +++ b/generators/fictionbook/converter.cpp @@ -291,7 +291,10 @@ bool Converter::convertTitleInfo(const QDomElement &element) if (!convertAuthor(child, firstName, middleName, lastName, dummy, dummy)) return false; - mTitleInfo->mAuthor = QStringLiteral("%1 %2 %3").arg(firstName, middleName, lastName); + if (mTitleInfo->mAuthor.isEmpty()) + mTitleInfo->mAuthor = QStringLiteral("%1 %2 %3").arg(firstName, middleName, lastName).simplified(); + else + mTitleInfo->mAuthor += QStringLiteral(", %1 %2 %3").arg(firstName, middleName, lastName).simplified(); } else if (child.tagName() == QLatin1String("book-title")) { if (!convertTextNode(child, mTitleInfo->mTitle)) return false; From 01c240c06db0e7946536dbf969a7fec9686f940a Mon Sep 17 00:00:00 2001 From: David Hurka Date: Sun, 4 Apr 2021 14:42:32 +0200 Subject: [PATCH 2/4] Fix white background flashing up when using Invert Lightness/Luma MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These color modes make white background black, but PagePainter wasn’t updated to draw black background when pixmaps are not yet available. BUG: 431372 --- part/pagepainter.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/part/pagepainter.cpp b/part/pagepainter.cpp index 6a8c36f3b..aa15d8baa 100644 --- a/part/pagepainter.cpp +++ b/part/pagepainter.cpp @@ -83,6 +83,9 @@ void PagePainter::paintCroppedPageOnPainter(QPainter *destPainter, if (Okular::SettingsCore::changeColors()) { switch (Okular::SettingsCore::renderMode()) { case Okular::SettingsCore::EnumRenderMode::Inverted: + case Okular::SettingsCore::EnumRenderMode::InvertLightness: + case Okular::SettingsCore::EnumRenderMode::InvertLuma: + case Okular::SettingsCore::EnumRenderMode::InvertLumaSymmetric: backgroundColor = Qt::black; break; case Okular::SettingsCore::EnumRenderMode::Paper: From 997e1d9137678f2ecfee681e06c387e5bae7ab7e Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Sun, 28 Mar 2021 17:45:52 +0200 Subject: [PATCH 3/4] Fix playing RichMedia annotations BUGS: 434962 --- part/pageviewmouseannotation.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/part/pageviewmouseannotation.cpp b/part/pageviewmouseannotation.cpp index 9bb9837a8..c7b5e6287 100644 --- a/part/pageviewmouseannotation.cpp +++ b/part/pageviewmouseannotation.cpp @@ -112,7 +112,8 @@ void MouseAnnotation::routeMousePressEvent(PageViewItem *pageViewItem, const QPo AnnotationDescription ad(pageViewItem, eventPos); /* qDebug() << "routeMousePressEvent: eventPos = " << eventPos; */ if (ad.isValid()) { - if (ad.annotation->subType() == Okular::Annotation::AMovie || ad.annotation->subType() == Okular::Annotation::AScreen || ad.annotation->subType() == Okular::Annotation::AFileAttachment) { + if (ad.annotation->subType() == Okular::Annotation::AMovie || ad.annotation->subType() == Okular::Annotation::AScreen || ad.annotation->subType() == Okular::Annotation::AFileAttachment || + ad.annotation->subType() == Okular::Annotation::ARichMedia) { /* qDebug() << "routeMousePressEvent: trigger action for AMovie/AScreen/AFileAttachment"; */ processAction(ad); } else { From d3b2317ab7af2cc4e98e1cd6f45bc75c5fd210c2 Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Mon, 29 Mar 2021 22:05:47 +0200 Subject: [PATCH 4/4] conf: Fix layout warnings QLayout: Attempting to add QLayout "" to DlgGeneral "", which already has a layout QLayout: Attempting to add QLayout "" to DlgPresentation "", which already has a layout --- part/dlggeneral.cpp | 2 +- part/dlgpresentation.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/part/dlggeneral.cpp b/part/dlggeneral.cpp index f808e68ed..b66cc4d28 100644 --- a/part/dlggeneral.cpp +++ b/part/dlggeneral.cpp @@ -79,7 +79,7 @@ DlgGeneral::DlgGeneral(QWidget *parent, Okular::EmbedMode embedMode) KColorButton *customColor = new KColorButton(this); customColor->setObjectName(QStringLiteral("kcfg_BackgroundColor")); - QHBoxLayout *customColorLayout = new QHBoxLayout(this); + QHBoxLayout *customColorLayout = new QHBoxLayout(); customColorLayout->addWidget(useCustomColor); useCustomColor->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); customColorLayout->addWidget(customColor); diff --git a/part/dlgpresentation.cpp b/part/dlgpresentation.cpp index 29a0ca4cb..8b7fdaf11 100644 --- a/part/dlgpresentation.cpp +++ b/part/dlgpresentation.cpp @@ -41,7 +41,7 @@ DlgPresentation::DlgPresentation(QWidget *parent) advanceTime->setSuffix(ki18ncp("Advance every %1 seconds", " second", " seconds")); advanceTime->setObjectName(QStringLiteral("kcfg_SlidesAdvanceTime")); - QHBoxLayout *advanceAutomaticallyLayout = new QHBoxLayout(this); + QHBoxLayout *advanceAutomaticallyLayout = new QHBoxLayout(); advanceAutomaticallyLayout->addWidget(advanceAutomatically); advanceAutomatically->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); advanceAutomaticallyLayout->addWidget(advanceTime);