Update to recent ObjFW changes
This commit is contained in:
parent
ba805dab97
commit
1e5a65195e
28 changed files with 341 additions and 331 deletions
|
@ -36,24 +36,25 @@
|
|||
@property bool quitsOnLastWindowClosed;
|
||||
@property QIcon windowIcon;
|
||||
|
||||
- initWithQGuiApplication: (QGuiApplication*)qGuiApplication;
|
||||
- initWithQCoreApplication: (QCoreApplication *)qCoreApplication OF_UNAVAILABLE;
|
||||
- initWithQGuiApplication: (QGuiApplication *)qGuiApplication;
|
||||
- (double)devicePixelRatio;
|
||||
- (bool)isSavingSession;
|
||||
- (bool)isSessionRestored;
|
||||
- (OFString*)sessionID;
|
||||
- (OFString*)sessionKey;
|
||||
- (OFString *)sessionID;
|
||||
- (OFString *)sessionKey;
|
||||
@end
|
||||
|
||||
namespace ObjQt {
|
||||
|
||||
static OF_INLINE QtGUIApplication*
|
||||
static OF_INLINE QtGUIApplication *
|
||||
toOF(QGuiApplication *qGuiApplication)
|
||||
{
|
||||
return [[[QtGUIApplication alloc]
|
||||
initWithQGuiApplication: qGuiApplication] autorelease];
|
||||
}
|
||||
|
||||
static OF_INLINE QGuiApplication*
|
||||
static OF_INLINE QGuiApplication *
|
||||
toQt(QtGUIApplication *GUIApplication)
|
||||
{
|
||||
return [GUIApplication qGuiApplication];
|
||||
|
|
|
@ -29,38 +29,38 @@ using ObjQt::toOF;
|
|||
using ObjQt::toQt;
|
||||
|
||||
@implementation QtGUIApplication
|
||||
- initWithQCoreApplication: (QCoreApplication*)qCoreApplication
|
||||
- initWithQCoreApplication: (QCoreApplication *)qCoreApplication
|
||||
{
|
||||
OF_INVALID_INIT_METHOD
|
||||
}
|
||||
|
||||
- initWithQGuiApplication: (QGuiApplication*)qGuiApplication
|
||||
- initWithQGuiApplication: (QGuiApplication *)qGuiApplication
|
||||
{
|
||||
return [super initWithQCoreApplication: qGuiApplication];
|
||||
}
|
||||
|
||||
- (QGuiApplication*)qGuiApplication
|
||||
- (QGuiApplication *)qGuiApplication
|
||||
{
|
||||
return qobject_cast<QGuiApplication*>(_qObject);
|
||||
return qobject_cast<QGuiApplication *>(_qObject);
|
||||
}
|
||||
|
||||
- (OFString*)applicationDisplayName
|
||||
- (OFString *)applicationDisplayName
|
||||
{
|
||||
return toOF(toQt(self)->applicationDisplayName());
|
||||
}
|
||||
|
||||
- (void)setApplicationDisplayName: (OFString*)applicationDisplayName
|
||||
- (void)setApplicationDisplayName: (OFString *)applicationDisplayName
|
||||
{
|
||||
toQt(self)->setApplicationDisplayName(toQt(applicationDisplayName));
|
||||
}
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
|
||||
- (OFString*)desktopFileName
|
||||
- (OFString *)desktopFileName
|
||||
{
|
||||
return toOF(toQt(self)->desktopFileName());
|
||||
}
|
||||
|
||||
- (void)setDesktopFileName: (OFString*)desktopFileName
|
||||
- (void)setDesktopFileName: (OFString *)desktopFileName
|
||||
{
|
||||
toQt(self)->setDesktopFileName(toQt(desktopFileName));
|
||||
}
|
||||
|
@ -91,12 +91,12 @@ using ObjQt::toQt;
|
|||
toQt(self)->setLayoutDirection(layoutDirection);
|
||||
}
|
||||
|
||||
- (OFString*)platformName
|
||||
- (OFString *)platformName
|
||||
{
|
||||
return toOF(toQt(self)->platformName());
|
||||
}
|
||||
|
||||
- (QScreen*)primaryScreen
|
||||
- (QScreen *)primaryScreen
|
||||
{
|
||||
return toQt(self)->primaryScreen();
|
||||
}
|
||||
|
@ -111,12 +111,12 @@ using ObjQt::toQt;
|
|||
toQt(self)->setQuitOnLastWindowClosed(quitsOnLastWindowClosed);
|
||||
}
|
||||
|
||||
- (OFString*)sessionID
|
||||
- (OFString *)sessionID
|
||||
{
|
||||
return toOF(toQt(self)->sessionId());
|
||||
}
|
||||
|
||||
- (OFString*)sessionKey
|
||||
- (OFString *)sessionKey
|
||||
{
|
||||
return toOF(toQt(self)->sessionKey());
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include <QPaintDevice>
|
||||
|
||||
@protocol QtPaintDevice
|
||||
- (QPaintDevice*)qPaintDevice;
|
||||
- (QPaintDevice *)qPaintDevice;
|
||||
- (int)colorCount;
|
||||
- (int)depth;
|
||||
- (int)devicePixelRatio;
|
||||
|
@ -36,7 +36,7 @@
|
|||
- (int)heightMM;
|
||||
- (int)logicalDPIX;
|
||||
- (int)logicalDPIY;
|
||||
- (QPaintEngine*)paintEngine;
|
||||
- (QPaintEngine *)paintEngine;
|
||||
- (bool)paintingActive;
|
||||
- (int)physicalDPIX;
|
||||
- (int)physicalDPIY;
|
||||
|
@ -50,7 +50,7 @@
|
|||
|
||||
namespace ObjQt {
|
||||
|
||||
static OF_INLINE QPaintDevice*
|
||||
static OF_INLINE QPaintDevice *
|
||||
toQt(QtPaintDevice *paintDevice)
|
||||
{
|
||||
return [paintDevice qPaintDevice];
|
||||
|
|
|
@ -29,9 +29,9 @@ using ObjQt::toQt;
|
|||
@implementation QtPaintDevice
|
||||
@dynamic qObject;
|
||||
|
||||
- (QPaintDevice*)qPaintDevice
|
||||
- (QPaintDevice *)qPaintDevice
|
||||
{
|
||||
return dynamic_cast<QPaintDevice*>([self qObject]);
|
||||
return dynamic_cast<QPaintDevice *>([self qObject]);
|
||||
}
|
||||
|
||||
- (int)colorCount
|
||||
|
@ -76,7 +76,7 @@ using ObjQt::toQt;
|
|||
return toQt(self)->logicalDpiY();
|
||||
}
|
||||
|
||||
- (QPaintEngine*)paintEngine
|
||||
- (QPaintEngine *)paintEngine
|
||||
{
|
||||
return toQt(self)->paintEngine();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue