Class: RubyQt6::QtDBus::QDBusReply

Inherits:
Object
  • Object
show all
Defined in:
lib/qt6/qtdbus/qdbusreply.rb

Overview

Instance Method Summary collapse

Constructor Details

#initialize(message) ⇒ QDBusReply

Parameters:



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/qt6/qtdbus/qdbusreply.rb', line 15

def initialize(message)
  @error = QtDBus::QDBusError.new(message)
  if @error.valid?
    @data = QtCore::QVariant.new("")
    return
  end

  if message.arguments.size < 1
    @error = QtDBus::QDBusError.new(QtDBus::QDBusError::ErrorType::InvalidSignature, "Unexpected reply signature")
    @data = QtCore::QVariant.new("")
    return
  end

  @data = message.arguments[0]
end