From ea806a12876e42cf94d27bc455a34f18d1bb8c1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Istv=C3=A1n=20V=C3=A1radi?= Date: Sun, 4 Nov 2018 17:28:13 +0100 Subject: [PATCH] Patch for Xenial to be able to compile with Qt 5.5 --- .../post-patches/qt5.5-compat.patch | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 admin/linux/debian/debian.xenial/post-patches/qt5.5-compat.patch diff --git a/admin/linux/debian/debian.xenial/post-patches/qt5.5-compat.patch b/admin/linux/debian/debian.xenial/post-patches/qt5.5-compat.patch new file mode 100644 index 000000000..7d7710513 --- /dev/null +++ b/admin/linux/debian/debian.xenial/post-patches/qt5.5-compat.patch @@ -0,0 +1,40 @@ +--- nextcloud-client-2.4.0.orig/src/gui/wizard/owncloudoauthcredspage.cpp ++++ nextcloud-client-2.4.0/src/gui/wizard/owncloudoauthcredspage.cpp +@@ -53,10 +53,8 @@ OwncloudOAuthCredsPage::OwncloudOAuthCredsPage() + _ui.openLinkButton->setContextMenuPolicy(Qt::CustomContextMenu); + QObject::connect(_ui.openLinkButton, &QWidget::customContextMenuRequested, [this](const QPoint &pos) { + auto menu = new QMenu(_ui.openLinkButton); +- menu->addAction(tr("Copy link to clipboard"), this, [this] { +- if (_asyncAuth) +- QApplication::clipboard()->setText(_asyncAuth->authorisationLink().toString(QUrl::FullyEncoded)); +- }); ++ auto action = menu->addAction(tr("Copy link to clipboard")); ++ connect(action, &QAction::triggered, this, &OwncloudOAuthCredsPage::copyLinkToClipboard); + menu->setAttribute(Qt::WA_DeleteOnClose); + menu->popup(_ui.openLinkButton->mapToGlobal(pos)); + }); +@@ -131,4 +129,11 @@ bool OwncloudOAuthCredsPage::isComplete() const + return false; /* We can never go forward manually */ + } + ++void OwncloudOAuthCredsPage::copyLinkToClipboard() ++{ ++ if (_asyncAuth) ++ QApplication::clipboard()->setText(_asyncAuth->authorisationLink().toString(QUrl::FullyEncoded)); ++} ++ ++ + } // namespace OCC +--- nextcloud-client-2.4.0.orig/src/gui/wizard/owncloudoauthcredspage.h ++++ nextcloud-client-2.4.0/src/gui/wizard/owncloudoauthcredspage.h +@@ -57,6 +57,10 @@ public: + QString _refreshToken; + QScopedPointer _asyncAuth; + Ui_OwncloudOAuthCredsPage _ui; ++ ++protected slots: ++ void copyLinkToClipboard(); ++ + }; + + } // namespace OCC