Skip to content

Commit

Permalink
Use another check for meta-types for Qt < 5
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco Busemann authored and j2doll committed Oct 8, 2019
1 parent 0a7bf28 commit 1f819f1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion QXlsx/source/xlsxstyles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,13 @@ Styles::Styles(CreateFlag flag)
//!Fix me. Should the custom num fmt Id starts with 164 or 176 or others??

//!Fix me! Where should we put these register code?
if (QMetaType::type("XlsxColor") == QMetaType::UnknownType) {

#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
if (QMetaType::type("XlsxColor") == QMetaType::UnknownType)
#else
if (!QMetaType::isRegistered(QMetaType::type("XlsxColor")))
#endif
{
qRegisterMetaType<XlsxColor>("XlsxColor");
qRegisterMetaTypeStreamOperators<XlsxColor>("XlsxColor");
#if QT_VERSION >= 0x050200
Expand Down

0 comments on commit 1f819f1

Please sign in to comment.