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;
|
||||
else {
|
||||
// Check all mainwindows of this window (recursively)
|
||||
foreach (Client * mainwin, mainClients()) {
|
||||
foreach (const Client * mainwin, mainClients()) {
|
||||
geom = mainwin->iconGeometry();
|
||||
if (geom.isValid())
|
||||
return geom;
|
||||
|
|
|
@ -115,10 +115,16 @@ void StartupFeedbackEffect::start(const QString& icon)
|
|||
QCursor cursor = QCursor(Qt::WaitCursor);
|
||||
|
||||
xcb_connection_t *c = connection();
|
||||
ScopedCPointer<xcb_grab_pointer_reply_t> grabPointer(xcb_grab_pointer_reply(c, 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));
|
||||
ScopedCPointer<xcb_grab_pointer_reply_t> grabPointer(
|
||||
xcb_grab_pointer_reply(
|
||||
c,
|
||||
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) {
|
||||
kWarning() << "could not grab pointer";
|
||||
return;
|
||||
|
|
|
@ -124,8 +124,8 @@ void DecorationModel::findDecorations()
|
|||
}
|
||||
}
|
||||
}
|
||||
KService::List offers = KServiceTypeTrader::self()->query("KWin/Decoration");
|
||||
foreach (KService::Ptr service, offers) {
|
||||
const KService::List offers = KServiceTypeTrader::self()->query("KWin/Decoration");
|
||||
foreach (const KService::Ptr service, offers) {
|
||||
DecorationModelData data;
|
||||
data.name = service->name();
|
||||
data.libraryName = "kwin3_aurorae";
|
||||
|
|
|
@ -183,8 +183,8 @@ static QString attributeString(KWin::AnimationEffect::Attribute attribute)
|
|||
QList<AniData> AniData::list(const QString &str)
|
||||
{
|
||||
QList<AniData> newList;
|
||||
QStringList list = str.split(';', QString::SkipEmptyParts);
|
||||
foreach (const QString &astr, list) {
|
||||
QStringList strlist = str.split(';', QString::SkipEmptyParts);
|
||||
foreach (const QString &astr, strlist) {
|
||||
newList << AniData(astr);
|
||||
if (newList.last().duration < 0)
|
||||
newList.removeLast();
|
||||
|
|
Loading…
Add table
Reference in a new issue