Remove qFind usages from the XCB plugin
QtAlgorithms is getting deprecated, see http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: Ieccef12c617276d0526ce2876fd76e37b4240a43 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>bb10
parent
fdbabc4f03
commit
6c88be2af2
|
|
@ -53,12 +53,13 @@
|
|||
#include "qxcbintegration.h"
|
||||
#include "qxcbsystemtraytracker.h"
|
||||
|
||||
#include <QtAlgorithms>
|
||||
#include <QSocketNotifier>
|
||||
#include <QAbstractEventDispatcher>
|
||||
#include <QTimer>
|
||||
#include <QByteArray>
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include <dlfcn.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
|
@ -1421,7 +1422,7 @@ static const char * xcb_atomnames = {
|
|||
|
||||
QXcbAtom::Atom QXcbConnection::qatom(xcb_atom_t xatom) const
|
||||
{
|
||||
return static_cast<QXcbAtom::Atom>(qFind(m_allAtoms, m_allAtoms + QXcbAtom::NAtoms, xatom) - m_allAtoms);
|
||||
return static_cast<QXcbAtom::Atom>(std::find(m_allAtoms, m_allAtoms + QXcbAtom::NAtoms, xatom) - m_allAtoms);
|
||||
}
|
||||
|
||||
void QXcbConnection::initializeAllAtoms() {
|
||||
|
|
|
|||
|
|
@ -57,6 +57,8 @@
|
|||
|
||||
#include <qpa/qplatformintegration.h>
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
// FIXME This workaround can be removed for xcb-icccm > 3.8
|
||||
#define class class_name
|
||||
#include <xcb/xcb_icccm.h>
|
||||
|
|
@ -779,21 +781,21 @@ QXcbWindow::NetWmStates QXcbWindow::netWmStates()
|
|||
if (reply && reply->format == 32 && reply->type == XCB_ATOM_ATOM) {
|
||||
const xcb_atom_t *states = static_cast<const xcb_atom_t *>(xcb_get_property_value(reply));
|
||||
const xcb_atom_t *statesEnd = states + reply->length;
|
||||
if (statesEnd != qFind(states, statesEnd, atom(QXcbAtom::_NET_WM_STATE_ABOVE)))
|
||||
if (statesEnd != std::find(states, statesEnd, atom(QXcbAtom::_NET_WM_STATE_ABOVE)))
|
||||
result |= NetWmStateAbove;
|
||||
if (statesEnd != qFind(states, statesEnd, atom(QXcbAtom::_NET_WM_STATE_BELOW)))
|
||||
if (statesEnd != std::find(states, statesEnd, atom(QXcbAtom::_NET_WM_STATE_BELOW)))
|
||||
result |= NetWmStateBelow;
|
||||
if (statesEnd != qFind(states, statesEnd, atom(QXcbAtom::_NET_WM_STATE_FULLSCREEN)))
|
||||
if (statesEnd != std::find(states, statesEnd, atom(QXcbAtom::_NET_WM_STATE_FULLSCREEN)))
|
||||
result |= NetWmStateFullScreen;
|
||||
if (statesEnd != qFind(states, statesEnd, atom(QXcbAtom::_NET_WM_STATE_MAXIMIZED_HORZ)))
|
||||
if (statesEnd != std::find(states, statesEnd, atom(QXcbAtom::_NET_WM_STATE_MAXIMIZED_HORZ)))
|
||||
result |= NetWmStateMaximizedHorz;
|
||||
if (statesEnd != qFind(states, statesEnd, atom(QXcbAtom::_NET_WM_STATE_MAXIMIZED_VERT)))
|
||||
if (statesEnd != std::find(states, statesEnd, atom(QXcbAtom::_NET_WM_STATE_MAXIMIZED_VERT)))
|
||||
result |= NetWmStateMaximizedVert;
|
||||
if (statesEnd != qFind(states, statesEnd, atom(QXcbAtom::_NET_WM_STATE_MODAL)))
|
||||
if (statesEnd != std::find(states, statesEnd, atom(QXcbAtom::_NET_WM_STATE_MODAL)))
|
||||
result |= NetWmStateModal;
|
||||
if (statesEnd != qFind(states, statesEnd, atom(QXcbAtom::_NET_WM_STATE_STAYS_ON_TOP)))
|
||||
if (statesEnd != std::find(states, statesEnd, atom(QXcbAtom::_NET_WM_STATE_STAYS_ON_TOP)))
|
||||
result |= NetWmStateStaysOnTop;
|
||||
if (statesEnd != qFind(states, statesEnd, atom(QXcbAtom::_NET_WM_STATE_DEMANDS_ATTENTION)))
|
||||
if (statesEnd != std::find(states, statesEnd, atom(QXcbAtom::_NET_WM_STATE_DEMANDS_ATTENTION)))
|
||||
result |= NetWmStateDemandsAttention;
|
||||
free(reply);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue