mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 23:05:36 +08:00
refs #248 fixed a GCC warning
This commit is contained in:
@@ -85,6 +85,8 @@ class QSharedApplication : public QApplication
|
||||
m_weakptr = ptr;
|
||||
}
|
||||
|
||||
static char *strdup(const char *s) { auto s2 = static_cast<char *>(std::malloc(std::strlen(s))); return std::strcpy(s2, s); }
|
||||
|
||||
public:
|
||||
/*!
|
||||
* Returns a shared pointer to the QApplication.
|
||||
@@ -97,7 +99,7 @@ public:
|
||||
if (! instance())
|
||||
{
|
||||
static int argc = 1;
|
||||
static char *argv[] = { "X-Plane" };
|
||||
static char *argv[] = { strdup("X-Plane") };
|
||||
new QSharedApplication(ptr, argc, argv);
|
||||
}
|
||||
if (! instance()->inherits("QSharedApplication"))
|
||||
|
||||
Reference in New Issue
Block a user