Remove unused function in NSWindowProxy. (#236)
This commit is contained in:
parent
85be988760
commit
af200adf63
|
@ -233,7 +233,6 @@ public:
|
||||||
qwindow = qtWindow;
|
qwindow = qtWindow;
|
||||||
nswindow = macWindow;
|
nswindow = macWindow;
|
||||||
instances.insert(macWindow, this);
|
instances.insert(macWindow, this);
|
||||||
saveState();
|
|
||||||
if (!windowClass) {
|
if (!windowClass) {
|
||||||
windowClass = [nswindow class];
|
windowClass = [nswindow class];
|
||||||
Q_ASSERT(windowClass);
|
Q_ASSERT(windowClass);
|
||||||
|
@ -245,41 +244,12 @@ public:
|
||||||
{
|
{
|
||||||
instances.remove(nswindow);
|
instances.remove(nswindow);
|
||||||
if (instances.count() <= 0) {
|
if (instances.count() <= 0) {
|
||||||
restoreImplementations();
|
|
||||||
windowClass = nil;
|
windowClass = nil;
|
||||||
}
|
}
|
||||||
restoreState();
|
|
||||||
nswindow = nil;
|
nswindow = nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
void saveState()
|
|
||||||
{
|
|
||||||
oldStyleMask = nswindow.styleMask;
|
|
||||||
oldTitlebarAppearsTransparent = nswindow.titlebarAppearsTransparent;
|
|
||||||
oldTitleVisibility = nswindow.titleVisibility;
|
|
||||||
oldHasShadow = nswindow.hasShadow;
|
|
||||||
oldShowsToolbarButton = nswindow.showsToolbarButton;
|
|
||||||
oldMovableByWindowBackground = nswindow.movableByWindowBackground;
|
|
||||||
oldMovable = nswindow.movable;
|
|
||||||
oldCloseButtonVisible = ![nswindow standardWindowButton:NSWindowCloseButton].hidden;
|
|
||||||
oldMiniaturizeButtonVisible = ![nswindow standardWindowButton:NSWindowMiniaturizeButton].hidden;
|
|
||||||
oldZoomButtonVisible = ![nswindow standardWindowButton:NSWindowZoomButton].hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
void restoreState()
|
|
||||||
{
|
|
||||||
nswindow.styleMask = oldStyleMask;
|
|
||||||
nswindow.titlebarAppearsTransparent = oldTitlebarAppearsTransparent;
|
|
||||||
nswindow.titleVisibility = oldTitleVisibility;
|
|
||||||
nswindow.hasShadow = oldHasShadow;
|
|
||||||
nswindow.showsToolbarButton = oldShowsToolbarButton;
|
|
||||||
nswindow.movableByWindowBackground = oldMovableByWindowBackground;
|
|
||||||
nswindow.movable = oldMovable;
|
|
||||||
[nswindow standardWindowButton:NSWindowCloseButton].hidden = !oldCloseButtonVisible;
|
|
||||||
[nswindow standardWindowButton:NSWindowMiniaturizeButton].hidden = !oldMiniaturizeButtonVisible;
|
|
||||||
[nswindow standardWindowButton:NSWindowZoomButton].hidden = !oldZoomButtonVisible;
|
|
||||||
}
|
|
||||||
|
|
||||||
void replaceImplementations()
|
void replaceImplementations()
|
||||||
{
|
{
|
||||||
|
@ -516,17 +486,6 @@ private:
|
||||||
//NSEvent *lastMouseDownEvent = nil;
|
//NSEvent *lastMouseDownEvent = nil;
|
||||||
NSView *blurEffect = nil;
|
NSView *blurEffect = nil;
|
||||||
|
|
||||||
NSWindowStyleMask oldStyleMask = 0;
|
|
||||||
BOOL oldTitlebarAppearsTransparent = NO;
|
|
||||||
BOOL oldHasShadow = NO;
|
|
||||||
BOOL oldShowsToolbarButton = NO;
|
|
||||||
BOOL oldMovableByWindowBackground = NO;
|
|
||||||
BOOL oldMovable = NO;
|
|
||||||
BOOL oldCloseButtonVisible = NO;
|
|
||||||
BOOL oldMiniaturizeButtonVisible = NO;
|
|
||||||
BOOL oldZoomButtonVisible = NO;
|
|
||||||
NSWindowTitleVisibility oldTitleVisibility = NSWindowTitleVisible;
|
|
||||||
|
|
||||||
QMetaObject::Connection widthChangeConnection = {};
|
QMetaObject::Connection widthChangeConnection = {};
|
||||||
QMetaObject::Connection heightChangeConnection = {};
|
QMetaObject::Connection heightChangeConnection = {};
|
||||||
QMetaObject::Connection themeChangeConnection = {};
|
QMetaObject::Connection themeChangeConnection = {};
|
||||||
|
|
Loading…
Reference in New Issue