Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Random errors have started to pop up
Forum Updated to NodeBB v4.3 + New Features

Random errors have started to pop up

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 2 Posters 1.1k Views 1 Watching
  • 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.
  • T Offline
    T Offline
    tony67
    wrote on last edited by tony67
    #1

    Hi All,
    I'm suddenly scratching my head about some issues I'm having. I'm worried that something is broken somewhere and I can't see where. What happened. Firstly a piece of code I haven't touched for weeks reported an error with a signal slot.

    emit LineObject.resize();
    

    reports
    line_class.h:92: error: 'void Line_Class::resize()' is protected
    void resize( void );
    ^
    opensave_gamefile.cpp:741: error: within this context
    emit LineObject.resize();
    ^

    So just for a test I though I would delete the emit line, I did, I then go an error from a simple string

    std::string send = "message";
    

    I get the error

    game_objectclass.cpp:476: error: 'to_string' is not a member of 'std'
    std::string send = "message"
    ^

    So I deleted the string message, I then get 100's of errors such as
    client.cpp:448: error: 'stoi' is not a member of 'std'
    Control_Object.position( realps, std::stoi ( value, nullptr, 10 ) );
    ^
    It's as if it doesn't see c++ anymore :s can anyone advise please?

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tony67
      wrote on last edited by
      #2

      On testing further, some of these issues seem to be related to c11

      client.cpp:448: warning: identifier 'nullptr' is a keyword in C++11 [-Wc++0x-compat]
                Control_Object.set_position( realps, std::stoi ( value, nullptr, 10 ) );
                ^
      

      However I can see ( and I've never changed my pro file ) it also says

      CONFIG += c++11
      

      can .pro ignore config?

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi,

        What OS/Compiler/Qt combo are you using ?

        emit LineObject.resize(); ? That's bad, don't try to emit signals from other objects.

        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
        • T Offline
          T Offline
          tony67
          wrote on last edited by tony67
          #4

          Hi Using Linux Lubuntu 15.04 QT 3.1.1
          But the code has always worked, for months. It was working last night until suddenly it broke. Everytime I comment out an error a new set of errors appear, until I finally reach c11 stuff.
          So I comment out the emit, the slot and the connect function and it then reports that "to_string" is not in "std" even though I have config pointing to c11 in my .pro? If I take out the "to_string" line I get dozens of errors in my code all to do with c11.
          I've tried rebuild, runqmake ect nothing fixes :s

          1 Reply Last reply
          0
          • T Offline
            T Offline
            tony67
            wrote on last edited by
            #5

            Found issue. Somehow Qt had revered to using qt4.8... I found this by checking through everything noticed in in tool->options. So set my project to 5.3 qmake and it's now compiling. However have some other issues popping up.

            How is it even possible for project setting to jump back to an old version of qt...

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              That I don't know, however you are running a pretty old version of Qt Creator. I'd recommend updating it. 4.0.0 is almost out.

              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