Skip to content

Commit

Permalink
Merge pull request #4395 from Be-ing/coreservices_qt6
Browse files Browse the repository at this point in the history
CoreServices Qt6 build fixes
  • Loading branch information
uklotzde authored Oct 13, 2021
2 parents b5542af + a5e548d commit df8b741
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/coreservices.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include <QApplication>
#include <QFileDialog>
#include <QPushButton>
#include <QStandardPaths>

#ifdef __BROADCAST__
#include "broadcast/broadcastmanager.h"
Expand Down Expand Up @@ -42,7 +43,7 @@
#include "util/sandbox.h"
#endif

#if defined(Q_OS_LINUX)
#if defined(Q_OS_LINUX) && QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
#include <X11/Xlib.h>
#include <X11/Xlibint.h>

Expand Down Expand Up @@ -74,7 +75,7 @@ void clearHelper(std::shared_ptr<T>& ref_ptr, const char* name) {

// hack around https://gitlab.freedesktop.org/xorg/lib/libx11/issues/25
// https://bugs.launchpad.net/mixxx/+bug/1805559
#if defined(Q_OS_LINUX)
#if defined(Q_OS_LINUX) && QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
typedef Bool (*WireToErrorType)(Display*, XErrorEvent*, xError*);

constexpr int NUM_HANDLERS = 256;
Expand Down Expand Up @@ -218,7 +219,7 @@ void CoreServices::initialize(QApplication* pApp) {

VersionStore::logBuildDetails();

#if defined(Q_OS_LINUX)
#if defined(Q_OS_LINUX) && QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
// XESetWireToError will segfault if running as a Wayland client
if (pApp->platformName() == QLatin1String("xcb")) {
for (auto i = 0; i < NUM_HANDLERS; ++i) {
Expand Down

0 comments on commit df8b741

Please sign in to comment.