gyunaev / spivak

A cross-platform Karaoke player
GNU General Public License v3.0
76 stars 18 forks source link

Error compiling (error: aggregate ‘QPainterPath path’ has incomplete type and cannot be defined) #29

Closed jose1711 closed 4 years ago

jose1711 commented 4 years ago

With current Arch Linux and spivak 1.4:

..
/usr/include/qt/QtGui/qfontmetrics.h:106:9: note: declared here
  106 |     int width(const QString &, int len = -1) const;
      |         ^~~~~
karaokepainter.cpp: In member function ‘void KaraokePainter::drawCenteredOutlineTextGradient(int, double, const QString&, int)’:
karaokepainter.cpp:151:61: warning: ‘int QFontMetrics::width(const QString&, int) const’ is deprecated: Use QFontMetrics::horizontalAdvance [-Wdeprecated-declarations]
  151 |     int x = (m_textRect.width() - fontMetrics().width( text ) ) / 2 + m_textRect.x();
      |                                                             ^
In file included from /usr/include/qt/QtGui/qpainter.h:59,
                 from /usr/include/qt/QtGui/QPainter:1,
                 from karaokepainter.h:23,
                 from karaokepainter.cpp:19:
/usr/include/qt/QtGui/qfontmetrics.h:106:9: note: declared here
  106 |     int width(const QString &, int len = -1) const;
      |         ^~~~~
karaokepainter.cpp: In member function ‘void KaraokePainter::drawOutlineTextInternal(int, int, const QColor&, const QString&, QBrush)’:
karaokepainter.cpp:159:18: error: aggregate ‘QPainterPath path’ has incomplete type and cannot be defined
  159 |     QPainterPath path;
      |                  ^~~~
karaokepainter.cpp: In member function ‘void KaraokePainter::drawCenteredOutlineText(int, const QColor&, const QString&)’:
karaokepainter.cpp:176:61: warning: ‘int QFontMetrics::width(const QString&, int) const’ is deprecated: Use QFontMetrics::horizontalAdvance [-Wdeprecated-declarations]
  176 |     int x = (m_textRect.width() - fontMetrics().width( text ) ) / 2 + m_textRect.x();
      |                                                             ^
In file included from /usr/include/qt/QtGui/qpainter.h:59,
                 from /usr/include/qt/QtGui/QPainter:1,
                 from karaokepainter.h:23,
                 from karaokepainter.cpp:19:
/usr/include/qt/QtGui/qfontmetrics.h:106:9: note: declared here
  106 |     int width(const QString &, int len = -1) const;
      |         ^~~~~
make[1]: *** [Makefile:1682: karaokepainter.o] Error 1
make[1]: Leaving directory '/home/jose/tmp/spivak/src/spivak-1.4/src'
make: *** [Makefile:125: sub-src-make_first] Error 2