mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-13 11:19:50 +03:00
63 lines
1.6 KiB
Diff
63 lines
1.6 KiB
Diff
--- a/src/libs/utils/qtcassert.cpp
|
|
+++ b/src/libs/utils/qtcassert.cpp
|
|
@@ -31,8 +31,10 @@
|
|
#if defined(Q_OS_LINUX)
|
|
#include <stdio.h>
|
|
#include <signal.h>
|
|
+#ifdef __GLIBC__
|
|
#include <execinfo.h>
|
|
#endif
|
|
+#endif
|
|
|
|
namespace Utils {
|
|
|
|
@@ -40,7 +42,7 @@ void dumpBacktrace(int maxdepth)
|
|
{
|
|
if (maxdepth == -1)
|
|
maxdepth = 1000;
|
|
-#if defined(Q_OS_UNIX)
|
|
+#if defined(Q_OS_UNIX) && defined(__GLIBC__)
|
|
void *bt[1000] = {nullptr};
|
|
int size = backtrace(bt, sizeof(bt) / sizeof(bt[0]));
|
|
char **lines = backtrace_symbols(bt, size);
|
|
diff --git a/src/plugins/qmldesigner/designercore/exceptions/exception.cpp b/src/plugins/qmldesigner/designercore/exceptions/exception.cpp
|
|
index a3a9806f7e..c369e681ab 100644
|
|
--- a/src/plugins/qmldesigner/designercore/exceptions/exception.cpp
|
|
+++ b/src/plugins/qmldesigner/designercore/exceptions/exception.cpp
|
|
@@ -26,7 +26,9 @@
|
|
#include "exception.h"
|
|
|
|
#ifdef Q_OS_LINUX
|
|
+#if defined(__GLIBC__)
|
|
#include <execinfo.h>
|
|
+#endif
|
|
#include <cxxabi.h>
|
|
#endif
|
|
|
|
@@ -100,6 +102,7 @@ bool Exception::warnAboutException()
|
|
}
|
|
|
|
#ifdef Q_OS_LINUX
|
|
+#ifdef __GLIBC__
|
|
static QString getBackTrace()
|
|
{
|
|
QString backTrace;
|
|
@@ -115,6 +118,7 @@ static QString getBackTrace()
|
|
return backTrace;
|
|
}
|
|
#endif
|
|
+#endif
|
|
|
|
QString Exception::defaultDescription(int line, const QByteArray &function, const QByteArray &file)
|
|
{
|
|
@@ -138,8 +142,10 @@ Exception::Exception(int line, const QByteArray &function,
|
|
, m_file(QString::fromUtf8(file))
|
|
, m_description(description)
|
|
#ifdef Q_OS_LINUX
|
|
+ #ifdef __GLIBC__
|
|
, m_backTrace(getBackTrace())
|
|
#endif
|
|
+ #endif
|
|
{
|
|
if (s_shouldAssert) {
|
|
qDebug() << Exception::description();
|