summaryrefslogtreecommitdiffstats
path: root/src/widgets/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/util')
-rw-r--r--src/widgets/util/qcompleter.h2
-rw-r--r--src/widgets/util/qflickgesture.cpp15
-rw-r--r--src/widgets/util/qscroller_mac.mm72
-rw-r--r--src/widgets/util/qscrollerproperties.cpp7
-rw-r--r--src/widgets/util/qsystemtrayicon.cpp11
-rw-r--r--src/widgets/util/util.pri4
6 files changed, 2 insertions, 109 deletions
diff --git a/src/widgets/util/qcompleter.h b/src/widgets/util/qcompleter.h
index 5620b55589..5448fc313c 100644
--- a/src/widgets/util/qcompleter.h
+++ b/src/widgets/util/qcompleter.h
@@ -75,12 +75,14 @@ public:
UnfilteredPopupCompletion,
InlineCompletion
};
+ Q_ENUM(CompletionMode)
enum ModelSorting {
UnsortedModel = 0,
CaseSensitivelySortedModel,
CaseInsensitivelySortedModel
};
+ Q_ENUM(ModelSorting)
QCompleter(QObject *parent = nullptr);
QCompleter(QAbstractItemModel *model, QObject *parent = nullptr);
diff --git a/src/widgets/util/qflickgesture.cpp b/src/widgets/util/qflickgesture.cpp
index 55ec93c7d3..14a30ce7cf 100644
--- a/src/widgets/util/qflickgesture.cpp
+++ b/src/widgets/util/qflickgesture.cpp
@@ -462,21 +462,6 @@ QGestureRecognizer::Result QFlickGestureRecognizer::recognize(QGesture *state,
}
break;
-#if 0 // Used to be included in Qt4 for Q_WS_MAC
- // the only way to distinguish between real mouse wheels and wheel
- // events generated by the native 2 finger swipe gesture is to listen
- // for these events (according to Apple's Cocoa Event-Handling Guide)
-
- case QEvent::NativeGesture: {
- QNativeGestureEvent *nge = static_cast<QNativeGestureEvent *>(event);
- if (nge->gestureType == QNativeGestureEvent::GestureBegin)
- d->macIgnoreWheel = true;
- else if (nge->gestureType == QNativeGestureEvent::GestureEnd)
- d->macIgnoreWheel = false;
- break;
- }
-#endif
-
// consume all wheel events if the scroller is active
case QEvent::Wheel:
if (d->macIgnoreWheel || (scroller->state() != QScroller::Inactive))
diff --git a/src/widgets/util/qscroller_mac.mm b/src/widgets/util/qscroller_mac.mm
deleted file mode 100644
index 6dbb483089..0000000000
--- a/src/widgets/util/qscroller_mac.mm
+++ /dev/null
@@ -1,72 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtWidgets module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QtCore/qglobal.h>
-
-#if 0 // Used to be included in Qt4 for Q_WS_MAC
-
-#import <AppKit/AppKit.h>
-
-#include "qscroller_p.h"
-
-QT_BEGIN_NAMESPACE
-
-QPointF QScrollerPrivate::realDpi(int screen) const
-{
- QMacAutoReleasePool pool;
- NSArray *nsscreens = [NSScreen screens];
-
- if (screen < 0 || screen >= int([nsscreens count]))
- screen = 0;
-
- NSScreen *nsscreen = [nsscreens objectAtIndex:screen];
- CGDirectDisplayID display = [[[nsscreen deviceDescription] objectForKey:@"NSScreenNumber"] intValue];
-
- CGSize mmsize = CGDisplayScreenSize(display);
- if (mmsize.width > 0 && mmsize.height > 0) {
- return QPointF(CGDisplayPixelsWide(display) / mmsize.width,
- CGDisplayPixelsHigh(display) / mmsize.height) * qreal(25.4);
- } else {
- return QPointF();
- }
-}
-
-QT_END_NAMESPACE
-
-#endif
diff --git a/src/widgets/util/qscrollerproperties.cpp b/src/widgets/util/qscrollerproperties.cpp
index c26fba2cd3..df6b899fe4 100644
--- a/src/widgets/util/qscrollerproperties.cpp
+++ b/src/widgets/util/qscrollerproperties.cpp
@@ -40,9 +40,6 @@
#include <QPointer>
#include <QObject>
#include <QtCore/qmath.h>
-#if 0 // Used to be included in Qt4 for Q_WS_WIN
-# include <QLibrary>
-#endif
#include "qscrollerproperties.h"
#include "private/qscrollerproperties_p.h"
@@ -73,10 +70,6 @@ QScrollerPropertiesPrivate *QScrollerPropertiesPrivate::defaults()
spp.overshootDragDistanceFactor = qreal(1);
spp.overshootScrollDistanceFactor = qreal(0.5);
spp.overshootScrollTime = qreal(0.7);
-# if 0 // Used to be included in Qt4 for Q_WS_WIN
- if (QLibrary::resolve(QLatin1String("UxTheme"), "BeginPanningFeedback"))
- spp.overshootScrollTime = qreal(0.35);
-# endif
spp.hOvershootPolicy = QScrollerProperties::OvershootWhenScrollable;
spp.vOvershootPolicy = QScrollerProperties::OvershootWhenScrollable;
spp.frameRate = QScrollerProperties::Standard;
diff --git a/src/widgets/util/qsystemtrayicon.cpp b/src/widgets/util/qsystemtrayicon.cpp
index a38a50d3df..fd18888870 100644
--- a/src/widgets/util/qsystemtrayicon.cpp
+++ b/src/widgets/util/qsystemtrayicon.cpp
@@ -626,16 +626,6 @@ void QBalloonTip::balloon(const QPoint& pos, int msecs, bool showArrow)
}
QPainterPath path;
-#if defined(QT_NO_XSHAPE) && 0 /* Used to be included in Qt4 for Q_WS_X11 */
- // XShape is required for setting the mask, so we just
- // draw an ugly square when its not available
- path.moveTo(0, 0);
- path.lineTo(sz.width() - 1, 0);
- path.lineTo(sz.width() - 1, sz.height() - 1);
- path.lineTo(0, sz.height() - 1);
- path.lineTo(0, 0);
- move(qMax(pos.x() - sz.width(), scr.left()), pos.y());
-#else
path.moveTo(ml + rc, mt);
if (arrowAtTop && arrowAtLeft) {
if (showArrow) {
@@ -685,7 +675,6 @@ void QBalloonTip::balloon(const QPoint& pos, int msecs, bool showArrow)
painter1.setBrush(QBrush(Qt::color1));
painter1.drawPath(path);
setMask(bitmap);
-#endif
// Draw the border
pixmap = QPixmap(sz);
diff --git a/src/widgets/util/util.pri b/src/widgets/util/util.pri
index a3bd8897f1..363291528e 100644
--- a/src/widgets/util/util.pri
+++ b/src/widgets/util/util.pri
@@ -54,7 +54,3 @@ qtConfig(xcb) {
} else {
SOURCES += util/qsystemtrayicon_qpa.cpp
}
-
-mac {
- OBJECTIVE_SOURCES += util/qscroller_mac.mm
-}