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

Document Viewer example could not be build on Qt 6.6.0

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P1: Critical P1: Critical
    • None
    • 6.6.0 Beta4
    • Examples and Demos
    • None
    • Linux/Other display system, macOS

      1. Open the project Document Viewer from Qt 6.6.0 examples, https://doc.qt.io/qt-6/qtdoc-demos-documentviewer-example.html
      2. Try to build the project and run it with Qt 6.6.0 on Raspberry Pi4 64bit device

       

      Actual: The project cannot be build due to large amount of errors. See below. It works well when use example from Qt 6.5.3 directory and build with Qt 6.5.3. Any other configuration fails.

      Expected: Project can be built.

       

      6.5.3 example build on Qt 6.6.0:

       

      /home/lukasz/Qt/Examples/Qt-6.5.3/demos/documentviewer/pdfviewer.cpp:58: error: no matching function for call to 'PdfViewer::connect(QPdfPageSelector*&, void (QSpinBox::*)(int), PdfViewer*, void (PdfViewer::*)(int))'
      /home/lukasz/Qt/Examples/Qt-6.5.3/demos/documentviewer/pdfviewer.cpp: In member function 'void PdfViewer::initPdfViewer()':
      /home/lukasz/Qt/Examples/Qt-6.5.3/demos/documentviewer/pdfviewer.cpp:58:12: error: no matching function for call to 'PdfViewer::connect(QPdfPageSelector*&, void (QSpinBox::*)(int), PdfViewer*, void (PdfViewer::*)(int))'
         58 |     connect(m_pageSelector, &QSpinBox::valueChanged, this, &PdfViewer::pageSelected);
      :-1: error: ninja: build stopped: subcommand failed. 

       

      6.6.0 example build on Qt 6.6.0:

       

      :-1: error: app/libabstractviewer.a(mocs_compilation.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `_ZN14AbstractViewer13uiInitializedEv' which may bind externally can not be used when making a shared object; recompile with -fPIC
      :-1: error: collect2: error: ld returned 1 exit status
      /home/lukasz/Qt/Examples/Qt-6.6.0/demos/documentviewer/plugins/pdfviewer/pdfviewer.cpp:77: error: 'QString::QString(const char*)' is private within this context
      /home/lukasz/Qt/Examples/Qt-6.6.0/demos/documentviewer/plugins/pdfviewer/pdfviewer.cpp: In member function 'virtual QStringList PdfViewer::supportedMimeTypes() const':
      /home/lukasz/Qt/Examples/Qt-6.6.0/demos/documentviewer/plugins/pdfviewer/pdfviewer.cpp:77:30: error: 'QString::QString(const char*)' is private within this context
         77 |     return {"application/pdf"};
            |                              ^
      /home/lukasz/Qt/6.6.0/Boot2Qt/raspberrypi4-64/toolchain/sysroots/cortexa72-poky-linux/usr/include/QtCore/qstring.h:913:5: note: declared private here
        913 |     QString(const char *ch);
            |     ^~~~~~~
       

      6.6.0 example build on Qt 6.5.3:{}

      /home/lukasz/Qt/Examples/Qt-6.6.0/demos/documentviewer/plugins/pdfviewer/pdfviewer.h:33: error: 'QString::QString(const char*)' is private within this context
      In file included from /home/lukasz/Qt/Examples/Qt-6.6.0/demos/build-documentviewer-Boot2Qt_6_5_3_Raspberry_Pi_4_64_bit-Debug/plugins/pdfviewer/pdfviewer_autogen/EWIEGA46WW/moc_pdfviewer.cpp:9,
                       from /home/lukasz/Qt/Examples/Qt-6.6.0/demos/build-documentviewer-Boot2Qt_6_5_3_Raspberry_Pi_4_64_bit-Debug/plugins/pdfviewer/pdfviewer_autogen/mocs_compilation.cpp:3:
      /home/lukasz/Qt/Examples/Qt-6.6.0/demos/build-documentviewer-Boot2Qt_6_5_3_Raspberry_Pi_4_64_bit-Debug/plugins/pdfviewer/pdfviewer_autogen/EWIEGA46WW/../../../../../documentviewer/plugins/pdfviewer/pdfviewer.h: In member function 'virtual QString PdfViewer::viewerName() const':
      /home/lukasz/Qt/Examples/Qt-6.6.0/demos/build-documentviewer-Boot2Qt_6_5_3_Raspberry_Pi_4_64_bit-Debug/plugins/pdfviewer/pdfviewer_autogen/EWIEGA46WW/../../../../../documentviewer/plugins/pdfviewer/pdfviewer.h:33:76: error: 'QString::QString(const char*)' is private within this context
         33 |     QString viewerName() const override { return staticMetaObject.className(); };
            |                                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~^~ 

       

       

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

            axelspoerl Axel Spoerl
            lkos Łukasz Kosiorowski
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes