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

After including QtAndroidExtras library can't check if QPointer is NULL

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.5.0 RC
    • 5.4.0
    • Extras: Android
    • None
    • Android
    • 4eb51defe10f4b97a3b6107ed4080311c0876a65

    Description

      After including QtAndroidExtras can't check if QPointer is NULL, got message ambiguous overload for 'operator==' (operand types are QPointer<QObject>' and 'int') which leads to qandroidjniobject.h line 194, where operator== is defined.

      Example, which cannot be compilled.

      #include <QApplication>
      #include <QQmlApplicationEngine>
      #include <QPointer>
      #include <QDebug>
      #include <QtAndroidExtras>
       
      int main(int argc, char *argv[])
      {
          QApplication app(argc, argv);
       
          QPointer<QObject> pointer;
          if(pointer == NULL) //ERROR HERE
              qDebug() << "TEST";
       
          QQmlApplicationEngine engine;
          engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
       
          return app.exec();
      }
      

      Attachments

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

        Activity

          People

            stromme Christian
            kolegs Aleksander Dejewski
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes