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

The negative value for the capacit of QContiguousCache constructor is accepted

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P4: Low
    • 5.12.0 Alpha
    • 4.8.0
    • Core: I/O
    • None
    • Ubuntu 10.4
    • ecdbaf99a11b8c42632e6cb9786d68464aacc7ec

    Description

      The QContiguousCache constructor takes the (int capacity) as a parameter and constructs the object with the given capacity. Hence it is expected that the capacity can not be negative. However negative values are permitted.

      The steps to reproduce:
      Create an object of QContiguousCache<int> c(-1);

      The actual result:
      the compilation passes, no warning messages regarding the negative capacity is generated

      The expected result:
      The warning or an error should be generated

      Attachments

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

        Activity

          People

            chehrlic Christian Ehrlicher
            hambardz Sergey Hambardzumyan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes