- (void)qt_sendPostedMessage:(NSEvent *)event
{
+ Q_UNUSED(event);
/*
// WARNING: data1 and data2 is truncated to from 64-bit to 32-bit on OS 10.5!
// That is why we need to split the address in two parts:
- (BOOL)qt_filterEvent:(NSEvent *)event
{
+ Q_UNUSED(event);
/*
if (qApp->macEventFilter(0, reinterpret_cast<EventRef>(event)))
return true;
- (void)application:(NSApplication *)sender openFiles:(NSArray *)filenames
{
+ Q_UNUSED(filenames);
+ Q_UNUSED(sender);
/*
for (NSString *fileName in filenames) {
QString qtFileName = qt_mac_NSStringToQString(fileName);
- (void)applicationDidBecomeActive:(NSNotification *)notification
{
+ Q_UNUSED(notification);
/*
if (reflectionDelegate
&& [reflectionDelegate respondsToSelector:@selector(applicationDidBecomeActive:)])
- (void)applicationDidResignActive:(NSNotification *)notification
{
+ Q_UNUSED(notification);
/*
if (reflectionDelegate
&& [reflectionDelegate respondsToSelector:@selector(applicationDidResignActive:)])
- (void)getUrl:(NSAppleEventDescriptor *)event withReplyEvent:(NSAppleEventDescriptor *)replyEvent
{
+ Q_UNUSED(event);
Q_UNUSED(replyEvent);
/*
NSString *urlString = [[event paramDescriptorForKeyword:keyDirectObject] stringValue];
- (void)qtDispatcherToQAction:(id)sender
{
+ Q_UNUSED(sender);
//[[NSApp QT_MANGLE_NAMESPACE(qt_qcocoamenuLoader)] qtDispatcherToQAction:sender];
}
static void setChildrenWorksWhenModal(QWindow *window, bool worksWhenModal)
{
+ Q_UNUSED(window)
+ Q_UNUSED(worksWhenModal)
+
// For NSPanels (but not NSWindows, sadly), we can set the flag
// worksWhenModal, so that they are active even when they are not modal.
/*
qApp->setAttribute(Qt::AA_DontUseNativeMenuBar, false);
- QNSApplication *cocoaApplication = [QNSApplication sharedApplication];
+ NSApplication *cocoaApplication = [NSApplication sharedApplication];
if (qgetenv("QT_MAC_DISABLE_FOREGROUND_APPLICATION_TRANSFORM").isEmpty()) {
// Applications launched from plain executables (without an app
QT_BEGIN_NAMESPACE
-@interface QNSWindow : NSWindow {
-
-}
-
-@end
-
class QCocoaWindow : public QPlatformWindow
{
public:
protected:
void determineWindowClass();
- QNSWindow *createWindow();
+ NSWindow *createWindow();
NSRect globalGeometry(const QRect localWindowGeometry) const;
QRect windowGeometry() const;
QCocoaWindow *parentCocoaWindow() const;
private:
friend class QCocoaBackingStore;
- QNSWindow *m_nsWindow;
+ NSWindow *m_nsWindow;
QNSView *m_contentView;
quint32 m_windowAttributes;
quint32 m_windowClass;
#include <QDebug>
-@implementation QNSWindow
-
-- (BOOL)canBecomeKeyWindow
-{
- return YES;
-}
-
-- (BOOL)canBecomeMainWindow
-{
- return YES;
-}
-
-@end
-
QCocoaWindow::QCocoaWindow(QWindow *tlw)
: QPlatformWindow(tlw)
, m_windowAttributes(0)
/*
*/
-QNSWindow * QCocoaWindow::createWindow()
+NSWindow * QCocoaWindow::createWindow()
{
// Determine if we need to add in our "custom window" attribute. Cocoa is rather clever
// in deciding if we need the maximize button or not (i.e., it's resizable, so you
*/
NSRect frame = globalGeometry(window()->geometry());
QCocoaAutoReleasePool pool;
- QNSWindow *window;
+ NSWindow *window;
switch (m_windowClass) {
case kMovableModalWindowClass:
NSPanel *panel;
BOOL needFloating = NO;
- BOOL worksWhenModal = (this->window()->windowType() == Qt::Popup);
+ //BOOL worksWhenModal = (this->window()->windowType() == Qt::Popup);
// Add in the extra flags if necessary.
switch (m_windowClass) {
break;
}
default:
- window = [[QNSWindow alloc] initWithContentRect:frame
+ window = [[NSWindow alloc] initWithContentRect:frame
styleMask:(NSResizableWindowMask | NSClosableWindowMask | NSMiniaturizableWindowMask | NSTitledWindowMask)
backing:NSBackingStoreBuffered
defer:NO]; // Deferring window creation breaks OpenGL (the GL context is set up
return menu; /* && menu->receivers(SIGNAL(aboutToShow()));*/
}
-static int qt_mac_CountMenuItems(OSMenuRef menu)
-{
- if (menu) {
- return [menu numberOfItems];
- }
- return 0;
-}
-
void qt_mac_menu_collapseSeparators(NSMenu * theMenu, bool collapse)
{
QCocoaAutoReleasePool pool;
static bool actualMenuItemVisibility(const QCocoaMenuBar *mbp,
const QCocoaMenuAction *action)
{
+ Q_UNUSED(mbp);
bool visible = action->action->isVisible();
if (visible && action->action->text() == QString(QChar(0x14)))
return false;