Update to recent ObjFW changes

This commit is contained in:
Jonathan Schleifer 2017-05-08 02:11:18 +02:00
parent ba805dab97
commit 1e5a65195e
No known key found for this signature in database
GPG key ID: 28D65178B37F33E3
28 changed files with 341 additions and 331 deletions

View file

@ -31,6 +31,7 @@
@property (readonly, getter=isPolished) bool polished; @property (readonly, getter=isPolished) bool polished;
@property (readonly, getter=isRemoved) bool removed; @property (readonly, getter=isRemoved) bool removed;
- initWithQEvent: (QEvent *)event OF_UNAVAILABLE;
- initWithQChildEvent: (QChildEvent *)qChildEvent; - initWithQChildEvent: (QChildEvent *)qChildEvent;
- initWithType: (QChildEvent::Type)type - initWithType: (QChildEvent::Type)type
child: (QtObject *)child; child: (QtObject *)child;

View file

@ -30,6 +30,7 @@
@property (copy) OFString *organizationDomain, *organizationName; @property (copy) OFString *organizationDomain, *organizationName;
@property (getter=isQuitLockEnabled) bool quitLockEnabled; @property (getter=isQuitLockEnabled) bool quitLockEnabled;
- initWithQObject: (QObject *)qObject OF_UNAVAILABLE;
- initWithQCoreApplication: (QCoreApplication *)qCoreApplication; - initWithQCoreApplication: (QCoreApplication *)qCoreApplication;
- (void)installNativeEventFilter: (QAbstractNativeEventFilter *)filterObject; - (void)installNativeEventFilter: (QAbstractNativeEventFilter *)filterObject;
- (void)quit; - (void)quit;

View file

@ -38,6 +38,7 @@
@property (readonly) QEvent::Type type; @property (readonly) QEvent::Type type;
+ (int)registerEventType: (int)hint; + (int)registerEventType: (int)hint;
- init OF_UNAVAILABLE;
- initWithQEvent: (QEvent *)qEvent; - initWithQEvent: (QEvent *)qEvent;
- (void)accept; - (void)accept;
- (void)ignore; - (void)ignore;

View file

@ -40,6 +40,7 @@
@property (retain) QtObject *parent; @property (retain) QtObject *parent;
@property (copy) OFString *objectName; @property (copy) OFString *objectName;
- init OF_UNAVAILABLE;
- initWithQObject: (QObject *)qObject; - initWithQObject: (QObject *)qObject;
- (bool)setBlockSignals: (bool)block; - (bool)setBlockSignals: (bool)block;
- (OFArray OF_GENERIC(QtObject *) *)children; - (OFArray OF_GENERIC(QtObject *) *)children;

View file

@ -34,6 +34,7 @@
@property QThread::Priority priority; @property QThread::Priority priority;
@property unsigned int stackSize; @property unsigned int stackSize;
- initWithQObject: (QObject *)qObject OF_UNAVAILABLE;
- initWithQThread: (QThread *)qThread; - initWithQThread: (QThread *)qThread;
- (void)exitWithReturnCode: (int)returnCode; - (void)exitWithReturnCode: (int)returnCode;
- (void)requestInterruption; - (void)requestInterruption;

View file

@ -36,6 +36,7 @@
@property bool quitsOnLastWindowClosed; @property bool quitsOnLastWindowClosed;
@property QIcon windowIcon; @property QIcon windowIcon;
- initWithQCoreApplication: (QCoreApplication *)qCoreApplication OF_UNAVAILABLE;
- initWithQGuiApplication: (QGuiApplication *)qGuiApplication; - initWithQGuiApplication: (QGuiApplication *)qGuiApplication;
- (double)devicePixelRatio; - (double)devicePixelRatio;
- (bool)isSavingSession; - (bool)isSavingSession;

View file

@ -38,6 +38,7 @@
@property QKeySequence shortcut; @property QKeySequence shortcut;
@property (copy) OFString *text; @property (copy) OFString *text;
- initWithQWidget: (QWidget *)qWidget OF_UNAVAILABLE;
- initWithQAbstractButton: (QAbstractButton *)qAbstractButton; - initWithQAbstractButton: (QAbstractButton *)qAbstractButton;
- (QButtonGroup *)group; - (QButtonGroup *)group;
@end @end

View file

@ -46,6 +46,7 @@
@property (getter=isVisible) bool visible; @property (getter=isVisible) bool visible;
@property (copy) OFString *whatsThis; @property (copy) OFString *whatsThis;
- initWithQObject: (QObject *)qObject OF_UNAVAILABLE;
- initWithQAction: (QAction *)qAction; - initWithQAction: (QAction *)qAction;
- (QActionGroup *)actionGroup; - (QActionGroup *)actionGroup;
- (void)activate: (QAction::ActionEvent)event; - (void)activate: (QAction::ActionEvent)event;

View file

@ -36,6 +36,7 @@
@property (copy) OFString *styleSheet; @property (copy) OFString *styleSheet;
@property int wheelScrollLines; @property int wheelScrollLines;
- initWithQGuiApplication: (QGuiApplication *)qGuiApplication OF_UNAVAILABLE;
- initWithQApplication: (QApplication *)qApplication; - initWithQApplication: (QApplication *)qApplication;
- (void)aboutQt; - (void)aboutQt;
- (void)closeAllWindows; - (void)closeAllWindows;

View file

@ -33,6 +33,7 @@
@property (getter=isDefault, setter=setDefault:) bool default_; @property (getter=isDefault, setter=setDefault:) bool default_;
@property (getter=isFlat) bool flat; @property (getter=isFlat) bool flat;
- initWithQAbstractButton: (QAbstractButton *)qAbstractButton OF_UNAVAILABLE;
- initWithQPushButton: (QPushButton *)qPushButton; - initWithQPushButton: (QPushButton *)qPushButton;
- initWithText: (OFString *)text; - initWithText: (OFString *)text;
- initWithIcon: (QIcon)icon - initWithIcon: (QIcon)icon

View file

@ -30,7 +30,6 @@ using ObjQt::toOF;
using ObjQt::toQt; using ObjQt::toQt;
@implementation QtPushButton @implementation QtPushButton
- initWithQAbstractButton: (QAbstractButton *)qAbstractButton - initWithQAbstractButton: (QAbstractButton *)qAbstractButton
{ {
OF_INVALID_INIT_METHOD OF_INVALID_INIT_METHOD

View file

@ -86,6 +86,7 @@
@property (readonly) int x; @property (readonly) int x;
@property (readonly) int y; @property (readonly) int y;
- initWithQObject: (QObject *)qObject OF_UNAVAILABLE;
- initWithQWidget: (QWidget *)qWidget; - initWithQWidget: (QWidget *)qWidget;
- (OFArray OF_GENERIC(QtAction *) *)actions; - (OFArray OF_GENERIC(QtAction *) *)actions;
- (void)activateWindow; - (void)activateWindow;

View file

@ -30,17 +30,17 @@
- initWithQString: (const QString &)qString - initWithQString: (const QString &)qString
{ {
static_assert(sizeof(QChar) == sizeof(of_char16_t), static_assert(sizeof(QChar) == sizeof(char16_t),
"QChar and of_char16_t have a different size!"); "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()]; length: qString.length()];
} }
- (QString)qString - (QString)qString
{ {
static_assert(sizeof(of_char16_t) == sizeof(QChar), static_assert(sizeof(char16_t) == sizeof(QChar),
"of_char16_t and QChar have a different size!"); "char16_t and QChar have a different size!");
void *pool = objc_autoreleasePoolPush(); void *pool = objc_autoreleasePoolPush();
QString ret = QString((QChar *)[self UTF16String]); QString ret = QString((QChar *)[self UTF16String]);