mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 12:40:35 +01:00
Replace foreach function by for, please try and report problem
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4900 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -96,7 +96,7 @@ void QetGraphicsItem::mousePressEvent(QGraphicsSceneMouseEvent *e)
|
||||
{
|
||||
//Disable views context menu
|
||||
if (scene())
|
||||
foreach (QGraphicsView *view, scene()->views())
|
||||
for (QGraphicsView *view: scene()->views())
|
||||
view->setContextMenuPolicy(Qt::NoContextMenu);
|
||||
|
||||
first_move_ = true;
|
||||
@@ -164,6 +164,6 @@ void QetGraphicsItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *e) {
|
||||
//Enable views context menu
|
||||
if (e -> button() == Qt::LeftButton)
|
||||
if (scene())
|
||||
foreach (QGraphicsView *view, scene()->views())
|
||||
for (QGraphicsView *view: scene()->views())
|
||||
view -> setContextMenuPolicy(Qt::DefaultContextMenu);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user