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

EndlessLoop while not return a value

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4: Low
    • Resolution: Invalid
    • Affects Version/s: 5.14.0 RC2
    • Fix Version/s: None
    • Component/s: Core: Event loop, Core: I/O
    • Labels:
      None
    • Environment:
      Qt5.14.2
      Os : Kubuntu 20.04
      QMake version 3.1
      Using Qt version 5.14.2 in /home/allen/soft/Qt5.14.2/5.14.2/gcc_64/lib
      gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
      g++ (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
    • Platform/s:
      Linux/X11

      Description

      #include <QCoreApplication>
       #include <iostream>
       bool test(){
       for(int i=0;i<10;i++)
      
      { std::cout<<"i "<<std::endl; }
      
      }
      
      int main(int argc, char *argv[])
       {
       QCoreApplication a(argc, argv);
      
      test();
      
      return a.exec();
       }
      

       

      output :

      i 
      i 
      i 
      i 
      i 
      i 
      i 
      i 
      i 
      i 
      i 
      i 
      i 
      i 
      i 
      i 
      i 
      i 
      i 
      i 
      i 
      i 
      i 
      i 
      i 
      i 
      i 
      i 
      i 
      i 
      i 
      i 
      i 
      i 
      i 
      i 
      i
      

        Attachments

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

          Activity

            People

            Assignee:
            thiago Thiago Macieira
            Reporter:
            edwardallen Edward Allen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes