teriflix / scrite

Crossplatform Screenwriting Software
https://www.scrite.io
Other
298 stars 49 forks source link

Compile failure with Qt 5.15.1 on Ubuntu 18.04 #177

Open gnittala opened 4 years ago

gnittala commented 4 years ago

I tried to compile scrite on Ubuntu 18.04 with Qt 5.15.1 (a few notes about this below). The compilation fails due to a missing include in the imageprinter.cpp.

The error is this:

~/scrite/src/printing/imageprinter.cpp:603: error: invalid use of incomplete type ‘class QPainterPath’
../scrite/src/printing/imageprinter.cpp:603:65: error: invalid use of incomplete type ‘class QPainterPath’
             m_pagePainter->setClipPath( tx.map(pestate.clipPath()) );

The fix is straight forward, we just need to include the QPainterPath in the imageprinter.cpp. I don't think this warrants a pull-request. But if you want me to, I will raise a pull-request for you to review and merge. P.S: I don't know if the include is the right order - will investigate and confirm.

diff --git a/src/printing/imageprinter.cpp b/src/printing/imageprinter.cpp
index 546d62b..ae75915 100644
--- a/src/printing/imageprinter.cpp
+++ b/src/printing/imageprinter.cpp
@@ -18,6 +18,7 @@
 #include <QDateTime>
 #include <QQmlEngine>
 #include <QPaintEngine>
+#include <QPainterPath>

 class ImagePrinterImageProvider : public QObject, public QQuickImageProvider
 {

Notes about the 5.15.1 as mentioned.

pnudupa commented 4 years ago

@gnittala - Personally, I hold a commercial license of Qt and that's what I use to build Scrite on my machines. I do have a 5.15.1 offline installer provided by the Qt Company, but I have been resisting to update to 5.15.x for this very reason. Qt 5.13.x has offline installers for LGPL/GPL users and that makes it easy for developers to simply pull the Scrite code, build it and play around with it.

While the the patch you mention here is simple and it can easily be incorporated, I was wondering if you could try using Scrite or a bit and see if the Qt 5.15.1 build needs any other polish. If you can make some time, do look at the video here: https://www.scrite.io/index.php/scrite-tutorial-aug-2020-edition/, and see if the 5.15.1 build works the same, that would be awesome. If you support even by listing issues that needs to be addressed before moving to 5.15.1; that would be super-useful. Feel free to look into the code and suggest more fundamental changes, like the ones suggested here: https://doc.qt.io/qt-5/qtqml-cppintegration-definetypes.html.

We have a Forum thread for this: https://www.scrite.io/index.php/forum/topic/moving-to-qt-5-15-1/.

Perhaps you can post there?

gnittala commented 4 years ago

Sure @pnudupa I will continue this conversation on the Scrite forum thread you created. But, I have a couple of questions regarding the Qt versions (still not well-versed with Qt licensing options)

  1. Whether I use the Qt 5.13.2 offline installer or use the 5.15.1 - I am developing under the LGPLV3 for OSS, right? Are there any differences in licensing for someone like me who doesn't have a commercial license on which installer I should use ? Am asking this because the official licensing FAQ page and the details from Mr. Stubert have sort of left me a bit confused
  2. I did not know that I could download the 5.13.2 installer. My bad, I should have searched for that !
  3. My question then would be - do you want me look at the changes possible under 5.15.1 or do I uninstall 5.15.1 and install 5.13.2 and try things out

Initial impressions

  1. I saw some lag on usage on my Ubuntu desktop (I didn't try it on my Ubuntu laptop yet). Have not been able to attach a profiler to figure out why there is lag. I tried to use the QT_OPENGL=software option but didn't see any big difference. I need to investigate more to understand what is happening
  2. As per the .pro file, looks like the compiler needs to be g++ to help with the hunspellcheck. Is that so? I switched to clang++ and got it compiled, but I could not get the linker working (can post the error message if that helps). But before I went that route, want to check if g++ is the only one supported