Created
March 16, 2019 18:41
-
-
Save notfood/50fc04a582122b6d3dcd0440b77daaba to your computer and use it in GitHub Desktop.
Changes for Drawpile Client to run on Debian stable
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/client/canvas/aclfilter.cpp b/src/client/canvas/aclfilter.cpp | |
index 92580a5f..a808bacc 100644 | |
--- a/src/client/canvas/aclfilter.cpp | |
+++ b/src/client/canvas/aclfilter.cpp | |
@@ -27,6 +27,10 @@ | |
#include "../shared/net/annotation.h" | |
#include "../shared/net/undo.h" | |
+#ifndef Q_FALLTHROUGH | |
+#define Q_FALLTHROUGH() (void)0 | |
+#endif | |
+ | |
namespace canvas { | |
AclFilter::AclFilter(QObject *parent) | |
diff --git a/src/client/ora/orawriter.cpp b/src/client/ora/orawriter.cpp | |
index 933352b2..0193c2a9 100644 | |
--- a/src/client/ora/orawriter.cpp | |
+++ b/src/client/ora/orawriter.cpp | |
@@ -41,7 +41,7 @@ static bool putPngInZip(KZip &zip, const QString &filename, const QImage &image, | |
zip.setCompression(KZip::NoCompression); | |
if(!zip.writeFile(filename, buf.data())) { | |
if(errorMessage) | |
- *errorMessage = zip.errorString(); | |
+ *errorMessage = QString("ZIP error"); | |
return false; | |
} | |
return true; | |
@@ -145,7 +145,7 @@ static bool writeStackXml(KZip &zip, const paintcore::LayerStack *image, const Q | |
zip.setCompression(KZip::DeflateCompression); | |
if(!zip.writeFile("stack.xml", buffer.data())) { | |
if(errorMessage) | |
- *errorMessage = zip.errorString(); | |
+ *errorMessage = QString("ZIP error"); | |
return false; | |
} | |
return true; | |
@@ -204,7 +204,7 @@ bool saveOpenRaster(const QString& filename, const paintcore::LayerStack *image, | |
KZip zf(filename); | |
if(!zf.open(QIODevice::WriteOnly)) { | |
if(errorMessage) | |
- *errorMessage = zf.errorString(); | |
+ *errorMessage = QString("ZIP error"); | |
return false; | |
} | |
@@ -213,7 +213,7 @@ bool saveOpenRaster(const QString& filename, const paintcore::LayerStack *image, | |
zf.setCompression(KZip::NoCompression); | |
if(!zf.writeFile("mimetype", QByteArray("image/openraster"))) { | |
if(errorMessage) | |
- *errorMessage = zf.errorString(); | |
+ *errorMessage = QString("ZIP error"); | |
return false; | |
} | |
@@ -237,7 +237,7 @@ bool saveOpenRaster(const QString& filename, const paintcore::LayerStack *image, | |
if(!zf.close()) { | |
if(errorMessage) | |
- *errorMessage = zf.errorString(); | |
+ *errorMessage = QString("ZIP error"); | |
return false; | |
} | |
return true; | |
diff --git a/src/desktop/docks/navigator.cpp b/src/desktop/docks/navigator.cpp | |
index 024c53cb..0a1e5bf1 100644 | |
--- a/src/desktop/docks/navigator.cpp | |
+++ b/src/desktop/docks/navigator.cpp | |
@@ -160,7 +160,7 @@ void NavigatorView::paintEvent(QPaintEvent *) | |
if(qAbs(m_focusRect[0].y() - m_focusRect[1].y()) >= 1.0 || m_focusRect[0].x() > m_focusRect[1].x()) { | |
const QLineF right { m_focusRect[1], m_focusRect[2] }; | |
const QLineF unitVector = right.unitVector().translated(-right.p1()); | |
- QLineF normal = unitVector.normalVector().translated(right.center()); | |
+ QLineF normal = unitVector.normalVector().translated(0.5 * right.p1() + 0.5 * right.p2()); | |
normal.setLength(10 / scale); | |
painter.drawLine(normal); | |
} | |
diff --git a/src/shared/server/loginhandler.cpp b/src/shared/server/loginhandler.cpp | |
index ae84c11d..4bfd88cb 100644 | |
--- a/src/shared/server/loginhandler.cpp | |
+++ b/src/shared/server/loginhandler.cpp | |
@@ -36,6 +36,10 @@ | |
#include <QNetworkRequest> | |
#include <QNetworkReply> | |
+#ifndef Q_FALLTHROUGH | |
+#define Q_FALLTHROUGH() (void)0 | |
+#endif | |
+ | |
namespace server { | |
LoginHandler::LoginHandler(Client *client, SessionServer *server) : |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment