Adjust to ObjFW changes
This commit is contained in:
parent
5fb2a587b6
commit
8febea385e
8 changed files with 25 additions and 25 deletions
|
@ -35,6 +35,8 @@ AX_CHECK_COMPILER_FLAGS(-pipe, [OBJCXXFLAGS="$OBJCXXFLAGS -pipe"])
|
||||||
AX_CHECK_COMPILER_FLAGS(-fno-common, [OBJCXXFLAGS="$OBJCXXFLAGS -fno-common"])
|
AX_CHECK_COMPILER_FLAGS(-fno-common, [OBJCXXFLAGS="$OBJCXXFLAGS -fno-common"])
|
||||||
AX_CHECK_COMPILER_FLAGS(-Wobjc-missing-property-synthesis -Werror,
|
AX_CHECK_COMPILER_FLAGS(-Wobjc-missing-property-synthesis -Werror,
|
||||||
[OBJCXXFLAGS="$OBJCXXFLAGS -Wobjc-missing-property-synthesis"])
|
[OBJCXXFLAGS="$OBJCXXFLAGS -Wobjc-missing-property-synthesis"])
|
||||||
|
AX_CHECK_COMPILER_FLAGS(-Watomic-properties,
|
||||||
|
[OBJCXXFLAGS="$OBJCXXFLAGS -Watomic-properties"])
|
||||||
AX_CHECK_COMPILER_FLAGS(-Wno-ignored-attributes -Werror,
|
AX_CHECK_COMPILER_FLAGS(-Wno-ignored-attributes -Werror,
|
||||||
[OBJCXXFLAGS="$OBJCXXFLAGS -Wno-ignored-attributes"])
|
[OBJCXXFLAGS="$OBJCXXFLAGS -Wno-ignored-attributes"])
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
method: (OFString *)method;
|
method: (OFString *)method;
|
||||||
- (void)dumpObjectInfo;
|
- (void)dumpObjectInfo;
|
||||||
- (void)dumpObjectTree;
|
- (void)dumpObjectTree;
|
||||||
- (OFArray OF_GENERIC(OFDataArray *) *)dynamicPropertyNames;
|
- (OFArray OF_GENERIC(OFData *) *)dynamicPropertyNames;
|
||||||
- (bool)handleEvent: (QtEvent *)event;
|
- (bool)handleEvent: (QtEvent *)event;
|
||||||
- (bool)filterEvent: (QtEvent *)event
|
- (bool)filterEvent: (QtEvent *)event
|
||||||
forObject: (QtObject *)watched;
|
forObject: (QtObject *)watched;
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#import "QtEvent.h"
|
#import "QtEvent.h"
|
||||||
#import "QtThread.h"
|
#import "QtThread.h"
|
||||||
#import "OFString+QString.h"
|
#import "OFString+QString.h"
|
||||||
#import "OFDataArray+QByteArray.h"
|
#import "OFData+QByteArray.h"
|
||||||
|
|
||||||
#include <QVariant>
|
#include <QVariant>
|
||||||
|
|
||||||
|
@ -133,7 +133,7 @@ using ObjQt::toQt;
|
||||||
_qObject->dumpObjectTree();
|
_qObject->dumpObjectTree();
|
||||||
}
|
}
|
||||||
|
|
||||||
- (OFArray OF_GENERIC(OFDataArray *) *)dynamicPropertyNames
|
- (OFArray OF_GENERIC(OFData *) *)dynamicPropertyNames
|
||||||
{
|
{
|
||||||
const QList<QByteArray> &dynamicPropertyNames =
|
const QList<QByteArray> &dynamicPropertyNames =
|
||||||
_qObject->dynamicPropertyNames();
|
_qObject->dynamicPropertyNames();
|
||||||
|
|
|
@ -169,8 +169,8 @@
|
||||||
flags: (QWidget::RenderFlags)renderFlags;
|
flags: (QWidget::RenderFlags)renderFlags;
|
||||||
- (void)repaintInRectangle: (of_rectangle_t)rect;
|
- (void)repaintInRectangle: (of_rectangle_t)rect;
|
||||||
- (void)repaintInRegion: (const QRegion &)region;
|
- (void)repaintInRegion: (const QRegion &)region;
|
||||||
- (bool)restoreGeometry: (OFDataArray *)geometry;
|
- (bool)restoreGeometry: (OFData *)geometry;
|
||||||
- (OFDataArray *)saveGeometry;
|
- (OFData *)saveGeometry;
|
||||||
- (void)scrollRight: (int)dx
|
- (void)scrollRight: (int)dx
|
||||||
down: (int)dy;
|
down: (int)dy;
|
||||||
- (void)scrollRight: (int)dx
|
- (void)scrollRight: (int)dx
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
#import "QtWidget.h"
|
#import "QtWidget.h"
|
||||||
#import "QtAction.h"
|
#import "QtAction.h"
|
||||||
#import "OFString+QString.h"
|
#import "OFString+QString.h"
|
||||||
#import "OFDataArray+QByteArray.h"
|
#import "OFData+QByteArray.h"
|
||||||
|
|
||||||
#import "helpers.h"
|
#import "helpers.h"
|
||||||
|
|
||||||
|
@ -913,12 +913,12 @@ using ObjQt::toQt;
|
||||||
toQt(self)->repaint(region);
|
toQt(self)->repaint(region);
|
||||||
}
|
}
|
||||||
|
|
||||||
- (bool)restoreGeometry: (OFDataArray *)geometry
|
- (bool)restoreGeometry: (OFData *)geometry
|
||||||
{
|
{
|
||||||
return toQt(self)->restoreGeometry(toQt(geometry));
|
return toQt(self)->restoreGeometry(toQt(geometry));
|
||||||
}
|
}
|
||||||
|
|
||||||
- (OFDataArray *)saveGeometry
|
- (OFData *)saveGeometry
|
||||||
{
|
{
|
||||||
return toOF(toQt(self)->saveGeometry());
|
return toOF(toQt(self)->saveGeometry());
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@ include ../../extra.mk
|
||||||
STATIC_PIC_LIB_NOINST = ${COMMON_LIB_A}
|
STATIC_PIC_LIB_NOINST = ${COMMON_LIB_A}
|
||||||
STATIC_LIB_NOINST = ${COMMON_A}
|
STATIC_LIB_NOINST = ${COMMON_A}
|
||||||
|
|
||||||
SRCS = OFDataArray+QByteArray.mm \
|
SRCS = OFData+QByteArray.mm \
|
||||||
OFString+QString.mm
|
OFString+QString.mm
|
||||||
|
|
||||||
include ../../buildsys.mk
|
include ../../buildsys.mk
|
||||||
|
|
|
@ -24,29 +24,29 @@
|
||||||
|
|
||||||
#include <QByteArray>
|
#include <QByteArray>
|
||||||
|
|
||||||
@interface OFDataArray (QByteArray)
|
@interface OFData (QByteArray)
|
||||||
+ (instancetype)dataArrayWithQByteArray: (const QByteArray &)qByteArray;
|
+ (instancetype)dataWithQByteArray: (const QByteArray &)qByteArray;
|
||||||
- (QByteArray)qByteArray;
|
- (QByteArray)qByteArray;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
namespace ObjQt {
|
namespace ObjQt {
|
||||||
|
|
||||||
static OF_INLINE OFDataArray *
|
static OF_INLINE OFData *
|
||||||
toOF(const QByteArray &qByteArray)
|
toOF(const QByteArray &qByteArray)
|
||||||
{
|
{
|
||||||
if (qByteArray.isNull())
|
if (qByteArray.isNull())
|
||||||
return nil;
|
return nil;
|
||||||
|
|
||||||
return [OFDataArray dataArrayWithQByteArray: qByteArray];
|
return [OFData dataWithQByteArray: qByteArray];
|
||||||
}
|
}
|
||||||
|
|
||||||
static OF_INLINE QByteArray
|
static OF_INLINE QByteArray
|
||||||
toQt(OFDataArray *dataArray)
|
toQt(OFData *data)
|
||||||
{
|
{
|
||||||
if (dataArray == nil)
|
if (data == nil)
|
||||||
return QByteArray();
|
return QByteArray();
|
||||||
|
|
||||||
return [dataArray qByteArray];
|
return [data qByteArray];
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -20,20 +20,18 @@
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import "OFDataArray+QByteArray.h"
|
#import "OFData+QByteArray.h"
|
||||||
|
|
||||||
@implementation OFDataArray (QByteArray)
|
@implementation OFData (QByteArray)
|
||||||
+ (instancetype)dataArrayWithQByteArray: (const QByteArray &)qByteArray
|
+ (instancetype)dataWithQByteArray: (const QByteArray &)qByteArray
|
||||||
{
|
{
|
||||||
OFDataArray *ret = [OFDataArray dataArray];
|
return [OFData dataWithItems: qByteArray.data()
|
||||||
[ret addItems: qByteArray.data()
|
count: qByteArray.count()];
|
||||||
count: qByteArray.count()];
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (QByteArray)qByteArray
|
- (QByteArray)qByteArray
|
||||||
{
|
{
|
||||||
return QByteArray((char *)[self items], [self count] * [self itemSize]);
|
return QByteArray((const char *)[self items],
|
||||||
|
[self count] * [self itemSize]);
|
||||||
}
|
}
|
||||||
@end
|
@end
|
Loading…
Add table
Add a link
Reference in a new issue