Make Format() constructed as fast as possible.
QMetaType::type("XlsxColor") is not fast.
This commit is contained in:
@@ -180,14 +180,6 @@ FormatPrivate::~FormatPrivate()
|
|||||||
*/
|
*/
|
||||||
Format::Format()
|
Format::Format()
|
||||||
{
|
{
|
||||||
if (QMetaType::type("XlsxColor") == QMetaType::UnknownType) {
|
|
||||||
//Fix me! Where should we put these register code?
|
|
||||||
qRegisterMetaType<XlsxColor>("XlsxColor");
|
|
||||||
qRegisterMetaTypeStreamOperators<XlsxColor>("XlsxColor");
|
|
||||||
#if QT_VERSION >= 0x050200
|
|
||||||
QMetaType::registerDebugStreamOperator<XlsxColor>();
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
//The d pointer is initialized with a null pointer
|
//The d pointer is initialized with a null pointer
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -47,6 +47,15 @@ Styles::Styles(CreateFlag flag)
|
|||||||
{
|
{
|
||||||
//!Fix me. Should the custom num fmt Id starts with 164 or 176 or others??
|
//!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) {
|
||||||
|
qRegisterMetaType<XlsxColor>("XlsxColor");
|
||||||
|
qRegisterMetaTypeStreamOperators<XlsxColor>("XlsxColor");
|
||||||
|
#if QT_VERSION >= 0x050200
|
||||||
|
QMetaType::registerDebugStreamOperator<XlsxColor>();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
if (flag == F_NewFromScratch) {
|
if (flag == F_NewFromScratch) {
|
||||||
//Add default Format
|
//Add default Format
|
||||||
Format defaultFmt;
|
Format defaultFmt;
|
||||||
|
|||||||
Reference in New Issue
Block a user