Declare designated initializers

This commit is contained in:
Jonathan Schleifer 2017-05-14 02:57:09 +02:00
parent 20ca71e816
commit dcc0d5e48a
No known key found for this signature in database
GPG key ID: 28D65178B37F33E3
13 changed files with 17 additions and 14 deletions

View file

@ -32,7 +32,7 @@
@property (readonly, nonatomic, getter=isRemoved) bool removed; @property (readonly, nonatomic, getter=isRemoved) bool removed;
- initWithQEvent: (QEvent *)event OF_UNAVAILABLE; - initWithQEvent: (QEvent *)event OF_UNAVAILABLE;
- initWithQChildEvent: (QChildEvent *)qChildEvent; - initWithQChildEvent: (QChildEvent *)qChildEvent OF_DESIGNATED_INITIALIZER;
- initWithType: (QChildEvent::Type)type - initWithType: (QChildEvent::Type)type
child: (QtObject *)child; child: (QtObject *)child;
@end @end

View file

@ -48,7 +48,7 @@ using ObjQt::toQt;
return self; return self;
} catch (const std::bad_alloc &e) { } catch (const std::bad_alloc &e) {
self = [super initWithQEvent: NULL]; self = [self initWithQChildEvent: NULL];
[self release]; [self release];
throw; throw;
} }

View file

@ -31,7 +31,8 @@
@property (nonatomic, getter=isQuitLockEnabled) bool quitLockEnabled; @property (nonatomic, getter=isQuitLockEnabled) bool quitLockEnabled;
- initWithQObject: (QObject *)qObject OF_UNAVAILABLE; - initWithQObject: (QObject *)qObject OF_UNAVAILABLE;
- initWithQCoreApplication: (QCoreApplication *)qCoreApplication; - initWithQCoreApplication: (QCoreApplication *)qCoreApplication
OF_DESIGNATED_INITIALIZER;
- (void)installNativeEventFilter: (QAbstractNativeEventFilter *)filterObject; - (void)installNativeEventFilter: (QAbstractNativeEventFilter *)filterObject;
- (void)quit; - (void)quit;
- (void)removeNativeEventFilter: (QAbstractNativeEventFilter *)filterObject; - (void)removeNativeEventFilter: (QAbstractNativeEventFilter *)filterObject;

View file

@ -39,7 +39,7 @@
+ (int)registerEventType: (int)hint; + (int)registerEventType: (int)hint;
- init OF_UNAVAILABLE; - init OF_UNAVAILABLE;
- initWithQEvent: (QEvent *)qEvent; - initWithQEvent: (QEvent *)qEvent OF_DESIGNATED_INITIALIZER;
- (void)accept; - (void)accept;
- (void)ignore; - (void)ignore;
@end @end

View file

@ -41,7 +41,7 @@
@property (nonatomic, copy) OFString *objectName; @property (nonatomic, copy) OFString *objectName;
- init OF_UNAVAILABLE; - init OF_UNAVAILABLE;
- initWithQObject: (QObject *)qObject; - initWithQObject: (QObject *)qObject OF_DESIGNATED_INITIALIZER;
- (bool)setBlockSignals: (bool)block; - (bool)setBlockSignals: (bool)block;
- (OFArray OF_GENERIC(QtObject *) *)children; - (OFArray OF_GENERIC(QtObject *) *)children;
- (QMetaObject::Connection)connectSignal: (OFString *)signal - (QMetaObject::Connection)connectSignal: (OFString *)signal

View file

@ -36,7 +36,7 @@
@property (nonatomic) unsigned int stackSize; @property (nonatomic) unsigned int stackSize;
- initWithQObject: (QObject *)qObject OF_UNAVAILABLE; - initWithQObject: (QObject *)qObject OF_UNAVAILABLE;
- initWithQThread: (QThread *)qThread; - initWithQThread: (QThread *)qThread OF_DESIGNATED_INITIALIZER;
- (void)exitWithReturnCode: (int)returnCode; - (void)exitWithReturnCode: (int)returnCode;
- (void)requestInterruption; - (void)requestInterruption;
- (bool)waitForMilliseconds: (unsigned long)time; - (bool)waitForMilliseconds: (unsigned long)time;

View file

@ -37,7 +37,8 @@
@property (nonatomic) QIcon windowIcon; @property (nonatomic) QIcon windowIcon;
- initWithQCoreApplication: (QCoreApplication *)qCoreApplication OF_UNAVAILABLE; - initWithQCoreApplication: (QCoreApplication *)qCoreApplication OF_UNAVAILABLE;
- initWithQGuiApplication: (QGuiApplication *)qGuiApplication; - initWithQGuiApplication: (QGuiApplication *)qGuiApplication
OF_DESIGNATED_INITIALIZER;
- (double)devicePixelRatio; - (double)devicePixelRatio;
- (bool)isSavingSession; - (bool)isSavingSession;
- (bool)isSessionRestored; - (bool)isSessionRestored;

View file

@ -39,7 +39,8 @@
@property (nonatomic, copy) OFString *text; @property (nonatomic, copy) OFString *text;
- initWithQWidget: (QWidget *)qWidget OF_UNAVAILABLE; - initWithQWidget: (QWidget *)qWidget OF_UNAVAILABLE;
- initWithQAbstractButton: (QAbstractButton *)qAbstractButton; - initWithQAbstractButton: (QAbstractButton *)qAbstractButton
OF_DESIGNATED_INITIALIZER;
- (QButtonGroup *)group; - (QButtonGroup *)group;
@end @end

View file

@ -47,7 +47,7 @@
@property (nonatomic, copy) OFString *whatsThis; @property (nonatomic, copy) OFString *whatsThis;
- initWithQObject: (QObject *)qObject OF_UNAVAILABLE; - initWithQObject: (QObject *)qObject OF_UNAVAILABLE;
- initWithQAction: (QAction *)qAction; - initWithQAction: (QAction *)qAction OF_DESIGNATED_INITIALIZER;
- (QActionGroup *)actionGroup; - (QActionGroup *)actionGroup;
- (void)activate: (QAction::ActionEvent)event; - (void)activate: (QAction::ActionEvent)event;
- (QList<QGraphicsWidget *>)associatedGraphicsWidgets; - (QList<QGraphicsWidget *>)associatedGraphicsWidgets;

View file

@ -37,7 +37,7 @@
@property (nonatomic) int wheelScrollLines; @property (nonatomic) int wheelScrollLines;
- initWithQGuiApplication: (QGuiApplication *)qGuiApplication OF_UNAVAILABLE; - initWithQGuiApplication: (QGuiApplication *)qGuiApplication OF_UNAVAILABLE;
- initWithQApplication: (QApplication *)qApplication; - initWithQApplication: (QApplication *)qApplication OF_DESIGNATED_INITIALIZER;
- (void)aboutQt; - (void)aboutQt;
- (void)closeAllWindows; - (void)closeAllWindows;
@end @end

View file

@ -34,7 +34,7 @@
@property (nonatomic, getter=isFlat) bool flat; @property (nonatomic, getter=isFlat) bool flat;
- initWithQAbstractButton: (QAbstractButton *)qAbstractButton OF_UNAVAILABLE; - initWithQAbstractButton: (QAbstractButton *)qAbstractButton OF_UNAVAILABLE;
- initWithQPushButton: (QPushButton *)qPushButton; - initWithQPushButton: (QPushButton *)qPushButton OF_DESIGNATED_INITIALIZER;
- initWithText: (OFString *)text; - initWithText: (OFString *)text;
- initWithIcon: (QIcon)icon - initWithIcon: (QIcon)icon
text: (OFString *)text; text: (OFString *)text;

View file

@ -50,7 +50,7 @@ using ObjQt::toQt;
return self; return self;
} catch (const std::bad_alloc &e) { } catch (const std::bad_alloc &e) {
self = [super initWithQAbstractButton: NULL]; self = [self initWithQPushButton: NULL];
[self release]; [self release];
throw; throw;
} }
@ -67,7 +67,7 @@ using ObjQt::toQt;
return self; return self;
} catch (const std::bad_alloc &e) { } catch (const std::bad_alloc &e) {
self = [super initWithQAbstractButton: NULL]; self = [self initWithQPushButton: NULL];
[self release]; [self release];
throw; throw;
} }

View file

@ -87,7 +87,7 @@
@property (readonly, nonatomic) int y; @property (readonly, nonatomic) int y;
- initWithQObject: (QObject *)qObject OF_UNAVAILABLE; - initWithQObject: (QObject *)qObject OF_UNAVAILABLE;
- initWithQWidget: (QWidget *)qWidget; - initWithQWidget: (QWidget *)qWidget OF_DESIGNATED_INITIALIZER;
- (OFArray OF_GENERIC(QtAction *) *)actions; - (OFArray OF_GENERIC(QtAction *) *)actions;
- (void)activateWindow; - (void)activateWindow;
- (void)addAction: (QtAction *)action; - (void)addAction: (QtAction *)action;