Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-4314

Phonon GStreamer backend non explicitly stated metatype reference

    XMLWordPrintable

Details

    Description

      I have class Message defined in my project. Message is also registered into meta type system. Here is the code snippet:

      message.h
      =========
      class Message {
      ...
      }
      Q_DECLARE_METATYPE(Message)

      message.cpp
      ===========
      void init() {
      qRegisterMetaType<Message>();
      ...
      }

      Everything worked well until I tried to make instance of Phonon's Video Player. This line of code makes a crash:
      Phonon::VideoPlayer *p = new Phonon::VideoPlayer(Phonon::VideoCategory);

      When I backtracked the problem in gdb I found the line 99 in \src\3rdparty\phonon\gstreamer\backend.cpp
      QMetaObject::invokeMethod(mediaObject->backend(), "handleBusMessage", Qt::QueuedConnection, Q_ARG(Message, message));
      makes the trouble. It looks that Q_ARG macro refers to my Message class instead of Phonon::Gstreamer::Message.

      The metatype system does not respect the namespace, so the Message type here should be explicitly stated as Phonon::GStreamer::Message.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            janichol Andy Nichols
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes