@@ -79,7 +79,7 @@ class AbstractMetaClassList : public QList<AbstractMetaClass *>
79
79
class AbstractMetaAttributes
80
80
{
81
81
public:
82
- AbstractMetaAttributes () : m_attributes( 0 ) { } ;
82
+ AbstractMetaAttributes () = default ;
83
83
84
84
enum Attribute {
85
85
None = 0x00000000 ,
@@ -180,11 +180,6 @@ class AbstractMetaType
180
180
};
181
181
182
182
AbstractMetaType () :
183
- m_type_entry (0 ),
184
- m_array_element_count (0 ),
185
- m_array_element_type (0 ),
186
- m_original_template_type (0 ),
187
- m_pattern (InvalidPattern),
188
183
m_constant (false ),
189
184
m_reference (false ),
190
185
m_cpp_instantiation (true ),
@@ -294,16 +289,16 @@ class AbstractMetaType
294
289
const AbstractMetaType *originalTemplateType () const { return m_original_template_type; }
295
290
296
291
private:
297
- const TypeEntry *m_type_entry;
292
+ const TypeEntry *m_type_entry{} ;
298
293
QList <AbstractMetaType *> m_instantiations;
299
294
QString m_package;
300
295
QString m_original_type_description;
301
296
302
- int m_array_element_count;
303
- AbstractMetaType *m_array_element_type;
304
- const AbstractMetaType *m_original_template_type;
297
+ int m_array_element_count{} ;
298
+ AbstractMetaType *m_array_element_type{} ;
299
+ const AbstractMetaType *m_original_template_type{} ;
305
300
306
- TypeUsagePattern m_pattern;
301
+ TypeUsagePattern m_pattern{InvalidPattern} ;
307
302
uint m_constant : 1 ;
308
303
uint m_reference : 1 ;
309
304
uint m_cpp_instantiation : 1 ;
@@ -314,7 +309,7 @@ class AbstractMetaType
314
309
class AbstractMetaVariable
315
310
{
316
311
public:
317
- AbstractMetaVariable () : m_type( 0 ) { }
312
+ AbstractMetaVariable () = default ;
318
313
319
314
AbstractMetaType *type () const { return m_type; }
320
315
void setType (AbstractMetaType *type) { m_type = type; }
@@ -324,15 +319,15 @@ class AbstractMetaVariable
324
319
325
320
private:
326
321
QString m_name;
327
- AbstractMetaType *m_type;
322
+ AbstractMetaType *m_type{} ;
328
323
};
329
324
330
325
331
326
332
327
class AbstractMetaArgument : public AbstractMetaVariable
333
328
{
334
329
public:
335
- AbstractMetaArgument () : m_argument_index( 0 ) { } ;
330
+ AbstractMetaArgument () = default ;
336
331
337
332
QString defaultValueExpression () const { return m_expression; }
338
333
void setDefaultValueExpression (const QString &expr) { m_expression = expr; }
@@ -357,14 +352,14 @@ class AbstractMetaArgument : public AbstractMetaVariable
357
352
358
353
QString m_expression;
359
354
QString m_original_expression;
360
- int m_argument_index;
355
+ int m_argument_index{} ;
361
356
};
362
357
363
358
364
359
class AbstractMetaField : public AbstractMetaVariable , public AbstractMetaAttributes
365
360
{
366
361
public:
367
- AbstractMetaField ();
362
+ AbstractMetaField () = default ;
368
363
~AbstractMetaField ();
369
364
370
365
const AbstractMetaClass *enclosingClass () const { return m_class; }
@@ -378,9 +373,9 @@ class AbstractMetaField : public AbstractMetaVariable, public AbstractMetaAttrib
378
373
AbstractMetaField *copy () const ;
379
374
380
375
private:
381
- mutable AbstractMetaFunction *m_getter;
382
- mutable AbstractMetaFunction *m_setter;
383
- const AbstractMetaClass *m_class;
376
+ mutable AbstractMetaFunction *m_getter{} ;
377
+ mutable AbstractMetaFunction *m_setter{} ;
378
+ const AbstractMetaClass *m_class{} ;
384
379
};
385
380
386
381
@@ -413,14 +408,7 @@ class AbstractMetaFunction : public AbstractMetaAttributes
413
408
NotEqual = 0x00001000
414
409
};
415
410
416
- AbstractMetaFunction ()
417
- : m_function_type(NormalFunction),
418
- m_type (0 ),
419
- m_class(0 ),
420
- m_implementing_class(0 ),
421
- m_declaring_class(0 ),
422
- m_interface_class(0 ),
423
- m_property_spec(0 ),
411
+ AbstractMetaFunction () :
424
412
m_constant (false ),
425
413
m_invalid (false )
426
414
{
@@ -552,13 +540,13 @@ class AbstractMetaFunction : public AbstractMetaAttributes
552
540
mutable QString m_cached_minimal_signature;
553
541
mutable QString m_cached_modified_name;
554
542
555
- FunctionType m_function_type;
556
- AbstractMetaType *m_type;
557
- const AbstractMetaClass *m_class;
558
- const AbstractMetaClass *m_implementing_class;
559
- const AbstractMetaClass *m_declaring_class;
560
- const AbstractMetaClass *m_interface_class;
561
- QPropertySpec *m_property_spec;
543
+ FunctionType m_function_type{NormalFunction} ;
544
+ AbstractMetaType *m_type{} ;
545
+ const AbstractMetaClass *m_class{} ;
546
+ const AbstractMetaClass *m_implementing_class{} ;
547
+ const AbstractMetaClass *m_declaring_class{} ;
548
+ const AbstractMetaClass *m_interface_class{} ;
549
+ QPropertySpec *m_property_spec{} ;
562
550
AbstractMetaArgumentList m_arguments;
563
551
QString m_exception;
564
552
uint m_constant : 1 ;
@@ -569,10 +557,7 @@ class AbstractMetaFunction : public AbstractMetaAttributes
569
557
class AbstractMetaEnumValue
570
558
{
571
559
public:
572
- AbstractMetaEnumValue ()
573
- : m_value_set(false ), m_value(0 )
574
- {
575
- }
560
+ AbstractMetaEnumValue () = default ;
576
561
577
562
int value () const { return m_value; }
578
563
void setValue (int value) { m_value_set = true ; m_value = value; }
@@ -589,8 +574,8 @@ class AbstractMetaEnumValue
589
574
QString m_name;
590
575
QString m_string_value;
591
576
592
- bool m_value_set;
593
- int m_value;
577
+ bool m_value_set{} ;
578
+ int m_value{} ;
594
579
};
595
580
596
581
@@ -603,7 +588,7 @@ class AbstractMetaEnumValueList : public QList<AbstractMetaEnumValue *>
603
588
class AbstractMetaEnum : public AbstractMetaAttributes
604
589
{
605
590
public:
606
- AbstractMetaEnum () : m_type_entry( 0 ), m_class( 0 ), m_has_qenums_declaration(false ) {}
591
+ AbstractMetaEnum () : m_has_qenums_declaration(false ) {}
607
592
608
593
AbstractMetaEnumValueList values () const { return m_enum_values; }
609
594
void addEnumValue (AbstractMetaEnumValue *enumValue) { m_enum_values << enumValue; }
@@ -625,8 +610,8 @@ class AbstractMetaEnum : public AbstractMetaAttributes
625
610
626
611
private:
627
612
AbstractMetaEnumValueList m_enum_values;
628
- EnumTypeEntry *m_type_entry;
629
- AbstractMetaClass *m_class;
613
+ EnumTypeEntry *m_type_entry{} ;
614
+ AbstractMetaClass *m_class{} ;
630
615
631
616
uint m_has_qenums_declaration : 1 ;
632
617
uint m_reserved : 31 ;
@@ -680,12 +665,6 @@ class AbstractMetaClass : public AbstractMetaAttributes
680
665
m_has_equals_operator(false ),
681
666
m_has_clone_operator(false ),
682
667
m_is_type_alias(false ),
683
- m_enclosing_class(0 ),
684
- m_base_class(0 ),
685
- m_template_base_class(0 ),
686
- m_extracted_interface(0 ),
687
- m_primary_interface_implementor(0 ),
688
- m_type_entry(0 ),
689
668
m_qDebug_stream_function(0 )
690
669
{
691
670
}
@@ -865,16 +844,16 @@ class AbstractMetaClass : public AbstractMetaAttributes
865
844
uint m_reserved : 18 ;
866
845
QString m_destructor_exception;
867
846
868
- const AbstractMetaClass *m_enclosing_class;
869
- AbstractMetaClass *m_base_class;
847
+ const AbstractMetaClass *m_enclosing_class{} ;
848
+ AbstractMetaClass *m_base_class{} ;
870
849
QList<AbstractMetaClass*> m_super_classes;
871
- const AbstractMetaClass *m_template_base_class;
850
+ const AbstractMetaClass *m_template_base_class{} ;
872
851
AbstractMetaFunctionList m_functions;
873
852
AbstractMetaFieldList m_fields;
874
853
AbstractMetaEnumList m_enums;
875
854
AbstractMetaClassList m_interfaces;
876
- AbstractMetaClass *m_extracted_interface;
877
- AbstractMetaClass *m_primary_interface_implementor;
855
+ AbstractMetaClass *m_extracted_interface{} ;
856
+ AbstractMetaClass *m_primary_interface_implementor{} ;
878
857
QList<QPropertySpec *> m_property_specs;
879
858
AbstractMetaFunctionList m_equals_functions;
880
859
AbstractMetaFunctionList m_nequals_functions;
@@ -886,7 +865,7 @@ class AbstractMetaClass : public AbstractMetaAttributes
886
865
887
866
QStringList m_base_class_names;
888
867
QList<TypeEntry *> m_template_args;
889
- ComplexTypeEntry *m_type_entry;
868
+ ComplexTypeEntry *m_type_entry{} ;
890
869
FunctionModelItem m_qDebug_stream_function;
891
870
};
892
871
@@ -924,8 +903,8 @@ class QPropertySpec {
924
903
QString m_write;
925
904
QString m_designable;
926
905
QString m_reset;
927
- const TypeEntry *m_type;
928
- int m_index;
906
+ const TypeEntry *m_type{} ;
907
+ int m_index{- 1 } ;
929
908
};
930
909
931
910
inline AbstractMetaFunctionList AbstractMetaClass::allVirtualFunctions () const
0 commit comments