cocoa: use const method more
to avoid implicit detach Change-Id: Ifeea193639f357cc53f8af884ae868a18149fbc8 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
parent
87b5d85641
commit
f5478b8a63
@ -251,7 +251,7 @@ QPixmap QCocoaDrag::dragPixmap(QDrag *drag, QPoint &hotSpot) const
|
||||
}
|
||||
|
||||
if (pm.isNull() && (data->hasText() || data->hasUrls()) ) {
|
||||
QString s = data->hasText() ? data->text() : data->urls().first().toString();
|
||||
QString s = data->hasText() ? data->text() : data->urls().constFirst().toString();
|
||||
if (s.length() > dragImageMaxChars)
|
||||
s = s.left(dragImageMaxChars -3) + QChar(0x2026);
|
||||
if (!s.isEmpty()) {
|
||||
|
@ -62,7 +62,7 @@ void QCocoaMenu::setMinimumWidth(int width)
|
||||
void QCocoaMenu::setFont(const QFont &font)
|
||||
{
|
||||
if (font.resolveMask()) {
|
||||
NSFont *customMenuFont = [NSFont fontWithName:font.families().first().toNSString()
|
||||
NSFont *customMenuFont = [NSFont fontWithName:font.families().constFirst().toNSString()
|
||||
size:font.pointSize()];
|
||||
m_nativeMenu.font = customMenuFont;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user