uisupport: Join channels on doubleclick on all but Windows and OSX
authorManuel Nickschas <sputnick@quassel-irc.org>
Tue, 27 Feb 2018 09:23:39 +0000 (10:23 +0100)
committerManuel Nickschas <sputnick@quassel-irc.org>
Wed, 4 Apr 2018 21:14:04 +0000 (23:14 +0200)
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)

src/uisupport/bufferview.cpp

index f14cff2..4015d13 100644 (file)
@@ -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
 }