mirror of
https://github.com/mappu/miqt.git
synced 2024-12-22 08:58:37 +00:00
linuxonly: fix ifdef quirks for building on windows
This commit is contained in:
parent
3902c9d36b
commit
bbc75b8ef1
@ -979,7 +979,7 @@ func emitBindingCpp(src *CppParsedHeader, filename string) (string, error) {
|
|||||||
ret.WriteString(
|
ret.WriteString(
|
||||||
"#ifndef Q_OS_LINUX\n" +
|
"#ifndef Q_OS_LINUX\n" +
|
||||||
"\treturn;\n" +
|
"\treturn;\n" +
|
||||||
"#endif\n",
|
"#else\n",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -992,6 +992,12 @@ func emitBindingCpp(src *CppParsedHeader, filename string) (string, error) {
|
|||||||
ret.WriteString("\t*outptr_" + cabiClassName(baseClass) + " = static_cast<" + baseClass + "*>(ret);\n")
|
ret.WriteString("\t*outptr_" + cabiClassName(baseClass) + " = static_cast<" + baseClass + "*>(ret);\n")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ctor.LinuxOnly {
|
||||||
|
ret.WriteString(
|
||||||
|
"#endif\n",
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
ret.WriteString(
|
ret.WriteString(
|
||||||
"}\n" +
|
"}\n" +
|
||||||
"\n",
|
"\n",
|
||||||
|
@ -375,9 +375,10 @@ void QSocketDescriptor_new2(QSocketDescriptor* param1, QSocketDescriptor** outpt
|
|||||||
void QSocketDescriptor_new3(int descriptor, QSocketDescriptor** outptr_QSocketDescriptor) {
|
void QSocketDescriptor_new3(int descriptor, QSocketDescriptor** outptr_QSocketDescriptor) {
|
||||||
#ifndef Q_OS_LINUX
|
#ifndef Q_OS_LINUX
|
||||||
return;
|
return;
|
||||||
#endif
|
#else
|
||||||
QSocketDescriptor* ret = new QSocketDescriptor(static_cast<QSocketDescriptor::DescriptorType>(descriptor));
|
QSocketDescriptor* ret = new QSocketDescriptor(static_cast<QSocketDescriptor::DescriptorType>(descriptor));
|
||||||
*outptr_QSocketDescriptor = ret;
|
*outptr_QSocketDescriptor = ret;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool QSocketDescriptor_IsValid(const QSocketDescriptor* self) {
|
bool QSocketDescriptor_IsValid(const QSocketDescriptor* self) {
|
||||||
|
@ -364,9 +364,10 @@ void QSocketDescriptor_new2(QSocketDescriptor* param1, QSocketDescriptor** outpt
|
|||||||
void QSocketDescriptor_new3(int descriptor, QSocketDescriptor** outptr_QSocketDescriptor) {
|
void QSocketDescriptor_new3(int descriptor, QSocketDescriptor** outptr_QSocketDescriptor) {
|
||||||
#ifndef Q_OS_LINUX
|
#ifndef Q_OS_LINUX
|
||||||
return;
|
return;
|
||||||
#endif
|
#else
|
||||||
QSocketDescriptor* ret = new QSocketDescriptor(static_cast<QSocketDescriptor::DescriptorType>(descriptor));
|
QSocketDescriptor* ret = new QSocketDescriptor(static_cast<QSocketDescriptor::DescriptorType>(descriptor));
|
||||||
*outptr_QSocketDescriptor = ret;
|
*outptr_QSocketDescriptor = ret;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool QSocketDescriptor_IsValid(const QSocketDescriptor* self) {
|
bool QSocketDescriptor_IsValid(const QSocketDescriptor* self) {
|
||||||
|
Loading…
Reference in New Issue
Block a user