From: Manuel Nickschas Date: Tue, 27 Feb 2018 09:59:52 +0000 (+0100) Subject: uisupport: Also fix doubleclick in nick views X-Git-Tag: travis-deploy-test~186 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=fe155e87ffa75bf4c13ae40311b029adba706816;hp=deaa4151758de4f22d1f7c113c50af0ffc6ae587 uisupport: Also fix doubleclick in nick views Since the Q_WS_* macros no longer exist in Qt5, replace them by the appropriate Q_OS_* macros. Remove some needless ones, too. --- diff --git a/src/qtui/qtui.cpp b/src/qtui/qtui.cpp index c7ac25f8..bcf8c024 100644 --- a/src/qtui/qtui.cpp +++ b/src/qtui/qtui.cpp @@ -33,10 +33,6 @@ #include "types.h" #include "util.h" -#ifdef Q_WS_X11 -# include -#endif - QtUi *QtUi::_instance = 0; MainWin *QtUi::_mainWin = 0; QList QtUi::_notificationBackends; diff --git a/src/uisupport/clearablelineedit.cpp b/src/uisupport/clearablelineedit.cpp index 5278aef0..7e0dc8d2 100644 --- a/src/uisupport/clearablelineedit.cpp +++ b/src/uisupport/clearablelineedit.cpp @@ -29,9 +29,7 @@ ClearableLineEdit::ClearableLineEdit(QWidget *parent) { clearButton = new QToolButton(this); clearButton->setIcon(QIcon::fromTheme("edit-clear-locationbar-rtl", QIcon::fromTheme("edit-clear"))); -#ifndef Q_WS_QWS clearButton->setCursor(Qt::ArrowCursor); -#endif clearButton->setStyleSheet("QToolButton { border: none; padding: 0px; }"); clearButton->hide(); diff --git a/src/uisupport/nickview.cpp b/src/uisupport/nickview.cpp index 31359c0e..3afab5a3 100644 --- a/src/uisupport/nickview.cpp +++ b/src/uisupport/nickview.cpp @@ -53,11 +53,11 @@ NickView::NickView(QWidget *parent) connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), SLOT(showContextMenu(const QPoint &))); -#if defined Q_WS_QWS || defined Q_WS_X11 - connect(this, SIGNAL(doubleClicked(QModelIndex)), SLOT(startQuery(QModelIndex))); -#else +#if defined Q_OS_MACOS || defined Q_OS_WIN // afaik this is better on Mac and Windows connect(this, SIGNAL(activated(QModelIndex)), SLOT(startQuery(QModelIndex))); +#else + connect(this, SIGNAL(doubleClicked(QModelIndex)), SLOT(startQuery(QModelIndex))); #endif }