Bug report #4284

error: ‘qt_metatype_id’ is not a member of ‘QMetaTypeId<QVariant>’

Added by Sandro Santilli about 9 years ago. Updated almost 9 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Build/Install
Affected QGIS version: Regression?:No
Operating System:GNU/Linux Easy fix?:No
Pull Request or Patch supplied:Yes Resolution:fixed
Crashes QGIS or corrupts data: Copied to github as #:14223

Description

  • master 1a70ddd [FEATURE] Import a vector layer from a datasource to a different one Merge of another part of my Summer of Code work (remote-tracking branch 'brushtyler/import_layer')
[ 97%] Building CXX object tests/src/core/CMakeFiles/qgis_expressiontest.dir/testqgsexpression.cpp.o
In file included from /usr/include/qt4/QtTest/qtest.h:252,
                 from /usr/include/qt4/QtTest/QtTest:6,
                 from /usr/src/qgis/qgis/tests/src/core/testqgsexpression.cpp:15:
/usr/include/qt4/QtTest/qtest_gui.h:111: warning: redundant redeclaration of ‘void qt_x11_wait_for_window_manager(QWidget*)’ in same scope
/usr/include/qt4/QtTest/qtestsystem.h:57: warning: previous declaration of ‘void qt_x11_wait_for_window_manager(QWidget*)’
In file included from /usr/include/qt4/QtCore/qvariant.h:48,
                 from /usr/include/qt4/QtCore/qsettings.h:46,
                 from /usr/include/qt4/QtCore/QtCore:17,
                 from /usr/include/qt4/QtTest/QtTest:3,
                 from /usr/src/qgis/qgis/tests/src/core/testqgsexpression.cpp:15:
/usr/include/qt4/QtCore/qmetatype.h: In static member function ‘static int QMetaTypeId2<T>::qt_metatype_id() [with T = QVariant]’:
/usr/include/qt4/QtCore/qmetatype.h:210:   instantiated from ‘int qMetaTypeId(T*) [with T = QVariant]’
/usr/src/qgis/qgis/tests/src/core/testqgsexpression.cpp:231:   instantiated from here
/usr/include/qt4/QtCore/qmetatype.h:200: error: ‘qt_metatype_id’ is not a member of ‘QMetaTypeId<QVariant>’
make[2]: *** [tests/src/core/CMakeFiles/qgis_expressiontest.dir/testqgsexpression.cpp.o] Error 1
make[1]: *** [tests/src/core/CMakeFiles/qgis_expressiontest.dir/all] Error 2
make: *** [all] Error 2

History

#1 Updated by Sandro Santilli about 9 years ago

For the record, this happens on "make" but is a test
(shouldn't it only be built by "make check"?)

I guess not many people enable testing if this didn't come out before

#2 Updated by Sandro Santilli about 9 years ago

For clarity, you need -DENABLE_TESTS=1 switch to cmake for this to be reproduced

#3 Updated by Giuseppe Sucameli almost 9 years ago

It may be a QT bug (QT < 4.7.1), see https://bugreports.qt.nokia.com/browse/QTBUG-8549

#4 Updated by Sandro Santilli almost 9 years ago

4.6.2-0ubuntu5.3 is the version in here

#5 Updated by Sandro Santilli almost 9 years ago

  • Pull Request or Patch supplied changed from No to Yes

The following changes since commit 232f1617614678115e6c42431a5976fc21f1dd4e:
marco (1):
Fix for ticket #4414 (svg indicators for arrows are not shown)

are available in the git repository at:

:strk/Quantum-GIS.git qt462

Sandro Santilli (1):
Workaround for builds against Qt 4.6.2. Fixes bug #4284.

tests/src/core/testqgsexpression.cpp |    4 +++
1 files changed, 4 insertions(
), 0 deletions(-)

#6 Updated by Sandro Santilli almost 9 years ago

Branch updated to include a version check:

The following changes since commit 232f1617614678115e6c42431a5976fc21f1dd4e:
marco (1):
Fix for ticket #4414 (svg indicators for arrows are not shown)

are available in the git repository at:

:strk/Quantum-GIS.git qt462

Sandro Santilli (2):
Workaround for builds against Qt 4.6.2. Fixes bug #4284.
Only implement QVariant bug workaround when building against Qt < 4.7.1 [#4284]

tests/src/core/testqgsexpression.cpp |    5 +++
1 files changed, 5 insertions(+), 0 deletions(-)

Tests welcome with newer QT versions

#7 Updated by Giuseppe Sucameli almost 9 years ago

Here (Ubuntu 11.04 and QT 4.7.2) the compilation still works fine and ends without errors before and after your fix.

#8 Updated by Sandro Santilli almost 9 years ago

  • Resolution set to fixed

Pushed to master by Jef (thanks!).
926b3888a15a25eb4f15d5b3fdc62a08016b20c3
d7b106fed347c4d7dcae546cb65a9a2dd6619ab0

#9 Updated by Giuseppe Sucameli almost 9 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF