Logo Search packages:      
Sourcecode: qt4-x11 version File versions

template<class T>
T QStack< T >::pop (  )  [inline]

Removes the top item from the stack and returns it. This function assumes that the stack isn't empty.

See also:
top(), push(), isEmpty()

Definition at line 46 of file qstack.h.

References QVector< T >::data(), QVector< T >::isEmpty(), QVector< T >::resize(), and QVector< T >::size().

Referenced by QTreeWidgetItem::clone(), QTreeWidgetItem::insertChild(), QTreeWidgetItem::insertChildren(), Q3ListViewItem::itemPos(), QTreeView::keyPressEvent(), Q3TextEdit::optimParseTags(), Q3ListViewItem::setOpen(), QTreeWidgetItem::takeChild(), and QTreeWidgetItem::takeChildren().

{ Q_ASSERT(!this->isEmpty()); T t = this->data()[this->size() -1];
  this->resize(this->size()-1); return t; }


Generated by  Doxygen 1.6.0   Back to index