Skip to content

Commit 0d03159

Browse files
author
Matt Peterson
committed
Remove SetDesktopFileName, we don're require Qt 5.7 yet
1 parent e6b4b95 commit 0d03159

File tree

3 files changed

+16
-14
lines changed

3 files changed

+16
-14
lines changed

cpp/capi.cpp

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -207,13 +207,14 @@ void guiappSetApplicationDisplayName(const char *path, int pathLen)
207207

208208
QGuiApplication::setApplicationDisplayName(qsappDispName);
209209
}
210-
void guiappSetDesktopFileName(const char *path, int pathLen)
211-
{
212-
QByteArray qfileName(path, pathLen);
213-
QString qsfileName = QString::fromUtf8(qfileName);
214-
215-
QGuiApplication::setDesktopFileName(qsfileName);
216-
}
210+
// Added in Qt 5.7
211+
// void guiappSetDesktopFileName(const char *path, int pathLen)
212+
// {
213+
// QByteArray qfileName(path, pathLen);
214+
// QString qsfileName = QString::fromUtf8(qfileName);
215+
//
216+
// QGuiApplication::setDesktopFileName(qsfileName);
217+
// }
217218
void guiappSetWindowIcon(const char *path, int pathLen)
218219
{
219220
QByteArray qiconPath(path, pathLen);

cpp/capi.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ void coreSetOrganizationDomain(const char *path, int pathLen);
139139
void coreSetOrganizationName(const char *path, int pathLen);
140140

141141
void guiappSetApplicationDisplayName(const char *path, int pathLen);
142-
void guiappSetDesktopFileName(const char *path, int pathLen);
142+
// void guiappSetDesktopFileName(const char *path, int pathLen); // Qt 5.7
143143
void guiappSetWindowIcon(const char *path, int pathLen);
144144

145145
void contextGetProperty(QQmlContext_ *context, QString_ *name, DataValue *value);

qml.go

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,13 @@ func SetApplicationDisplayName(name string) {
5555
})
5656
}
5757

58-
func SetDesktopFileName(path string) {
59-
cpath, cpathLen := util.UnsafeStringData(path)
60-
RunMain(func() {
61-
C.guiappSetDesktopFileName((*C.char)(cpath), C.int(cpathLen))
62-
})
63-
}
58+
// Qt 5.7
59+
// func SetDesktopFileName(path string) {
60+
// cpath, cpathLen := util.UnsafeStringData(path)
61+
// RunMain(func() {
62+
// C.guiappSetDesktopFileName((*C.char)(cpath), C.int(cpathLen))
63+
// })
64+
// }
6465

6566
func SetWindowIcon(path string) {
6667
cpath, cpathLen := util.UnsafeStringData(path)

0 commit comments

Comments
 (0)