mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-23 10:22:55 +00:00
check for program_invocation_short_name variable and use it in QCoreApplication::setApplicationName() if available
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
c23499cb2a
commit
212ea37257
2 changed files with 6 additions and 0 deletions
|
@ -352,6 +352,7 @@ katie_check_function(timegm "time.h")
|
|||
katie_check_function(pipe2 "unistd.h")
|
||||
katie_check_function(getdomainname "unistd.h")
|
||||
katie_check_function(renameat2 "stdio.h")
|
||||
katie_check_function(program_invocation_short_name "errno.h")
|
||||
katie_check_struct(tm tm_gmtoff "time.h")
|
||||
katie_check_struct(tm tm_zone "time.h")
|
||||
katie_check_struct(dirent d_type "dirent.h")
|
||||
|
|
|
@ -48,6 +48,7 @@
|
|||
#include "qstdcontainers_p.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
@ -1568,6 +1569,10 @@ QString QCoreApplication::applicationName()
|
|||
{
|
||||
QString name = coreappdata()->application;
|
||||
|
||||
#ifdef QT_HAVE_PROGRAM_INVOCATION_SHORT_NAME
|
||||
name = QString::fromLocal8Bit(program_invocation_short_name);
|
||||
#endif
|
||||
|
||||
#ifdef QT_HAVE_GETPROGNAME
|
||||
if (name.isEmpty()) {
|
||||
name = QString::fromLocal8Bit(::getprogname());
|
||||
|
|
Loading…
Add table
Reference in a new issue