From 9e6a79b807e1b0295a3c2d5f02713819badefbc5 Mon Sep 17 00:00:00 2001 From: Artur Sinila Date: Sat, 3 Oct 2020 05:37:49 +0300 Subject: [PATCH] New package: qt-virt-manager-0.71.95 --- .../qt-virt-manager/patches/update-krdc.patch | 193 ++++++++++++++++++ srcpkgs/qt-virt-manager/template | 20 ++ 2 files changed, 213 insertions(+) create mode 100644 srcpkgs/qt-virt-manager/patches/update-krdc.patch create mode 100644 srcpkgs/qt-virt-manager/template diff --git a/srcpkgs/qt-virt-manager/patches/update-krdc.patch b/srcpkgs/qt-virt-manager/patches/update-krdc.patch new file mode 100644 index 00000000000..92572dd6182 --- /dev/null +++ b/srcpkgs/qt-virt-manager/patches/update-krdc.patch @@ -0,0 +1,193 @@ +From 4640f5f64534ed7c8a1ecc6851f1c7503988de6d Mon Sep 17 00:00:00 2001 +From: "Tristan Helmich (omniIT)" +Date: Fri, 2 Oct 2020 11:36:34 +0000 +Subject: [PATCH] Rename variables to work with current krdc release + +Rename variables according to changes made upstream in KDE/krdc@56a0222b518d05c1816aba5a142ea616983ee9ef +--- + src/vm_viewer/krdc_vnc_qtonly/remoteview.cpp | 12 +++++------ + src/vm_viewer/krdc_vnc_qtonly/remoteview.h | 22 ++++++++++---------- + src/vm_viewer/krdc_vnc_qtonly/vncview.cpp | 18 ++++++++-------- + src/vm_viewer/krdc_vnc_qtonly/vncview.h | 2 +- + 4 files changed, 27 insertions(+), 27 deletions(-) + +diff --git a/src/vm_viewer/krdc_vnc_qtonly/remoteview.cpp b/src/vm_viewer/krdc_vnc_qtonly/remoteview.cpp +index 3b1eedea..5d716a28 100644 +--- src/vm_viewer/krdc_vnc_qtonly/remoteview.cpp ++++ src/vm_viewer/krdc_vnc_qtonly/remoteview.cpp +@@ -44,7 +44,7 @@ RemoteView::RemoteView(QWidget *parent) + #ifndef QTONLY + m_wallet(0), + #endif +- m_dotCursorState(CursorOff) ++ m_localCursorState(CursorOff) + { + } + +@@ -158,14 +158,14 @@ void RemoteView::setGrabAllKeys(bool grabAllKeys) + } + } + +-void RemoteView::showDotCursor(DotCursorState state) ++void RemoteView::showLocalCursor(LocalCursorState state) + { +- m_dotCursorState = state; ++ m_localCursorState = state; + } + +-RemoteView::DotCursorState RemoteView::dotCursorState() const ++RemoteView::LocalCursorState RemoteView::localCursorState() const + { +- return m_dotCursorState; ++ return m_localCursorState; + } + + bool RemoteView::scaling() const +@@ -243,7 +243,7 @@ void RemoteView::saveWalletPassword(const QString &password, bool fromUserNameOn + } + #endif + +-QCursor RemoteView::localDotCursor() const ++QCursor RemoteView::localDefaultCursor() const + { + #ifdef QTONLY + QBitmap cursorBitmap( ":images/pointcursor.png" ); +diff --git a/src/vm_viewer/krdc_vnc_qtonly/remoteview.h b/src/vm_viewer/krdc_vnc_qtonly/remoteview.h +index b3d734f6..0fdbe21b 100644 +--- src/vm_viewer/krdc_vnc_qtonly/remoteview.h ++++ src/vm_viewer/krdc_vnc_qtonly/remoteview.h +@@ -78,9 +78,9 @@ class KDE_EXPORT RemoteView : public QWidget + * is a dot and the remote cursor is the 'real' cursor, usually an arrow. + */ + +- Q_ENUMS(DotCursorState) ++ Q_ENUMS(LocalCursorState) + +- enum DotCursorState { ++ enum LocalCursorState { + CursorOn, ///< Always show local cursor (and the remote one). + CursorOff, ///< Never show local cursor, only the remote one. + /// Try to measure the lag and enable the local cursor if the latency is too high. +@@ -150,9 +150,9 @@ class KDE_EXPORT RemoteView : public QWidget + * Checks whether the backend supports the concept of local cursors. The + * default implementation returns false. + * @return true if local cursors are supported/known +- * @see DotCursorState +- * @see showDotCursor() +- * @see dotCursorState() ++ * @see LocalCursorState ++ * @see showLocalCursor() ++ * @see localCursorState() + */ + virtual bool supportsLocalCursor() const; + +@@ -161,19 +161,19 @@ class KDE_EXPORT RemoteView : public QWidget + * The default implementation does nothing. + * @param state the new state (CursorOn, CursorOff or + * CursorAuto) +- * @see dotCursorState() ++ * @see localCursorState() + * @see supportsLocalCursor() + */ +- virtual void showDotCursor(DotCursorState state); ++ virtual void showLocalCursor(LocalCursorState state); + + /** + * Returns the state of the local cursor. The default implementation returns + * always CursorOff. + * @return true if local cursors are supported/known +- * @see showDotCursor() ++ * @see showLocalCursor() + * @see supportsLocalCursor() + */ +- virtual DotCursorState dotCursorState() const; ++ virtual LocalCursorState localCursorState() const; + + /** + * Checks whether the view is in view-only mode. This means +@@ -387,7 +387,7 @@ public slots: + */ + virtual void setStatus(RemoteStatus s); + +- QCursor localDotCursor() const; ++ QCursor localDefaultCursor() const; + + QString m_host; + int m_port; +@@ -403,7 +403,7 @@ public slots: + KWallet::Wallet *m_wallet; + #endif + +- DotCursorState m_dotCursorState; ++ LocalCursorState m_localCursorState; + }; + + #endif +diff --git a/src/vm_viewer/krdc_vnc_qtonly/vncview.cpp b/src/vm_viewer/krdc_vnc_qtonly/vncview.cpp +index 78a90017..92976aff 100644 +--- src/vm_viewer/krdc_vnc_qtonly/vncview.cpp ++++ src/vm_viewer/krdc_vnc_qtonly/vncview.cpp +@@ -219,7 +219,7 @@ bool VncView::start() + + // set local cursor on by default because low quality mostly means slow internet connection + if (quality == RemoteView::Low) { +- showDotCursor(RemoteView::CursorOn); ++ showLocalCursor(RemoteView::CursorOn); + #ifndef QTONLY + // KRDC does always just have one main window, so at(0) is safe + KXMLGUIClient *mainWindow = dynamic_cast(KMainWindow::memberList().at(0)); +@@ -309,7 +309,7 @@ void VncView::outputErrorMessage(const QString &message) + kDebug(5011) << message; + + if (message == "INTERNAL:APPLE_VNC_COMPATIBILTY") { +- setCursor(localDotCursor()); ++ setCursor(localDefaultCursor()); + m_forceLocalCursor = true; + return; + } +@@ -353,8 +353,8 @@ void VncView::updateImage(int x, int y, int w, int h) + setAttribute(Qt::WA_OpaquePaintEvent); + installEventFilter(this); + +- setCursor(((m_dotCursorState == CursorOn) || m_forceLocalCursor) +- ? localDotCursor() : Qt::BlankCursor); ++ setCursor(((m_localCursorState == CursorOn) || m_forceLocalCursor) ++ ? localDefaultCursor() : Qt::BlankCursor); + + setMouseTracking(true); // get mouse events even when there is no mousebutton pressed + setFocusPolicy(Qt::WheelFocus); +@@ -409,16 +409,16 @@ void VncView::setViewOnly(bool viewOnly) + if (viewOnly) + setCursor(Qt::ArrowCursor); + else +- setCursor(m_dotCursorState == CursorOn +- ? localDotCursor() : Qt::BlankCursor); ++ setCursor(m_localCursorState == CursorOn ++ ? localDefaultCursor() : Qt::BlankCursor); + } + +-void VncView::showDotCursor(DotCursorState state) ++void VncView::showLocalCursor(LocalCursorState state) + { +- RemoteView::showDotCursor(state); ++ RemoteView::showLocalCursor(state); + + setCursor(state == CursorOn +- ? localDotCursor() : Qt::BlankCursor); ++ ? localDefaultCursor() : Qt::BlankCursor); + } + + void VncView::enableScaling(bool scale) +diff --git a/src/vm_viewer/krdc_vnc_qtonly/vncview.h b/src/vm_viewer/krdc_vnc_qtonly/vncview.h +index 5d867c1b..d3c18a4c 100644 +--- src/vm_viewer/krdc_vnc_qtonly/vncview.h ++++ src/vm_viewer/krdc_vnc_qtonly/vncview.h +@@ -61,7 +61,7 @@ class VncView: public RemoteView + #endif + + void setViewOnly(bool viewOnly); +- void showDotCursor(DotCursorState state); ++ void showLocalCursor(LocalCursorState state); + void enableScaling(bool scale); + + virtual void updateConfiguration(); diff --git a/srcpkgs/qt-virt-manager/template b/srcpkgs/qt-virt-manager/template new file mode 100644 index 00000000000..ae0b5b09498 --- /dev/null +++ b/srcpkgs/qt-virt-manager/template @@ -0,0 +1,20 @@ +# Template file for 'qt-virt-manager' +pkgname=qt-virt-manager +version=0.71.95 +revision=1 +build_style=cmake +hostmakedepends="pkg-config" +makedepends="qt5-multimedia-devel qt5-svg-devel qtermwidget-devel \ + libglib-devel spice-gtk-devel libvncserver-devel \ + libvirt-devel krdc-devel qt5-tools-devel" +depends="qt5-xml" +short_desc="Qt Virtual machines manager" +maintainer="Artur Sinila " +license="GPL-2.0-only" +homepage="https://f1ash.github.io/qt-virt-manager/" +distfiles="https://github.com/F1ash/${pkgname}/archive/${version}.tar.gz" +checksum=d72d9bf8b3d0b94956f0fd8b58890f12063b58d826102e353820be51210fbfe1 + +if [ "$CROSS_BUILD" ]; then + hostmakedepends+=" qt5-host-tools qt5-devel" +fi