https://bugs.kde.org/show_bug.cgi?id=443415
Bug ID: 443415
Summary: Signals of IProjectBuilder cannot be connected
Product: kdevelop
Version: 5.5.0
Platform: Other
OS: All
Status: REPORTED
Severity: normal
Priority: NOR
Component: general
Assignee: kdevelop-bugs-n...@kde.org
Reporter: kde2...@warship.prima.de
Target Milestone: ---
The signals of IProjectBuilder cannot be connected. I think the class must be
derived from QObject.
STEPS TO REPRODUCE
void TestView::built(KDevelop::ProjectBaseItem*);
void TestView::addTestSuite(ITestSuite* suite)
{
auto builder = suite->project()->buildSystemManager()->builder();
connect(builder, &KDevelop::IProjectBuilder::built, this,
&TestView::built);
OBSERVED RESULT
In file included from
/usr/include/x86_64-linux-gnu/qt5/QtGui/qkeysequence.h:45,
from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qaction.h:44,
from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/QAction:1,
from /home/twollgam/projects/TestBrowser/src/testview.h:3,
from /home/twollgam/projects/TestBrowser/src/testview.cpp:1:
/usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs.h: In instantiation of
‘struct QtPrivate::HasQ_OBJECT_Macro’:
/usr/include/x86_64-linux-gnu/qt5/QtCore/qobject.h:235:9: required from
‘static QMetaObject::Connection QObject::connect(const typename
QtPrivate::FunctionPointer::Object*, Func1, const typename
QtPrivate::FunctionPointer::Object*, Func2, Qt::ConnectionType) [with
Func1 = void (KDevelop::IProjectBuilder::*)(KDevelop::ProjectBaseItem*); Func2
= void (TestView::*)(KDevelop::ProjectBaseItem*); typename
QtPrivate::FunctionPointer::Object = KDevelop::IProjectBuilder; typename
QtPrivate::FunctionPointer::Object = TestView]’
/home/twollgam/projects/TestBrowser/src/testview.cpp:529:79: required from
here
/usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs.h:622:37: error:
‘qt_metacall’ is not a member of ‘KDevelop::IProjectBuilder’
622 | enum { Value = sizeof(test(&Object::qt_metacall)) ==
sizeof(int) };
| ^~~~
In file included from /usr/include/x86_64-linux-gnu/qt5/QtGui/qtguiglobal.h:43,
from
/usr/include/x86_64-linux-gnu/qt5/QtWidgets/qtwidgetsglobal.h:43,
from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qaction.h:43,
from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/QAction:1,
from /home/twollgam/projects/TestBrowser/src/testview.h:3,
from /home/twollgam/projects/TestBrowser/src/testview.cpp:1:
/usr/include/x86_64-linux-gnu/qt5/QtCore/qobject.h: In instantiation of ‘static
QMetaObject::Connection QObject::connect(const typename
QtPrivate::FunctionPointer::Object*, Func1, const typename
QtPrivate::FunctionPointer::Object*, Func2, Qt::ConnectionType) [with
Func1 = void (KDevelop::IProjectBuilder::*)(KDevelop::ProjectBaseItem*); Func2
= void (TestView::*)(KDevelop::ProjectBaseItem*); typename
QtPrivate::FunctionPointer::Object = KDevelop::IProjectBuilder; typename
QtPrivate::FunctionPointer::Object = TestView]’:
/home/twollgam/projects/TestBrowser/src/testview.cpp:529:79: required from
here
/usr/include/x86_64-linux-gnu/qt5/QtCore/qobject.h:235:9: error: static
assertion failed: No Q_OBJECT in the class with the signal
235 | Q_STATIC_ASSERT_X(QtPrivate::HasQ_OBJECT_Macro::Value,
| ^
In file included from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qwidget.h:45,
from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qaction.h:46,
from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/QAction:1,
from /home/twollgam/projects/TestBrowser/src/testview.h:3,
from /home/twollgam/projects/TestBrowser/src/testview.cpp:1:
/usr/include/x86_64-linux-gnu/qt5/QtCore/qobject.h:254:42: error:
‘staticMetaObject’ is not a member of ‘QtPrivate::FunctionPointer::Object’ {aka
‘KDevelop::IProjectBuilder’}
254 | type, types,
&SignalType::Object::staticMetaObject);
EXPECTED RESULT
No compile errors.
ADDITIONAL INFORMATION
class KDEVPLATFORMPROJECT_EXPORT IProjectBuilder : public QObject
{
Q_OBJECT
public:
--
You are receiving this mail because:
You are watching all bug changes.