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=isRemoved) bool removed;
- initWithQEvent: (QEvent *)event OF_UNAVAILABLE;
- initWithQChildEvent: (QChildEvent *)qChildEvent;
- initWithType: (QChildEvent::Type)type
child: (QtObject *)child;

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -30,17 +30,17 @@
- 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]);