Index: src/QtCore/QtChildEvent.h ================================================================== --- src/QtCore/QtChildEvent.h +++ src/QtCore/QtChildEvent.h @@ -29,25 +29,26 @@ @property (readonly, getter=isAdded) bool added; @property (readonly, retain) QtObject *child; @property (readonly, getter=isPolished) bool polished; @property (readonly, getter=isRemoved) bool removed; -- initWithQChildEvent: (QChildEvent*)qChildEvent; +- initWithQEvent: (QEvent *)event OF_UNAVAILABLE; +- initWithQChildEvent: (QChildEvent *)qChildEvent; - initWithType: (QChildEvent::Type)type - child: (QtObject*)child; + child: (QtObject *)child; @end namespace ObjQt { -static OF_INLINE QtChildEvent* +static OF_INLINE QtChildEvent * toOF(QChildEvent *qChildEvent) { return [[[QtChildEvent alloc] initWithQChildEvent: qChildEvent] autorelease]; } -static OF_INLINE QChildEvent* +static OF_INLINE QChildEvent * toQt(QtChildEvent *childEvent) { return [childEvent qChildEvent]; } Index: src/QtCore/QtChildEvent.mm ================================================================== --- src/QtCore/QtChildEvent.mm +++ src/QtCore/QtChildEvent.mm @@ -25,22 +25,22 @@ using ObjQt::toOF; using ObjQt::toQt; @implementation QtChildEvent -- initWithQEvent: (QEvent*)event +- initWithQEvent: (QEvent *)event { OF_INVALID_INIT_METHOD } -- initWithQChildEvent: (QChildEvent*)event +- initWithQChildEvent: (QChildEvent *)event { return [super initWithQEvent: event]; } - initWithType: (QChildEvent::Type)type - child: (QtObject*)child + child: (QtObject *)child { try { self = [self initWithQChildEvent: new QChildEvent(type, toQt(child))]; @@ -52,21 +52,21 @@ [self release]; throw; } } -- (QChildEvent*)qChildEvent +- (QChildEvent *)qChildEvent { - return dynamic_cast(_qEvent); + return dynamic_cast(_qEvent); } - (bool)isAdded { return toQt(self)->added(); } -- (QtObject*)child +- (QtObject *)child { return toOF(toQt(self)->child()); } - (bool)isPolished Index: src/QtCore/QtCoreApplication.h ================================================================== --- src/QtCore/QtCoreApplication.h +++ src/QtCore/QtCoreApplication.h @@ -28,28 +28,29 @@ @property (readonly) QCoreApplication *qCoreApplication; @property (copy) OFString *applicationName, *applicationVersion; @property (copy) OFString *organizationDomain, *organizationName; @property (getter=isQuitLockEnabled) bool quitLockEnabled; -- initWithQCoreApplication: (QCoreApplication*)qCoreApplication; -- (void)installNativeEventFilter: (QAbstractNativeEventFilter*)filterObject; +- initWithQObject: (QObject *)qObject OF_UNAVAILABLE; +- initWithQCoreApplication: (QCoreApplication *)qCoreApplication; +- (void)installNativeEventFilter: (QAbstractNativeEventFilter *)filterObject; - (void)quit; -- (void)removeNativeEventFilter: (QAbstractNativeEventFilter*)filterObject; -- (bool)sendEvent: (QtEvent*)event - receiver: (QtObject*)receiver; +- (void)removeNativeEventFilter: (QAbstractNativeEventFilter *)filterObject; +- (bool)sendEvent: (QtEvent *)event + receiver: (QtObject *)receiver; @end namespace ObjQt { -static OF_INLINE QtCoreApplication* +static OF_INLINE QtCoreApplication * toOF(QCoreApplication *qCoreApplication) { return [[[QtCoreApplication alloc] initWithQCoreApplication: qCoreApplication] autorelease]; } -static OF_INLINE QCoreApplication* +static OF_INLINE QCoreApplication * toQt(QtCoreApplication *coreApplication) { return [coreApplication qCoreApplication]; } Index: src/QtCore/QtCoreApplication.mm ================================================================== --- src/QtCore/QtCoreApplication.mm +++ src/QtCore/QtCoreApplication.mm @@ -26,66 +26,66 @@ using ObjQt::toOF; using ObjQt::toQt; @implementation QtCoreApplication -- initWithQObject: (QObject*)qObject +- initWithQObject: (QObject *)qObject { OF_INVALID_INIT_METHOD } -- initWithQCoreApplication: (QCoreApplication*)qCoreApplication +- initWithQCoreApplication: (QCoreApplication *)qCoreApplication { return [super initWithQObject: qCoreApplication]; } -- (QCoreApplication*)qCoreApplication +- (QCoreApplication *)qCoreApplication { - return qobject_cast(_qObject); + return qobject_cast(_qObject); } -- (OFString*)applicationName +- (OFString *)applicationName { return toOF(toQt(self)->applicationName()); } -- (void)setApplicationName: (OFString*)applicationName +- (void)setApplicationName: (OFString *)applicationName { toQt(self)->setApplicationName(toQt(applicationName)); } -- (OFString*)applicationVersion +- (OFString *)applicationVersion { return toOF(toQt(self)->applicationVersion()); } -- (void)installNativeEventFilter: (QAbstractNativeEventFilter*)filterObject +- (void)installNativeEventFilter: (QAbstractNativeEventFilter *)filterObject { toQt(self)->installNativeEventFilter(filterObject); } -- (void)setApplicationVersion: (OFString*)applicationVersion +- (void)setApplicationVersion: (OFString *)applicationVersion { toQt(self)->setApplicationVersion(toQt(applicationVersion)); } -- (OFString*)organizationDomain +- (OFString *)organizationDomain { return toOF(toQt(self)->organizationDomain()); } -- (void)setOrganizationDomain: (OFString*)organizationDomain +- (void)setOrganizationDomain: (OFString *)organizationDomain { toQt(self)->setOrganizationDomain(toQt(organizationDomain)); } -- (OFString*)organizationName +- (OFString *)organizationName { return toOF(toQt(self)->organizationName()); } -- (void)setOrganizationName: (OFString*)organizationName +- (void)setOrganizationName: (OFString *)organizationName { toQt(self)->setOrganizationName(toQt(organizationName)); } - (void)quit @@ -101,16 +101,16 @@ - (void)setQuitLockEnabled: (bool)quitLockEnabled { toQt(self)->setQuitLockEnabled(quitLockEnabled); } -- (void)removeNativeEventFilter: (QAbstractNativeEventFilter*)filterObject +- (void)removeNativeEventFilter: (QAbstractNativeEventFilter *)filterObject { toQt(self)->removeNativeEventFilter(filterObject); } -- (bool)sendEvent: (QtEvent*)event - receiver: (QtObject*)receiver +- (bool)sendEvent: (QtEvent *)event + receiver: (QtObject *)receiver { return toQt(self)->notify(toQt(receiver), toQt(event)); } @end Index: src/QtCore/QtEvent.h ================================================================== --- src/QtCore/QtEvent.h +++ src/QtCore/QtEvent.h @@ -36,24 +36,25 @@ @property (getter=isAccepted) bool accepted; @property (readonly, getter=isSpontaneous) bool spontaneous; @property (readonly) QEvent::Type type; + (int)registerEventType: (int)hint; -- initWithQEvent: (QEvent*)qEvent; +- init OF_UNAVAILABLE; +- initWithQEvent: (QEvent *)qEvent; - (void)accept; - (void)ignore; @end namespace ObjQt { -static OF_INLINE QtEvent* +static OF_INLINE QtEvent * toOF(QEvent *qEvent) { return [[[QtEvent alloc] initWithQEvent: qEvent] autorelease]; } -static OF_INLINE QEvent* +static OF_INLINE QEvent * toQt(QtEvent *event) { return [event qEvent]; } Index: src/QtCore/QtEvent.mm ================================================================== --- src/QtCore/QtEvent.mm +++ src/QtCore/QtEvent.mm @@ -33,11 +33,11 @@ - init { OF_INVALID_INIT_METHOD } -- initWithQEvent: (QEvent*)qEvent +- initWithQEvent: (QEvent *)qEvent { self = [super init]; _qEvent = qEvent; Index: src/QtCore/QtObject.h ================================================================== --- src/QtCore/QtObject.h +++ src/QtCore/QtObject.h @@ -38,60 +38,61 @@ @property (readonly) QObject *qObject; @property (readonly) const QMetaObject *metaObject; @property (retain) QtObject *parent; @property (copy) OFString *objectName; -- initWithQObject: (QObject*)qObject; +- init OF_UNAVAILABLE; +- initWithQObject: (QObject *)qObject; - (bool)setBlockSignals: (bool)block; -- (OFArray OF_GENERIC(QtObject*)*)children; -- (QMetaObject::Connection)connectSignal: (OFString*)signal - sender: (QtObject*)sender - method: (OFString*)method +- (OFArray OF_GENERIC(QtObject *) *)children; +- (QMetaObject::Connection)connectSignal: (OFString *)signal + sender: (QtObject *)sender + method: (OFString *)method type: (Qt::ConnectionType)type; -- (bool)disconnectSignal: (OFString*)signal - receiver: (QtObject*)receiver - method: (OFString*)method; -- (bool)disconnectAllSignalsForReceiver: (QtObject*)receiver - method: (OFString*)method; +- (bool)disconnectSignal: (OFString *)signal + receiver: (QtObject *)receiver + method: (OFString *)method; +- (bool)disconnectAllSignalsForReceiver: (QtObject *)receiver + method: (OFString *)method; - (void)dumpObjectInfo; - (void)dumpObjectTree; -- (OFArray OF_GENERIC(OFDataArray*)*)dynamicPropertyNames; -- (bool)handleEvent: (QtEvent*)event; -- (bool)filterEvent: (QtEvent*)event - forObject: (QtObject*)watched; +- (OFArray OF_GENERIC(OFDataArray *) *)dynamicPropertyNames; +- (bool)handleEvent: (QtEvent *)event; +- (bool)filterEvent: (QtEvent *)event + forObject: (QtObject *)watched; // MISSING: T findChild(const QString &name = QString(), // Qt::FindChildOptions options = Qt::FindChildrenRecursively) const; // MISSING QList findChildren(const QString &name = QString(), // Qt::FindChildOptions options = Qt::FindChildrenRecursively) const; // MISSING: QList findChildren(const QRegExp ®Exp, // Qt::FindChildOptions options = Qt::FindChildrenRecursively) const; -- (bool)inheritsClassWithName: (OFString*)className; -- (void)installEventFilter: (QtObject*)filterObj; +- (bool)inheritsClassWithName: (OFString *)className; +- (void)installEventFilter: (QtObject *)filterObj; - (bool)isWidgetType; - (bool)isWindowType; - (void)killTimerWithID: (int)ID; -- (void)moveToThread: (QtThread*)targetThread; -- (QVariant)propertyForName: (OFString*)name; -- (void)removeEventFilter: (QtObject*)obj; +- (void)moveToThread: (QtThread *)targetThread; +- (QVariant)propertyForName: (OFString *)name; +- (void)removeEventFilter: (QtObject *)obj; - (bool)setProperty: (QVariant&)value - forName: (OFString*)name; + forName: (OFString *)name; - (bool)signalsBlocked; - (int)startTimerWithInterval: (int)interval type: (Qt::TimerType)type; -- (QtThread*)thread; +- (QtThread *)thread; - (void)deleteLater; @end namespace ObjQt { -static OF_INLINE QtObject* +static OF_INLINE QtObject * toOF(QObject *qObject) { return [[[QtObject alloc] initWithQObject: qObject] autorelease]; } -static OF_INLINE QObject* +static OF_INLINE QObject * toQt(QtObject *object) { return [object qObject]; } Index: src/QtCore/QtObject.mm ================================================================== --- src/QtCore/QtObject.mm +++ src/QtCore/QtObject.mm @@ -37,11 +37,11 @@ - init { OF_INVALID_INIT_METHOD } -- initWithQObject: (QObject*)qObject +- initWithQObject: (QObject *)qObject { self = [super init]; _qObject = qObject; @@ -66,26 +66,26 @@ { OF_ENSURE(_ownsObject); _ownsObject = false; } -- (OFString*)objectName +- (OFString *)objectName { return toOF(_qObject->objectName()); } -- (void)setObjectName: (OFString*)objectName +- (void)setObjectName: (OFString *)objectName { _qObject->setObjectName(toQt(objectName)); } - (bool)setBlockSignals: (bool)block { return _qObject->blockSignals(block); } -- (OFArray OF_GENERIC(QtObject*)*)children +- (OFArray OF_GENERIC(QtObject *) *)children { const QObjectList &qChildren = _qObject->children(); OFMutableArray *children = [OFMutableArray arrayWithCapacity: qChildren.count()]; void *pool = objc_autoreleasePoolPush(); @@ -98,29 +98,29 @@ objc_autoreleasePoolPop(pool); return children; } -- (QMetaObject::Connection)connectSignal: (OFString*)signal - sender: (QtObject*)sender - method: (OFString*)method +- (QMetaObject::Connection)connectSignal: (OFString *)signal + sender: (QtObject *)sender + method: (OFString *)method type: (Qt::ConnectionType)type { return _qObject->connect(toQt(sender), [signal UTF8String], [method UTF8String], type); } -- (bool)disconnectSignal: (OFString*)signal - receiver: (QtObject*)receiver - method: (OFString*)method +- (bool)disconnectSignal: (OFString *)signal + receiver: (QtObject *)receiver + method: (OFString *)method { return _qObject->disconnect([signal UTF8String], toQt(receiver), [method UTF8String]); } -- (bool)disconnectAllSignalsForReceiver: (QtObject*)receiver - method: (OFString*)method +- (bool)disconnectAllSignalsForReceiver: (QtObject *)receiver + method: (OFString *)method { return _qObject->disconnect(toQt(receiver), [method UTF8String]); } - (void)dumpObjectInfo @@ -131,11 +131,11 @@ - (void)dumpObjectTree { _qObject->dumpObjectTree(); } -- (OFArray OF_GENERIC(OFDataArray*)*)dynamicPropertyNames +- (OFArray OF_GENERIC(OFDataArray *) *)dynamicPropertyNames { const QList &dynamicPropertyNames = _qObject->dynamicPropertyNames(); OFMutableArray *ret = [OFMutableArray arrayWithCapacity: dynamicPropertyNames.count()]; @@ -149,27 +149,27 @@ objc_autoreleasePoolPop(pool); return ret; } -- (bool)handleEvent: (QtEvent*)event +- (bool)handleEvent: (QtEvent *)event { return _qObject->event(toQt(event)); } -- (bool)filterEvent: (QtEvent*)event - forObject: (QtObject*)watched +- (bool)filterEvent: (QtEvent *)event + forObject: (QtObject *)watched { return _qObject->eventFilter(toQt(watched), toQt(event)); } -- (bool)inheritsClassWithName: (OFString*)className +- (bool)inheritsClassWithName: (OFString *)className { return _qObject->inherits([className UTF8String]); } -- (void)installEventFilter: (QtObject*)filterObj +- (void)installEventFilter: (QtObject *)filterObj { _qObject->installEventFilter(toQt(filterObj)); } - (bool)isWidgetType @@ -185,42 +185,42 @@ - (void)killTimerWithID: (int)ID { _qObject->killTimer(ID); } -- (const QMetaObject*)metaObject +- (const QMetaObject *)metaObject { return _qObject->metaObject(); } -- (void)moveToThread: (QtThread*)targetThread +- (void)moveToThread: (QtThread *)targetThread { _qObject->moveToThread(toQt(targetThread)); } -- (QtObject*)parent +- (QtObject *)parent { return toOF(_qObject->parent()); } -- (void)setParent: (QtObject*)parent +- (void)setParent: (QtObject *)parent { _qObject->setParent(toQt(parent)); } -- (QVariant)propertyForName: (OFString*)name +- (QVariant)propertyForName: (OFString *)name { return _qObject->property([name UTF8String]); } -- (void)removeEventFilter: (QtObject*)obj +- (void)removeEventFilter: (QtObject *)obj { _qObject->removeEventFilter(toQt(obj)); } -- (bool)setProperty: (QVariant&)value - forName: (OFString*)name +- (bool)setProperty: (QVariant &)value + forName: (OFString *)name { return _qObject->setProperty([name UTF8String], value); } - (bool)signalsBlocked @@ -232,11 +232,11 @@ type: (Qt::TimerType)type { return _qObject->startTimer(interval, type); } -- (QtThread*)thread +- (QtThread *)thread { return toOF(_qObject->thread()); } - (void)deleteLater Index: src/QtCore/QtThread.h ================================================================== --- src/QtCore/QtThread.h +++ src/QtCore/QtThread.h @@ -32,11 +32,12 @@ @property (readonly, getter=isRunning) bool running; @property (readonly) int loopLevel; @property QThread::Priority priority; @property unsigned int stackSize; -- initWithQThread: (QThread*)qThread; +- initWithQObject: (QObject *)qObject OF_UNAVAILABLE; +- initWithQThread: (QThread *)qThread; - (void)exitWithReturnCode: (int)returnCode; - (void)requestInterruption; - (bool)waitForMilliseconds: (unsigned long)time; - (void)quit; - (void)startWithPriority: (QThread::Priority)priority; @@ -43,18 +44,18 @@ - (void)terminate; @end namespace ObjQt { -static OF_INLINE QtThread* +static OF_INLINE QtThread * toOF(QThread *qThread) { return [[[QtThread alloc] initWithQThread: qThread] autorelease]; } -static OF_INLINE QThread* +static OF_INLINE QThread * toQt(QtThread *thread) { return [thread qThread]; } } Index: src/QtCore/QtThread.mm ================================================================== --- src/QtCore/QtThread.mm +++ src/QtCore/QtThread.mm @@ -23,31 +23,31 @@ #import "QtThread.h" using ObjQt::toQt; @implementation QtThread: QtObject -- initWithQObject: (QObject*)qObject +- initWithQObject: (QObject *)qObject { OF_INVALID_INIT_METHOD } -- initWithQThread: (QThread*)qThread +- initWithQThread: (QThread *)qThread { return [super initWithQObject: qThread]; } -- (QThread*)qThread +- (QThread *)qThread { - return qobject_cast(_qObject); + return qobject_cast(_qObject); } -- (QAbstractEventDispatcher*)eventDispatcher +- (QAbstractEventDispatcher *)eventDispatcher { return toQt(self)->eventDispatcher(); } -- (void)setEventDispatcher: (QAbstractEventDispatcher*)eventDispatcher +- (void)setEventDispatcher: (QAbstractEventDispatcher *)eventDispatcher { toQt(self)->setEventDispatcher(eventDispatcher); } - (void)exitWithReturnCode: (int)returnCode Index: src/QtGui/QtGUIApplication.h ================================================================== --- src/QtGui/QtGUIApplication.h +++ src/QtGui/QtGUIApplication.h @@ -34,28 +34,29 @@ @property (readonly, copy) OFString *platformName; @property (readonly) QScreen *primaryScreen; @property bool quitsOnLastWindowClosed; @property QIcon windowIcon; -- initWithQGuiApplication: (QGuiApplication*)qGuiApplication; +- initWithQCoreApplication: (QCoreApplication *)qCoreApplication OF_UNAVAILABLE; +- initWithQGuiApplication: (QGuiApplication *)qGuiApplication; - (double)devicePixelRatio; - (bool)isSavingSession; - (bool)isSessionRestored; -- (OFString*)sessionID; -- (OFString*)sessionKey; +- (OFString *)sessionID; +- (OFString *)sessionKey; @end namespace ObjQt { -static OF_INLINE QtGUIApplication* +static OF_INLINE QtGUIApplication * toOF(QGuiApplication *qGuiApplication) { return [[[QtGUIApplication alloc] initWithQGuiApplication: qGuiApplication] autorelease]; } -static OF_INLINE QGuiApplication* +static OF_INLINE QGuiApplication * toQt(QtGUIApplication *GUIApplication) { return [GUIApplication qGuiApplication]; } Index: src/QtGui/QtGUIApplication.mm ================================================================== --- src/QtGui/QtGUIApplication.mm +++ src/QtGui/QtGUIApplication.mm @@ -27,42 +27,42 @@ using ObjQt::toOF; using ObjQt::toQt; @implementation QtGUIApplication -- initWithQCoreApplication: (QCoreApplication*)qCoreApplication +- initWithQCoreApplication: (QCoreApplication *)qCoreApplication { OF_INVALID_INIT_METHOD } -- initWithQGuiApplication: (QGuiApplication*)qGuiApplication +- initWithQGuiApplication: (QGuiApplication *)qGuiApplication { return [super initWithQCoreApplication: qGuiApplication]; } -- (QGuiApplication*)qGuiApplication +- (QGuiApplication *)qGuiApplication { - return qobject_cast(_qObject); + return qobject_cast(_qObject); } -- (OFString*)applicationDisplayName +- (OFString *)applicationDisplayName { return toOF(toQt(self)->applicationDisplayName()); } -- (void)setApplicationDisplayName: (OFString*)applicationDisplayName +- (void)setApplicationDisplayName: (OFString *)applicationDisplayName { toQt(self)->setApplicationDisplayName(toQt(applicationDisplayName)); } #if QT_VERSION >= QT_VERSION_CHECK(5, 7, 0) -- (OFString*)desktopFileName +- (OFString *)desktopFileName { return toOF(toQt(self)->desktopFileName()); } -- (void)setDesktopFileName: (OFString*)desktopFileName +- (void)setDesktopFileName: (OFString *)desktopFileName { toQt(self)->setDesktopFileName(toQt(desktopFileName)); } #endif @@ -89,16 +89,16 @@ - (void)setLayoutDirection: (Qt::LayoutDirection)layoutDirection { toQt(self)->setLayoutDirection(layoutDirection); } -- (OFString*)platformName +- (OFString *)platformName { return toOF(toQt(self)->platformName()); } -- (QScreen*)primaryScreen +- (QScreen *)primaryScreen { return toQt(self)->primaryScreen(); } - (bool)quitsOnLastWindowClosed @@ -109,16 +109,16 @@ - (void)setQuitsOnLastWindowClosed: (bool)quitsOnLastWindowClosed { toQt(self)->setQuitOnLastWindowClosed(quitsOnLastWindowClosed); } -- (OFString*)sessionID +- (OFString *)sessionID { return toOF(toQt(self)->sessionId()); } -- (OFString*)sessionKey +- (OFString *)sessionKey { return toOF(toQt(self)->sessionKey()); } - (QIcon)windowIcon Index: src/QtGui/QtPaintDevice.h ================================================================== --- src/QtGui/QtPaintDevice.h +++ src/QtGui/QtPaintDevice.h @@ -23,11 +23,11 @@ #import #include @protocol QtPaintDevice -- (QPaintDevice*)qPaintDevice; +- (QPaintDevice *)qPaintDevice; - (int)colorCount; - (int)depth; - (int)devicePixelRatio; #if QT_VERSION >= QT_VERSION_CHECK(5, 7, 0) - (double)devicePixelRatioF; @@ -34,11 +34,11 @@ #endif - (int)height; - (int)heightMM; - (int)logicalDPIX; - (int)logicalDPIY; -- (QPaintEngine*)paintEngine; +- (QPaintEngine *)paintEngine; - (bool)paintingActive; - (int)physicalDPIX; - (int)physicalDPIY; - (int)width; - (int)widthMM; @@ -48,12 +48,12 @@ @property (readonly) QObject *qObject; @end namespace ObjQt { -static OF_INLINE QPaintDevice* +static OF_INLINE QPaintDevice * toQt(QtPaintDevice *paintDevice) { return [paintDevice qPaintDevice]; } } Index: src/QtGui/QtPaintDevice.mm ================================================================== --- src/QtGui/QtPaintDevice.mm +++ src/QtGui/QtPaintDevice.mm @@ -27,13 +27,13 @@ using ObjQt::toQt; @implementation QtPaintDevice @dynamic qObject; -- (QPaintDevice*)qPaintDevice +- (QPaintDevice *)qPaintDevice { - return dynamic_cast([self qObject]); + return dynamic_cast([self qObject]); } - (int)colorCount { return toQt(self)->colorCount(); @@ -74,11 +74,11 @@ - (int)logicalDPIY { return toQt(self)->logicalDpiY(); } -- (QPaintEngine*)paintEngine +- (QPaintEngine *)paintEngine { return toQt(self)->paintEngine(); } - (bool)paintingActive Index: src/QtWidgets/QtAbstractButton.h ================================================================== --- src/QtWidgets/QtAbstractButton.h +++ src/QtWidgets/QtAbstractButton.h @@ -36,24 +36,25 @@ @property QIcon icon; @property of_dimension_t iconSize; @property QKeySequence shortcut; @property (copy) OFString *text; -- initWithQAbstractButton: (QAbstractButton*)qAbstractButton; -- (QButtonGroup*)group; +- initWithQWidget: (QWidget *)qWidget OF_UNAVAILABLE; +- initWithQAbstractButton: (QAbstractButton *)qAbstractButton; +- (QButtonGroup *)group; @end namespace ObjQt { -static OF_INLINE QtAbstractButton* +static OF_INLINE QtAbstractButton * toOF(QAbstractButton *qAbstractButton) { return [[[QtAbstractButton alloc] initWithQAbstractButton: qAbstractButton] autorelease]; } -static OF_INLINE QAbstractButton* +static OF_INLINE QAbstractButton * toQt(QtAbstractButton *abstractButton) { return [abstractButton qAbstractButton]; } Index: src/QtWidgets/QtAbstractButton.mm ================================================================== --- src/QtWidgets/QtAbstractButton.mm +++ src/QtWidgets/QtAbstractButton.mm @@ -27,23 +27,23 @@ using ObjQt::toOF; using ObjQt::toQt; @implementation QtAbstractButton -- initWithQWidget: (QWidget*)qWidget +- initWithQWidget: (QWidget *)qWidget { OF_INVALID_INIT_METHOD } -- initWithQAbstractButton: (QAbstractButton*)qAbstractButton +- initWithQAbstractButton: (QAbstractButton *)qAbstractButton { return [super initWithQWidget: qAbstractButton]; } -- (QAbstractButton*)qAbstractButton +- (QAbstractButton *)qAbstractButton { - return qobject_cast(_qObject); + return qobject_cast(_qObject); } - (bool)autoExclusive { return toQt(self)->autoExclusive(); @@ -142,20 +142,20 @@ - (void)setShortcut: (QKeySequence)shortcut { toQt(self)->setShortcut(shortcut); } -- (OFString*)text +- (OFString *)text { return toOF(toQt(self)->text()); } -- (void)setText: (OFString*)text +- (void)setText: (OFString *)text { toQt(self)->setText(toQt(text)); } -- (QButtonGroup*)group +- (QButtonGroup *)group { return toQt(self)->group(); } @end Index: src/QtWidgets/QtAction.h ================================================================== --- src/QtWidgets/QtAction.h +++ src/QtWidgets/QtAction.h @@ -44,38 +44,39 @@ @property (copy) OFString *text; @property (copy) OFString *toolTip; @property (getter=isVisible) bool visible; @property (copy) OFString *whatsThis; -- initWithQAction: (QAction*)qAction; -- (QActionGroup*)actionGroup; +- initWithQObject: (QObject *)qObject OF_UNAVAILABLE; +- initWithQAction: (QAction *)qAction; +- (QActionGroup *)actionGroup; - (void)activate: (QAction::ActionEvent)event; -- (QList)associatedGraphicsWidgets; -- (OFArray OF_GENERIC(QtWidget*)*)associatedWidgets; +- (QList)associatedGraphicsWidgets; +- (OFArray OF_GENERIC(QtWidget *) *)associatedWidgets; - (QVariant)data; - (bool)isSeparator; -- (QMenu*)menu; -- (QtWidget*)parentWidget; -- (void)setActionGroup: (QActionGroup*)group; +- (QMenu *)menu; +- (QtWidget *)parentWidget; +- (void)setActionGroup: (QActionGroup *)group; - (void)setData: (const QVariant&)data; -- (void)setMenu: (QMenu*)menu; +- (void)setMenu: (QMenu *)menu; - (void)setSeparator: (bool)isSeparator; - (void)setShortcuts: (const QList&)shortcuts; - (void)setShortcutsWithStandardKey: (QKeySequence::StandardKey)key; - (QList)shortcuts; -- (bool)showStatusText: (QtWidget*)widget; +- (bool)showStatusText: (QtWidget *)widget; @end namespace ObjQt { -static OF_INLINE QtAction* +static OF_INLINE QtAction * toOF(QAction *qAction) { return [[[QtAction alloc] initWithQAction: qAction] autorelease]; } -static OF_INLINE QAction* +static OF_INLINE QAction * toQt(QtAction *action) { return [action qAction]; } Index: src/QtWidgets/QtAction.mm ================================================================== --- src/QtWidgets/QtAction.mm +++ src/QtWidgets/QtAction.mm @@ -26,23 +26,23 @@ using ObjQt::toOF; using ObjQt::toQt; @implementation QtAction -- initWithQObject: (QObject*)qObject +- initWithQObject: (QObject *)qObject { OF_INVALID_INIT_METHOD } -- initWithQAction: (QAction*)qAction +- initWithQAction: (QAction *)qAction { return [super initWithQObject: qAction]; } -- (QAction*)qAction +- (QAction *)qAction { - return qobject_cast(_qObject); + return qobject_cast(_qObject); } - (bool)autoRepeat { return toQt(self)->autoRepeat(); @@ -101,16 +101,16 @@ - (void)setIcon: (QIcon)icon { toQt(self)->setIcon(icon); } -- (OFString*)iconText +- (OFString *)iconText { return toOF(toQt(self)->iconText()); } -- (void)setIconText: (OFString*)iconText +- (void)setIconText: (OFString *)iconText { toQt(self)->setIconText(toQt(iconText)); } - (bool)isIconVisibleInMenu @@ -161,36 +161,36 @@ - (void)setShortcutContext: (Qt::ShortcutContext)shortcutContext { toQt(self)->setShortcutContext(shortcutContext); } -- (OFString*)statusTip +- (OFString *)statusTip { return toOF(toQt(self)->statusTip()); } -- (void)setStatusTip: (OFString*)statusTip +- (void)setStatusTip: (OFString *)statusTip { toQt(self)->setStatusTip(toQt(statusTip)); } -- (OFString*)text +- (OFString *)text { return toOF(toQt(self)->text()); } -- (void)setText: (OFString*)text +- (void)setText: (OFString *)text { toQt(self)->setText(toQt(text)); } -- (OFString*)toolTip +- (OFString *)toolTip { return toOF(toQt(self)->toolTip()); } -- (void)setToolTip: (OFString*)toolTip +- (void)setToolTip: (OFString *)toolTip { toQt(self)->setToolTip(toQt(toolTip)); } - (bool)isVisible @@ -201,38 +201,38 @@ - (void)setVisible: (bool)visible { toQt(self)->setVisible(visible); } -- (OFString*)whatsThis +- (OFString *)whatsThis { return toOF(toQt(self)->whatsThis()); } -- (void)setWhatsThis: (OFString*)whatsThis +- (void)setWhatsThis: (OFString *)whatsThis { toQt(self)->setWhatsThis(toQt(whatsThis)); } -- (QActionGroup*)actionGroup +- (QActionGroup *)actionGroup { return toQt(self)->actionGroup(); } - (void)activate: (QAction::ActionEvent)event { toQt(self)->activate(event); } -- (QList)associatedGraphicsWidgets +- (QList)associatedGraphicsWidgets { return toQt(self)->associatedGraphicsWidgets(); } -- (OFArray OF_GENERIC(QtWidget*)*)associatedWidgets +- (OFArray OF_GENERIC(QtWidget *) *)associatedWidgets { - const QList &widgets = toQt(self)->associatedWidgets(); + const QList &widgets = toQt(self)->associatedWidgets(); OFMutableArray *ret = [OFMutableArray arrayWithCapacity: widgets.count()]; void *pool = objc_autoreleasePoolPush(); for (QWidget *widget: widgets) @@ -253,41 +253,41 @@ - (bool)isSeparator { return toQt(self)->isSeparator(); } -- (QMenu*)menu +- (QMenu *)menu { return toQt(self)->menu(); } -- (QtWidget*)parentWidget +- (QtWidget *)parentWidget { return toOF(toQt(self)->parentWidget()); } -- (void)setActionGroup: (QActionGroup*)group +- (void)setActionGroup: (QActionGroup *)group { toQt(self)->setActionGroup(group); } -- (void)setData: (const QVariant&)userData +- (void)setData: (const QVariant &)userData { toQt(self)->setData(userData); } -- (void)setMenu: (QMenu*)menu +- (void)setMenu: (QMenu *)menu { toQt(self)->setMenu(menu); } - (void)setSeparator: (bool)isSeparator { toQt(self)->setSeparator(isSeparator); } -- (void)setShortcuts: (const QList&)shortcuts +- (void)setShortcuts: (const QList &)shortcuts { toQt(self)->setShortcuts(shortcuts); } - (void)setShortcutsWithStandardKey: (QKeySequence::StandardKey)key @@ -298,10 +298,10 @@ - (QList)shortcuts { return toQt(self)->shortcuts(); } -- (bool)showStatusText: (QtWidget*)widget +- (bool)showStatusText: (QtWidget *)widget { return toQt(self)->showStatusText(toQt(widget)); } @end Index: src/QtWidgets/QtApplication.h ================================================================== --- src/QtWidgets/QtApplication.h +++ src/QtWidgets/QtApplication.h @@ -34,25 +34,26 @@ @property int startDragDistance; @property int startDragTime; @property (copy) OFString *styleSheet; @property int wheelScrollLines; -- initWithQApplication: (QApplication*)qApplication; +- initWithQGuiApplication: (QGuiApplication *)qGuiApplication OF_UNAVAILABLE; +- initWithQApplication: (QApplication *)qApplication; - (void)aboutQt; - (void)closeAllWindows; @end namespace ObjQt { -static OF_INLINE QtApplication* +static OF_INLINE QtApplication * toOF(QApplication *qApplication) { return [[[QtApplication alloc] initWithQApplication: qApplication] autorelease]; } -static OF_INLINE QApplication* +static OF_INLINE QApplication * toQt(QtApplication *application) { return [application qApplication]; } Index: src/QtWidgets/QtApplication.mm ================================================================== --- src/QtWidgets/QtApplication.mm +++ src/QtWidgets/QtApplication.mm @@ -27,23 +27,23 @@ using ObjQt::toOF; using ObjQt::toQt; @implementation QtApplication -- initWithQGuiApplication: (QGuiApplication*)qGuiApplication +- initWithQGuiApplication: (QGuiApplication *)qGuiApplication { OF_INVALID_INIT_METHOD } -- initWithQApplication: (QApplication*)qApplication +- initWithQApplication: (QApplication *)qApplication { return [super initWithQGuiApplication: qApplication]; } -- (QApplication*)qApplication +- (QApplication *)qApplication { - return qobject_cast(_qObject); + return qobject_cast(_qObject); } - (bool)autoSIPEnabled { return toQt(self)->autoSipEnabled(); @@ -112,16 +112,16 @@ - (void)setStartDragTime: (int)startDragTime { toQt(self)->setStartDragTime(startDragTime); } -- (OFString*)styleSheet +- (OFString *)styleSheet { return toOF(toQt(self)->styleSheet()); } -- (void)setStyleSheet: (OFString*)styleSheet +- (void)setStyleSheet: (OFString *)styleSheet { toQt(self)->setStyleSheet(toQt(styleSheet)); } - (int)wheelScrollLines Index: src/QtWidgets/QtPushButton.h ================================================================== --- src/QtWidgets/QtPushButton.h +++ src/QtWidgets/QtPushButton.h @@ -26,31 +26,32 @@ #include #include @interface QtPushButton: QtAbstractButton @property (readonly) QPushButton *qPushButton; -@property QMenu* menu; +@property QMenu *menu; @property bool autoDefault; @property (getter=isDefault, setter=setDefault:) bool default_; @property (getter=isFlat) bool flat; -- initWithQPushButton: (QPushButton*)qPushButton; -- initWithText: (OFString*)text; +- initWithQAbstractButton: (QAbstractButton *)qAbstractButton OF_UNAVAILABLE; +- initWithQPushButton: (QPushButton *)qPushButton; +- initWithText: (OFString *)text; - initWithIcon: (QIcon)icon - text: (OFString*)text; + text: (OFString *)text; @end namespace ObjQt { -static OF_INLINE QtPushButton* +static OF_INLINE QtPushButton * toOF(QPushButton *qPushButton) { return [[[QtPushButton alloc] initWithQPushButton: qPushButton] autorelease]; } -static OF_INLINE QPushButton* +static OF_INLINE QPushButton * toQt(QtPushButton *pushButton) { return [pushButton qPushButton]; } Index: src/QtWidgets/QtPushButton.mm ================================================================== --- src/QtWidgets/QtPushButton.mm +++ src/QtWidgets/QtPushButton.mm @@ -28,22 +28,21 @@ using ObjQt::toOF; using ObjQt::toQt; @implementation QtPushButton - -- initWithQAbstractButton: (QAbstractButton*)qAbstractButton +- initWithQAbstractButton: (QAbstractButton *)qAbstractButton { OF_INVALID_INIT_METHOD } -- initWithQPushButton: (QPushButton*)qPushButton +- initWithQPushButton: (QPushButton *)qPushButton { return [super initWithQAbstractButton: qPushButton]; } -- initWithText: (OFString*)text +- initWithText: (OFString *)text { try { self = [self initWithQPushButton: new QPushButton(toQt(text))]; @@ -56,11 +55,11 @@ throw; } } - initWithIcon: (QIcon)icon - text: (OFString*)text + text: (OFString *)text { try { self = [self initWithQPushButton: new QPushButton(icon, toQt(text))]; @@ -72,21 +71,21 @@ [self release]; throw; } } -- (QPushButton*)qPushButton +- (QPushButton *)qPushButton { - return qobject_cast(_qObject); + return qobject_cast(_qObject); } -- (QMenu*)menu +- (QMenu *)menu { return toQt(self)->menu(); } -- (void)setMenu: (QMenu*)menu +- (void)setMenu: (QMenu *)menu { toQt(self)->setMenu(menu); } - (bool)autoDefault Index: src/QtWidgets/QtWidget.h ================================================================== --- src/QtWidgets/QtWidget.h +++ src/QtWidgets/QtWidget.h @@ -84,94 +84,95 @@ @property double windowOpacity; @property (copy) OFString *windowTitle; @property (readonly) int x; @property (readonly) int y; -- initWithQWidget: (QWidget*)qWidget; -- (OFArray OF_GENERIC(QtAction*)*)actions; +- initWithQObject: (QObject *)qObject OF_UNAVAILABLE; +- initWithQWidget: (QWidget *)qWidget; +- (OFArray OF_GENERIC(QtAction *) *)actions; - (void)activateWindow; -- (void)addAction: (QtAction*)action; -- (void)addActions: (OFArray OF_GENERIC(QtAction*)*)actions; +- (void)addAction: (QtAction *)action; +- (void)addActions: (OFArray OF_GENERIC(QtAction *) *)actions; - (void)adjustSize; - (QPalette::ColorRole)backgroundRole; -- (QBackingStore*)backingStore; -- (QtWidget*)childAt: (of_point_t)point; +- (QBackingStore *)backingStore; +- (QtWidget *)childAt: (of_point_t)point; - (void)clearFocus; - (void)clearMask; - (QMargins)contentsMargins; - (of_rectangle_t)contentsRect; - (WId)effectiveWinID; - (void)ensurePolished; -- (QtWidget*)focusProxy; -- (QtWidget*)focusWidget; +- (QtWidget *)focusProxy; +- (QtWidget *)focusWidget; - (QFontInfo)fontInfo; - (QFontMetrics)fontMetrics; - (QPalette::ColorRole)foregroundRole; - (QPixmap)grabRectangle: (of_rectangle_t)rectangle; - (void)grabGesture: (Qt::GestureType)gesture; - (void)grabGesture: (Qt::GestureType)gesture flags: (Qt::GestureFlags)flags; - (void)grabKeyboard; - (void)grabMouse; -- (void)grabMouseWithCursor: (const QCursor&)cursor; -- (int)grabShortcutWithKey: (const QKeySequence&)key; -- (int)grabShortcutWithKey: (const QKeySequence&)key +- (void)grabMouseWithCursor: (const QCursor &)cursor; +- (int)grabShortcutWithKey: (const QKeySequence &)key; +- (int)grabShortcutWithKey: (const QKeySequence &)key context: (Qt::ShortcutContext)context; -- (QGraphicsEffect*)graphicsEffect; -- (QGraphicsProxyWidget*)graphicsProxyWidget; +- (QGraphicsEffect *)graphicsEffect; +- (QGraphicsProxyWidget *)graphicsProxyWidget; #ifdef QT_KEYPAD_NAVIGATION - (bool)hasEditFocus; #endif - (bool)hasFocus; - (bool)hasHeightForWidth; - (int)heightForWidth: (int)w; - (QVariant)queryInputMethod: (Qt::InputMethodQuery)query; -- (void)insertAction: (QtAction*)action - before: (QtAction*)before; -- (void)insertActions: (OFArray OF_GENERIC(QtAction*)*)actions - before: (QtAction*)before; -- (bool)isAncestorOf: (QtWidget*)child; -- (bool)isEnabledTo: (QtWidget*)ancestor; +- (void)insertAction: (QtAction *)action + before: (QtAction *)before; +- (void)insertActions: (OFArray OF_GENERIC(QtAction *) *)actions + before: (QtAction *)before; +- (bool)isAncestorOf: (QtWidget *)child; +- (bool)isEnabledTo: (QtWidget *)ancestor; - (bool)isHidden; -- (bool)isVisibleTo: (QtWidget*)ancestor; +- (bool)isVisibleTo: (QtWidget *)ancestor; - (bool)isWindow; - (of_point_t)mapPosition: (of_point_t)pos - from: (QtWidget*)parent; + from: (QtWidget *)parent; - (of_point_t)mapPositionFromGlobal: (of_point_t)pos; - (of_point_t)mapPositionFromParent: (of_point_t)pos; - (of_point_t)mapPosition: (of_point_t)pos - to: (QtWidget*)parent; + to: (QtWidget *)parent; - (of_point_t)mapPositionToGlobal: (of_point_t)pos; - (of_point_t)mapPositionToParent: (of_point_t)pos; - (QRegion)mask; -- (QtWidget*)nativeParentWidget; -- (QtWidget*)nextInFocusChain; +- (QtWidget *)nativeParentWidget; +- (QtWidget *)nextInFocusChain; - (void)overrideWindowFlags: (Qt::WindowFlags)flags; -- (QtWidget*)parentWidget; -- (QtWidget*)previousInFocusChain; +- (QtWidget *)parentWidget; +- (QtWidget *)previousInFocusChain; - (void)releaseKeyboard; - (void)releaseMouse; - (void)releaseShortcut: (int)ID; -- (void)removeAction: (QtAction*)action; -- (void)renderIntoPaintDevice: (QtObject *)target +- (void)removeAction: (QtAction *)action; +- (void)renderIntoPaintDevice: (QtObject *)target targetOffset: (of_point_t)targetOffset sourceRegion: (QRegion)sourceRegion; -- (void)renderIntoPaintDevice: (QtObject *)target +- (void)renderIntoPaintDevice: (QtObject *)target targetOffset: (of_point_t)targetOffset sourceRegion: (QRegion)sourceRegion flags: (QWidget::RenderFlags)renderFlags; -- (void)renderIntoPainter: (QPainter*)target +- (void)renderIntoPainter: (QPainter *)target targetOffset: (of_point_t)targetOffset sourceRegion: (QRegion)sourceRegion; -- (void)renderIntoPainter: (QPainter*)target +- (void)renderIntoPainter: (QPainter *)target targetOffset: (of_point_t)targetOffset sourceRegion: (QRegion)sourceRegion flags: (QWidget::RenderFlags)renderFlags; - (void)repaintInRectangle: (of_rectangle_t)rect; -- (void)repaintInRegion: (const QRegion&)region; -- (bool)restoreGeometry: (OFDataArray*)geometry; -- (OFDataArray*)saveGeometry; +- (void)repaintInRegion: (const QRegion &)region; +- (bool)restoreGeometry: (OFDataArray *)geometry; +- (OFDataArray *)saveGeometry; - (void)scrollRight: (int)dx down: (int)dy; - (void)scrollRight: (int)dx down: (int)dy inRectangle: (of_rectangle_t)rect; @@ -182,59 +183,59 @@ #endif - (void)setFixedHeight: (int)height; - (void)setFixedSize: (of_dimension_t)size; - (void)setFixedWidth: (int)width; - (void)setFocus: (Qt::FocusReason)reason; -- (void)setFocusProxy: (QtWidget*)widget; +- (void)setFocusProxy: (QtWidget *)widget; - (void)setForegroundRole: (QPalette::ColorRole)role; -- (void)setGraphicsEffect: (QGraphicsEffect*)effect; -- (void)setLayout: (QLayout*)layout; -- (void)setMaskFromBitmap: (const QBitmap&)bitmap; -- (void)setMask: (const QRegion&)region; -- (void)setParent: (QtWidget*)parent; -- (void)setParent: (QtWidget*)parent +- (void)setGraphicsEffect: (QGraphicsEffect *)effect; +- (void)setLayout: (QLayout *)layout; +- (void)setMaskFromBitmap: (const QBitmap &)bitmap; +- (void)setMask: (const QRegion &)region; +- (void)setParent: (QtWidget *)parent; +- (void)setParent: (QtWidget *)parent flags: (Qt::WindowFlags)flags; - (void)setAutoRepeat: (bool)enable forShortcut: (int)ID; - (void)setEnabled: (bool)enable forShortcut: (int)ID; -- (void)setStyle: (QStyle*)style; -- (void)setWindowRole: (OFString*)role; +- (void)setStyle: (QStyle *)style; +- (void)setWindowRole: (OFString *)role; - (void)setWindowState: (Qt::WindowStates)windowState; -- (void)stackUnder: (QtWidget*)widget; -- (QStyle*)style; +- (void)stackUnder: (QtWidget *)widget; +- (QStyle *)style; - (bool)testAttribute: (Qt::WidgetAttribute)attribute; - (bool)isUnderMouse; - (void)ungrabGesture: (Qt::GestureType)gesture; - (void)unsetCursor; - (void)unsetLayoutDirection; - (void)unsetLocale; - (void)updateInRectangle: (of_rectangle_t)rect; -- (void)updateInRegion: (const QRegion&)region; +- (void)updateInRegion: (const QRegion &)region; - (void)updateGeometry; - (QRegion)visibleRegion; - (WId)winID; -- (QtWidget*)window; -- (QWindow*)windowHandle; -- (OFString*)windowRole; +- (QtWidget *)window; +- (QWindow *)windowHandle; +- (OFString *)windowRole; - (Qt::WindowStates)windowState; - (Qt::WindowType)windowType; @end @interface QtWidget (QtPaintDevice) @end namespace ObjQt { -static OF_INLINE QtWidget* +static OF_INLINE QtWidget * toOF(QWidget *qWidget) { return [[[QtWidget alloc] initWithQWidget: qWidget] autorelease]; } -static OF_INLINE QWidget* +static OF_INLINE QWidget * toQt(QtWidget *widget) { return [widget qWidget]; } } Index: src/QtWidgets/QtWidget.mm ================================================================== --- src/QtWidgets/QtWidget.mm +++ src/QtWidgets/QtWidget.mm @@ -38,23 +38,23 @@ { if (self == [QtWidget class]) [self inheritMethodsFromClass: [QtPaintDevice class]]; } -- initWithQObject: (QObject*)qObject +- initWithQObject: (QObject *)qObject { OF_INVALID_INIT_METHOD } -- initWithQWidget: (QWidget*)qWidget +- initWithQWidget: (QWidget *)qWidget { return [super initWithQObject: qWidget]; } -- (QWidget*)qWidget +- (QWidget *)qWidget { - return qobject_cast(_qObject); + return qobject_cast(_qObject); } - (bool)acceptDrops { return toQt(self)->acceptDrops(); @@ -63,26 +63,26 @@ - (void)setAcceptDrops: (bool)acceptDrops { toQt(self)->setAcceptDrops(acceptDrops); } -- (OFString*)accessibleDescription +- (OFString *)accessibleDescription { return toOF(toQt(self)->accessibleDescription()); } -- (void)setAccessibleDescription: (OFString*)accessibleDescription +- (void)setAccessibleDescription: (OFString *)accessibleDescription { toQt(self)->setAccessibleDescription(toQt(accessibleDescription)); } -- (OFString*)accessibleName +- (OFString *)accessibleName { return toOF(toQt(self)->accessibleName()); } -- (void)setAccessibleName: (OFString*)accessibleName +- (void)setAccessibleName: (OFString *)accessibleName { toQt(self)->setAccessibleName(toQt(accessibleName)); } - (bool)autoFillBackground @@ -163,16 +163,16 @@ - (void)setFocusPolicy: (Qt::FocusPolicy)focusPolicy { toQt(self)->setFocusPolicy(focusPolicy); } -- (const QFont&)font +- (const QFont &)font { return toQt(self)->font(); } -- (void)setFont: (const QFont&)font +- (void)setFont: (const QFont &)font { toQt(self)->setFont(font); } - (of_rectangle_t)frameGeometry @@ -343,16 +343,16 @@ - (of_rectangle_t)normalGeometry { return toOF(toQt(self)->normalGeometry()); } -- (const QPalette&)palette +- (const QPalette &)palette { return toQt(self)->palette(); } -- (void)setPalette: (const QPalette&)palette +- (void)setPalette: (const QPalette &)palette { toQt(self)->setPalette(palette); } - (of_point_t)pos @@ -403,36 +403,36 @@ - (void)setSizePolicy: (QSizePolicy)sizePolicy { toQt(self)->setSizePolicy(sizePolicy); } -- (OFString*)statusTip +- (OFString *)statusTip { return toOF(toQt(self)->statusTip()); } -- (void)setStatusTip: (OFString*)statusTip +- (void)setStatusTip: (OFString *)statusTip { toQt(self)->setStatusTip(toQt(statusTip)); } -- (OFString*)styleSheet +- (OFString *)styleSheet { return toOF(toQt(self)->styleSheet()); } -- (void)setStyleSheet: (OFString*)styleSheet +- (void)setStyleSheet: (OFString *)styleSheet { toQt(self)->setStyleSheet(toQt(styleSheet)); } -- (OFString*)toolTip +- (OFString *)toolTip { return toOF(toQt(self)->toolTip()); } -- (void)setToolTip: (OFString*)toolTip +- (void)setToolTip: (OFString *)toolTip { toQt(self)->setToolTip(toQt(toolTip)); } - (int)toolTipDuration @@ -463,31 +463,31 @@ - (void)setVisible: (bool)visible { toQt(self)->setVisible(visible); } -- (OFString*)whatsThis +- (OFString *)whatsThis { return toOF(toQt(self)->whatsThis()); } -- (void)setWhatsThis: (OFString*)whatsThis +- (void)setWhatsThis: (OFString *)whatsThis { toQt(self)->setWhatsThis(toQt(whatsThis)); } - (int)width { return toQt(self)->width(); } -- (OFString*)windowFilePath +- (OFString *)windowFilePath { return toOF(toQt(self)->windowFilePath()); } -- (void)setWindowFilePath: (OFString*)windowFilePath +- (void)setWindowFilePath: (OFString *)windowFilePath { toQt(self)->setWindowFilePath(toQt(windowFilePath)); } - (Qt::WindowFlags)windowFlags @@ -538,16 +538,16 @@ - (void)setWindowOpacity: (double)windowOpacity { toQt(self)->setWindowOpacity(windowOpacity); } -- (OFString*)windowTitle +- (OFString *)windowTitle { return toOF(toQt(self)->windowTitle()); } -- (void)setWindowTitle: (OFString*)windowTitle +- (void)setWindowTitle: (OFString *)windowTitle { toQt(self)->setWindowTitle(toQt(windowTitle)); } - (int)x @@ -558,13 +558,13 @@ - (int)y { return toQt(self)->y(); } -- (OFArray OF_GENERIC(QtAction*)*)actions +- (OFArray OF_GENERIC(QtAction *) *)actions { - const QList &actions = toQt(self)->actions(); + const QList &actions = toQt(self)->actions(); OFMutableArray *ret = [OFMutableArray arrayWithCapacity: actions.count()]; void *pool = objc_autoreleasePoolPush(); for (QAction *action: actions) @@ -580,18 +580,18 @@ - (void)activateWindow { toQt(self)->activateWindow(); } -- (void)addAction: (QtAction*)action +- (void)addAction: (QtAction *)action { toQt(self)->addAction(toQt(action)); } -- (void)addActions: (OFArray OF_GENERIC(QtAction*)*)actions +- (void)addActions: (OFArray OF_GENERIC(QtAction *) *)actions { - QList list; + QList list; for (QtAction *action in actions) list.append(toQt(action)); toQt(self)->addActions(list); @@ -605,16 +605,16 @@ - (QPalette::ColorRole)backgroundRole { return toQt(self)->backgroundRole(); } -- (QBackingStore*)backingStore +- (QBackingStore *)backingStore { return toQt(self)->backingStore(); } -- (QtWidget*)childAt: (of_point_t)point +- (QtWidget *)childAt: (of_point_t)point { return toOF(toQt(self)->childAt(toQt(point))); } - (void)clearFocus @@ -645,16 +645,16 @@ - (void)ensurePolished { toQt(self)->ensurePolished(); } -- (QtWidget*)focusProxy +- (QtWidget *)focusProxy { return toOF(toQt(self)->focusProxy()); } -- (QtWidget*)focusWidget +- (QtWidget *)focusWidget { return toOF(toQt(self)->focusWidget()); } - (QFontInfo)fontInfo @@ -696,32 +696,32 @@ - (void)grabMouse { toQt(self)->grabMouse(); } -- (void)grabMouseWithCursor: (const QCursor&)cursor +- (void)grabMouseWithCursor: (const QCursor &)cursor { toQt(self)->grabMouse(cursor); } -- (int)grabShortcutWithKey: (const QKeySequence&)key +- (int)grabShortcutWithKey: (const QKeySequence &)key { return toQt(self)->grabShortcut(key); } -- (int)grabShortcutWithKey: (const QKeySequence&)key +- (int)grabShortcutWithKey: (const QKeySequence &)key context: (Qt::ShortcutContext)context { return toQt(self)->grabShortcut(key, context); } -- (QGraphicsEffect*)graphicsEffect +- (QGraphicsEffect *)graphicsEffect { return toQt(self)->graphicsEffect(); } -- (QGraphicsProxyWidget*)graphicsProxyWidget +- (QGraphicsProxyWidget *)graphicsProxyWidget { return toQt(self)->graphicsProxyWidget(); } #ifdef QT_KEYPAD_NAVIGATION @@ -744,43 +744,43 @@ - (QVariant)queryInputMethod: (Qt::InputMethodQuery)query { return toQt(self)->inputMethodQuery(query); } -- (void)insertAction: (QtAction*)action - before: (QtAction*)before +- (void)insertAction: (QtAction *)action + before: (QtAction *)before { toQt(self)->insertAction(toQt(before), toQt(action)); } -- (void)insertActions: (OFArray OF_GENERIC(QtAction*)*)actions - before: (QtAction*)before +- (void)insertActions: (OFArray OF_GENERIC(QtAction *) *)actions + before: (QtAction *)before { - QList list; + QList list; for (QtAction *action in actions) list.append(toQt(action)); toQt(self)->insertActions(toQt(before), list); } -- (bool)isAncestorOf: (QtWidget*)child +- (bool)isAncestorOf: (QtWidget *)child { return toQt(self)->isAncestorOf(toQt(child)); } -- (bool)isEnabledTo: (QtWidget*)ancestor +- (bool)isEnabledTo: (QtWidget *)ancestor { return toQt(self)->isEnabledTo(toQt(ancestor)); } - (bool)isHidden { return toQt(self)->isHidden(); } -- (bool)isVisibleTo: (QtWidget*)ancestor +- (bool)isVisibleTo: (QtWidget *)ancestor { return toQt(self)->isVisibleTo(toQt(ancestor)); } - (bool)isWindow @@ -787,11 +787,11 @@ { return toQt(self)->isWindow(); } - (of_point_t)mapPosition: (of_point_t)pos - from: (QtWidget*)parent + from: (QtWidget *)parent { return toOF(toQt(self)->mapFrom(toQt(parent), toQt(pos))); } - (of_point_t)mapPositionFromGlobal: (of_point_t)pos @@ -803,11 +803,11 @@ { return toOF(toQt(self)->mapFromParent(toQt(pos))); } - (of_point_t)mapPosition: (of_point_t)pos - to: (QtWidget*)parent + to: (QtWidget *)parent { return toOF(toQt(self)->mapTo(toQt(parent), toQt(pos))); } - (of_point_t)mapPositionToGlobal: (of_point_t)pos @@ -823,31 +823,31 @@ - (QRegion)mask { return toQt(self)->mask(); } -- (QtWidget*)nativeParentWidget +- (QtWidget *)nativeParentWidget { return toOF(toQt(self)->nativeParentWidget()); } -- (QtWidget*)nextInFocusChain +- (QtWidget *)nextInFocusChain { return toOF(toQt(self)->nextInFocusChain()); } - (void)overrideWindowFlags: (Qt::WindowFlags)flags { toQt(self)->overrideWindowFlags(flags); } -- (QtWidget*)parentWidget +- (QtWidget *)parentWidget { return toOF(toQt(self)->parentWidget()); } -- (QtWidget*)previousInFocusChain +- (QtWidget *)previousInFocusChain { return toOF(toQt(self)->previousInFocusChain()); } - (void)releaseKeyboard @@ -863,40 +863,40 @@ - (void)releaseShortcut: (int)ID { toQt(self)->releaseShortcut(ID); } -- (void)removeAction: (QtAction*)action +- (void)removeAction: (QtAction *)action { toQt(self)->removeAction(toQt(action)); } -- (void)renderIntoPaintDevice: (QtObject *)target +- (void)renderIntoPaintDevice: (QtObject *)target targetOffset: (of_point_t)targetOffset sourceRegion: (QRegion)sourceRegion { toQt(self)->render([target qPaintDevice], toQt(targetOffset), sourceRegion); } -- (void)renderIntoPaintDevice: (QtObject *)target +- (void)renderIntoPaintDevice: (QtObject *)target targetOffset: (of_point_t)targetOffset sourceRegion: (QRegion)sourceRegion flags: (QWidget::RenderFlags)renderFlags { toQt(self)->render([target qPaintDevice], toQt(targetOffset), sourceRegion, renderFlags); } -- (void)renderIntoPainter: (QPainter*)target +- (void)renderIntoPainter: (QPainter *)target targetOffset: (of_point_t)targetOffset sourceRegion: (QRegion)sourceRegion { toQt(self)->render(target, toQt(targetOffset), sourceRegion); } -- (void)renderIntoPainter: (QPainter*)target +- (void)renderIntoPainter: (QPainter *)target targetOffset: (of_point_t)targetOffset sourceRegion: (QRegion)sourceRegion flags: (QWidget::RenderFlags)renderFlags { toQt(self)->render(target, toQt(targetOffset), sourceRegion, @@ -906,21 +906,21 @@ - (void)repaintInRectangle: (of_rectangle_t)rect { toQt(self)->repaint(toQt(rect)); } -- (void)repaintInRegion: (const QRegion&)region +- (void)repaintInRegion: (const QRegion &)region { toQt(self)->repaint(region); } -- (bool)restoreGeometry: (OFDataArray*)geometry +- (bool)restoreGeometry: (OFDataArray *)geometry { return toQt(self)->restoreGeometry(toQt(geometry)); } -- (OFDataArray*)saveGeometry +- (OFDataArray *)saveGeometry { return toOF(toQt(self)->saveGeometry()); } - (void)scrollRight: (int)dx @@ -967,46 +967,46 @@ - (void)setFocus: (Qt::FocusReason)reason { toQt(self)->setFocus(reason); } -- (void)setFocusProxy: (QtWidget*)widget +- (void)setFocusProxy: (QtWidget *)widget { toQt(self)->setFocusProxy(toQt(widget)); } - (void)setForegroundRole: (QPalette::ColorRole)role { toQt(self)->setForegroundRole(role); } -- (void)setGraphicsEffect: (QGraphicsEffect*)effect +- (void)setGraphicsEffect: (QGraphicsEffect *)effect { toQt(self)->setGraphicsEffect(effect); } -- (void)setLayout: (QLayout*)layout +- (void)setLayout: (QLayout *)layout { toQt(self)->setLayout(layout); } -- (void)setMaskFromBitmap: (const QBitmap&)bitmap +- (void)setMaskFromBitmap: (const QBitmap &)bitmap { toQt(self)->setMask(bitmap); } -- (void)setMask: (const QRegion&)region +- (void)setMask: (const QRegion &)region { toQt(self)->setMask(region); } -- (void)setParent: (QtWidget*)parent +- (void)setParent: (QtWidget *)parent { toQt(self)->setParent(toQt(parent)); } -- (void)setParent: (QtWidget*)parent +- (void)setParent: (QtWidget *)parent flags: (Qt::WindowFlags)flags { toQt(self)->setParent(toQt(parent), flags); } @@ -1020,31 +1020,31 @@ forShortcut: (int)ID { toQt(self)->setShortcutEnabled(ID, enable); } -- (void)setStyle: (QStyle*)style +- (void)setStyle: (QStyle *)style { toQt(self)->setStyle(style); } -- (void)setWindowRole: (OFString*)role +- (void)setWindowRole: (OFString *)role { toQt(self)->setWindowRole(toQt(role)); } - (void)setWindowState: (Qt::WindowStates)windowState { toQt(self)->setWindowState(windowState); } -- (void)stackUnder: (QtWidget*)widget +- (void)stackUnder: (QtWidget *)widget { toQt(self)->stackUnder(toQt(widget)); } -- (QStyle*)style +- (QStyle *)style { return toQt(self)->style(); } - (bool)testAttribute: (Qt::WidgetAttribute)attribute @@ -1065,11 +1065,11 @@ - (void)updateInRectangle: (of_rectangle_t)rect { toQt(self)->update(toQt(rect)); } -- (void)updateInRegion: (const QRegion&)region +- (void)updateInRegion: (const QRegion &)region { toQt(self)->update(region); } - (void)updateGeometry @@ -1085,21 +1085,21 @@ - (WId)winID { return toQt(self)->winId(); } -- (QtWidget*)window +- (QtWidget *)window { return toOF(toQt(self)->window()); } -- (QWindow*)windowHandle +- (QWindow *)windowHandle { return toQt(self)->windowHandle(); } -- (OFString*)windowRole +- (OFString *)windowRole { return toOF(toQt(self)->windowRole()); } - (Qt::WindowStates)windowState Index: src/common/OFDataArray+QByteArray.h ================================================================== --- src/common/OFDataArray+QByteArray.h +++ src/common/OFDataArray+QByteArray.h @@ -23,17 +23,17 @@ #import #include @interface OFDataArray (QByteArray) -+ (instancetype)dataArrayWithQByteArray: (const QByteArray&)qByteArray; ++ (instancetype)dataArrayWithQByteArray: (const QByteArray &)qByteArray; - (QByteArray)qByteArray; @end namespace ObjQt { -static OF_INLINE OFDataArray* +static OF_INLINE OFDataArray * toOF(const QByteArray &qByteArray) { return [OFDataArray dataArrayWithQByteArray: qByteArray]; } Index: src/common/OFDataArray+QByteArray.mm ================================================================== --- src/common/OFDataArray+QByteArray.mm +++ src/common/OFDataArray+QByteArray.mm @@ -21,11 +21,11 @@ */ #import "OFDataArray+QByteArray.h" @implementation OFDataArray (QByteArray) -+ (instancetype)dataArrayWithQByteArray: (const QByteArray&)qByteArray ++ (instancetype)dataArrayWithQByteArray: (const QByteArray &)qByteArray { OFDataArray *ret = [OFDataArray dataArray]; [ret addItems: qByteArray.data() count: qByteArray.count()]; @@ -32,8 +32,8 @@ return ret; } - (QByteArray)qByteArray { - return QByteArray((char*)[self items], [self count] * [self itemSize]); + return QByteArray((char *)[self items], [self count] * [self itemSize]); } @end Index: src/common/OFString+QString.h ================================================================== --- src/common/OFString+QString.h +++ src/common/OFString+QString.h @@ -23,18 +23,18 @@ #import #include @interface OFString (QString) -+ (instancetype)stringWithQString: (const QString&)qString; -- initWithQString: (const QString&)qString; ++ (instancetype)stringWithQString: (const QString &)qString; +- initWithQString: (const QString &)qString; - (QString)qString; @end namespace ObjQt { -static OF_INLINE OFString* +static OF_INLINE OFString * toOF(const QString &qString) { return [OFString stringWithQString: qString]; } Index: src/common/OFString+QString.mm ================================================================== --- src/common/OFString+QString.mm +++ src/common/OFString+QString.mm @@ -21,31 +21,31 @@ */ #import "OFString+QString.h" @implementation OFString (QString) -+ stringWithQString: (const QString&)qString ++ stringWithQString: (const QString &)qString { return [[[self alloc] initWithQString: qString] autorelease]; } -- initWithQString: (const QString&)qString +- initWithQString: (const QString &)qString { - static_assert(sizeof(QChar) == sizeof(of_char16_t), - "QChar and of_char16_t have a different size!"); + static_assert(sizeof(QChar) == sizeof(char16_t), + "QChar and char16_t have a different size!"); - return [self initWithUTF16String: (of_char16_t*)qString.data() + return [self initWithUTF16String: (char16_t *)qString.data() length: qString.length()]; } - (QString)qString { - static_assert(sizeof(of_char16_t) == sizeof(QChar), - "of_char16_t and QChar have a different size!"); + static_assert(sizeof(char16_t) == sizeof(QChar), + "char16_t and QChar have a different size!"); void *pool = objc_autoreleasePoolPush(); - QString ret = QString((QChar*)[self UTF16String]); + QString ret = QString((QChar *)[self UTF16String]); objc_autoreleasePoolPop(pool); return ret; }