Details
-
Bug
-
Resolution: Unresolved
-
P5: Not important
-
None
-
4.7.4, 5.1.0 RC1
-
None
-
Windows 7 x64
Description
If you want to construct a QList "inline" and send it as an argument to a function, it looks like this:
(...)
fooFunction(QList<int>() << 1 << 2 << 3 << 10);
(...)
but you cannot do the same thing with QQueue, though it subclasses QList:
void function(QQueue<int> queue) { return; } int main(int argc, char *argv[]) { // QQueue<int> queue; // queue.enqueue(2); // queue.enqueue(4); // function(queue); // this and the above will compile, but it's more cumbersome to write function(QQueue<int>() << 2 << 4); // this wont compile return 0; }
Is it an expected behavior or a bug? I'd really like to be able to construct QQueues like QLists.