Changeset 846 for trunk/src/dbus/qdbusmessage.cpp
- Timestamp:
- May 5, 2011, 5:36:53 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.7.2 (added) merged: 845 /branches/vendor/nokia/qt/current merged: 844 /branches/vendor/nokia/qt/4.6.3 removed
- Property svn:mergeinfo changed
-
trunk/src/dbus/qdbusmessage.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 54 54 #include "qdbusutil_p.h" 55 55 56 #ifndef QT_NO_DBUS 57 56 58 QT_BEGIN_NAMESPACE 57 59 … … 64 66 : msg(0), reply(0), type(DBUS_MESSAGE_TYPE_INVALID), 65 67 timeout(-1), localReply(0), ref(1), delayedReply(false), localMessage(false), 66 parametersValidated(false) 68 parametersValidated(false), autoStartService(true) 67 69 { 68 70 } … … 130 132 msg = q_dbus_message_new_method_call(data(d_ptr->service.toUtf8()), d_ptr->path.toUtf8(), 131 133 data(d_ptr->interface.toUtf8()), d_ptr->name.toUtf8()); 134 q_dbus_message_set_auto_start( msg, d_ptr->autoStartService ); 132 135 break; 133 136 case DBUS_MESSAGE_TYPE_METHOD_RETURN: … … 290 293 291 294 // no complex types seen 292 // optimi se by using the variant list itself295 // optimize by using the variant list itself 293 296 QDBusMessage retval; 294 297 QDBusMessagePrivate *d = retval.d_ptr; … … 450 453 } 451 454 452 // the reply must have a msg or be a local-loop optimi sation455 // the reply must have a msg or be a local-loop optimization 453 456 Q_ASSERT(reply.d_ptr->reply || reply.d_ptr->localMessage); 454 457 return reply; … … 469 472 } 470 473 471 // the reply must have a msg or be a local-loop optimi sation474 // the reply must have a msg or be a local-loop optimization 472 475 Q_ASSERT(reply.d_ptr->reply || reply.d_ptr->localMessage); 473 476 return reply; … … 642 645 { 643 646 return d_ptr->delayedReply; 647 } 648 649 /*! 650 Sets the auto start flag to \a enable. This flag only makes sense 651 for method call messages, where it tells the D-Bus server to 652 either auto start the service responsible for the service name, or 653 not to auto start it. 654 655 By default this flag is true, i.e. a service is autostarted. 656 This means: 657 658 When the service that this method call is sent to is already 659 running, the method call is sent to it. If the service is not 660 running yet, the D-Bus daemon is requested to autostart the 661 service that is assigned to this service name. This is 662 handled by .service files that are placed in a directory known 663 to the D-Bus server. These files then each contain a service 664 name and the path to a program that should be executed when 665 this service name is requested. 666 667 \since 4.7 668 */ 669 void QDBusMessage::setAutoStartService(bool enable) 670 { 671 d_ptr->autoStartService = enable; 672 } 673 674 /*! 675 Returns the auto start flag, as set by setAutoStartService(). By default, this 676 flag is true, which means QtDBus will auto start a service, if it is 677 not running already. 678 679 \sa setAutoStartService() 680 681 \since 4.7 682 */ 683 bool QDBusMessage::autoStartService() const 684 { 685 return d_ptr->autoStartService; 644 686 } 645 687 … … 760 802 QT_END_NAMESPACE 761 803 804 #endif // QT_NO_DBUS
Note:
See TracChangeset
for help on using the changeset viewer.