This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2goclient. commit 82beb1295147800bc57b2f6991ad18d3d4ad3706 Author: Mihai Moldovan <ionic@ionic.de> Date: Sat Nov 27 08:22:11 2021 +0100 src/onmainwindow.cpp: unbreak more and make sure that the code actually works on older systems. A very important part of the magic is using the old Qt4 SIGNAL/SLOT syntax and making sure to drop parameters on both sides, so that the default slot parameter is used, which animates the button for 150 ms. --- debian/changelog | 5 +++++ src/onmainwindow.cpp | 14 ++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 87822b3..48542ed 100644 --- a/debian/changelog +++ b/debian/changelog @@ -103,6 +103,11 @@ x2goclient (4.1.2.3-0x2go1) UNRELEASED; urgency=medium - src/onmainwindow.cpp: increase fixed height of session selection dialog in normal mode and also set as minimum height. - src/onmainwindow.cpp: unbreak on Qt 4 by emulating QKeySequence::Cancel. + - src/onmainwindow.cpp: unbreak more and make sure that the code actually + works on older systems. A very important part of the magic is using the + old Qt4 SIGNAL/SLOT syntax and making sure to drop parameters on both + sides, so that the default slot parameter is used, which animates the + button for 150 ms. * debian/control: + Move to debian/control.in. * debian/control.in: diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp index 640ae65..5d51c1c 100644 --- a/src/onmainwindow.cpp +++ b/src/onmainwindow.cpp @@ -12506,7 +12506,12 @@ void ONMainWindow::initPassDlg() cancel->setShortcut (QKeySequence::Cancel); #else /* QT_VERSION >= QT_VERSION_CHECK(5, 6, 0) */ #ifdef Q_OS_DARWIN - cancel->setShortCuts (QList<QKeySequence> { Qt::Key_Escape, Qt::CTRL + Qt::Key_Period }); + QAction *cancel_action = new QAction (passForm); + QList<QKeySequence> tmp_shortcuts; + tmp_shortcuts << Qt::Key_Escape << (Qt::CTRL + Qt::Key_Period); + cancel_action->setShortcuts (tmp_shortcuts); + connect (cancel_action, SIGNAL (triggered ()), cancel, SLOT (animateClick ())); + cancel->addAction (cancel_action); #else /* defined (Q_OS_DARWIN) */ cancel->setShortcut (QKeySequence (Qt::Key_Escape)); #endif /* defined (Q_OS_DARWIN) */ @@ -12847,7 +12852,12 @@ void ONMainWindow::initSelectSessDlg() sCancel->setShortcut (QKeySequence::Cancel); #else /* QT_VERSION >= QT_VERSION_CHECK(5, 6, 0) */ #ifdef Q_OS_DARWIN - sCancel->setShortCuts (QList<QKeySequence> { Qt::Key_Escape, Qt::CTRL + Qt::Key_Period }); + QAction *cancel_action = new QAction (selectSessionDlg); + QList<QKeySequence> tmp_shortcuts; + tmp_shortcuts << Qt::Key_Escape << (Qt::CTRL + Qt::Key_Period); + cancel_action->setShortcuts (tmp_shortcuts); + connect (cancel_action, SIGNAL (triggered ()), sCancel, SLOT (animateClick ())); + sCancel->addAction (cancel_action); #else /* defined (Q_OS_DARWIN) */ sCancel->setShortcut (QKeySequence (Qt::Key_Escape)); #endif /* defined (Q_OS_DARWIN) */ -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2goclient.git