Details
-
Task
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
None
-
None
Description
cppmodelmanager.h is a fairly central file and its dependencies should be minimal.
Currently it pulls in refactoringengineinterface.h, which pulls in quite a lot of other stuff that for most clients of CppModelManager is not relevant.
For example, in qbsproject.cpp, which includes cppmodelmanager.h, it's not even possible to add a qWarning() << QStringList() since this will result in a build error:
compiling qbsproject.cpp [QbsProjectManager] /usr/lib/icecc/bin/g++ -g -O0 -Wall -Wextra -m64 -pipe -fexceptions -fvisibility=hidden -fvisibility-inlines-hidden -Wno-noexcept-type -include /d1/creator/4.7/builds/gcc_qbs/qtc_Qt_5_9_0_gcc_64_Debug/QbsProjectManager.9871ebc7/QbsProjectManager_cpp -fPIC -DQT_CREATOR '-DIDE_LIBRARY_BASENAME="lib"' '-DRELATIVE_PLUGIN_PATH="../lib/qtcreator/plugins"' '-DRELATIVE_LIBEXEC_PATH="../libexec/qtcreator"' '-DRELATIVE_DATA_PATH="../share/qtcreator"' '-DRELATIVE_DOC_PATH="../share/doc/qtcreator"' -DQT_NO_CAST_TO_ASCII -DQT_RESTRICTED_CAST_FROM_ASCII -DQT_DISABLE_DEPRECATED_BEFORE=0x050600 -DQT_USE_FAST_OPERATOR_PLUS -DQT_USE_FAST_CONCATENATION -DWITH_TESTS -DQBSPROJECTMANAGER_LIBRARY -DQML_BUILD_STATIC_LIB -DQBS_ENABLE_PROJECT_FILE_UPDATES '-DQBS_INSTALL_DIR=""' -DQT_CORE_LIB -DQT_CONCURRENT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQMAKE_AS_LIBRARY -DPROPARSER_THREAD_SAFE -DPROEVALUATOR_THREAD_SAFE -DPROEVALUATOR_CUMULATIVE -DPROEVALUATOR_SETENV -DQT_NETWORK_LIB -DQT_TESTLIB_LIB -I/d1/creator/4.7/source/src/plugins -I/d1/creator/4.7/source/src/libs -I/d1/creator/4.7/source/src/libs/3rdparty -I/home/nik/opt/qt-5.9.0/5.9/gcc_64/include -I/home/nik/opt/qt-5.9.0/5.9/gcc_64/include/QtCore -I/home/nik/opt/qt-5.9.0/5.9/gcc_64/mkspecs/linux-g++ -I/d1/creator/4.7/builds/gcc_qbs/qtc_Qt_5_9_0_gcc_64_Debug/QbsProjectManager.9871ebc7/qt.headers -I/home/nik/opt/qt-5.9.0/5.9/gcc_64/include/QtConcurrent -I/home/nik/opt/qt-5.9.0/5.9/gcc_64/include/QtWidgets -I/home/nik/opt/qt-5.9.0/5.9/gcc_64/include/QtGui -I/d1/creator/4.7/source/src/shared -I/home/nik/opt/qt-5.9.0/5.9/gcc_64/include/QtNetwork -I/home/nik/opt/qt-5.9.0/5.9/gcc_64/include/QtTest -I/d1/creator/4.7/builds/gcc_qbs/qtc_Qt_5_9_0_gcc_64_Debug/app-version-header.c0615433 -I/d1/creator/4.7/source/src/shared/qbs/src/lib/corelib -I/d1/creator/4.7/source/src/shared/qbs/src/lib/qtprofilesetup -std=c++14 -o /d1/creator/4.7/builds/gcc_qbs/qtc_Qt_5_9_0_gcc_64_Debug/QbsProjectManager.9871ebc7/3a52ce780950d4d9/qbsproject.cpp.o -c /d1/creator/4.7/source/src/plugins/qbsprojectmanager/qbsproject.cpp In file included from /d1/creator/4.7/source/src/libs/clangsupport/sourcelocationscontainer.h:30:0, from /d1/creator/4.7/source/src/plugins/cpptools/refactoringengineinterface.h:35, from /d1/creator/4.7/source/src/plugins/cpptools/cppmodelmanager.h:30, from /d1/creator/4.7/source/src/plugins/qbsprojectmanager/qbsproject.cpp:46: /d1/creator/4.7/source/src/libs/utils/smallstringio.h: In instantiation of ‘QDebug& Utils::operator<<(QDebug&, const String&) [with String = QStringList]’: /d1/creator/4.7/source/src/plugins/qbsprojectmanager/qbsproject.cpp:804:36: required from here /d1/creator/4.7/source/src/libs/utils/smallstringio.h:72:63: error: ‘const class QStringList’ has no member named ‘data’; did you mean ‘at’? debug.nospace().quote() << QByteArray::fromRawData(string.data(), int(string.size())); ~~~~~~~^~~~ at
...due to some smallstring header... - cppmodelmanager should not even pull that one in.