diff options
author | Alexander Golubev <[email protected]> | 2024-03-12 01:19:14 +0300 |
---|---|---|
committer | Alexander Golubev <[email protected]> | 2024-03-14 00:11:47 +0300 |
commit | f7642b09c9e61f71e434aeb0ceb330d2ccaa25db (patch) | |
tree | 24caf3ca34bc91f4c3ea20b8fc436fdd71c44925 /src/moc | |
parent | fa4475f36d6404a70d760ca95ac6a986a8846a3f (diff) | |
download | tqt3-f7642b09c9e61f71e434aeb0ceb330d2ccaa25db.tar.gz tqt3-f7642b09c9e61f71e434aeb0ceb330d2ccaa25db.zip |
TQT_THREAD_SUPPORT->!TQT_NO_THREAD: migrate sources
Signed-off-by: Alexander Golubev <[email protected]>
Diffstat (limited to 'src/moc')
-rw-r--r-- | src/moc/moc.y | 6 | ||||
-rw-r--r-- | src/moc/moc_yacc.cpp | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/moc/moc.y b/src/moc/moc.y index 4b754b7bc..7bb17512a 100644 --- a/src/moc/moc.y +++ b/src/moc/moc.y @@ -2985,8 +2985,8 @@ void generateClass() // generate C++ source code for a class // fprintf( out, "TQMetaObject* %s::staticMetaObject()\n{\n", (const char*)qualifiedClassName() ); fprintf( out, " if ( metaObj ) {\n\treturn metaObj;\n}\n" ); - fprintf( out, "#ifdef TQT_THREAD_SUPPORT\n if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->lock();\n" ); - fprintf( out, " if ( metaObj ) {\n\tif (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();\n\treturn metaObj;\n }\n#endif // TQT_THREAD_SUPPORT\n" ); + fprintf( out, "#ifndef TQT_NO_THREAD\n if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->lock();\n" ); + fprintf( out, " if ( metaObj ) {\n\tif (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();\n\treturn metaObj;\n }\n#endif // TQT_NO_THREAD\n" ); if ( isTQObject ) fprintf( out, " TQMetaObject* parentObject = staticTQtMetaObject();\n" ); else if ( !g->superClassName.isEmpty() ) @@ -3056,7 +3056,7 @@ void generateClass() // generate C++ source code for a class // Setup cleanup handler and return meta object // fprintf( out, " cleanUp_%s.setMetaObject( metaObj );\n", cleanup.data() ); - fprintf( out, "#ifdef TQT_THREAD_SUPPORT\n if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();\n#endif // TQT_THREAD_SUPPORT\n" ); + fprintf( out, "#ifndef TQT_NO_THREAD\n if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();\n#endif // TQT_NO_THREAD\n" ); fprintf( out, " return metaObj;\n}\n" ); // diff --git a/src/moc/moc_yacc.cpp b/src/moc/moc_yacc.cpp index ef980dd34..d1178724b 100644 --- a/src/moc/moc_yacc.cpp +++ b/src/moc/moc_yacc.cpp @@ -5860,8 +5860,8 @@ void generateClass() // generate C++ source code for a class // fprintf( out, "TQMetaObject* %s::staticMetaObject()\n{\n", (const char*)qualifiedClassName() ); fprintf( out, " if ( metaObj ) {\n\treturn metaObj;\n}\n" ); - fprintf( out, "#ifdef TQT_THREAD_SUPPORT\n if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->lock();\n" ); - fprintf( out, " if ( metaObj ) {\n\tif (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();\n\treturn metaObj;\n }\n#endif // TQT_THREAD_SUPPORT\n" ); + fprintf( out, "#ifndef TQT_NO_THREAD\n if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->lock();\n" ); + fprintf( out, " if ( metaObj ) {\n\tif (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();\n\treturn metaObj;\n }\n#endif // TQT_NO_THREAD\n" ); if ( isTQObject ) fprintf( out, " TQMetaObject* parentObject = staticTQtMetaObject();\n" ); else if ( !g->superClassName.isEmpty() ) @@ -5931,7 +5931,7 @@ void generateClass() // generate C++ source code for a class // Setup cleanup handler and return meta object // fprintf( out, " cleanUp_%s.setMetaObject( metaObj );\n", cleanup.data() ); - fprintf( out, "#ifdef TQT_THREAD_SUPPORT\n if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();\n#endif // TQT_THREAD_SUPPORT\n" ); + fprintf( out, "#ifndef TQT_NO_THREAD\n if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();\n#endif // TQT_NO_THREAD\n" ); fprintf( out, " return metaObj;\n}\n" ); // |