Skip to content

Commit

Permalink
rename qobject folder to metaobject
Browse files Browse the repository at this point in the history
  • Loading branch information
felixf4xu committed Jan 22, 2024
1 parent d17e437 commit 5be333e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ target_compile_definitions(${PROJECT_NAME} PUBLIC
UNICODE
)

if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/../qobject")
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/../metaobject")
message(STATUS "Building with qcorelib source code: " "${CMAKE_CURRENT_SOURCE_DIR}/../qobject")
#build with qcorelib source code
target_link_libraries(${PROJECT_NAME} qcorelib)
Expand Down
6 changes: 3 additions & 3 deletions generator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
#include "cbordevice.h"
#include "outputrevision.h"
#include "utils.h"
#include <qobject/qmetatype.h>
#include <qobject/qmetaobject.h>
#include <qobject/qmetamethod.h> //enum PropertyFlags
#include <metaobject/qmetatype.h>
#include <metaobject/qmetaobject.h>
#include <metaobject/qmetamethod.h> //enum PropertyFlags

#include <serialization/qjsondocument.h>
#include <serialization/qjsonobject.h>
Expand Down
8 changes: 4 additions & 4 deletions moc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <io/qdir.h>
#include <serialization/qjsondocument.h>

#include <qobject/qmetaobject_moc.h> // for normalizeTypeInternal
#include <metaobject/qmetaobject_moc.h> // for normalizeTypeInternal
#include <tools/qduplicatetracker.h>

QT_BEGIN_NAMESPACE
Expand Down Expand Up @@ -1090,17 +1090,17 @@ void Moc::generate(FILE *out, FILE *jsonOutput)
if (classList.size() && classList.constFirst().classname == "Qt")
fprintf(out, "#include <QtCore/qobject.h>\n");

fprintf(out, "#include <qobject/qmetatype.h>\n"); // For QMetaType::Type
fprintf(out, "#include <metaobject/qmetatype.h>\n"); // For QMetaType::Type
if (mustIncludeQPluginH)
fprintf(out, "#include <QtCore/qplugin.h>\n");

const auto qtContainers = requiredQtContainers(classList);
for (const QByteArray &qtContainer : qtContainers)
fprintf(out, "#include <QtCore/%s>\n", qtContainer.constData());

fprintf(out, "\n%s#include <qobject/qtmochelpers.h>\n%s\n",
fprintf(out, "\n%s#include <metaobject/qtmochelpers.h>\n%s\n",
#if QT_VERSION <= QT_VERSION_CHECK(6, 9, 0)
"#if __has_include(<qobject/qtmochelpers.h>)\n",
"#if __has_include(<metaobject/qtmochelpers.h>)\n",
"#else\n"
"QT_BEGIN_MOC_NAMESPACE\n"
"#endif\n"
Expand Down

0 comments on commit 5be333e

Please sign in to comment.