QActionPrivate::QActionPrivate() : group(0), enabled(1),
- visible(1), checkable(0), checked(0), separator(0), fontSet(false),
+ visible(1), checkable(0), checked(0), separator(0),
menuRole(QAction::TextHeuristicRole),
priority(QAction::NormalPriority)
{
if (d->font == font)
return;
- d->fontSet = true;
d->font = font;
d->sendDataChanged();
}
uint checkable : 1;
uint checked : 1;
uint separator : 1;
- uint fontSet : 1;
QFont font;
QPointer<QMenu> menu;
"to get the screen geometry of a null widget");
return QRect();
}
- QRect rect = QWidgetPrivate::screenGeometry(widget);
+ const QRect rect = QWidgetPrivate::screenGeometry(widget);
if (rect.isNull())
return screenGeometry(screenNumber(widget));
- else return rect;
+ return rect;
}
const QRect QDesktopWidget::availableGeometry(const QWidget *widget) const
"to get the available geometry of a null widget");
return QRect();
}
- QRect rect = QWidgetPrivate::screenGeometry(widget);
+ const QRect rect = QWidgetPrivate::screenGeometry(widget);
if (rect.isNull())
return availableGeometry(screenNumber(widget));
- else
- return rect;
+ return rect;
}
QT_END_NAMESPACE
Starts the drag and drop operation and returns a value indicating the requested
drop action when it is completed. The drop actions that the user can choose
- from are specified in \a supportedActions. The default proposed action will be selected
- among the allowed actions in the following order: Move, Copy and Link.
-
- \bold{Note:} On Linux and Mac OS X, the drag and drop operation
- can take some time, but this function does not block the event
- loop. Other events are still delivered to the application while
- the operation is performed. On Windows, the Qt event loop is
- blocked while during the operation.
-*/
-
-Qt::DropAction QDrag::exec(Qt::DropActions supportedActions)
-{
- return exec(supportedActions, Qt::IgnoreAction);
-}
-
-/*!
- \since 4.3
-
- Starts the drag and drop operation and returns a value indicating the requested
- drop action when it is completed. The drop actions that the user can choose
from are specified in \a supportedActions.
The \a defaultDropAction determines which action will be proposed when the user performs a
QWidget *target() const;
Qt::DropAction start(Qt::DropActions supportedActions = Qt::CopyAction);
- Qt::DropAction exec(Qt::DropActions supportedActions = Qt::MoveAction);
- Qt::DropAction exec(Qt::DropActions supportedActions, Qt::DropAction defaultAction);
+ Qt::DropAction exec(Qt::DropActions supportedActions = Qt::MoveAction,
+ Qt::DropAction defaultAction = Qt::IgnoreAction);
void setDragCursor(const QPixmap &cursor, Qt::DropAction action);
return Qt::Alignment((alignment & ~(Qt::AlignLeft | Qt::AlignRight | Qt::AlignAbsolute))
| ((alignment & Qt::AlignRight) ? Qt::AlignLeft : 0)
| ((alignment & Qt::AlignLeft) ? Qt::AlignRight : 0));
- } else {
- return alignment & ~Qt::AlignAbsolute;
}
+ return alignment & ~Qt::AlignAbsolute;
}
static int storageIndexFromLayoutItem(const QFormLayoutPrivate::ItemMatrix &m,
setCheckable(action->isCheckable());
setChecked(action->isChecked());
setEnabled(action->isEnabled());
- if (action->d_func()->fontSet)
- setFont(action->font());
+ setFont(action->font());
}