From kde-core-devel Fri Nov 05 06:26:47 2004 From: Ismail Donmez Date: Fri, 05 Nov 2004 06:26:47 +0000 To: kde-core-devel Subject: [PATCH] Fix deprecated warnings in klistview.cpp Message-Id: <200411050826.47690.kde () myrealbox ! com> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=109963602427386 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--Boundary-00=_n0xiBlUwqV5cjCa" --Boundary-00=_n0xiBlUwqV5cjCa Content-Type: text/plain; charset="iso-8859-9" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi all, Attached a small patch which replaces KApplication::keyboardModifiers() with KApplication::keyboardMouseState() in klistview.cpp to fix deprecated warnings. Can someone please review? Regards, ismail --Boundary-00=_n0xiBlUwqV5cjCa Content-Type: text/x-diff; charset="iso-8859-9"; name="klistview_deprec.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="klistview_deprec.patch" =2D-- klistview.cpp.~1.238.~ 2004-11-04 20:17:05.000000000 +0200 +++ klistview.cpp 2004-11-05 08:24:51.000000000 +0200 @@ -581,19 +581,19 @@ if( !hasFocus() ) setFocus(); =20 =2D uint keybstate =3D KApplication::keyboardModifiers(); + uint keybstate =3D KApplication::keyboardMouseState(); =20 QListViewItem* previousItem =3D currentItem(); setCurrentItem( d->pCurrentItem ); =20 if( d->pCurrentItem ) { //Shift pressed? =2D if( (keybstate & KApplication::ShiftModifier) ) { + if(keybstate =3D=3D Qt::ShiftButton) { bool block =3D signalsBlocked(); blockSignals( true ); =20 //No Ctrl? Then clear before! =2D if( !(keybstate & KApplication::ControlModifier) ) + if(keybstate !=3D Qt::ControlButton) clearSelection(); =20 bool select =3D !d->pCurrentItem->isSelected(); @@ -665,12 +665,12 @@ } else { =2D uint keybstate =3D KApplication::keyboardModifiers(); + uint keybstate =3D KApplication::keyboardMouseState(); =20 d->autoSelect.stop(); =20 //Don=B4t emit executed if in SC mode and Shift or Ctrl are pr= essed =2D if( !( ((keybstate & KApplication::ShiftModifier) || (keybst= ate & KApplication::ControlModifier)) ) ) { + if( !((keybstate =3D=3D Qt::ShiftButton) || (keybstate =3D=3D = Qt::ControlButton)) ) { viewport()->unsetCursor(); emit executed( item ); emit executed( item, pos, c ); --Boundary-00=_n0xiBlUwqV5cjCa--