Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-4362

Creator shows syntax error where there is none

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • Qt Creator 2.3.0
    • Qt Creator 2.2.0-beta
    • C/C++/Obj-C++ Support
    • None
    • Gentoo Linux AMD64. Qt Creator build using Qt 4.7.2.
    • b83932708cb4d5e0f54cd01ecf9a5c50c7ecb2b0

    Description

      Qt Creator 2.2.0 beta shows syntax errors (underlines them with red) with code that is actually correct. The code below triggers the bug.

      {{
      class Task {
      private:
      int mStartTime;
      int mEndTime;

      public:
      bool overlaps(const Task& t) const

      { if (t.mStartTime == this->mStartTime or t.mEndTime == this->mEndTime) return true; if (t.mStartTime < this->mStartTime and t.mEndTime > this->mStartTime) return true; if (t.mStartTime < this->mEndTime and t.mEndTime > this->mEndTime) return true; if (t.mStartTime > this->mStartTime and t.mEndTime < this->mEndTime) return true; return false; }

      };
      }}

      Attachments

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

        Activity

          People

            erikv Erik Verbruggen
            realnc Nikos Chantziaras
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes