[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kdelibs/frameworks] tier1/kwindowsystem/src: Fix compilation in the kwindowsystem framework
From: David Faure <faure+bluesystems () kde ! org>
Date: 2012-11-30 22:12:39
Message-ID: 20121130221239.8146BA60C8 () git ! kde ! org
[Download RAW message or body]
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/kwindowsystem/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 <config-kdeui.h>
-
-#if HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
-#if HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-
-#if HAVE_UNISTD_H
-#include <unistd.h>
-#endif
+#include <config-kwindowsystem.h>
#include <QtCore/QObject>
#include <QtCore/QBasicTimer>
@@ -44,7 +32,6 @@ DEALINGS IN THE SOFTWARE.
#include <qx11info_x11.h>
#include <qwidget.h>
-#include <kdebug.h>
static xcb_window_t get_selection_owner(xcb_connection_t *c, xcb_atom_t selection)
{
@@ -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 = XCB_CURRENT_TIME;
window = 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_kill_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 = d->window;
- emit lostOwnership();
+ Q_EMIT lostOwnership();
// Unset the event mask before we destroy the window so we don't get a \
destroy event uint32_t event_mask = XCB_NONE;
@@ -353,7 +340,7 @@ bool KSelectionOwner::filterEvent( void* ev_P )
d->timestamp = 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 = reinterpret_cast<xcb_atom_t \
*>(xcb_get_property_value(reply)); bool handled_array[MAX_ATOMS];
- for (int i = 0; i < reply->value_len / 2; i++)
+ for (uint i = 0; i < reply->value_len / 2; i++)
handled_array[i] = handle_selection(atoms[i * 2], atoms[i * 2 + \
1], ev->requestor);
bool all_handled = true;
- for (int i = 0; i < reply->value_len / 2; i++) {
+ for (uint i = 0; i < reply->value_len / 2; i++) {
if (!handled_array[i]) {
all_handled = false;
atoms[i * 2 + 1] = XCB_NONE;
@@ -645,7 +632,7 @@ xcb_window_t KSelectionWatcher::owner()
if (!err && current_owner == new_owner) {
d->selection_owner = 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 = XCB_NONE;
@@ -681,7 +668,7 @@ void KSelectionWatcher::filterEvent(void* ev_P)
d->selection_owner = XCB_NONE; // in case the exactly same ID gets reused as \
the owner
if (owner() == 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 slot
return;
}
}
diff --git a/tier1/kwindowsystem/src/kmanagerselection.h \
b/tier1/kwindowsystem/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 <kdeui_export.h>
+#include <kwindowsystem_export.h>
#include <QtCore/QObject>
#include <xcb/xcb.h>
@@ -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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic