Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Unsolved Qt 5.13 warnings when build for iOS. How to fix it?

    Mobile and Embedded
    4
    9
    383
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • B
      bogong last edited by bogong

      Hello all!
      Just tried to build simple application for iOS on Qt 5.13 and got this warnings:

      1_1567337568295_Screenshot 2019-09-01 at 14.32.01.png
      0_1567337568295_Screenshot 2019-09-01 at 14.31.50.png
      0_1567337903126_Screenshot 2019-09-01 at 14.37.58.png

      How to fix it not suppress? There are a lot of them. On 5.12.4 not appeared.

      1 Reply Last reply Reply Quote 0
      • M
        mvuori last edited by

        Make the conversion explicit using a suitable cast.

        Next time: post the whole warning message and the code which the warning concerns

        B 1 Reply Last reply Reply Quote -1
        • B
          bogong @mvuori last edited by bogong

          @mvuori Legally I have no option to change anything because it's in Qt sources (there are the mentioning of the file in the sources, it's in QtCore not in my application) and this is the whole message that I got ... And only in iOS build.

          1 Reply Last reply Reply Quote 0
          • B
            bogong last edited by bogong

            The same trouble appeared on Qt 5.12.4 in Qt Test and again only for iOS build.

            0_1567504858362_Screenshot 2019-09-03 at 12.59.36.png

            J.Hilk 1 Reply Last reply Reply Quote 0
            • J.Hilk
              J.Hilk Moderators @bogong last edited by J.Hilk

              @bogong are you building for simulator? because iOS devices should be 64 bit, which should make the int 64 bit which should make the implicit cast moot

              Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct

              Qt Needs YOUR vote: https://bugreports.qt.io/browse/QTQAINFRA-4121


              Q: What's that?
              A: It's blue light.
              Q: What does it do?
              A: It turns blue.

              B 2 Replies Last reply Reply Quote 0
              • B
                bogong @J.Hilk last edited by bogong

                @j-hilk It's for Qt Test on 5.12.4: It's happening when I am building static library for iOS with tests for iPhone 6SE, for simulator works fine. For Qt 5.13 couldn't say anything because Qt 5.13 killed on my computer after weekend of fighting against it :-) Awaiting Qt 5.13.1 within big hope :-)

                1 Reply Last reply Reply Quote 0
                • B
                  bogong last edited by

                  The same issue on Qt 5.13.1 when building for iOS and for Simulator too.

                  In file included from /Users/alexandr/Projects/arboreus/arboreus_examples/qt/build-HandlingQMLFromCPP-Qt_5_13_1_for_iOS_Simulator-Debug/handlingqmlfromcpp_qml_plugin_import.cpp:3:
                  In file included from /Users/alexandr/Tools/qt/5.13.1/ios/include/QtCore/QtPlugin:1:
                  In file included from /Users/alexandr/Tools/qt/5.13.1/ios/include/QtCore/qplugin.h:44:
                  In file included from /Users/alexandr/Tools/qt/5.13.1/ios/include/QtCore/qobject.h:49:
                  /Users/alexandr/Tools/qt/5.13.1/ios/include/QtCore/qlist.h:1034:26: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
                                  return n - b;
                                  ~~~~~~ ~~^~~
                  In file included from /Users/alexandr/Projects/arboreus/arboreus_examples/qt/build-HandlingQMLFromCPP-Qt_5_13_1_for_iOS_Simulator-Debug/handlingqmlfromcpp_qml_plugin_import.cpp:3:
                  In file included from /Users/alexandr/Tools/qt/5.13.1/ios/include/QtCore/QtPlugin:1:
                  In file included from /Users/alexandr/Tools/qt/5.13.1/ios/include/QtCore/qplugin.h:44:
                  In file included from /Users/alexandr/Tools/qt/5.13.1/ios/include/QtCore/qobject.h:49:
                  In file included from /Users/alexandr/Tools/qt/5.13.1/ios/include/QtCore/qlist.h:1166:
                  /Users/alexandr/Tools/qt/5.13.1/ios/include/QtCore/qstringlist.h:270:23: note: in instantiation of function template specialization 'QtPrivate::lastIndexOf<QString, QStringView>' requested here
                      return QtPrivate::lastIndexOf<QString, QStringView>(*this, string, from);
                                        ^
                  In file included from /Users/alexandr/Projects/arboreus/arboreus_examples/qt/build-HandlingQMLFromCPP-Qt_5_13_1_for_iOS_Simulator-Debug/handlingqmlfromcpp_qml_plugin_import.cpp:3:
                  In file included from /Users/alexandr/Tools/qt/5.13.1/ios/include/QtCore/QtPlugin:1:
                  In file included from /Users/alexandr/Tools/qt/5.13.1/ios/include/QtCore/qplugin.h:44:
                  In file included from /Users/alexandr/Tools/qt/5.13.1/ios/include/QtCore/qobject.h:49:
                  /Users/alexandr/Tools/qt/5.13.1/ios/include/QtCore/qlist.h:1034:26: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
                                  return n - b;
                                  ~~~~~~ ~~^~~
                  In file included from /Users/alexandr/Projects/arboreus/arboreus_examples/qt/build-HandlingQMLFromCPP-Qt_5_13_1_for_iOS_Simulator-Debug/handlingqmlfromcpp_qml_plugin_import.cpp:3:
                  In file included from /Users/alexandr/Tools/qt/5.13.1/ios/include/QtCore/QtPlugin:1:
                  In file included from /Users/alexandr/Tools/qt/5.13.1/ios/include/QtCore/qplugin.h:44:
                  In file included from /Users/alexandr/Tools/qt/5.13.1/ios/include/QtCore/qobject.h:49:
                  In file included from /Users/alexandr/Tools/qt/5.13.1/ios/include/QtCore/qlist.h:1166:
                  /Users/alexandr/Tools/qt/5.13.1/ios/include/QtCore/qstringlist.h:275:23: note: in instantiation of function template specialization 'QtPrivate::lastIndexOf<QString, QLatin1String>' requested here
                      return QtPrivate::lastIndexOf<QString, QLatin1String>(*this, string, from);
                  

                  Is it bug or not?

                  1 Reply Last reply Reply Quote 0
                  • B
                    bogong @J.Hilk last edited by

                    @j-hilk Just tried to build on Qt 5.13.1 application for iOS device - got 58 warnings about implicit conversion. Device the same iPhone SE.

                    1 Reply Last reply Reply Quote 0
                    • SGaist
                      SGaist Lifetime Qt Champion last edited by

                      Hi,

                      What version of Xcode are you using ?

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post