From kde-commits Fri Nov 30 22:12:39 2012 From: David Faure Date: Fri, 30 Nov 2012 22:12:39 +0000 To: kde-commits Subject: [kdelibs/frameworks] tier1/kwindowsystem/src: Fix compilation in the kwindowsystem framework Message-Id: <20121130221239.8146BA60C8 () git ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=135431360917702 Git commit bf4eb107cc365a28c9d01fd1a0a7fdb76da4d133 by David Faure. Committed on 30/11/2012 at 19:38. Pushed by dfaure into branch 'frameworks'. Fix compilation in the kwindowsystem framework M +11 -24 tier1/kwindowsystem/src/kmanagerselection.cpp M +3 -3 tier1/kwindowsystem/src/kmanagerselection.h http://commits.kde.org/kdelibs/bf4eb107cc365a28c9d01fd1a0a7fdb76da4d133 diff --git a/tier1/kwindowsystem/src/kmanagerselection.cpp b/tier1/kwindows= ystem/src/kmanagerselection.cpp index 4e67549..4d8bad3 100644 --- a/tier1/kwindowsystem/src/kmanagerselection.cpp +++ b/tier1/kwindowsystem/src/kmanagerselection.cpp @@ -24,19 +24,7 @@ DEALINGS IN THE SOFTWARE. = #include "kmanagerselection.h" = -#include - -#if HAVE_SYS_TYPES_H -#include -#endif - -#if HAVE_SYS_TIME_H -#include -#endif - -#if HAVE_UNISTD_H -#include -#endif +#include = #include #include @@ -44,7 +32,6 @@ DEALINGS IN THE SOFTWARE. = #include #include -#include = static xcb_window_t get_selection_owner(xcb_connection_t *c, xcb_atom_t se= lection) { @@ -167,7 +154,7 @@ void KSelectionOwner::Private::claimSucceeded() = // kDebug() << "Claimed selection"; = - emit owner->claimedOwnership(); + Q_EMIT owner->claimedOwnership(); } = void KSelectionOwner::Private::gotTimestamp() @@ -189,7 +176,7 @@ void KSelectionOwner::Private::gotTimestamp() timestamp =3D XCB_CURRENT_TIME; window =3D XCB_NONE; = - emit owner->failedToClaimOwnership(); + Q_EMIT owner->failedToClaimOwnership(); return; } = @@ -225,7 +212,7 @@ void KSelectionOwner::Private::timeout() return; } = - emit owner->failedToClaimOwnership(); + Q_EMIT owner->failedToClaimOwnership(); } = void KSelectionOwner::claim(bool force_P, bool force_kill_P) @@ -246,7 +233,7 @@ void KSelectionOwner::claim(bool force_P, bool force_ki= ll_P) if (!force_P) { // kDebug() << "Selection already owned, failing"; - emit failedToClaimOwnership(); + Q_EMIT failedToClaimOwnership(); return; } = @@ -326,7 +313,7 @@ bool KSelectionOwner::filterEvent( void* ev_P ) // kDebug() << "Lost selection"; = xcb_window_t window =3D d->window; - emit lostOwnership(); + Q_EMIT lostOwnership(); = // Unset the event mask before we destroy the window so we don't g= et a destroy event uint32_t event_mask =3D XCB_NONE; @@ -353,7 +340,7 @@ bool KSelectionOwner::filterEvent( void* ev_P ) = d->timestamp =3D XCB_CURRENT_TIME; // kDebug() << "Lost selection (destroyed)"; - emit lostOwnership(); + Q_EMIT lostOwnership(); return true; } case XCB_SELECTION_NOTIFY: @@ -430,11 +417,11 @@ void KSelectionOwner::filter_selection_request( void*= event ) xcb_atom_t *atoms =3D reinterpret_cast(xcb_g= et_property_value(reply)); bool handled_array[MAX_ATOMS]; = - for (int i =3D 0; i < reply->value_len / 2; i++) + for (uint i =3D 0; i < reply->value_len / 2; i++) handled_array[i] =3D handle_selection(atoms[i * 2], at= oms[i * 2 + 1], ev->requestor); = bool all_handled =3D true; - for (int i =3D 0; i < reply->value_len / 2; i++) { + for (uint i =3D 0; i < reply->value_len / 2; i++) { if (!handled_array[i]) { all_handled =3D false; atoms[i * 2 + 1] =3D XCB_NONE; @@ -645,7 +632,7 @@ xcb_window_t KSelectionWatcher::owner() = if (!err && current_owner =3D=3D new_owner) { d->selection_owner =3D current_owner; - emit newOwner(d->selection_owner); + Q_EMIT newOwner(d->selection_owner); } else { // ### This doesn't look right - the selection could have an owner d->selection_owner =3D XCB_NONE; @@ -681,7 +668,7 @@ void KSelectionWatcher::filterEvent(void* ev_P) d->selection_owner =3D XCB_NONE; // in case the exactly same ID ge= ts reused as the owner = if (owner() =3D=3D XCB_NONE) - emit lostOwner(); // it must be safe to delete 'this' in a slot + Q_EMIT lostOwner(); // it must be safe to delete 'this' in a s= lot return; } } diff --git a/tier1/kwindowsystem/src/kmanagerselection.h b/tier1/kwindowsys= tem/src/kmanagerselection.h index e931e26..8df8ead 100644 --- a/tier1/kwindowsystem/src/kmanagerselection.h +++ b/tier1/kwindowsystem/src/kmanagerselection.h @@ -25,7 +25,7 @@ DEALINGS IN THE SOFTWARE. #ifndef KMANAGERSELECTION_H #define KMANAGERSELECTION_H = -#include +#include #include = #include @@ -39,7 +39,7 @@ DEALINGS IN THE SOFTWARE. is claimed by another owner. @short ICCCM manager selection owner */ -class KDEUI_EXPORT KSelectionOwner +class KWINDOWSYSTEM_EXPORT KSelectionOwner : public QObject { Q_OBJECT @@ -179,7 +179,7 @@ class KDEUI_EXPORT KSelectionOwner out current owner of the selection, owner() can be used. @short ICCCM manager selection watching */ -class KDEUI_EXPORT KSelectionWatcher +class KWINDOWSYSTEM_EXPORT KSelectionWatcher : public QObject { Q_OBJECT