78 |
// Constructor. |
// Constructor. |
79 |
qsamplerApplication::qsamplerApplication ( int& argc, char **argv ) |
qsamplerApplication::qsamplerApplication ( int& argc, char **argv ) |
80 |
: QApplication(argc, argv), |
: QApplication(argc, argv), |
81 |
m_pQtTranslator(NULL), m_pMyTranslator(NULL), m_pWidget(NULL) |
m_pQtTranslator(nullptr), m_pMyTranslator(nullptr), m_pWidget(nullptr) |
82 |
{ |
{ |
83 |
|
#if QT_VERSION >= QT_VERSION_CHECK(5, 1, 0) |
84 |
|
QApplication::setApplicationName(QSAMPLER_TITLE); |
85 |
|
QApplication::setApplicationDisplayName(QSAMPLER_TITLE); |
86 |
|
// QSAMPLER_TITLE " - " + QObject::tr(QSAMPLER_SUBTITLE)); |
87 |
|
#endif |
88 |
// Load translation support. |
// Load translation support. |
89 |
QLocale loc; |
QLocale loc; |
90 |
if (loc.language() != QLocale::C) { |
if (loc.language() != QLocale::C) { |
141 |
#ifdef CONFIG_XUNIQUE |
#ifdef CONFIG_XUNIQUE |
142 |
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) |
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) |
143 |
#ifdef CONFIG_X11 |
#ifdef CONFIG_X11 |
144 |
m_pDisplay = NULL; |
m_pDisplay = nullptr; |
145 |
m_aUnique = 0; |
m_aUnique = 0; |
146 |
m_wOwner = 0; |
m_wOwner = 0; |
147 |
#endif // CONFIG_X11 |
#endif // CONFIG_X11 |
148 |
#else |
#else |
149 |
m_pMemory = NULL; |
m_pMemory = nullptr; |
150 |
m_pServer = NULL; |
m_pServer = nullptr; |
151 |
#endif |
#endif |
152 |
#endif // CONFIG_XUNIQUE |
#endif // CONFIG_XUNIQUE |
153 |
} |
} |
161 |
if (m_pServer) { |
if (m_pServer) { |
162 |
m_pServer->close(); |
m_pServer->close(); |
163 |
delete m_pServer; |
delete m_pServer; |
164 |
m_pServer = NULL; |
m_pServer = nullptr; |
165 |
} |
} |
166 |
if (m_pMemory) { |
if (m_pMemory) { |
167 |
delete m_pMemory; |
delete m_pMemory; |
168 |
m_pMemory = NULL; |
m_pMemory = nullptr; |
169 |
} |
} |
170 |
#endif |
#endif |
171 |
#endif // CONFIG_XUNIQUE |
#endif // CONFIG_XUNIQUE |
375 |
if (pSocket) { |
if (pSocket) { |
376 |
const qint64 nread = pSocket->bytesAvailable(); |
const qint64 nread = pSocket->bytesAvailable(); |
377 |
if (nread > 0) { |
if (nread > 0) { |
378 |
QByteArray data = pSocket->read(nread); |
const QByteArray data = pSocket->read(nread); |
379 |
// Just make it always shows up fine... |
// Just make it always shows up fine... |
380 |
m_pWidget->hide(); |
m_pWidget->hide(); |
381 |
m_pWidget->show(); |
m_pWidget->show(); |
426 |
|
|
427 |
// Fork child... |
// Fork child... |
428 |
if (pid == 0) { |
if (pid == 0) { |
429 |
execl(shell, shell, "-c", cmd, NULL); |
execl(shell, shell, "-c", cmd, nullptr); |
430 |
_exit(1); |
_exit(1); |
431 |
return; |
return; |
432 |
} |
} |
463 |
::signal(SIGBUS, stacktrace); |
::signal(SIGBUS, stacktrace); |
464 |
#endif |
#endif |
465 |
#endif |
#endif |
|
qsamplerApplication app(argc, argv); |
|
466 |
#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0) |
#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0) |
467 |
app.setAttribute(Qt::AA_EnableHighDpiScaling); |
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); |
468 |
#endif |
#endif |
469 |
|
qsamplerApplication app(argc, argv); |
470 |
|
|
471 |
#if defined(__APPLE__) // Toshi Nagata 20080105 |
#if defined(__APPLE__) // Toshi Nagata 20080105 |
472 |
{ |
{ |
473 |
// Set the plugin path to @exetutable_path/../plugins |
// Set the plugin path to @exetutable_path/../plugins |