Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:rhabacker:branches:windows:mingw
kio
0001-KACLListViewItem-calcEffectiveRights-prope...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-KACLListViewItem-calcEffectiveRights-properly-cast-f.patch of Package kio
From 38741681d58dd217895064eeab36e90b6099115c Mon Sep 17 00:00:00 2001 From: "Friedrich W. H. Kossebau" <kossebau@kde.org> Date: Thu, 12 Nov 2020 01:21:22 +0100 Subject: [PATCH 1/1] KACLListViewItem::calcEffectiveRights(): properly cast from char to QChar QT_NO_CAST_FROM_ASCII can break code without the compiler warning about when one assigns chars > 127 to a QCharRef. Because instead of the no longer available char argument overload the int overload is used: QCharRef &QCharRefoperator=(int rc) which then gets bad negative values passed after the implicit cast. Never happens here but better safe than sorry, also preparing for the case future Qt properly catches a left-over assignment from a char type to a QCharRef. NO_CHANGELOG --- src/widgets/kacleditwidget.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/widgets/kacleditwidget.cpp b/src/widgets/kacleditwidget.cpp index 51f8bcf3..29dd033f 100644 --- a/src/widgets/kacleditwidget.cpp +++ b/src/widgets/kacleditwidget.cpp @@ -304,9 +304,9 @@ void KACLListViewItem::calcEffectiveRights() || type == KACLListView::NamedGroup) && !isDefault) { - strEffective[0] = (m_pACLListView->maskPermissions() & value & ACL_READ) ? 'r' : '-'; - strEffective[1] = (m_pACLListView->maskPermissions() & value & ACL_WRITE) ? 'w' : '-'; - strEffective[2] = (m_pACLListView->maskPermissions() & value & ACL_EXECUTE) ? 'x' : '-'; + strEffective[0] = QLatin1Char((m_pACLListView->maskPermissions() & value & ACL_READ) ? 'r' : '-'); + strEffective[1] = QLatin1Char((m_pACLListView->maskPermissions() & value & ACL_WRITE) ? 'w' : '-'); + strEffective[2] = QLatin1Char((m_pACLListView->maskPermissions() & value & ACL_EXECUTE) ? 'x' : '-'); /* // What about any partial perms? if ( maskPerms & partialPerms & ACL_READ || // Partial perms on entry @@ -324,9 +324,9 @@ void KACLListViewItem::calcEffectiveRights() */ } else { // No, the effective value are just the value in this entry - strEffective[0] = (value & ACL_READ) ? 'r' : '-'; - strEffective[1] = (value & ACL_WRITE) ? 'w' : '-'; - strEffective[2] = (value & ACL_EXECUTE) ? 'x' : '-'; + strEffective[0] = QLatin1Char((value & ACL_READ) ? 'r' : '-'); + strEffective[1] = QLatin1Char((value & ACL_WRITE) ? 'w' : '-'); + strEffective[2] = QLatin1Char((value & ACL_EXECUTE) ? 'x' : '-'); /* // What about any partial perms? -- 2.32.0
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor