From deaa4151758de4f22d1f7c113c50af0ffc6ae587 Mon Sep 17 00:00:00 2001 From: Manuel Nickschas Date: Tue, 27 Feb 2018 10:23:39 +0100 Subject: [PATCH] uisupport: Join channels on doubleclick on all but Windows and OSX The Q_WS_* macros no longer exist in Qt5, so the OS detection for the click behavior in bufferviews didn't work correctly. Use the correct Q_OS_* macros to ensure that a doubleclick is required on platforms other than Windows and OSX. --- src/uisupport/bufferview.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/uisupport/bufferview.cpp b/src/uisupport/bufferview.cpp index 700e7a9d..7986118b 100644 --- a/src/uisupport/bufferview.cpp +++ b/src/uisupport/bufferview.cpp @@ -89,14 +89,13 @@ void BufferView::init() setSortingEnabled(true); sortByColumn(0, Qt::AscendingOrder); - // activated() fails on X11 and Qtopia at least -#if defined Q_WS_QWS || defined Q_WS_X11 - disconnect(this, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(joinChannel(QModelIndex))); - connect(this, SIGNAL(doubleClicked(QModelIndex)), SLOT(joinChannel(QModelIndex))); -#else +#if defined Q_OS_MACOS || defined Q_OS_WIN // afaik this is better on Mac and Windows disconnect(this, SIGNAL(activated(QModelIndex)), this, SLOT(joinChannel(QModelIndex))); connect(this, SIGNAL(activated(QModelIndex)), SLOT(joinChannel(QModelIndex))); +#else + disconnect(this, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(joinChannel(QModelIndex))); + connect(this, SIGNAL(doubleClicked(QModelIndex)), SLOT(joinChannel(QModelIndex))); #endif } -- 2.20.1