Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package qimgv for openSUSE:Factory checked in at 2021-09-30 23:43:48 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/qimgv (Old) and /work/SRC/openSUSE:Factory/.qimgv.new.2443 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "qimgv" Thu Sep 30 23:43:48 2021 rev:21 rq:922350 version:1.0.2 Changes: -------- --- /work/SRC/openSUSE:Factory/qimgv/qimgv.changes 2021-09-27 20:08:53.402460910 +0200 +++ /work/SRC/openSUSE:Factory/.qimgv.new.2443/qimgv.changes 2021-09-30 23:45:07.680588409 +0200 @@ -1,0 +2,10 @@ +Thu Sep 30 10:54:56 UTC 2021 - Luigi Baldoni <aloi...@gmx.com> + +- Update to version 1.0.2 + Bug fixes: + * fix file replace dialog not working + * fix trackpad scroll with libinput + Misc: + * build with Qt 5.12 now works again! + +------------------------------------------------------------------- Old: ---- qimgv-1.0.1.tar.gz New: ---- qimgv-1.0.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ qimgv.spec ++++++ --- /var/tmp/diff_new_pack.SpOuOW/_old 2021-09-30 23:45:08.100588890 +0200 +++ /var/tmp/diff_new_pack.SpOuOW/_new 2021-09-30 23:45:08.100588890 +0200 @@ -17,7 +17,7 @@ Name: qimgv -Version: 1.0.1 +Version: 1.0.2 Release: 0 Summary: Qt5 image viewer License: GPL-3.0-only @@ -41,7 +41,7 @@ BuildRequires: pkgconfig(Qt5Core) BuildRequires: pkgconfig(Qt5PrintSupport) BuildRequires: pkgconfig(Qt5Svg) -BuildRequires: pkgconfig(Qt5Widgets) >= 5.14 +BuildRequires: pkgconfig(Qt5Widgets) >= 5.12 BuildRequires: pkgconfig(exiv2) BuildRequires: pkgconfig(mpv) >= 1.22.0 Requires: mpv >= 0.32.0 ++++++ qimgv-1.0.1.tar.gz -> qimgv-1.0.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qimgv-1.0.1/CMakeLists.txt new/qimgv-1.0.2/CMakeLists.txt --- old/qimgv-1.0.1/CMakeLists.txt 2021-09-26 18:19:06.000000000 +0200 +++ new/qimgv-1.0.2/CMakeLists.txt 2021-09-29 23:46:05.000000000 +0200 @@ -1,7 +1,7 @@ # qimgv root cmake_minimum_required(VERSION 3.13) project(qimgv - VERSION 1.0.1 + VERSION 1.0.2 HOMEPAGE_URL "https://github.com/easymodo/qimgv" LANGUAGES CXX) @@ -49,7 +49,7 @@ if(QT_VERSION_MAJOR GREATER_EQUAL 6) find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Widgets Svg PrintSupport Core5Compat OpenGLWidgets) else() - find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Widgets Svg PrintSupport) + find_package(Qt${QT_VERSION_MAJOR} 5.12 REQUIRED COMPONENTS Core Widgets Svg PrintSupport) endif() if(EXIV2) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qimgv-1.0.1/README.md new/qimgv-1.0.2/README.md --- old/qimgv-1.0.1/README.md 2021-09-26 18:19:06.000000000 +0200 +++ new/qimgv-1.0.2/README.md 2021-09-29 23:46:05.000000000 +0200 @@ -1,4 +1,4 @@ -qimgv | Current version: 1.0.0 +qimgv | Current version: 1.0.2 ===== Image viewer. Fast, easy to use. Optional video support. @@ -81,7 +81,7 @@ ## Using quick copy / quick move panels -Bring up the panel with C or M shortcut. You will see 9 destination directories, click them to set them up. +Bring up the panel with C or M shortcut. You will see 9 destination directories, click on the folder icon to change them. With panel visible, use 1 - 9 keys to copy/move current image to corresponding directory. @@ -154,7 +154,7 @@ ``` sudo add-apt-repository ppa:easymodo/qimgv -sudo apt-get update +sudo apt update sudo apt install qimgv ``` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qimgv-1.0.1/qimgv/CMakeLists.txt new/qimgv-1.0.2/qimgv/CMakeLists.txt --- old/qimgv-1.0.1/qimgv/CMakeLists.txt 2021-09-26 18:19:06.000000000 +0200 +++ new/qimgv-1.0.2/qimgv/CMakeLists.txt 2021-09-29 23:46:05.000000000 +0200 @@ -80,8 +80,8 @@ set_target_properties(qimgv PROPERTIES MACOSX_BUNDLE YES MACOSX_BUNDLE_BUNDLE_NAME "qimgv" - MACOSX_BUNDLE_BUNDLE_VERSION "1.0.1" - MACOSX_BUNDLE_SHORT_VERSION_STRING "1.0.1" + MACOSX_BUNDLE_BUNDLE_VERSION "1.0.2" + MACOSX_BUNDLE_SHORT_VERSION_STRING "1.0.2" MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/distrib/MyBundleInfo.plist.in MACOSX_BUNDLE_ICON_FILE ${APPLE_ICON_NAME} ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qimgv-1.0.1/qimgv/appversion.cpp new/qimgv-1.0.2/qimgv/appversion.cpp --- old/qimgv-1.0.1/qimgv/appversion.cpp 2021-09-26 18:19:06.000000000 +0200 +++ new/qimgv-1.0.2/qimgv/appversion.cpp 2021-09-29 23:46:05.000000000 +0200 @@ -1,3 +1,3 @@ #include "appversion.h" -QVersionNumber appVersion(1,0,1); +QVersionNumber appVersion(1,0,2); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qimgv-1.0.1/qimgv/gui/customwidgets/pathselectormenuitem.cpp new/qimgv-1.0.2/qimgv/gui/customwidgets/pathselectormenuitem.cpp --- old/qimgv-1.0.1/qimgv/gui/customwidgets/pathselectormenuitem.cpp 2021-09-26 18:19:06.000000000 +0200 +++ new/qimgv-1.0.2/qimgv/gui/customwidgets/pathselectormenuitem.cpp 2021-09-29 23:46:05.000000000 +0200 @@ -26,7 +26,12 @@ void PathSelectorMenuItem::setDirectory(QString path) { mDirectory = path; - QString stripped = mDirectory.split("/", Qt::SkipEmptyParts).last(); + QString stripped; +#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) + stripped = mDirectory.split("/").last(); +#else + stripped = mDirectory.split("/", Qt::SkipEmptyParts).last(); +#endif this->mTextLabel.setText(stripped); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qimgv-1.0.1/qimgv/gui/customwidgets/thumbnailview.cpp new/qimgv-1.0.2/qimgv/gui/customwidgets/thumbnailview.cpp --- old/qimgv-1.0.1/qimgv/gui/customwidgets/thumbnailview.cpp 2021-09-26 18:19:06.000000000 +0200 +++ new/qimgv-1.0.2/qimgv/gui/customwidgets/thumbnailview.cpp 2021-09-29 23:46:05.000000000 +0200 @@ -24,6 +24,7 @@ setRenderHint(QPainter::Antialiasing, false); setRenderHint(QPainter::SmoothPixmapTransform, false); + lastTouchpadScroll.start(); connect(&loadTimer, &QTimer::timeout, this, &ThumbnailView::loadVisibleThumbnails); loadTimer.setInterval(static_cast<const int>(LOAD_DELAY)); @@ -457,22 +458,25 @@ //################### scrolling ###################### void ThumbnailView::wheelEvent(QWheelEvent *event) { event->accept(); - // alright, i officially gave up on fixing libinput scrolling - // let's just hope it gets done in Qt while I am still alive int pixelDelta = event->pixelDelta().y(); int angleDelta = event->angleDelta().ry(); + bool isWheel = angleDelta && !(angleDelta % 120) && lastTouchpadScroll.elapsed() > 100; + if(!isWheel) + lastTouchpadScroll.restart(); if(!settings->enableSmoothScroll()) { if(pixelDelta) scrollPrecise(pixelDelta); else if(angleDelta) scrollPrecise(angleDelta); } else { - if(pixelDelta) - scrollPrecise(pixelDelta); - else if(abs(angleDelta) < SMOOTH_SCROLL_THRESHOLD) - scrollPrecise(angleDelta); - else if(angleDelta) + if(!isWheel) { + if(pixelDelta) + scrollPrecise(pixelDelta); + else if(angleDelta) // try this too + scrollPrecise(angleDelta); + } else if(angleDelta) { scrollSmooth(angleDelta, SCROLL_MULTIPLIER, SCROLL_ACCELERATION, true); + } } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qimgv-1.0.1/qimgv/gui/customwidgets/thumbnailview.h new/qimgv-1.0.2/qimgv/gui/customwidgets/thumbnailview.h --- old/qimgv-1.0.1/qimgv/gui/customwidgets/thumbnailview.h 2021-09-26 18:19:06.000000000 +0200 +++ new/qimgv-1.0.2/qimgv/gui/customwidgets/thumbnailview.h 2021-09-29 23:46:05.000000000 +0200 @@ -81,10 +81,6 @@ QTimer loadTimer; bool blockThumbnailLoading; - // let's say mouse wheel scroll always sends angleDelta = 120 - // then we can treat anything smaller as a touchpad scroll - // TODO: tune this value - const int SMOOTH_SCROLL_THRESHOLD = 120; int mDrawScrollbarIndicator, lastScrollFrameTime; QList<int> mSelection; @@ -97,6 +93,7 @@ void createScrollTimeLine(); QElapsedTimer scrollFrameTimer; std::function<void(int)> centerOn; + QElapsedTimer lastTouchpadScroll; protected: QGraphicsScene scene; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qimgv-1.0.1/qimgv/gui/customwidgets/thumbnailwidget.cpp new/qimgv-1.0.2/qimgv/gui/customwidgets/thumbnailwidget.cpp --- old/qimgv-1.0.1/qimgv/gui/customwidgets/thumbnailwidget.cpp 2021-09-26 18:19:06.000000000 +0200 +++ new/qimgv-1.0.2/qimgv/gui/customwidgets/thumbnailwidget.cpp 2021-09-29 23:46:05.000000000 +0200 @@ -16,7 +16,9 @@ thumbStyle(THUMB_SIMPLE) { setAttribute(Qt::WA_OpaquePaintEvent, true); - //setCacheMode(QGraphicsItem::DeviceCoordinateCache); breaks hidpi fractional scaling + float dpr = qApp->devicePixelRatio(); + if(trunc(dpr) == dpr) // don't enable for fractional scaling + setCacheMode(QGraphicsItem::DeviceCoordinateCache); setAcceptHoverEvents(true); font.setBold(false); QFontMetrics fm(font); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qimgv-1.0.1/qimgv/gui/mainwindow.cpp new/qimgv-1.0.2/qimgv/gui/mainwindow.cpp --- old/qimgv-1.0.1/qimgv/gui/mainwindow.cpp 2021-09-26 18:19:06.000000000 +0200 +++ new/qimgv-1.0.2/qimgv/gui/mainwindow.cpp 2021-09-29 23:46:05.000000000 +0200 @@ -338,8 +338,12 @@ } void MW::updateCurrentDisplay() { +#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) + currentDisplay = desktopWidget.screenNumber(this); +#else auto screens = qApp->screens(); currentDisplay = screens.indexOf(this->window()->screen()); +#endif } void MW::onWindowGeometryChanged() { @@ -348,7 +352,11 @@ } void MW::saveCurrentDisplay() { +#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) + settings->setLastDisplay(desktopWidget.screenNumber(this)); +#else settings->setLastDisplay(qApp->screens().indexOf(this->window()->screen())); +#endif } //############################################################# @@ -538,7 +546,11 @@ saveWindowGeometry(); auto screens = qApp->screens(); // todo: why check the screen again? - auto _currentDisplay = screens.indexOf(this->window()->screen()); +#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) + int _currentDisplay = desktopWidget.screenNumber(this); +#else + int _currentDisplay = screens.indexOf(this->window()->screen()); +#endif //move to target screen if(screens.count() > currentDisplay && currentDisplay != _currentDisplay) { this->move(screens.at(currentDisplay)->geometry().x(), diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qimgv-1.0.1/qimgv/gui/mainwindow.h new/qimgv-1.0.2/qimgv/gui/mainwindow.h --- old/qimgv-1.0.1/qimgv/gui/mainwindow.h 2021-09-26 18:19:06.000000000 +0200 +++ new/qimgv-1.0.2/qimgv/gui/mainwindow.h 2021-09-29 23:46:05.000000000 +0200 @@ -1,5 +1,6 @@ #pragma once +#include <QApplication> #include <QObject> #include <QWidget> #include <QHBoxLayout> @@ -7,6 +8,11 @@ #include <QFileDialog> #include <QMimeData> #include <QImageWriter> + +#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) +#include <QDesktopWidget> +#endif + #include "gui/customwidgets/floatingwidgetcontainer.h" #include "gui/viewers/viewerwidget.h" #include "gui/overlays/controlsoverlay.h" @@ -30,7 +36,6 @@ #include "gui/viewers/documentwidget.h" #include "gui/folderview/folderviewproxy.h" #include "gui/panels/infobar/infobarproxy.h" -#include <QApplication> #ifdef USE_KDE_BLUR #include <KWindowEffects> @@ -106,6 +111,9 @@ PanelHPosition panelPosition; CurrentInfo info; +#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) + QDesktopWidget desktopWidget; +#endif void saveWindowGeometry(); void restoreWindowGeometry(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qimgv-1.0.1/qimgv/gui/viewers/imageviewerv2.cpp new/qimgv-1.0.2/qimgv/gui/viewers/imageviewerv2.cpp --- old/qimgv-1.0.1/qimgv/gui/viewers/imageviewerv2.cpp 2021-09-26 18:19:06.000000000 +0200 +++ new/qimgv-1.0.2/qimgv/gui/viewers/imageviewerv2.cpp 2021-09-29 23:46:05.000000000 +0200 @@ -598,8 +598,8 @@ /* for reference * linux * trackpad: - * pixelDelta = (x,y) - * angleDelta = (x*scale,y*scale) + * pixelDelta = (x,y) OR (0,0) + * angleDelta = (x*scale,y*scale) OR (x,y) * wheel: * pixelDelta = (0,0) - libinput <= 1.18 * pixelDelta = (0,120*m) - libinput 1.19 @@ -627,8 +627,10 @@ if(settings->imageScrolling() != ImageScrolling::SCROLL_NONE) { // scroll (high precision) stopPosAnimation(); - horizontalScrollBar()->setValue(horizontalScrollBar()->value() - pixelDelta.x() * TRACKPAD_SCROLL_MULTIPLIER); - verticalScrollBar()->setValue(verticalScrollBar()->value() - pixelDelta.y() * TRACKPAD_SCROLL_MULTIPLIER); + int dx = pixelDelta.x() ? pixelDelta.x() : angleDelta.x(); + int dy = pixelDelta.y() ? pixelDelta.y() : angleDelta.y(); + horizontalScrollBar()->setValue(horizontalScrollBar()->value() - dx * TRACKPAD_SCROLL_MULTIPLIER); + verticalScrollBar()->setValue(verticalScrollBar()->value() - dy * TRACKPAD_SCROLL_MULTIPLIER); centerIfNecessary(); snapToEdges(); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qimgv-1.0.1/qimgv/utils/fileoperations.cpp new/qimgv-1.0.2/qimgv/utils/fileoperations.cpp --- old/qimgv-1.0.1/qimgv/utils/fileoperations.cpp 2021-09-26 18:19:06.000000000 +0200 +++ new/qimgv-1.0.2/qimgv/utils/fileoperations.cpp 2021-09-29 23:46:05.000000000 +0200 @@ -92,7 +92,7 @@ return; } #endif - if(destDir.isDir()) { + if(destFile.isDir()) { result = FileOpResult::DESTINATION_DIR_EXISTS; return; } @@ -165,7 +165,7 @@ return; } #endif - if(destDir.isDir()) { + if(destFile.isDir()) { result = FileOpResult::DESTINATION_DIR_EXISTS; return; }