37 |
#define darker(x) dark(x) |
#define darker(x) dark(x) |
38 |
#endif |
#endif |
39 |
|
|
40 |
|
#if WIN32 |
41 |
|
#define RELATIVE_LOCALE_DIR "/share/locale" |
42 |
|
#elif defined(__APPLE__) |
43 |
|
#define RELATIVE_LOCALE_DIR "/../Resources" |
44 |
|
#endif |
45 |
|
|
46 |
|
|
47 |
//------------------------------------------------------------------------- |
//------------------------------------------------------------------------- |
48 |
// Singleton application instance stuff (Qt/X11 only atm.) |
// Singleton application instance stuff (Qt/X11 only atm.) |
77 |
if (m_pQtTranslator->load(sLocName, sLocPath)) { |
if (m_pQtTranslator->load(sLocName, sLocPath)) { |
78 |
QApplication::installTranslator(m_pQtTranslator); |
QApplication::installTranslator(m_pQtTranslator); |
79 |
} else { |
} else { |
80 |
|
#ifdef RELATIVE_LOCALE_DIR |
81 |
|
sLocPath = QApplication::applicationDirPath() + RELATIVE_LOCALE_DIR; |
82 |
|
if (m_pQtTranslator->load(sLocName, sLocPath)) { |
83 |
|
QApplication::installTranslator(m_pQtTranslator); |
84 |
|
} else { |
85 |
|
#endif |
86 |
delete m_pQtTranslator; |
delete m_pQtTranslator; |
87 |
m_pQtTranslator = 0; |
m_pQtTranslator = 0; |
88 |
#ifdef CONFIG_DEBUG |
#ifdef CONFIG_DEBUG |
91 |
sLocPath.toUtf8().constData(), |
sLocPath.toUtf8().constData(), |
92 |
sLocName.toUtf8().constData()); |
sLocName.toUtf8().constData()); |
93 |
#endif |
#endif |
94 |
|
#ifdef RELATIVE_LOCALE_DIR |
95 |
|
} |
96 |
|
#endif |
97 |
} |
} |
98 |
// Try own application translation... |
// Try own application translation... |
99 |
m_pMyTranslator = new QTranslator(this); |
m_pMyTranslator = new QTranslator(this); |
101 |
if (m_pMyTranslator->load(sLocName, sLocPath)) { |
if (m_pMyTranslator->load(sLocName, sLocPath)) { |
102 |
QApplication::installTranslator(m_pMyTranslator); |
QApplication::installTranslator(m_pMyTranslator); |
103 |
} else { |
} else { |
104 |
|
#ifdef RELATIVE_LOCALE_DIR |
105 |
|
sLocPath = QApplication::applicationDirPath() + RELATIVE_LOCALE_DIR; |
106 |
|
#else |
107 |
sLocPath = CONFIG_PREFIX "/share/locale"; |
sLocPath = CONFIG_PREFIX "/share/locale"; |
108 |
|
#endif |
109 |
if (m_pMyTranslator->load(sLocName, sLocPath)) { |
if (m_pMyTranslator->load(sLocName, sLocPath)) { |
110 |
QApplication::installTranslator(m_pMyTranslator); |
QApplication::installTranslator(m_pMyTranslator); |
111 |
} else { |
} else { |
276 |
signal(signo, SIG_DFL); |
signal(signo, SIG_DFL); |
277 |
|
|
278 |
static const char *shell = "/bin/sh"; |
static const char *shell = "/bin/sh"; |
279 |
static const char *format = "gdb -q --batch --pid=%d --eval-command=bt"; |
static const char *format = "gdb -q --batch --pid=%d" |
280 |
|
" --eval-command='thread apply all bt'"; |
281 |
|
|
282 |
snprintf(cmd, sizeof(cmd), format, (int) getpid()); |
snprintf(cmd, sizeof(cmd), format, (int) getpid()); |
283 |
|
|