Remove unused tst_qwidget_mac_helpers.h/mm

The usage of the helpers was removed in 2011,
in bf8dfc394a95acb6cab063dac69cef534666543c.

Change-Id: I950812982148fd76bcc65c4781a144c21cb3c901
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
This commit is contained in:
Tor Arne Vestbø 2022-11-10 11:55:43 +01:00
parent 224d795ec9
commit 12a74666b7
4 changed files with 0 additions and 54 deletions

View File

@ -40,14 +40,6 @@ qt_internal_extend_target(tst_qwidget CONDITION AIX
-fpermissive
)
qt_internal_extend_target(tst_qwidget CONDITION APPLE
SOURCES
tst_qwidget_mac_helpers.mm
LIBRARIES
${FWAppKit}
${FWSecurity}
)
qt_internal_extend_target(tst_qwidget CONDITION WIN32
LIBRARIES
gdi32

View File

@ -50,10 +50,6 @@
#include <qtimer.h>
#include <QtWidgets/QDoubleSpinBox>
#if defined(Q_OS_MACOS)
#include "tst_qwidget_mac_helpers.h" // Abstract the ObjC stuff out so not everyone must run an ObjC++ compile.
#endif
#include <QtTest/QTest>
#include <QtTest/private/qtesthelpers_p.h>

View File

@ -1,10 +0,0 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include <QtCore/QString>
#include <QtCore/QPair>
#include <QtWidgets/QWidget>
#pragma once // Yeah, it's deprecated in general, but it's standard practice for Mac OS X.
QString nativeWindowTitle(QWidget *widget, Qt::WindowState state);
bool nativeWindowModified(QWidget *widget);

View File

@ -1,32 +0,0 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
// some versions of CALayer.h use 'slots' as an identifier
#define QT_NO_KEYWORDS
#include "tst_qwidget_mac_helpers.h"
#include <QApplication>
#include <qpa/qplatformnativeinterface.h>
#include <private/qcore_mac_p.h>
#include <AppKit/AppKit.h>
QString nativeWindowTitle(QWidget *window, Qt::WindowState state)
{
QWindow *qwindow = window->windowHandle();
NSWindow *nswindow = (NSWindow *) qApp->platformNativeInterface()->nativeResourceForWindow("nswindow", qwindow);
QCFString macTitle;
if (state == Qt::WindowMinimized) {
macTitle = reinterpret_cast<CFStringRef>([[nswindow miniwindowTitle] retain]);
} else {
macTitle = reinterpret_cast<CFStringRef>([[nswindow title] retain]);
}
return macTitle;
}
bool nativeWindowModified(QWidget *widget)
{
QWindow *qwindow = widget->windowHandle();
NSWindow *nswindow = (NSWindow *) qApp->platformNativeInterface()->nativeResourceForWindow("nswindow", qwindow);
return [nswindow isDocumentEdited];
}