QMap compile issues in Qt5 port (RESOLVED)



  • Hi folks,

    I am running into a QMap issue while porting kaffeine to Qt5 (the same code compiled fine under Qt4):
    @[ 33%] Building CXX object src/CMakeFiles/kaffeine.dir/backend-vlc/vlcmediawidget.o
    In file included from /home/quentin/git-kaffeine/src/backend-vlc/vlcmediawidget.h:24:0,
    from /home/quentin/git-kaffeine/src/backend-vlc/vlcmediawidget.cpp:21:
    /home/quentin/git-kaffeine/src/backend-vlc/../abstractmediawidget.h:109:43: error: field 'metadata' has incomplete type
    QMap<MediaWidget::MetadataType, QString> metadata;
    ^
    /home/quentin/git-kaffeine/src/backend-vlc/../abstractmediawidget.h: In member function 'QMap<MediaWidget::MetadataType, QString> AbstractMediaWidget::getMetadata() const':
    /home/quentin/git-kaffeine/src/backend-vlc/../abstractmediawidget.h:40:63: error: return type 'class QMap<MediaWidget::MetadataType, QString>' is incomplete
    QMap<MediaWidget::MetadataType, QString> getMetadata() const { return metadata; }
    ^
    /home/quentin/git-kaffeine/src/backend-vlc/../abstractmediawidget.h:40:72: error: 'metadata' was not declared in this scope
    QMap<MediaWidget::MetadataType, QString> getMetadata() const { return metadata; }
    ^
    /home/quentin/git-kaffeine/src/backend-vlc/vlcmediawidget.cpp: In member function 'virtual void VlcMediaWidget::updateMetadata()':
    /home/quentin/git-kaffeine/src/backend-vlc/vlcmediawidget.cpp:385:2: error: 'metadata' was not declared in this scope
    metadata.clear();@

    The source files are here:

    I do not understand why my enum is not valid anymore.

    Thanks in advance.
    -Quentin



  • Looks like missing <QMap> include in abstractmediawidget.h



  • That's it, thanks! Thought it was less obvious!


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.