miqt/qt6/gen_qdesktopservices.cpp

37 lines
950 B
C++
Raw Permalink Normal View History

2024-10-20 05:21:03 +00:00
#include <QDesktopServices>
#include <QObject>
#include <QString>
#include <QByteArray>
#include <cstring>
#include <QUrl>
#include <qdesktopservices.h>
#include "gen_qdesktopservices.h"
#ifndef _Bool
#define _Bool bool
#endif
2024-10-20 05:21:03 +00:00
#include "_cgo_export.h"
bool QDesktopServices_OpenUrl(QUrl* url) {
return QDesktopServices::openUrl(*url);
}
void QDesktopServices_SetUrlHandler(struct miqt_string scheme, QObject* receiver, const char* method) {
QString scheme_QString = QString::fromUtf8(scheme.data, scheme.len);
QDesktopServices::setUrlHandler(scheme_QString, receiver, method);
}
void QDesktopServices_UnsetUrlHandler(struct miqt_string scheme) {
QString scheme_QString = QString::fromUtf8(scheme.data, scheme.len);
QDesktopServices::unsetUrlHandler(scheme_QString);
}
2024-11-19 06:29:06 +00:00
void QDesktopServices_Delete(QDesktopServices* self, bool isSubclass) {
if (isSubclass) {
delete dynamic_cast<QDesktopServices*>( self );
} else {
delete self;
}
2024-10-20 05:21:03 +00:00
}