mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-23 18:32:50 +00:00
kwin: const-ify iterator values where possible
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
6cc1c2b782
commit
ca6280368c
4 changed files with 15 additions and 9 deletions
|
@ -894,7 +894,7 @@ QRect Client::iconGeometry() const
|
||||||
return geom;
|
return geom;
|
||||||
else {
|
else {
|
||||||
// Check all mainwindows of this window (recursively)
|
// Check all mainwindows of this window (recursively)
|
||||||
foreach (Client * mainwin, mainClients()) {
|
foreach (const Client * mainwin, mainClients()) {
|
||||||
geom = mainwin->iconGeometry();
|
geom = mainwin->iconGeometry();
|
||||||
if (geom.isValid())
|
if (geom.isValid())
|
||||||
return geom;
|
return geom;
|
||||||
|
|
|
@ -115,10 +115,16 @@ void StartupFeedbackEffect::start(const QString& icon)
|
||||||
QCursor cursor = QCursor(Qt::WaitCursor);
|
QCursor cursor = QCursor(Qt::WaitCursor);
|
||||||
|
|
||||||
xcb_connection_t *c = connection();
|
xcb_connection_t *c = connection();
|
||||||
ScopedCPointer<xcb_grab_pointer_reply_t> grabPointer(xcb_grab_pointer_reply(c, xcb_grab_pointer_unchecked(c, false, rootWindow(),
|
ScopedCPointer<xcb_grab_pointer_reply_t> grabPointer(
|
||||||
XCB_EVENT_MASK_NO_EVENT,
|
xcb_grab_pointer_reply(
|
||||||
XCB_GRAB_MODE_ASYNC, XCB_GRAB_MODE_ASYNC, XCB_WINDOW_NONE,
|
c,
|
||||||
cursor.handle(), XCB_TIME_CURRENT_TIME), NULL));
|
xcb_grab_pointer_unchecked(c, false, rootWindow(),
|
||||||
|
XCB_EVENT_MASK_NO_EVENT,
|
||||||
|
XCB_GRAB_MODE_ASYNC, XCB_GRAB_MODE_ASYNC, XCB_WINDOW_NONE,
|
||||||
|
cursor.handle(), XCB_TIME_CURRENT_TIME),
|
||||||
|
NULL
|
||||||
|
)
|
||||||
|
);
|
||||||
if (grabPointer.isNull() || grabPointer->status != XCB_GRAB_STATUS_SUCCESS) {
|
if (grabPointer.isNull() || grabPointer->status != XCB_GRAB_STATUS_SUCCESS) {
|
||||||
kWarning() << "could not grab pointer";
|
kWarning() << "could not grab pointer";
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -124,8 +124,8 @@ void DecorationModel::findDecorations()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
KService::List offers = KServiceTypeTrader::self()->query("KWin/Decoration");
|
const KService::List offers = KServiceTypeTrader::self()->query("KWin/Decoration");
|
||||||
foreach (KService::Ptr service, offers) {
|
foreach (const KService::Ptr service, offers) {
|
||||||
DecorationModelData data;
|
DecorationModelData data;
|
||||||
data.name = service->name();
|
data.name = service->name();
|
||||||
data.libraryName = "kwin3_aurorae";
|
data.libraryName = "kwin3_aurorae";
|
||||||
|
|
|
@ -183,8 +183,8 @@ static QString attributeString(KWin::AnimationEffect::Attribute attribute)
|
||||||
QList<AniData> AniData::list(const QString &str)
|
QList<AniData> AniData::list(const QString &str)
|
||||||
{
|
{
|
||||||
QList<AniData> newList;
|
QList<AniData> newList;
|
||||||
QStringList list = str.split(';', QString::SkipEmptyParts);
|
QStringList strlist = str.split(';', QString::SkipEmptyParts);
|
||||||
foreach (const QString &astr, list) {
|
foreach (const QString &astr, strlist) {
|
||||||
newList << AniData(astr);
|
newList << AniData(astr);
|
||||||
if (newList.last().duration < 0)
|
if (newList.last().duration < 0)
|
||||||
newList.removeLast();
|
newList.removeLast();
|
||||||
|
|
Loading…
Add table
Reference in a new issue