diff options
author | Thiago Macieira <thiago@kde.org> | 2006-02-15 16:25:12 +0000 |
---|---|---|
committer | Thiago Macieira <thiago@kde.org> | 2006-02-15 16:25:12 +0000 |
commit | c2432800b1d387c5512e605ba92060d4827b7606 (patch) | |
tree | 859ad5945d12efbfecdbd0fb1244642de6ae51c6 /qt/qdbuserror.cpp | |
parent | 120d4ae484acde0d8684a2ba72874bd1c3017b97 (diff) |
Merge the changes to the bindings from the KDE Subversion server.
This is a major change: library is source- and binary-incompatible to
what it used to be.
All testcases are green, functionality is preserved.
It is not feature-complete. Development will continue in the branch in the
Subversion server for a while.
Diffstat (limited to 'qt/qdbuserror.cpp')
-rw-r--r-- | qt/qdbuserror.cpp | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/qt/qdbuserror.cpp b/qt/qdbuserror.cpp index 0f7dc92c..64b68b37 100644 --- a/qt/qdbuserror.cpp +++ b/qt/qdbuserror.cpp @@ -1,6 +1,8 @@ /* qdbuserror.h QDBusError object * * Copyright (C) 2005 Harald Fernengel <harry@kdevelop.org> + * Copyright (C) 2006 Trolltech AS. All rights reserved. + * Author: Thiago Macieira <thiago.macieira@trolltech.com> * * Licensed under the Academic Free License version 2.1 * @@ -15,16 +17,17 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * along with this program; if not, write to the Free Software Foundation + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include "qdbuserror.h" -#include <QtCore/qdebug.h> +#include <qdebug.h> #include <dbus/dbus.h> +#include "qdbusmessage.h" QDBusError::QDBusError(const DBusError *error) { @@ -35,6 +38,16 @@ QDBusError::QDBusError(const DBusError *error) msg = QString::fromUtf8(error->message); } +QDBusError::QDBusError(const QDBusMessage &qdmsg) +{ + if (qdmsg.type() != QDBusMessage::ErrorMessage) + return; + + nm = qdmsg.name(); + if (qdmsg.count()) + msg = qdmsg[0].toString(); +} + #ifndef QT_NO_DEBUG QDebug operator<<(QDebug dbg, const QDBusError &msg) { |