ObjQt  Check-in [201f28b1d1]

Overview
Comment:Declare designated initializers
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 201f28b1d193eaea5488f9e7368a14d9a15f6062535fba795dad41925432c693
User & Date: js on 2017-05-14 00:57:09
Other Links: manifest | tags
Context
2017-05-14
01:07
Handle NULL / nil in toOF() / toQt() check-in: 6c336e34d7 user: js tags: trunk
00:57
Declare designated initializers check-in: 201f28b1d1 user: js tags: trunk
00:50
Make all properties nonatomic check-in: b2aa2ffc1d user: js tags: trunk
Changes

Modified src/QtCore/QtChildEvent.h from [8aa26cef59] to [32943bf9e4].

28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
@property (readonly, nonatomic) QChildEvent *qChildEvent;
@property (readonly, nonatomic, getter=isAdded) bool added;
@property (readonly, nonatomic) QtObject *child;
@property (readonly, nonatomic, getter=isPolished) bool polished;
@property (readonly, nonatomic, getter=isRemoved) bool removed;

- initWithQEvent: (QEvent *)event OF_UNAVAILABLE;
- initWithQChildEvent: (QChildEvent *)qChildEvent;
- initWithType: (QChildEvent::Type)type
	 child: (QtObject *)child;
@end

namespace ObjQt {

static OF_INLINE QtChildEvent *







|







28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
@property (readonly, nonatomic) QChildEvent *qChildEvent;
@property (readonly, nonatomic, getter=isAdded) bool added;
@property (readonly, nonatomic) QtObject *child;
@property (readonly, nonatomic, getter=isPolished) bool polished;
@property (readonly, nonatomic, getter=isRemoved) bool removed;

- initWithQEvent: (QEvent *)event OF_UNAVAILABLE;
- initWithQChildEvent: (QChildEvent *)qChildEvent OF_DESIGNATED_INITIALIZER;
- initWithType: (QChildEvent::Type)type
	 child: (QtObject *)child;
@end

namespace ObjQt {

static OF_INLINE QtChildEvent *

Modified src/QtCore/QtChildEvent.mm from [77e90608b8] to [ebdc9a8fdc].

44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
		self = [self initWithQChildEvent:
		    new QChildEvent(type, toQt(child))];

		[self takeOwnership];

		return self;
	} catch (const std::bad_alloc &e) {
		self = [super initWithQEvent: NULL];
		[self release];
		throw;
	}
}

- (QChildEvent *)qChildEvent
{







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
		self = [self initWithQChildEvent:
		    new QChildEvent(type, toQt(child))];

		[self takeOwnership];

		return self;
	} catch (const std::bad_alloc &e) {
		self = [self initWithQChildEvent: NULL];
		[self release];
		throw;
	}
}

- (QChildEvent *)qChildEvent
{

Modified src/QtCore/QtCoreApplication.h from [9a82637e75] to [85b036ea11].

27
28
29
30
31
32
33
34

35
36
37
38
39
40
41
@interface QtCoreApplication: QtObject
@property (readonly, nonatomic) QCoreApplication *qCoreApplication;
@property (nonatomic, copy) OFString *applicationName, *applicationVersion;
@property (nonatomic, copy) OFString *organizationDomain, *organizationName;
@property (nonatomic, getter=isQuitLockEnabled) bool quitLockEnabled;

- 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;
@end








|
>







27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
@interface QtCoreApplication: QtObject
@property (readonly, nonatomic) QCoreApplication *qCoreApplication;
@property (nonatomic, copy) OFString *applicationName, *applicationVersion;
@property (nonatomic, copy) OFString *organizationDomain, *organizationName;
@property (nonatomic, getter=isQuitLockEnabled) bool quitLockEnabled;

- initWithQObject: (QObject *)qObject OF_UNAVAILABLE;
- initWithQCoreApplication: (QCoreApplication *)qCoreApplication
    OF_DESIGNATED_INITIALIZER;
- (void)installNativeEventFilter: (QAbstractNativeEventFilter *)filterObject;
- (void)quit;
- (void)removeNativeEventFilter: (QAbstractNativeEventFilter *)filterObject;
- (bool)sendEvent: (QtEvent *)event
	 receiver: (QtObject *)receiver;
@end

Modified src/QtCore/QtEvent.h from [ff20e49325] to [9eeffc99c5].

35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
@property (readonly, nonatomic) QEvent *qEvent;
@property (nonatomic, getter=isAccepted) bool accepted;
@property (readonly, nonatomic, getter=isSpontaneous) bool spontaneous;
@property (readonly, nonatomic) QEvent::Type type;

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

namespace ObjQt {

static OF_INLINE QtEvent *







|







35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
@property (readonly, nonatomic) QEvent *qEvent;
@property (nonatomic, getter=isAccepted) bool accepted;
@property (readonly, nonatomic, getter=isSpontaneous) bool spontaneous;
@property (readonly, nonatomic) QEvent::Type type;

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

namespace ObjQt {

static OF_INLINE QtEvent *

Modified src/QtCore/QtObject.h from [d82bf2c426] to [3fdad31715].

37
38
39
40
41
42
43
44
45
46
47
48
49
50
51

@property (readonly, nonatomic) QObject *qObject;
@property (readonly, nonatomic) const QMetaObject *metaObject;
@property (nonatomic, retain) QtObject *parent;
@property (nonatomic, copy) OFString *objectName;

- 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
				    type: (Qt::ConnectionType)type;
- (bool)disconnectSignal: (OFString *)signal







|







37
38
39
40
41
42
43
44
45
46
47
48
49
50
51

@property (readonly, nonatomic) QObject *qObject;
@property (readonly, nonatomic) const QMetaObject *metaObject;
@property (nonatomic, retain) QtObject *parent;
@property (nonatomic, copy) OFString *objectName;

- init OF_UNAVAILABLE;
- initWithQObject: (QObject *)qObject OF_DESIGNATED_INITIALIZER;
- (bool)setBlockSignals: (bool)block;
- (OFArray OF_GENERIC(QtObject *) *)children;
- (QMetaObject::Connection)connectSignal: (OFString *)signal
				  sender: (QtObject *)sender
				  method: (OFString *)method
				    type: (Qt::ConnectionType)type;
- (bool)disconnectSignal: (OFString *)signal

Modified src/QtCore/QtThread.h from [fa16c3e3b9] to [43ef120cbc].

32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
    bool interruptionRequested;
@property (readonly, nonatomic, getter=isRunning) bool running;
@property (readonly, nonatomic) int loopLevel;
@property (nonatomic) QThread::Priority priority;
@property (nonatomic) unsigned int stackSize;

- 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;
- (void)terminate;
@end







|







32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
    bool interruptionRequested;
@property (readonly, nonatomic, getter=isRunning) bool running;
@property (readonly, nonatomic) int loopLevel;
@property (nonatomic) QThread::Priority priority;
@property (nonatomic) unsigned int stackSize;

- initWithQObject: (QObject *)qObject OF_UNAVAILABLE;
- initWithQThread: (QThread *)qThread OF_DESIGNATED_INITIALIZER;
- (void)exitWithReturnCode: (int)returnCode;
- (void)requestInterruption;
- (bool)waitForMilliseconds: (unsigned long)time;
- (void)quit;
- (void)startWithPriority: (QThread::Priority)priority;
- (void)terminate;
@end

Modified src/QtGui/QtGUIApplication.h from [3b927b4443] to [189b609e87].

33
34
35
36
37
38
39
40

41
42
43
44
45
46
47
@property (nonatomic) Qt::LayoutDirection layoutDirection;
@property (readonly, nonatomic) OFString *platformName;
@property (readonly, nonatomic) QScreen *primaryScreen;
@property (nonatomic) bool quitsOnLastWindowClosed;
@property (nonatomic) QIcon windowIcon;

- initWithQCoreApplication: (QCoreApplication *)qCoreApplication OF_UNAVAILABLE;
- initWithQGuiApplication: (QGuiApplication *)qGuiApplication;

- (double)devicePixelRatio;
- (bool)isSavingSession;
- (bool)isSessionRestored;
- (OFString *)sessionID;
- (OFString *)sessionKey;
@end








|
>







33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
@property (nonatomic) Qt::LayoutDirection layoutDirection;
@property (readonly, nonatomic) OFString *platformName;
@property (readonly, nonatomic) QScreen *primaryScreen;
@property (nonatomic) bool quitsOnLastWindowClosed;
@property (nonatomic) QIcon windowIcon;

- initWithQCoreApplication: (QCoreApplication *)qCoreApplication OF_UNAVAILABLE;
- initWithQGuiApplication: (QGuiApplication *)qGuiApplication
    OF_DESIGNATED_INITIALIZER;
- (double)devicePixelRatio;
- (bool)isSavingSession;
- (bool)isSessionRestored;
- (OFString *)sessionID;
- (OFString *)sessionKey;
@end

Modified src/QtWidgets/QtAbstractButton.h from [c50d80772c] to [fb433a7608].

35
36
37
38
39
40
41
42

43
44
45
46
47
48
49
@property (nonatomic, getter=isDown) bool down;
@property (nonatomic) QIcon icon;
@property (nonatomic) of_dimension_t iconSize;
@property (nonatomic) QKeySequence shortcut;
@property (nonatomic, copy) OFString *text;

- initWithQWidget: (QWidget *)qWidget OF_UNAVAILABLE;
- initWithQAbstractButton: (QAbstractButton *)qAbstractButton;

- (QButtonGroup *)group;
@end

namespace ObjQt {

static OF_INLINE QtAbstractButton *
toOF(QAbstractButton *qAbstractButton)







|
>







35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
@property (nonatomic, getter=isDown) bool down;
@property (nonatomic) QIcon icon;
@property (nonatomic) of_dimension_t iconSize;
@property (nonatomic) QKeySequence shortcut;
@property (nonatomic, copy) OFString *text;

- initWithQWidget: (QWidget *)qWidget OF_UNAVAILABLE;
- initWithQAbstractButton: (QAbstractButton *)qAbstractButton
    OF_DESIGNATED_INITIALIZER;
- (QButtonGroup *)group;
@end

namespace ObjQt {

static OF_INLINE QtAbstractButton *
toOF(QAbstractButton *qAbstractButton)

Modified src/QtWidgets/QtAction.h from [bd2dd3adc8] to [a42f7769d7].

43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
@property (nonatomic, copy) OFString *statusTip;
@property (nonatomic, copy) OFString *text;
@property (nonatomic, copy) OFString *toolTip;
@property (nonatomic, getter=isVisible) bool visible;
@property (nonatomic, copy) OFString *whatsThis;

- initWithQObject: (QObject *)qObject OF_UNAVAILABLE;
- initWithQAction: (QAction *)qAction;
- (QActionGroup *)actionGroup;
- (void)activate: (QAction::ActionEvent)event;
- (QList<QGraphicsWidget *>)associatedGraphicsWidgets;
- (OFArray OF_GENERIC(QtWidget *) *)associatedWidgets;
- (QVariant)data;
- (bool)isSeparator;
- (QMenu *)menu;







|







43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
@property (nonatomic, copy) OFString *statusTip;
@property (nonatomic, copy) OFString *text;
@property (nonatomic, copy) OFString *toolTip;
@property (nonatomic, getter=isVisible) bool visible;
@property (nonatomic, copy) OFString *whatsThis;

- initWithQObject: (QObject *)qObject OF_UNAVAILABLE;
- initWithQAction: (QAction *)qAction OF_DESIGNATED_INITIALIZER;
- (QActionGroup *)actionGroup;
- (void)activate: (QAction::ActionEvent)event;
- (QList<QGraphicsWidget *>)associatedGraphicsWidgets;
- (OFArray OF_GENERIC(QtWidget *) *)associatedWidgets;
- (QVariant)data;
- (bool)isSeparator;
- (QMenu *)menu;

Modified src/QtWidgets/QtApplication.h from [1c7a702202] to [fa444a862d].

33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
@property (nonatomic) int keyboardInputInterval;
@property (nonatomic) int startDragDistance;
@property (nonatomic) int startDragTime;
@property (nonatomic, copy) OFString *styleSheet;
@property (nonatomic) int wheelScrollLines;

- initWithQGuiApplication: (QGuiApplication *)qGuiApplication OF_UNAVAILABLE;
- initWithQApplication: (QApplication *)qApplication;
- (void)aboutQt;
- (void)closeAllWindows;
@end

namespace ObjQt {

static OF_INLINE QtApplication *







|







33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
@property (nonatomic) int keyboardInputInterval;
@property (nonatomic) int startDragDistance;
@property (nonatomic) int startDragTime;
@property (nonatomic, copy) OFString *styleSheet;
@property (nonatomic) int wheelScrollLines;

- initWithQGuiApplication: (QGuiApplication *)qGuiApplication OF_UNAVAILABLE;
- initWithQApplication: (QApplication *)qApplication OF_DESIGNATED_INITIALIZER;
- (void)aboutQt;
- (void)closeAllWindows;
@end

namespace ObjQt {

static OF_INLINE QtApplication *

Modified src/QtWidgets/QtPushButton.h from [dbffbb2ba9] to [f5a84ec4a3].

30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
@property (readonly, nonatomic) QPushButton *qPushButton;
@property (nonatomic) QMenu *menu;
@property (nonatomic) bool autoDefault;
@property (nonatomic, getter=isDefault, setter=setDefault:) bool default_;
@property (nonatomic, getter=isFlat) bool flat;

- initWithQAbstractButton: (QAbstractButton *)qAbstractButton OF_UNAVAILABLE;
- initWithQPushButton: (QPushButton *)qPushButton;
- initWithText: (OFString *)text;
- initWithIcon: (QIcon)icon
	  text: (OFString *)text;
@end

namespace ObjQt {








|







30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
@property (readonly, nonatomic) QPushButton *qPushButton;
@property (nonatomic) QMenu *menu;
@property (nonatomic) bool autoDefault;
@property (nonatomic, getter=isDefault, setter=setDefault:) bool default_;
@property (nonatomic, getter=isFlat) bool flat;

- initWithQAbstractButton: (QAbstractButton *)qAbstractButton OF_UNAVAILABLE;
- initWithQPushButton: (QPushButton *)qPushButton OF_DESIGNATED_INITIALIZER;
- initWithText: (OFString *)text;
- initWithIcon: (QIcon)icon
	  text: (OFString *)text;
@end

namespace ObjQt {

Modified src/QtWidgets/QtPushButton.mm from [ddd71ab879] to [8cd49ef499].

46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
		self = [self initWithQPushButton:
		    new QPushButton(toQt(text))];

		[self takeOwnership];

		return self;
	} catch (const std::bad_alloc &e) {
		self = [super initWithQAbstractButton: NULL];
		[self release];
		throw;
	}
}

- initWithIcon: (QIcon)icon
	  text: (OFString *)text
{
	try {
		self = [self initWithQPushButton:
		    new QPushButton(icon, toQt(text))];

		[self takeOwnership];

		return self;
	} catch (const std::bad_alloc &e) {
		self = [super initWithQAbstractButton: NULL];
		[self release];
		throw;
	}
}

- (QPushButton *)qPushButton
{







|
















|







46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
		self = [self initWithQPushButton:
		    new QPushButton(toQt(text))];

		[self takeOwnership];

		return self;
	} catch (const std::bad_alloc &e) {
		self = [self initWithQPushButton: NULL];
		[self release];
		throw;
	}
}

- initWithIcon: (QIcon)icon
	  text: (OFString *)text
{
	try {
		self = [self initWithQPushButton:
		    new QPushButton(icon, toQt(text))];

		[self takeOwnership];

		return self;
	} catch (const std::bad_alloc &e) {
		self = [self initWithQPushButton: NULL];
		[self release];
		throw;
	}
}

- (QPushButton *)qPushButton
{

Modified src/QtWidgets/QtWidget.h from [5c1d80b6ca] to [0274ca44b6].

83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
@property (nonatomic, getter=isWindowModified) bool windowModified;
@property (nonatomic) double windowOpacity;
@property (nonatomic, copy) OFString *windowTitle;
@property (readonly, nonatomic) int x;
@property (readonly, nonatomic) int y;

- 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)adjustSize;
- (QPalette::ColorRole)backgroundRole;
- (QBackingStore *)backingStore;







|







83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
@property (nonatomic, getter=isWindowModified) bool windowModified;
@property (nonatomic) double windowOpacity;
@property (nonatomic, copy) OFString *windowTitle;
@property (readonly, nonatomic) int x;
@property (readonly, nonatomic) int y;

- initWithQObject: (QObject *)qObject OF_UNAVAILABLE;
- initWithQWidget: (QWidget *)qWidget OF_DESIGNATED_INITIALIZER;
- (OFArray OF_GENERIC(QtAction *) *)actions;
- (void)activateWindow;
- (void)addAction: (QtAction *)action;
- (void)addActions: (OFArray OF_GENERIC(QtAction *) *)actions;
- (void)adjustSize;
- (QPalette::ColorRole)backgroundRole;
- (QBackingStore *)backingStore;