Changeset View
Changeset View
Standalone View
Standalone View
outputscreens.cpp
Show First 20 Lines • Show All 96 Lines • ▼ Show 20 Line(s) | |||||
97 | 97 | | |||
98 | Qt::ScreenOrientation OutputScreens::orientation(int screen) const | 98 | Qt::ScreenOrientation OutputScreens::orientation(int screen) const | ||
99 | { | 99 | { | ||
100 | if (AbstractOutput *output = findOutput(screen)) { | 100 | if (AbstractOutput *output = findOutput(screen)) { | ||
101 | return output->orientation(); | 101 | return output->orientation(); | ||
102 | } | 102 | } | ||
103 | return Qt::PrimaryOrientation; | 103 | return Qt::PrimaryOrientation; | ||
104 | } | 104 | } | ||
105 | int OutputScreens::rotation(int screen) const | ||||
106 | { | ||||
107 | auto output = m_platform->enabledOutputs().value(screen, nullptr); | ||||
zzag: I know that you follow the rest of the code, but could you please rename this variable? | |||||
108 | if (!output) { | ||||
109 | return 0; | ||||
zzag: return 0 | |||||
110 | } | ||||
111 | return output->softwareRotationAngle(); | ||||
112 | } | ||||
105 | 113 | | |||
106 | void OutputScreens::updateCount() | 114 | void OutputScreens::updateCount() | ||
107 | { | 115 | { | ||
108 | setCount(m_platform->enabledOutputs().size()); | 116 | setCount(m_platform->enabledOutputs().size()); | ||
109 | } | 117 | } | ||
110 | 118 | | |||
111 | int OutputScreens::number(const QPoint &pos) const | 119 | int OutputScreens::number(const QPoint &pos) const | ||
112 | { | 120 | { | ||
Show All 26 Lines |
I know that you follow the rest of the code, but could you please rename this variable?
According to the Frameworks coding style, one shall not use short variable names.