Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Qt 5.13 warnings when build for iOS. How to fix it?

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

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
9 Posts 4 Posters 776 Views
  • 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 Offline
    B Offline
    bogong
    wrote on last edited by bogong
    #1

    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
    0
    • M Offline
      M Offline
      mvuori
      wrote on last edited by
      #2

      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
      -1
      • M mvuori

        Make the conversion explicit using a suitable cast.

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

        B Offline
        B Offline
        bogong
        wrote on last edited by bogong
        #3

        @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
        0
        • B Offline
          B Offline
          bogong
          wrote on last edited by bogong
          #4

          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.HilkJ 1 Reply Last reply
          0
          • B 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.HilkJ Offline
            J.HilkJ Offline
            J.Hilk
            Moderators
            wrote on last edited by J.Hilk
            #5

            @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


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

            B 2 Replies Last reply
            0
            • J.HilkJ 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

              B Offline
              B Offline
              bogong
              wrote on last edited by bogong
              #6

              @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
              0
              • B Offline
                B Offline
                bogong
                wrote on last edited by
                #7

                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
                0
                • J.HilkJ 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

                  B Offline
                  B Offline
                  bogong
                  wrote on last edited by
                  #8

                  @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
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    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
                    0

                    • Login

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups
                    • Search
                    • Get Qt Extensions
                    • Unsolved