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;
- initWithQEvent: (QEvent *)event OF_UNAVAILABLE;
- initWithQChildEvent: (QChildEvent *)qChildEvent;
- initWithQChildEvent: (QChildEvent *)qChildEvent OF_DESIGNATED_INITIALIZER;
- initWithType: (QChildEvent::Type)type
child: (QtObject *)child;
@end

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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