[SCM] Qt 4 packaging branch, master, updated. debian/4.7.1-2-21-ge9b94c8
Fathi Boudra
fabo at alioth.debian.org
Sun Mar 6 07:42:51 UTC 2011
The following commit has been merged in the master branch:
commit ee970dabcda09ca4fb2737877a5ea97e771b83a6
Author: Fathi Boudra <fabo at debian.org>
Date: Sun Mar 6 09:30:23 2011 +0200
Add qtdebug_syslog.patch - send Q_ASSERT, qDebug, qWarning and qFatal
messages to syslog.
---
debian/changelog | 2 +
debian/patches/qtdebug_syslog.patch | 61 +++++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 64 insertions(+), 0 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index c08d887..08a1cef 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -15,6 +15,8 @@ qt4-x11 (4:4.7.2-1) UNRELEASED; urgency=low
- 17_add_postgresql_8.3_support.diff - fixed upstream.
- 22_use___GLIBC__.diff - merged upstream.
* Add patches:
+ - qtdebug_syslog.patch - send Q_ASSERT, qDebug, qWarning and qFatal
+ messages to syslog.
- buildable_appchooser_states_demos.patch - images files aren't shipped
(Closes: #616500)
* Update symbols files.
diff --git a/debian/patches/qtdebug_syslog.patch b/debian/patches/qtdebug_syslog.patch
new file mode 100644
index 0000000..320ad8c
--- /dev/null
+++ b/debian/patches/qtdebug_syslog.patch
@@ -0,0 +1,61 @@
+Description: send Q_ASSERT, qDebug, qWarning and qFatal messages to syslog
+Forwarded: not-needed
+Author: Thiago Macieira <thiago at kde.org>
+--- a/src/corelib/global/qglobal.cpp
++++ b/src/corelib/global/qglobal.cpp
+@@ -50,6 +50,7 @@
+
+ #ifndef QT_NO_QOBJECT
+ #include <private/qthread_p.h>
++#include <private/qcoreapplication_p.h>
+ #endif
+
+ #include <stdio.h>
+@@ -88,6 +89,8 @@
+ _LIT(qt_S60Filter, "Series60v?.*.sis");
+ _LIT(qt_symbianFilter, "Symbianv*.sis");
+ _LIT(qt_symbianSystemInstallDir, "z:\\system\\install\\");
++#elif defined(Q_OS_UNIX)
++#include <syslog.h>
+ #endif
+
+ QT_BEGIN_NAMESPACE
+@@ -2247,6 +2250,27 @@ void qt_message_output(QtMsgType msgType
+ #else
+ fprintf(stderr, "%s\n", buf);
+ fflush(stderr);
++
++ if (qgetenv("QT_USE_SYSLOG").toInt() > 0) {
++ static bool logOpened = false;
++ if (!logOpened) {
++ QByteArray appname;
++#ifndef QT_NO_QOBJECT
++ appname = QCoreApplication::applicationName().toLatin1(); // don't use the local codec here
++ if (appname.isEmpty())
++ appname = QCoreApplicationPrivate::staticAppName().toLatin1();
++#endif
++ if (appname.isEmpty())
++ appname = "unknown-qt-application";
++ openlog(appname, LOG_NOWAIT | LOG_PID, LOG_USER);
++ logOpened = true;
++ }
++
++ int level = msgType == QtFatalMsg ? LOG_ERR :
++ msgType == QtWarningMsg ? LOG_WARNING :
++ LOG_DEBUG;
++ syslog(level, "%s", buf);
++ }
+ #endif
+ }
+
+--- a/src/corelib/kernel/qcoreapplication_p.h
++++ b/src/corelib/kernel/qcoreapplication_p.h
+@@ -82,6 +82,8 @@ public:
+ bool sendThroughObjectEventFilters(QObject *, QEvent *);
+ bool notify_helper(QObject *, QEvent *);
+
++ static QString staticAppName()
++ { return QCoreApplication::self ? QCoreApplication::self->d_func()->appName() : QString(); }
+ virtual QString appName() const;
+ virtual void createEventDispatcher();
+ static void removePostedEvent(QEvent *);
diff --git a/debian/patches/series b/debian/patches/series
index 9090b32..1b6310d 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,6 +5,7 @@
0225-invalidate-tabbar-geometry-on-refresh.patch
# debian patches
+qtdebug_syslog.patch
buildable_appchooser_states_demos.patch
01_debian_append_qt4_suffix.diff
02_syncqt_sane_timestamp_for_nonexisting_headers.diff
--
Qt 4 packaging
More information about the pkg-kde-commits
mailing list