diff options
Diffstat (limited to 'src/qdbus')
-rw-r--r-- | src/qdbus/qdbus.pro | 2 | ||||
-rw-r--r-- | src/qdbus/qdbus/qdbus.cpp | 2 | ||||
-rw-r--r-- | src/qdbus/qdbusviewer/main.cpp | 2 | ||||
-rw-r--r-- | src/qdbus/qdbusviewer/propertydialog.cpp | 2 | ||||
-rw-r--r-- | src/qdbus/qdbusviewer/propertydialog.h | 2 | ||||
-rw-r--r-- | src/qdbus/qdbusviewer/qdbusmodel.cpp | 2 | ||||
-rw-r--r-- | src/qdbus/qdbusviewer/qdbusmodel.h | 2 | ||||
-rw-r--r-- | src/qdbus/qdbusviewer/qdbusviewer.cpp | 16 | ||||
-rw-r--r-- | src/qdbus/qdbusviewer/qdbusviewer.h | 2 |
9 files changed, 20 insertions, 12 deletions
diff --git a/src/qdbus/qdbus.pro b/src/qdbus/qdbus.pro index aeb1c96be..df1f34f28 100644 --- a/src/qdbus/qdbus.pro +++ b/src/qdbus/qdbus.pro @@ -1,3 +1,3 @@ TEMPLATE = subdirs SUBDIRS = qdbus -!isEmpty(QT.widgets.name): SUBDIRS += qdbusviewer +qtHaveModule(widgets): SUBDIRS += qdbusviewer diff --git a/src/qdbus/qdbus/qdbus.cpp b/src/qdbus/qdbus/qdbus.cpp index 0ce6563cb..b92cb92b8 100644 --- a/src/qdbus/qdbus/qdbus.cpp +++ b/src/qdbus/qdbus/qdbus.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the tools applications of the Qt Toolkit. diff --git a/src/qdbus/qdbusviewer/main.cpp b/src/qdbus/qdbusviewer/main.cpp index c5cfaed21..5499192c8 100644 --- a/src/qdbus/qdbusviewer/main.cpp +++ b/src/qdbus/qdbusviewer/main.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the tools applications of the Qt Toolkit. diff --git a/src/qdbus/qdbusviewer/propertydialog.cpp b/src/qdbus/qdbusviewer/propertydialog.cpp index 5fd059d21..d4bbecdef 100644 --- a/src/qdbus/qdbusviewer/propertydialog.cpp +++ b/src/qdbus/qdbusviewer/propertydialog.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the tools applications of the Qt Toolkit. diff --git a/src/qdbus/qdbusviewer/propertydialog.h b/src/qdbus/qdbusviewer/propertydialog.h index 2e90350d7..8f4107c9b 100644 --- a/src/qdbus/qdbusviewer/propertydialog.h +++ b/src/qdbus/qdbusviewer/propertydialog.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the tools applications of the Qt Toolkit. diff --git a/src/qdbus/qdbusviewer/qdbusmodel.cpp b/src/qdbus/qdbusviewer/qdbusmodel.cpp index e2405a11d..8fe0fed3e 100644 --- a/src/qdbus/qdbusviewer/qdbusmodel.cpp +++ b/src/qdbus/qdbusviewer/qdbusmodel.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the tools applications of the Qt Toolkit. diff --git a/src/qdbus/qdbusviewer/qdbusmodel.h b/src/qdbus/qdbusviewer/qdbusmodel.h index d9db69981..a00dffaa3 100644 --- a/src/qdbus/qdbusviewer/qdbusmodel.h +++ b/src/qdbus/qdbusviewer/qdbusmodel.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the tools applications of the Qt Toolkit. diff --git a/src/qdbus/qdbusviewer/qdbusviewer.cpp b/src/qdbus/qdbusviewer/qdbusviewer.cpp index 1d6429a59..8a38d25e0 100644 --- a/src/qdbus/qdbusviewer/qdbusviewer.cpp +++ b/src/qdbus/qdbusviewer/qdbusviewer.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the tools applications of the Qt Toolkit. @@ -294,9 +294,17 @@ void QDBusViewer::callMethod(const BusSignature &sig) args = dialog.values(); } - // Special case - convert a value to a QDBusVariant if the - // interface wants a variant + // Try to convert the values we got as closely as possible to the + // dbus signature. This is especially important for those input as strings for (int i = 0; i < args.count(); ++i) { + QVariant a = args.at(i); + int desttype = types.at(i); + if (desttype < int(QMetaType::User) && desttype != int(QVariant::Map) + && a.canConvert(desttype)) { + args[i].convert(desttype); + } + // Special case - convert a value to a QDBusVariant if the + // interface wants a variant if (types.at(i) == qMetaTypeId<QDBusVariant>()) args[i] = QVariant::fromValue(QDBusVariant(args.at(i))); } @@ -492,7 +500,7 @@ void QDBusViewer::about() box.setText(QString::fromLatin1("<center><img src=\":/qt-project.org/qdbusviewer/images/qdbusviewer-128.png\">" "<h3>%1</h3>" "<p>Version %2</p></center>" - "<p>Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).</p>") + "<p>Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).</p>") .arg(tr("D-Bus Viewer")).arg(QLatin1String(QT_VERSION_STR))); box.setWindowTitle(tr("D-Bus Viewer")); box.exec(); diff --git a/src/qdbus/qdbusviewer/qdbusviewer.h b/src/qdbus/qdbusviewer/qdbusviewer.h index cbfcb6885..f77f84cfe 100644 --- a/src/qdbus/qdbusviewer/qdbusviewer.h +++ b/src/qdbus/qdbusviewer/qdbusviewer.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the tools applications of the Qt Toolkit. |