antonypro/QGoodWindow

`no_qgoodwindow` flag: `'return': cannot convert 'int' to 'QFlags<Qt::AlignmentFlag>'`

Closed this issue · 2 comments

Hello again. Here's another issue I've encountered while trying out the no_qgoodwindow flag:

image

[...]\QGoodWindow-master\QGoodWindow\QGoodCentralWidget\src\qgoodcentralwidget.cpp:435: error: C2440: 'return': cannot convert from 'int' to 'QFlags<Qt::AlignmentFlag>'
..\..\QGoodCentralWidget\src\qgoodcentralwidget.cpp(435): error C2440: 'return': cannot convert from 'int' to 'QFlags<Qt::AlignmentFlag>'
..\..\QGoodCentralWidget\src\qgoodcentralwidget.cpp(435): note: No constructor could take the source type, or constructor overload resolution was ambiguous

Occurs here at line 435:

Qt::Alignment QGoodCentralWidget::titleAlignment() const
{
#ifdef QGOODWINDOW
return m_title_bar->titleAlignment();
#else
return 0;
#endif
}

Encountered while trying to build GoodShowCase & GoodPlayground. I didn't try this out on the other examples.

@kresimirko: This problem is solved by replacing 0 with Qt::Alignment(0).

The next version of the library will contain the fix.

Thanks for reporting!

@kresimirko: This bug was solved on version 2.3.