From: Manuel Nickschas Date: Tue, 27 Feb 2018 09:23:39 +0000 (+0100) Subject: uisupport: Join channels on doubleclick on all but Windows and OSX X-Git-Tag: 0.12.5~18 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=007ec4a7ee83c9ae868fab1b7e5322d4a5081b5e 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. (cherry picked from commit deaa4151758de4f22d1f7c113c50af0ffc6ae587) --- diff --git a/src/uisupport/bufferview.cpp b/src/uisupport/bufferview.cpp index f14cff2c..4015d13a 100644 --- a/src/uisupport/bufferview.cpp +++ b/src/uisupport/bufferview.cpp @@ -88,14 +88,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 }