@@ -135,7 +135,8 @@ void ShellHeaderGenerator::write(QTextStream& s, const AbstractMetaClass* meta_c
135135 }
136136
137137 // Shell-------------------------------------------------------------------
138- if (meta_class->generateShellClass () && !ctors.isEmpty ()) {
138+ bool generateShell = meta_class->generateShellClass () && !ctors.isEmpty ();
139+ if (generateShell) {
139140
140141 AbstractMetaFunctionList virtualsForShell = getVirtualFunctionsForShell (meta_class);
141142
@@ -348,12 +349,12 @@ void ShellHeaderGenerator::write(QTextStream& s, const AbstractMetaClass* meta_c
348349 }
349350 }
350351 s << " public Q_SLOTS:" << Qt::endl;
351- if (meta_class-> generateShellClass () || !meta_class->isAbstract ()) {
352+ if (generateShell || !meta_class->isAbstract ()) {
352353
353354 bool copyConstructorSeen = false ;
354355 bool defaultConstructorSeen = false ;
355356 for (const AbstractMetaFunction* fun : ctors) {
356- if (fun->isAbstract () || (!meta_class-> generateShellClass () && !fun->isPublic ())) {
357+ if (fun->isAbstract () || (!generateShell && !fun->isPublic ())) {
357358 continue ;
358359 }
359360
@@ -373,8 +374,7 @@ void ShellHeaderGenerator::write(QTextStream& s, const AbstractMetaClass* meta_c
373374 if (meta_class->typeEntry ()->isValue () && !copyConstructorSeen && defaultConstructorSeen
374375 && !meta_class->typeEntry ()->hasNoCopy ())
375376 {
376- QString className =
377- meta_class->generateShellClass () ? shellClassName (meta_class) : meta_class->qualifiedCppName ();
377+ QString className = generateShell ? shellClassName (meta_class) : meta_class->qualifiedCppName ();
378378 s << meta_class->qualifiedCppName () << " * new_" << meta_class->name () << " (const "
379379 << meta_class->qualifiedCppName () << " & other) {" << Qt::endl;
380380 s << className << " * a = new " << className << " ();" << Qt::endl;
0 commit comments